PERFORCE change 61299 for review
Julian Elischer
julian at FreeBSD.org
Fri Sep 10 13:19:30 PDT 2004
http://perforce.freebsd.org/chv.cgi?CH=61299
Change 61299 by julian at julian_ref on 2004/09/10 20:19:05
IFC at 61298
Affected files ...
.. //depot/projects/nsched/sys/alpha/alpha/busdma_machdep.c#3 integrate
.. //depot/projects/nsched/sys/alpha/alpha/clock.c#3 integrate
.. //depot/projects/nsched/sys/alpha/conf/GENERIC#8 integrate
.. //depot/projects/nsched/sys/alpha/include/atomic.h#2 integrate
.. //depot/projects/nsched/sys/amd64/amd64/busdma_machdep.c#4 integrate
.. //depot/projects/nsched/sys/amd64/amd64/pmap.c#19 integrate
.. //depot/projects/nsched/sys/amd64/conf/GENERIC#9 integrate
.. //depot/projects/nsched/sys/arm/arm/busdma_machdep.c#3 integrate
.. //depot/projects/nsched/sys/boot/sparc64/loader/main.c#3 integrate
.. //depot/projects/nsched/sys/conf/NOTES#18 integrate
.. //depot/projects/nsched/sys/dev/acpica/acpi_powerres.c#7 integrate
.. //depot/projects/nsched/sys/dev/acpica/acpi_thermal.c#7 integrate
.. //depot/projects/nsched/sys/dev/ata/ata-all.c#11 integrate
.. //depot/projects/nsched/sys/dev/ata/ata-chipset.c#14 integrate
.. //depot/projects/nsched/sys/dev/ata/ata-dma.c#4 integrate
.. //depot/projects/nsched/sys/dev/isp/isp_pci.c#3 integrate
.. //depot/projects/nsched/sys/dev/md/md.c#10 integrate
.. //depot/projects/nsched/sys/dev/pccard/pccarddevs#5 integrate
.. //depot/projects/nsched/sys/dev/sound/pcm/sndstat.c#3 integrate
.. //depot/projects/nsched/sys/dev/sym/sym_hipd.c#2 integrate
.. //depot/projects/nsched/sys/dev/usb/ugen.c#6 integrate
.. //depot/projects/nsched/sys/dev/usb/uhub.c#5 integrate
.. //depot/projects/nsched/sys/dev/usb/usb_subr.c#6 integrate
.. //depot/projects/nsched/sys/fs/autofs/autofs.h#3 integrate
.. //depot/projects/nsched/sys/fs/autofs/autofs_util.c#4 integrate
.. //depot/projects/nsched/sys/fs/autofs/autofs_vfsops.c#4 integrate
.. //depot/projects/nsched/sys/fs/autofs/autofs_vnops.c#6 integrate
.. //depot/projects/nsched/sys/fs/msdosfs/denode.h#2 integrate
.. //depot/projects/nsched/sys/fs/msdosfs/msdosfs_denode.c#3 integrate
.. //depot/projects/nsched/sys/fs/msdosfs/msdosfs_fat.c#2 integrate
.. //depot/projects/nsched/sys/fs/msdosfs/msdosfs_lookup.c#2 integrate
.. //depot/projects/nsched/sys/fs/nwfs/nwfs.h#2 integrate
.. //depot/projects/nsched/sys/fs/nwfs/nwfs_io.c#3 integrate
.. //depot/projects/nsched/sys/fs/nwfs/nwfs_vnops.c#2 integrate
.. //depot/projects/nsched/sys/fs/smbfs/smbfs.h#2 integrate
.. //depot/projects/nsched/sys/fs/smbfs/smbfs_io.c#3 integrate
.. //depot/projects/nsched/sys/fs/smbfs/smbfs_vnops.c#3 integrate
.. //depot/projects/nsched/sys/geom/mirror/g_mirror.c#6 integrate
.. //depot/projects/nsched/sys/geom/uzip/g_uzip.c#2 integrate
.. //depot/projects/nsched/sys/gnu/ext2fs/ext2_vnops.c#4 integrate
.. //depot/projects/nsched/sys/i386/conf/GENERIC#7 integrate
.. //depot/projects/nsched/sys/i386/i386/busdma_machdep.c#4 integrate
.. //depot/projects/nsched/sys/i386/i386/db_trace.c#4 integrate
.. //depot/projects/nsched/sys/i386/i386/pmap.c#18 integrate
.. //depot/projects/nsched/sys/ia64/ia64/busdma_machdep.c#2 integrate
.. //depot/projects/nsched/sys/kern/kern_event.c#8 integrate
.. //depot/projects/nsched/sys/kern/kern_thr.c#17 integrate
.. //depot/projects/nsched/sys/kern/subr_witness.c#7 integrate
.. //depot/projects/nsched/sys/kern/vfs_subr.c#11 integrate
.. //depot/projects/nsched/sys/modules/autofs/Makefile#2 integrate
.. //depot/projects/nsched/sys/modules/geom/geom_uzip/Makefile#2 integrate
.. //depot/projects/nsched/sys/net/bpf.c#8 integrate
.. //depot/projects/nsched/sys/net/bpfdesc.h#3 integrate
.. //depot/projects/nsched/sys/net/if.c#12 integrate
.. //depot/projects/nsched/sys/net/if.h#8 integrate
.. //depot/projects/nsched/sys/netinet/if_ether.c#5 integrate
.. //depot/projects/nsched/sys/nfs4client/nfs4_vnops.c#4 integrate
.. //depot/projects/nsched/sys/nfsclient/nfs.h#5 integrate
.. //depot/projects/nsched/sys/nfsclient/nfs_bio.c#6 integrate
.. //depot/projects/nsched/sys/nfsclient/nfs_nfsiod.c#4 integrate
.. //depot/projects/nsched/sys/nfsclient/nfs_vnops.c#6 integrate
.. //depot/projects/nsched/sys/pc98/conf/GENERIC#8 integrate
.. //depot/projects/nsched/sys/pci/if_xl.c#9 integrate
.. //depot/projects/nsched/sys/pci/ncr.c#4 integrate
.. //depot/projects/nsched/sys/powerpc/powerpc/busdma_machdep.c#2 integrate
.. //depot/projects/nsched/sys/security/mac_bsdextended/mac_bsdextended.c#3 integrate
.. //depot/projects/nsched/sys/sparc64/conf/GENERIC#7 integrate
.. //depot/projects/nsched/sys/sparc64/sparc64/bus_machdep.c#4 integrate
.. //depot/projects/nsched/sys/sys/param.h#13 integrate
.. //depot/projects/nsched/sys/sys/vnode.h#9 integrate
.. //depot/projects/nsched/sys/ufs/ufs/ufs_vnops.c#4 integrate
.. //depot/projects/nsched/sys/vm/vnode_pager.c#5 integrate
Differences ...
==== //depot/projects/nsched/sys/alpha/alpha/busdma_machdep.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/alpha/busdma_machdep.c,v 1.45 2004/07/02 03:47:28 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/alpha/busdma_machdep.c,v 1.46 2004/09/08 04:54:18 scottl Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -229,11 +229,11 @@
if (parent != NULL) {
newtag->lowaddr = MIN(parent->lowaddr, newtag->lowaddr);
newtag->highaddr = MAX(parent->highaddr, newtag->highaddr);
- /*
- * XXX Not really correct??? Probably need to honor boundary
- * all the way up the inheritence chain.
- */
- newtag->boundary = MAX(parent->boundary, newtag->boundary);
+ if (newtag->boundary == 0)
+ newtag->boundary = parent->boundary;
+ else if (parent->boundary != 0)
+ newtag->boundary = MIN(parent->boundary,
+ newtag->boundary);
if (newtag->filter == NULL) {
/*
* Short circuit looking at our parent directly
==== //depot/projects/nsched/sys/alpha/alpha/clock.c#3 (text+ko) ====
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/alpha/clock.c,v 1.36 2004/04/05 21:00:49 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/alpha/clock.c,v 1.37 2004/09/07 07:06:36 phk Exp $");
#include "opt_clock.h"
@@ -120,7 +120,8 @@
0, /* no poll_pps */
~0u, /* counter_mask */
0, /* frequency */
- "alpha" /* name */
+ "alpha", /* name */
+ 800, /* quality */
};
static struct timecounter i8254_timecounter = {
==== //depot/projects/nsched/sys/alpha/conf/GENERIC#8 (text+ko) ====
@@ -18,7 +18,7 @@
#
# For hardware specific information check HARDWARE.TXT
#
-# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.177 2004/08/30 18:40:00 wilko Exp $
+# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.178 2004/09/07 22:37:43 scottl Exp $
machine alpha
cpu EV4
@@ -46,7 +46,9 @@
options DEC_KN300 # AlphaServer 4100 (Rawhide),
# AlphaServer 1200 (Tincup)
-options SCHED_ULE #ULE scheduler
+#options SCHED_ULE #ULE scheduler
+options SCHED_4BSD #4BSD scheduler
+options PREEMPTION #Enable kernel thread preemption
options INET #InterNETworking
options INET6 #IPv6 communications protocols
options FFS #Berkeley Fast Filesystem
==== //depot/projects/nsched/sys/alpha/include/atomic.h#2 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/alpha/include/atomic.h,v 1.18 2003/02/23 06:34:21 marcel Exp $
+ * $FreeBSD: src/sys/alpha/include/atomic.h,v 1.19 2004/09/10 05:00:27 marcel Exp $
*/
#ifndef _MACHINE_ATOMIC_H_
@@ -32,18 +32,6 @@
#include <machine/alpha_cpu.h>
/*
- * Quick and dirty workaround for compiling LINT. The kernel is too
- * large to jump between sections without linker stubs/trampolines.
- */
-#ifdef COMPILING_LINT
-#define __COLD_SECTION "br 3f\n"
-#define __HOT_SECTION "3:\n"
-#else
-#define __COLD_SECTION ".section .text3,\"ax\"\n"
-#define __HOT_SECTION ".previous\n"
-#endif
-
-/*
* Various simple arithmetic on memory which is atomic in the presence
* of interrupts and SMP safe.
*/
@@ -67,10 +55,7 @@
"1:\tldl_l %0, %2\n\t" /* load old value */
"bis %0, %3, %0\n\t" /* calculate new value */
"stl_c %0, %1\n\t" /* attempt to store */
- "beq %0, 2f\n\t" /* spin if failed */
- __COLD_SECTION /* improve branch prediction */
- "2:\tbr 1b\n" /* try again */
- __HOT_SECTION
+ "beq %0, 1b\n" /* spin if failed */
: "=&r" (temp), "=m" (*p)
: "m" (*p), "r" (v)
: "memory");
@@ -86,10 +71,7 @@
"1:\tldl_l %0, %1\n\t" /* load old value */
"bic %0, %2, %0\n\t" /* calculate new value */
"stl_c %0, %1\n\t" /* attempt to store */
- "beq %0, 2f\n\t" /* spin if failed */
- __COLD_SECTION /* improve branch prediction */
- "2:\tbr 1b\n" /* try again */
- __HOT_SECTION
+ "beq %0, 1b\n" /* spin if failed */
: "=&r" (temp), "+m" (*p)
: "r" (v)
: "memory");
@@ -105,10 +87,7 @@
"1:\tldl_l %0, %1\n\t" /* load old value */
"addl %0, %2, %0\n\t" /* calculate new value */
"stl_c %0, %1\n\t" /* attempt to store */
- "beq %0, 2f\n\t" /* spin if failed */
- __COLD_SECTION /* improve branch prediction */
- "2:\tbr 1b\n" /* try again */
- __HOT_SECTION
+ "beq %0, 1b\n" /* spin if failed */
: "=&r" (temp), "+m" (*p)
: "r" (v)
: "memory");
@@ -124,10 +103,7 @@
"1:\tldl_l %0, %1\n\t" /* load old value */
"subl %0, %2, %0\n\t" /* calculate new value */
"stl_c %0, %1\n\t" /* attempt to store */
- "beq %0, 2f\n\t" /* spin if failed */
- __COLD_SECTION /* improve branch prediction */
- "2:\tbr 1b\n" /* try again */
- __HOT_SECTION
+ "beq %0, 1b\n" /* spin if failed */
: "=&r" (temp), "+m" (*p)
: "r" (v)
: "memory");
@@ -144,10 +120,7 @@
"1:\tldl_l %0,%2\n\t" /* load current value, asserting lock */
"ldiq %1,0\n\t" /* value to store */
"stl_c %1,%2\n\t" /* attempt to store */
- "beq %1,2f\n\t" /* if the store failed, spin */
- "br 3f\n" /* it worked, exit */
- "2:\tbr 1b\n" /* *addr not updated, loop */
- "3:\n" /* it worked */
+ "beq %1,1b\n" /* if the store failed, spin */
: "=&r"(result), "=&r"(temp), "+m" (*addr)
:
: "memory");
@@ -165,10 +138,7 @@
"1:\tldq_l %0, %1\n\t" /* load old value */
"bis %0, %2, %0\n\t" /* calculate new value */
"stq_c %0, %1\n\t" /* attempt to store */
- "beq %0, 2f\n\t" /* spin if failed */
- __COLD_SECTION /* improve branch prediction */
- "2:\tbr 1b\n" /* try again */
- __HOT_SECTION
+ "beq %0, 1b\n" /* spin if failed */
: "=&r" (temp), "+m" (*p)
: "r" (v)
: "memory");
@@ -184,10 +154,7 @@
"1:\tldq_l %0, %1\n\t" /* load old value */
"bic %0, %2, %0\n\t" /* calculate new value */
"stq_c %0, %1\n\t" /* attempt to store */
- "beq %0, 2f\n\t" /* spin if failed */
- __COLD_SECTION /* improve branch prediction */
- "2:\tbr 1b\n" /* try again */
- __HOT_SECTION
+ "beq %0, 1b\n" /* spin if failed */
: "=&r" (temp), "+m" (*p)
: "r" (v)
: "memory");
@@ -203,10 +170,7 @@
"1:\tldq_l %0, %1\n\t" /* load old value */
"addq %0, %2, %0\n\t" /* calculate new value */
"stq_c %0, %1\n\t" /* attempt to store */
- "beq %0, 2f\n\t" /* spin if failed */
- __COLD_SECTION /* improve branch prediction */
- "2:\tbr 1b\n" /* try again */
- __HOT_SECTION
+ "beq %0, 1b\n" /* spin if failed */
: "=&r" (temp), "+m" (*p)
: "r" (v)
: "memory");
@@ -222,10 +186,7 @@
"1:\tldq_l %0, %1\n\t" /* load old value */
"subq %0, %2, %0\n\t" /* calculate new value */
"stq_c %0, %1\n\t" /* attempt to store */
- "beq %0, 2f\n\t" /* spin if failed */
- __COLD_SECTION /* improve branch prediction */
- "2:\tbr 1b\n" /* try again */
- __HOT_SECTION
+ "beq %0, 1b\n" /* spin if failed */
: "=&r" (temp), "+m" (*p)
: "r" (v)
: "memory");
@@ -242,10 +203,7 @@
"1:\tldq_l %0,%2\n\t" /* load current value, asserting lock */
"ldiq %1,0\n\t" /* value to store */
"stq_c %1,%2\n\t" /* attempt to store */
- "beq %1,2f\n\t" /* if the store failed, spin */
- "br 3f\n" /* it worked, exit */
- "2:\tbr 1b\n" /* *addr not updated, loop */
- "3:\n" /* it worked */
+ "beq %1,1b\n" /* if the store failed, spin */
: "=&r"(result), "=&r"(temp), "+m" (*addr)
:
: "memory");
@@ -385,11 +343,8 @@
"beq %0, 2f\n\t" /* exit if not equal */
"mov %3, %0\n\t" /* value to store */
"stl_c %0, %1\n\t" /* attempt to store */
- "beq %0, 3f\n\t" /* if it failed, spin */
- "2:\n" /* done */
- __COLD_SECTION /* improve branch prediction */
- "3:\tbr 1b\n" /* try again */
- __HOT_SECTION
+ "beq %0, 1b\n\t" /* if it failed, spin */
+ "2:\n"
: "=&r" (ret), "+m" (*p)
: "r" ((long)(int)cmpval), "r" (newval)
: "memory");
@@ -415,11 +370,8 @@
"beq %0, 2f\n\t" /* exit if not equal */
"mov %3, %0\n\t" /* value to store */
"stq_c %0, %1\n\t" /* attempt to store */
- "beq %0, 3f\n\t" /* if it failed, spin */
- "2:\n" /* done */
- __COLD_SECTION /* improve branch prediction */
- "3:\tbr 1b\n" /* try again */
- __HOT_SECTION
+ "beq %0, 1b\n\t" /* if it failed, spin */
+ "2:\n"
: "=&r" (ret), "+m" (*p)
: "r" (cmpval), "r" (newval)
: "memory");
==== //depot/projects/nsched/sys/amd64/amd64/busdma_machdep.c#4 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.57 2004/08/16 22:53:03 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.58 2004/09/08 04:54:18 scottl Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -248,11 +248,11 @@
if (parent != NULL) {
newtag->lowaddr = MIN(parent->lowaddr, newtag->lowaddr);
newtag->highaddr = MAX(parent->highaddr, newtag->highaddr);
- /*
- * XXX Not really correct??? Probably need to honor boundary
- * all the way up the inheritence chain.
- */
- newtag->boundary = MAX(parent->boundary, newtag->boundary);
+ if (newtag->boundary == 0)
+ newtag->boundary = parent->boundary;
+ else if (parent->boundary != 0)
+ newtag->boundary = MIN(parent->boundary,
+ newtag->boundary);
if (newtag->filter == NULL) {
/*
* Short circuit looking at our parent directly
==== //depot/projects/nsched/sys/amd64/amd64/pmap.c#19 (text+ko) ====
@@ -75,7 +75,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.496 2004/08/30 03:52:04 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.497 2004/09/08 18:58:28 alc Exp $");
/*
* Manages physical address maps.
@@ -203,7 +203,7 @@
static PMAP_INLINE void free_pv_entry(pv_entry_t pv);
static pv_entry_t get_pv_entry(void);
-static void pmap_clear_ptes(vm_page_t m, int bit);
+static void pmap_clear_ptes(vm_page_t m, long bit);
static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq,
vm_offset_t sva, pd_entry_t ptepde);
@@ -2591,7 +2591,7 @@
* Clear the given bit in each of the given page's ptes.
*/
static __inline void
-pmap_clear_ptes(vm_page_t m, int bit)
+pmap_clear_ptes(vm_page_t m, long bit)
{
register pv_entry_t pv;
pt_entry_t pbits, *pte;
@@ -2623,15 +2623,18 @@
PMAP_LOCK(pv->pv_pmap);
pte = pmap_pte(pv->pv_pmap, pv->pv_va);
+retry:
pbits = *pte;
if (pbits & bit) {
if (bit == PG_RW) {
+ if (!atomic_cmpset_long(pte, pbits,
+ pbits & ~(PG_RW | PG_M)))
+ goto retry;
if (pbits & PG_M) {
vm_page_dirty(m);
}
- pte_store(pte, pbits & ~(PG_M|PG_RW));
} else {
- pte_store(pte, pbits & ~bit);
+ atomic_clear_long(pte, bit);
}
pmap_invalidate_page(pv->pv_pmap, pv->pv_va);
}
==== //depot/projects/nsched/sys/amd64/conf/GENERIC#9 (text+ko) ====
@@ -16,7 +16,7 @@
# If you are in doubt as to the purpose or necessity of a line, check first
# in NOTES.
#
-# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.422 2004/08/27 15:16:21 andre Exp $
+# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.423 2004/09/07 22:37:43 scottl Exp $
machine amd64
cpu HAMMER
@@ -27,7 +27,9 @@
makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols
-options SCHED_ULE # ULE scheduler
+#options SCHED_ULE # ULE scheduler
+options SCHED_4BSD # 4BSD scheduler
+options PREEMPTION # Enable kernel thread preemption
options INET # InterNETworking
options INET6 # IPv6 communications protocols
options FFS # Berkeley Fast Filesystem
==== //depot/projects/nsched/sys/arm/arm/busdma_machdep.c#3 (text+ko) ====
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.2 2004/07/21 22:04:05 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.3 2004/09/08 04:54:18 scottl Exp $");
/*
* MacPPC bus dma support routines
@@ -207,12 +207,11 @@
if (parent != NULL) {
newtag->lowaddr = min(parent->lowaddr, newtag->lowaddr);
newtag->highaddr = max(parent->highaddr, newtag->highaddr);
-
- /*
- * XXX Not really correct??? Probably need to honor boundary
- * all the way up the inheritence chain.
- */
- newtag->boundary = max(parent->boundary, newtag->boundary);
+ if (newtag->boundary == 0)
+ newtag->boundary = parent->boundary;
+ else if (parent->boundary != 0)
+ newtag->boundary = min(parent->boundary,
+ newtag->boundary);
if (newtag->filter == NULL) {
/*
* Short circuit looking at our parent directly
==== //depot/projects/nsched/sys/boot/sparc64/loader/main.c#3 (text+ko) ====
@@ -8,7 +8,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/sparc64/loader/main.c,v 1.24 2004/08/19 20:13:31 kensmith Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/sparc64/loader/main.c,v 1.25 2004/09/08 12:52:45 kensmith Exp $");
/*
* FreeBSD/sparc64 kernel loader - machine dependent part
@@ -197,9 +197,7 @@
static int
sparc64_autoload(void)
{
- /* XXX - Temporary hack needed for new ATA to work. */
- printf("Turning off DMA for ATA.\n");
- setenv("hw.ata.ata_dma", "0", 1);
+ printf("nothing to autoload yet.\n");
return 0;
}
==== //depot/projects/nsched/sys/conf/NOTES#18 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1275 2004/09/03 06:32:11 ru Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1276 2004/09/08 08:42:36 ru Exp $
#
# NOTES -- Lines that can be cut/pasted into kernel and hints configs.
#
@@ -1904,20 +1904,20 @@
device snd_uaudio
# For non-pnp sound cards:
-hint.snd_mss.0.at="isa"
-hint.snd_mss.0.irq="10"
-hint.snd_mss.0.drq="1"
-hint.snd_mss.0.flags="0x0"
-hint.snd_sbc.0.at="isa"
-hint.snd_sbc.0.port="0x220"
-hint.snd_sbc.0.irq="5"
-hint.snd_sbc.0.drq="1"
-hint.snd_sbc.0.flags="0x15"
-hint.snd_gusc.0.at="isa"
-hint.snd_gusc.0.port="0x220"
-hint.snd_gusc.0.irq="5"
-hint.snd_gusc.0.drq="1"
-hint.snd_gusc.0.flags="0x13"
+hint.pcm.0.at="isa"
+hint.pcm.0.irq="10"
+hint.pcm.0.drq="1"
+hint.pcm.0.flags="0x0"
+hint.sbc.0.at="isa"
+hint.sbc.0.port="0x220"
+hint.sbc.0.irq="5"
+hint.sbc.0.drq="1"
+hint.sbc.0.flags="0x15"
+hint.gusc.0.at="isa"
+hint.gusc.0.port="0x220"
+hint.gusc.0.irq="5"
+hint.gusc.0.drq="1"
+hint.gusc.0.flags="0x13"
#
# Miscellaneous hardware:
==== //depot/projects/nsched/sys/dev/acpica/acpi_powerres.c#7 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_powerres.c,v 1.26 2004/08/13 06:22:10 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_powerres.c,v 1.27 2004/09/07 16:58:12 njl Exp $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -62,6 +62,7 @@
/* Return values from _STA on a power resource */
#define ACPI_PWR_OFF 0
#define ACPI_PWR_ON 1
+#define ACPI_PWR_UNK (-1)
/* A relationship between a power resource and a consumer. */
struct acpi_powerreference {
@@ -87,6 +88,7 @@
ACPI_HANDLE ap_resource;
ACPI_INTEGER ap_systemlevel;
ACPI_INTEGER ap_order;
+ int ap_state;
};
static TAILQ_HEAD(acpi_powerresource_list, acpi_powerresource)
@@ -169,6 +171,7 @@
}
rp->ap_systemlevel = obj->PowerResource.SystemLevel;
rp->ap_order = obj->PowerResource.ResourceOrder;
+ rp->ap_state = ACPI_PWR_UNK;
/* Sort the resource into the list */
status = AE_OK;
@@ -640,17 +643,17 @@
if (ACPI_FAILURE(status)) {
ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "can't get status of %s - %d\n",
acpi_name(rp->ap_resource), status));
-
/* XXX is this correct? Always switch if in doubt? */
continue;
- }
+ } else if (rp->ap_state == ACPI_PWR_UNK)
+ rp->ap_state = cur;
/*
* Switch if required. Note that we ignore the result of the switch
* effort; we don't know what to do if it fails, so checking wouldn't
* help much.
*/
- if (cur != ACPI_PWR_ON) {
+ if (rp->ap_state != ACPI_PWR_ON) {
status = AcpiEvaluateObject(rp->ap_resource, "_ON", NULL, NULL);
if (ACPI_FAILURE(status)) {
ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS,
@@ -658,6 +661,7 @@
acpi_name(rp->ap_resource),
AcpiFormatException(status)));
} else {
+ rp->ap_state = ACPI_PWR_ON;
ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "switched %s on\n",
acpi_name(rp->ap_resource)));
}
@@ -685,14 +689,15 @@
acpi_name(rp->ap_resource), status));
/* XXX is this correct? Always switch if in doubt? */
continue;
- }
+ } else if (rp->ap_state == ACPI_PWR_UNK)
+ rp->ap_state = cur;
/*
* Switch if required. Note that we ignore the result of the switch
* effort; we don't know what to do if it fails, so checking wouldn't
* help much.
*/
- if (cur != ACPI_PWR_OFF) {
+ if (rp->ap_state != ACPI_PWR_OFF) {
status = AcpiEvaluateObject(rp->ap_resource, "_OFF", NULL, NULL);
if (ACPI_FAILURE(status)) {
ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS,
@@ -700,6 +705,7 @@
acpi_name(rp->ap_resource),
AcpiFormatException(status)));
} else {
+ rp->ap_state = ACPI_PWR_OFF;
ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "switched %s off\n",
acpi_name(rp->ap_resource)));
}
==== //depot/projects/nsched/sys/dev/acpica/acpi_thermal.c#7 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_thermal.c,v 1.49 2004/08/30 22:42:10 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_thermal.c,v 1.51 2004/09/08 19:36:07 njl Exp $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -112,7 +112,9 @@
static int acpi_tz_attach(device_t dev);
static int acpi_tz_establish(struct acpi_tz_softc *sc);
static void acpi_tz_monitor(void *Context);
+#if 0
static void acpi_tz_all_off(struct acpi_tz_softc *sc);
+#endif
static void acpi_tz_switch_cooler_off(ACPI_OBJECT *obj, void *arg);
static void acpi_tz_switch_cooler_on(ACPI_OBJECT *obj, void *arg);
static void acpi_tz_getparam(struct acpi_tz_softc *sc, char *node,
@@ -225,7 +227,8 @@
OID_AUTO, oidname, CTLFLAG_RD, 0, "");
SYSCTL_ADD_OPAQUE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
OID_AUTO, "temperature", CTLFLAG_RD, &sc->tz_temperature,
- sizeof(sc->tz_temperature), "IK", "current thermal zone temperature");
+ sizeof(sc->tz_temperature), "IK",
+ "current thermal zone temperature");
SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
OID_AUTO, "active", CTLTYPE_INT | CTLFLAG_RW,
sc, 0, acpi_tz_active_sysctl, "I", "");
@@ -233,9 +236,9 @@
SYSCTL_ADD_INT(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
OID_AUTO, "thermal_flags", CTLFLAG_RD,
&sc->tz_thflags, 0, "thermal zone flags");
- SYSCTL_ADD_INT(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
- OID_AUTO, "_PSV", CTLFLAG_RD,
- &sc->tz_zone.psv, 0, "");
+ SYSCTL_ADD_OPAQUE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
+ OID_AUTO, "_PSV", CTLFLAG_RD, &sc->tz_zone.psv,
+ sizeof(sc->tz_zone.psv), "IK", "");
SYSCTL_ADD_OPAQUE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree),
OID_AUTO, "_HOT", CTLFLAG_RD, &sc->tz_zone.hot,
sizeof(sc->tz_zone.hot), "IK", "");
@@ -293,8 +296,7 @@
ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
- /* Power everything off and erase any existing state. */
- acpi_tz_all_off(sc);
+ /* Erase any existing state. */
for (i = 0; i < TZ_NUMLEVELS; i++)
if (sc->tz_zone.al[i].Pointer != NULL)
AcpiOsFree(sc->tz_zone.al[i].Pointer);
@@ -343,11 +345,6 @@
for (i = 0; i < TZ_NUMLEVELS; i++)
acpi_tz_sanity(sc, &sc->tz_zone.ac[i], "_ACx");
- /*
- * Power off everything that we've just been given.
- */
- acpi_tz_all_off(sc);
-
return_VALUE (0);
}
@@ -490,6 +487,7 @@
return_VOID;
}
+#if 0
/*
* Turn off all the cooling devices.
*/
@@ -517,6 +515,7 @@
return_VOID;
}
+#endif
/*
* Given an object, verify that it's a reference to a device of some sort,
@@ -634,9 +633,6 @@
return (0);
}
-/*
- * Respond to a Notify event sent to the zone.
- */
static void
acpi_tz_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context)
{
@@ -675,21 +671,32 @@
}
/*
- * Poll the thermal zone.
+ * Notifies can be generated asynchronously but have also been seen to be
+ * triggered by other thermal methods. One system generates a notify of
+ * 0x81 when the fan is turned on or off. Another generates it when _SCP
+ * is called. To handle these situations, we check the zone via
+ * acpi_tz_monitor() before evaluating changes to setpoints or the cooling
+ * policy.
*/
static void
acpi_tz_timeout(struct acpi_tz_softc *sc, int flags)
{
+
+ /* Check the current temperature and take action based on it */
+ acpi_tz_monitor(sc);
+
/* If requested, get the power profile settings. */
if (flags & TZ_FLAG_GETPROFILE)
acpi_tz_power_profile(sc);
- /* If requested, check for new devices/setpoints. */
- if (flags & TZ_FLAG_GETSETTINGS)
+ /*
+ * If requested, check for new devices/setpoints. After finding them,
+ * check if we need to switch fans based on the new values.
+ */
+ if (flags & TZ_FLAG_GETSETTINGS) {
acpi_tz_establish(sc);
-
- /* Check the current temperature and take action based on it */
- acpi_tz_monitor(sc);
+ acpi_tz_monitor(sc);
+ }
/* XXX passive cooling actions? */
}
==== //depot/projects/nsched/sys/dev/ata/ata-all.c#11 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.225 2004/09/03 12:10:44 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.226 2004/09/09 13:25:46 sos Exp $");
#include "opt_ata.h"
#include <sys/param.h>
@@ -77,12 +77,12 @@
/* global vars */
MALLOC_DEFINE(M_ATA, "ATA generic", "ATA driver generic layer");
-struct intr_config_hook *ata_delayed_attach = NULL;
devclass_t ata_devclass;
uma_zone_t ata_zone;
int ata_wc = 1;
/* local vars */
+static struct intr_config_hook *ata_delayed_attach = NULL;
static int ata_dma = 1;
static int atapi_dma = 1;
@@ -704,6 +704,12 @@
struct ata_channel *ch;
int ctlr;
+ if (ata_delayed_attach) {
+ config_intrhook_disestablish(ata_delayed_attach);
+ free(ata_delayed_attach, M_TEMP);
+ ata_delayed_attach = NULL;
+ }
+
/*
* run through all ata devices and look for real ATA & ATAPI devices
* using the hints we found in the early probe, this avoids some of
@@ -724,11 +730,6 @@
#ifdef DEV_ATARAID
ata_raid_attach();
#endif
- if (ata_delayed_attach) {
- config_intrhook_disestablish(ata_delayed_attach);
- free(ata_delayed_attach, M_TEMP);
- ata_delayed_attach = NULL;
- }
}
/*
==== //depot/projects/nsched/sys/dev/ata/ata-chipset.c#14 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.87 2004/09/03 12:10:44 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.88 2004/09/10 10:31:37 sos Exp $");
#include "opt_ata.h"
#include <sys/param.h>
@@ -546,7 +546,7 @@
int error;
atadev->channel->dma->alignment = 16;
- atadev->channel->dma->max_iosize = 63 * 1024;
+ atadev->channel->dma->max_iosize = 126 * DEV_BSIZE;
mode = ata_limit_mode(atadev, mode, ATA_UDMA2);
@@ -1067,7 +1067,7 @@
int error;
atadev->channel->dma->alignment = 16;
- atadev->channel->dma->max_iosize = 63 * 1024;
+ atadev->channel->dma->max_iosize = 126 * DEV_BSIZE;
mode = ata_limit_mode(atadev, mode, ATA_UDMA2);
@@ -2157,8 +2157,10 @@
if (ctlr->chip->max_dma >= ATA_SA150)
ch->flags |= ATA_NO_SLAVE;
- if ((ctlr->chip->cfg2 & SIIBUG) && ch->dma)
- ch->dma->boundary = 8 * 1024;
+ if ((ctlr->chip->cfg2 & SIIBUG) && ch->dma) {
+ ch->dma->boundary = 16 * DEV_BSIZE;
+ ch->dma->max_iosize = 15 * DEV_BSIZE;
+ }
ata_generic_hw(ch);
==== //depot/projects/nsched/sys/dev/ata/ata-dma.c#4 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-dma.c,v 1.130 2004/08/20 19:05:22 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-dma.c,v 1.131 2004/09/10 10:31:37 sos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -75,8 +75,8 @@
ch->dma->load = ata_dmaload;
ch->dma->unload = ata_dmaunload;
ch->dma->alignment = 2;
- ch->dma->max_iosize = 64 * 1024;
- ch->dma->boundary = 64 * 1024;
+ ch->dma->max_iosize = 128 * DEV_BSIZE;
+ ch->dma->boundary = 128 * DEV_BSIZE;
}
}
@@ -96,7 +96,7 @@
if (bus_dma_tag_create(NULL, ch->dma->alignment, 0,
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR,
- NULL, NULL, 16*1024*1024,
+ NULL, NULL, 256 * DEV_BSIZE,
ATA_DMA_ENTRIES, ch->dma->max_iosize,
BUS_DMA_ALLOCNOW, NULL, NULL, &ch->dma->dmatag))
goto error;
@@ -109,7 +109,7 @@
if (bus_dma_tag_create(ch->dma->dmatag,ch->dma->alignment,ch->dma->boundary,
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR,
- NULL, NULL, 16*1024*1024,
+ NULL, NULL, 256 * DEV_BSIZE,
ATA_DMA_ENTRIES, ch->dma->max_iosize,
BUS_DMA_ALLOCNOW, NULL, NULL, &ch->dma->ddmatag))
goto error;
==== //depot/projects/nsched/sys/dev/isp/isp_pci.c#3 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.98 2004/05/24 07:02:25 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.99 2004/09/07 08:04:09 mjacob Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -45,6 +45,12 @@
#include <sys/rman.h>
#include <sys/malloc.h>
+#ifdef ISP_TARGET_MODE
+#ifdef PAE
+#error "PAE and ISP_TARGET_MODE not supported yet"
+#endif
+#endif
+
#include <dev/isp/isp_freebsd.h>
static u_int16_t isp_pci_rd_reg(struct ispsoftc *, int);
@@ -1621,6 +1627,131 @@
static void dma2(void *, bus_dma_segment_t *, int, int);
+#ifdef PAE
+static void
+dma2(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
+{
+ mush_t *mp;
+ struct ispsoftc *isp;
+ struct ccb_scsiio *csio;
+ struct isp_pcisoftc *pcs;
+ bus_dmamap_t *dp;
+ bus_dma_segment_t *eseg;
+ ispreq64_t *rq;
+ int seglim, datalen;
+ u_int16_t nxti;
+
+ mp = (mush_t *) arg;
+ if (error) {
+ mp->error = error;
+ return;
+ }
+
+ if (nseg < 1) {
+ isp_prt(mp->isp, ISP_LOGERR, "bad segment count (%d)", nseg);
+ mp->error = EFAULT;
+ return;
+ }
+ csio = mp->cmd_token;
+ isp = mp->isp;
+ rq = mp->rq;
+ pcs = (struct isp_pcisoftc *)mp->isp;
+ dp = &pcs->dmaps[isp_handle_index(rq->req_handle)];
+ nxti = *mp->nxtip;
+
+ if ((csio->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) {
+ bus_dmamap_sync(pcs->dmat, *dp, BUS_DMASYNC_PREREAD);
+ } else {
+ bus_dmamap_sync(pcs->dmat, *dp, BUS_DMASYNC_PREWRITE);
+ }
+
+ datalen = XS_XFRLEN(csio);
+
+ /*
+ * We're passed an initial partially filled in entry that
+ * has most fields filled in except for data transfer
+ * related values.
+ *
+ * Our job is to fill in the initial request queue entry and
+ * then to start allocating and filling in continuation entries
+ * until we've covered the entire transfer.
+ */
+
+ if (IS_FC(isp)) {
+ seglim = ISP_RQDSEG_T3;
+ ((ispreqt3_t *)rq)->req_totalcnt = datalen;
+ if ((csio->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) {
+ ((ispreqt3_t *)rq)->req_flags |= REQFLAG_DATA_IN;
+ } else {
+ ((ispreqt3_t *)rq)->req_flags |= REQFLAG_DATA_OUT;
+ }
+ } else {
+ if (csio->cdb_len > 12) {
+ seglim = 0;
+ } else {
+ seglim = ISP_RQDSEG_A64;
+ }
+ if ((csio->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) {
+ rq->req_flags |= REQFLAG_DATA_IN;
+ } else {
+ rq->req_flags |= REQFLAG_DATA_OUT;
+ }
+ }
+
+ eseg = dm_segs + nseg;
+
+ while (datalen != 0 && rq->req_seg_count < seglim && dm_segs != eseg) {
+ if (IS_FC(isp)) {
+ ispreqt3_t *rq3 = (ispreqt3_t *)rq;
+ rq3->req_dataseg[rq3->req_seg_count].ds_base =
+ dm_segs->ds_addr;
+ rq3->req_dataseg[rq3->req_seg_count].ds_count =
+ dm_segs->ds_len;
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list