Date: Wed, 4 Aug 2004 20:19:14 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 58872 for review Message-ID: <200408042019.i74KJEeS038485@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=58872 Change 58872 by rwatson@rwatson_paprika on 2004/08/04 20:18:15 Integrate netperf_socket from rwatson_netperf: /dev/null no longer a module; non-optional. cpu_spinwait() abstraction /dev/mem build fixes for SMP _pmap_unwire_pte_hold() FASTCALL() cleanup in NDIS. ACPI debugger cleanup, lock trimming. Lots of aic driver fixes. Access control fix for pseudo-signalling of zombies. Pipe locking cleanup. ng_l2tp cleanups, changes, fixing. Don't use delayed checksums with divert sockets. IP fragment reassembly cleanunp. Loop back of a number of Giant-related assertions for file descriptors, VFS from rwatson_netperf. Loop back of uidinfo locking annotation, spl cleanup from rwatson_netperf. Loop back of inpcb assertions enabled by default even with IPv6 compiled in from rwatson_netperf. Affected files ... .. //depot/projects/netperf_socket/sys/alpha/alpha/pmap.c#16 integrate .. //depot/projects/netperf_socket/sys/alpha/conf/GENERIC#7 integrate .. //depot/projects/netperf_socket/sys/alpha/include/cpu.h#5 integrate .. //depot/projects/netperf_socket/sys/amd64/amd64/mem.c#8 integrate .. //depot/projects/netperf_socket/sys/amd64/amd64/mp_machdep.c#7 integrate .. //depot/projects/netperf_socket/sys/amd64/amd64/pmap.c#23 integrate .. //depot/projects/netperf_socket/sys/amd64/conf/GENERIC#13 integrate .. //depot/projects/netperf_socket/sys/amd64/include/cpu.h#5 integrate .. //depot/projects/netperf_socket/sys/amd64/include/elf.h#3 integrate .. //depot/projects/netperf_socket/sys/arm/include/cpu.h#2 integrate .. //depot/projects/netperf_socket/sys/compat/ndis/kern_ndis.c#18 integrate .. //depot/projects/netperf_socket/sys/compat/ndis/ntoskrnl_var.h#10 integrate .. //depot/projects/netperf_socket/sys/compat/ndis/subr_ndis.c#14 integrate .. //depot/projects/netperf_socket/sys/compat/ndis/subr_ntoskrnl.c#17 integrate .. //depot/projects/netperf_socket/sys/conf/NOTES#32 integrate .. //depot/projects/netperf_socket/sys/conf/files#43 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi.c#34 integrate .. //depot/projects/netperf_socket/sys/dev/aic7xxx/aic79xx.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/aic7xxx/aic79xx.h#4 integrate .. //depot/projects/netperf_socket/sys/dev/aic7xxx/aic79xx.reg#4 integrate .. //depot/projects/netperf_socket/sys/dev/aic7xxx/aic79xx.seq#4 integrate .. //depot/projects/netperf_socket/sys/dev/aic7xxx/aic79xx_inline.h#4 integrate .. //depot/projects/netperf_socket/sys/dev/aic7xxx/aic79xx_osm.c#3 integrate .. //depot/projects/netperf_socket/sys/dev/aic7xxx/aic79xx_pci.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/asr/asr.c#8 integrate .. //depot/projects/netperf_socket/sys/dev/eisa/eisaconf.c#3 integrate .. //depot/projects/netperf_socket/sys/dev/esp/esp_sbus.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/esp/lsi64854.c#2 integrate .. //depot/projects/netperf_socket/sys/dev/esp/lsi64854var.h#2 integrate .. //depot/projects/netperf_socket/sys/dev/esp/ncr53c9x.c#5 integrate .. //depot/projects/netperf_socket/sys/dev/esp/ncr53c9xreg.h#2 integrate .. //depot/projects/netperf_socket/sys/dev/esp/ncr53c9xvar.h#4 integrate .. //depot/projects/netperf_socket/sys/dev/firewire/fwohci_pci.c#9 integrate .. //depot/projects/netperf_socket/sys/dev/firewire/fwohcireg.h#5 integrate .. //depot/projects/netperf_socket/sys/dev/if_ndis/if_ndis.c#17 integrate .. //depot/projects/netperf_socket/sys/dev/mem/memdev.c#3 integrate .. //depot/projects/netperf_socket/sys/dev/mem/memutil.c#1 branch .. //depot/projects/netperf_socket/sys/dev/ofw/ofw_console.c#10 integrate .. //depot/projects/netperf_socket/sys/geom/mirror/g_mirror.c#2 integrate .. //depot/projects/netperf_socket/sys/geom/mirror/g_mirror.h#2 integrate .. //depot/projects/netperf_socket/sys/i386/acpica/acpi_asus.c#7 integrate .. //depot/projects/netperf_socket/sys/i386/conf/GENERIC#11 integrate .. //depot/projects/netperf_socket/sys/i386/i386/mem.c#10 integrate .. //depot/projects/netperf_socket/sys/i386/i386/mp_machdep.c#4 integrate .. //depot/projects/netperf_socket/sys/i386/i386/pmap.c#22 integrate .. //depot/projects/netperf_socket/sys/i386/include/cpu.h#5 integrate .. //depot/projects/netperf_socket/sys/ia64/conf/GENERIC#7 integrate .. //depot/projects/netperf_socket/sys/ia64/conf/SKI#5 integrate .. //depot/projects/netperf_socket/sys/ia64/include/cpu.h#5 integrate .. //depot/projects/netperf_socket/sys/kern/kern_descrip.c#13 integrate .. //depot/projects/netperf_socket/sys/kern/kern_kse.c#8 integrate .. //depot/projects/netperf_socket/sys/kern/kern_mutex.c#9 integrate .. //depot/projects/netperf_socket/sys/kern/kern_resource.c#10 integrate .. //depot/projects/netperf_socket/sys/kern/kern_sig.c#17 integrate .. //depot/projects/netperf_socket/sys/kern/sys_pipe.c#6 integrate .. //depot/projects/netperf_socket/sys/kern/vfs_lookup.c#4 integrate .. //depot/projects/netperf_socket/sys/modules/Makefile#15 integrate .. //depot/projects/netperf_socket/sys/modules/acpi/acpi_asus/Makefile#3 integrate .. //depot/projects/netperf_socket/sys/modules/acpi/acpi_panasonic/Makefile#2 integrate .. //depot/projects/netperf_socket/sys/modules/acpi/acpi_toshiba/Makefile#3 integrate .. //depot/projects/netperf_socket/sys/modules/acpi/acpi_video/Makefile#3 integrate .. //depot/projects/netperf_socket/sys/modules/mem/Makefile#2 integrate .. //depot/projects/netperf_socket/sys/modules/null/Makefile#2 delete .. //depot/projects/netperf_socket/sys/netgraph/ng_l2tp.c#6 integrate .. //depot/projects/netperf_socket/sys/netgraph/ng_l2tp.h#2 integrate .. //depot/projects/netperf_socket/sys/netgraph/ng_ppp.c#6 integrate .. //depot/projects/netperf_socket/sys/netinet/in_pcb.h#6 integrate .. //depot/projects/netperf_socket/sys/netinet/ip_divert.c#11 integrate .. //depot/projects/netperf_socket/sys/netinet/ip_input.c#16 integrate .. //depot/projects/netperf_socket/sys/netinet/ip_mroute.c#10 integrate .. //depot/projects/netperf_socket/sys/netinet/ip_output.c#13 integrate .. //depot/projects/netperf_socket/sys/netinet/tcp_subr.c#14 integrate .. //depot/projects/netperf_socket/sys/pc98/conf/GENERIC#11 integrate .. //depot/projects/netperf_socket/sys/powerpc/conf/GENERIC#8 integrate .. //depot/projects/netperf_socket/sys/powerpc/include/cpu.h#2 integrate .. //depot/projects/netperf_socket/sys/powerpc/include/critical.h#4 integrate .. //depot/projects/netperf_socket/sys/sparc64/conf/GENERIC#9 integrate .. //depot/projects/netperf_socket/sys/sparc64/include/cpu.h#5 integrate .. //depot/projects/netperf_socket/sys/sys/kse.h#4 integrate .. //depot/projects/netperf_socket/sys/sys/memrange.h#2 integrate .. //depot/projects/netperf_socket/sys/sys/mount.h#13 integrate .. //depot/projects/netperf_socket/sys/sys/resourcevar.h#6 integrate .. //depot/projects/netperf_socket/sys/vm/device_pager.c#6 integrate Differences ... ==== //depot/projects/netperf_socket/sys/alpha/alpha/pmap.c#16 (text+ko) ==== @@ -148,7 +148,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.164 2004/07/29 18:56:30 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.165 2004/08/04 18:04:43 alc Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -336,6 +336,7 @@ static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va); static vm_page_t _pmap_allocpte(pmap_t pmap, unsigned ptepindex); +static int _pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m); static int pmap_unuse_pt(pmap_t, vm_offset_t, vm_page_t); #ifdef SMP static void pmap_invalidate_page_action(void *arg); @@ -894,74 +895,65 @@ * This routine unholds page table pages, and if the hold count * drops to zero, then it decrements the wire count. */ +static PMAP_INLINE int +pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m) +{ + + vm_page_unhold(m); + if (m->hold_count == 0) + return _pmap_unwire_pte_hold(pmap, va, m); + else + return 0; +} + static int _pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m) { + vm_offset_t pteva; + pt_entry_t* pte; - while (vm_page_sleep_if_busy(m, FALSE, "pmuwpt")) - vm_page_lock_queues(); + /* + * unmap the page table page + */ + if (m->pindex >= NUSERLEV3MAPS) { + /* Level 2 page table */ + pte = pmap_lev1pte(pmap, va); + pteva = (vm_offset_t) PTlev2 + alpha_ptob(m->pindex - NUSERLEV3MAPS); + } else { + /* Level 3 page table */ + pte = pmap_lev2pte(pmap, va); + pteva = (vm_offset_t) PTmap + alpha_ptob(m->pindex); + } - if (m->hold_count == 0) { - vm_offset_t pteva; - pt_entry_t* pte; + *pte = 0; - /* - * unmap the page table page - */ - if (m->pindex >= NUSERLEV3MAPS) { - /* Level 2 page table */ - pte = pmap_lev1pte(pmap, va); - pteva = (vm_offset_t) PTlev2 + alpha_ptob(m->pindex - NUSERLEV3MAPS); - } else { - /* Level 3 page table */ - pte = pmap_lev2pte(pmap, va); - pteva = (vm_offset_t) PTmap + alpha_ptob(m->pindex); - } + if (m->pindex < NUSERLEV3MAPS) { + /* unhold the level 2 page table */ + vm_page_t lev2pg; - *pte = 0; + lev2pg = PHYS_TO_VM_PAGE(pmap_pte_pa(pmap_lev1pte(pmap, va))); + pmap_unwire_pte_hold(pmap, va, lev2pg); + } - if (m->pindex < NUSERLEV3MAPS) { - /* unhold the level 2 page table */ - vm_page_t lev2pg; + --pmap->pm_stats.resident_count; + /* + * Do a invltlb to make the invalidated mapping + * take effect immediately. + */ + pmap_invalidate_page(pmap, pteva); - lev2pg = PHYS_TO_VM_PAGE(pmap_pte_pa(pmap_lev1pte(pmap, va))); - vm_page_unhold(lev2pg); - if (lev2pg->hold_count == 0) - _pmap_unwire_pte_hold(pmap, va, lev2pg); - } + if (pmap->pm_ptphint == m) + pmap->pm_ptphint = NULL; - --pmap->pm_stats.resident_count; - /* - * Do a invltlb to make the invalidated mapping - * take effect immediately. - */ - pmap_invalidate_page(pmap, pteva); - - if (pmap->pm_ptphint == m) - pmap->pm_ptphint = NULL; - - /* - * If the page is finally unwired, simply free it. - */ - --m->wire_count; - if (m->wire_count == 0) { - vm_page_busy(m); - vm_page_free_zero(m); - atomic_subtract_int(&cnt.v_wire_count, 1); - } - return 1; + /* + * If the page is finally unwired, simply free it. + */ + --m->wire_count; + if (m->wire_count == 0) { + vm_page_free_zero(m); + atomic_subtract_int(&cnt.v_wire_count, 1); } - return 0; -} - -static PMAP_INLINE int -pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m) -{ - vm_page_unhold(m); - if (m->hold_count == 0) - return _pmap_unwire_pte_hold(pmap, va, m); - else - return 0; + return 1; } /* ==== //depot/projects/netperf_socket/sys/alpha/conf/GENERIC#7 (text+ko) ==== @@ -18,7 +18,7 @@ # # For hardware specific information check HARDWARE.TXT # -# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.173 2004/08/01 11:40:50 markm Exp $ +# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.174 2004/08/03 19:24:52 markm Exp $ machine alpha cpu EV4 @@ -173,7 +173,6 @@ # Pseudo devices. device loop # Network loopback device mem # Memory and kernel memory devices -device null # Null and zero devices device random # Entropy device device ether # Ethernet support device sl # Kernel SLIP ==== //depot/projects/netperf_socket/sys/alpha/include/cpu.h#5 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/alpha/include/cpu.h,v 1.39 2004/06/20 03:52:48 bde Exp $ */ +/* $FreeBSD: src/sys/alpha/include/cpu.h,v 1.40 2004/08/03 18:44:26 mux Exp $ */ /* From: NetBSD: cpu.h,v 1.18 1997/09/23 23:17:49 mjacob Exp */ /* @@ -93,6 +93,7 @@ #ifdef _KERNEL #define cpu_getstack(td) (alpha_pal_rdusp()) +#define cpu_spinwait() /* nothing */ #define get_cyclecount alpha_rpcc void cpu_halt(void); ==== //depot/projects/netperf_socket/sys/amd64/amd64/mem.c#8 (text+ko) ==== @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/mem.c,v 1.119 2004/08/02 20:36:47 markm Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mem.c,v 1.120 2004/08/04 18:30:31 markm Exp $"); /* * Memory special file @@ -71,14 +71,6 @@ * Used in /dev/mem drivers and elsewhere */ MALLOC_DEFINE(M_MEMDESC, "memdesc", "memory range descriptors"); -struct mem_range_softc mem_range_softc; - -void -mem_range_AP_init(void) -{ - if (mem_range_softc.mr_op && mem_range_softc.mr_op->initAP) - mem_range_softc.mr_op->initAP(&mem_range_softc); -} /* ARGSUSED */ int @@ -223,35 +215,6 @@ return (error); } -/* - * Implementation-neutral, kernel-callable functions for manipulating - * memory range attributes. - */ -int -mem_range_attr_get(struct mem_range_desc *mrd, int *arg) -{ - /* can we handle this? */ - if (mem_range_softc.mr_op == NULL) - return (EOPNOTSUPP); - - if (*arg == 0) - *arg = mem_range_softc.mr_ndesc; - else - bcopy(mem_range_softc.mr_desc, mrd, - (*arg) * sizeof(struct mem_range_desc)); - return (0); -} - -int -mem_range_attr_set(struct mem_range_desc *mrd, int *arg) -{ - /* can we handle this? */ - if (mem_range_softc.mr_op == NULL) - return (EOPNOTSUPP); - - return (mem_range_softc.mr_op->set(&mem_range_softc, mrd, arg)); -} - void dev_mem_md_init(void) { ==== //depot/projects/netperf_socket/sys/amd64/amd64/mp_machdep.c#7 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.239 2004/06/08 01:07:51 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.240 2004/08/04 18:30:31 markm Exp $"); #include "opt_cpu.h" #include "opt_kstack_pages.h" @@ -142,6 +142,15 @@ static struct sysctl_ctx_list logical_cpu_clist; static u_int bootMP_size; +struct mem_range_softc mem_range_softc; + +static void +mem_range_AP_init(void) +{ + if (mem_range_softc.mr_op && mem_range_softc.mr_op->initAP) + mem_range_softc.mr_op->initAP(&mem_range_softc); +} + void mp_topology(void) { ==== //depot/projects/netperf_socket/sys/amd64/amd64/pmap.c#23 (text+ko) ==== @@ -75,7 +75,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.488 2004/07/31 06:42:05 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.489 2004/08/04 18:04:43 alc Exp $"); /* * Manages physical address maps. @@ -215,6 +215,7 @@ static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va); static vm_page_t _pmap_allocpte(pmap_t pmap, vm_pindex_t ptepindex); +static int _pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m); static int pmap_unuse_pt(pmap_t, vm_offset_t, pd_entry_t); static vm_offset_t pmap_kmem_choose(vm_offset_t addr); @@ -964,87 +965,76 @@ * This routine unholds page table pages, and if the hold count * drops to zero, then it decrements the wire count. */ +static PMAP_INLINE int +pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m) +{ + + vm_page_unhold(m); + if (m->hold_count == 0) + return _pmap_unwire_pte_hold(pmap, va, m); + else + return 0; +} + static int _pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m) { + vm_offset_t pteva; - while (vm_page_sleep_if_busy(m, FALSE, "pmuwpt")) - vm_page_lock_queues(); + /* + * unmap the page table page + */ + if (m->pindex >= (NUPDE + NUPDPE)) { + /* PDP page */ + pml4_entry_t *pml4; + pml4 = pmap_pml4e(pmap, va); + pteva = (vm_offset_t) PDPmap + amd64_ptob(m->pindex - (NUPDE + NUPDPE)); + *pml4 = 0; + } else if (m->pindex >= NUPDE) { + /* PD page */ + pdp_entry_t *pdp; + pdp = pmap_pdpe(pmap, va); + pteva = (vm_offset_t) PDmap + amd64_ptob(m->pindex - NUPDE); + *pdp = 0; + } else { + /* PTE page */ + pd_entry_t *pd; + pd = pmap_pde(pmap, va); + pteva = (vm_offset_t) PTmap + amd64_ptob(m->pindex); + *pd = 0; + } + --pmap->pm_stats.resident_count; + if (m->pindex < NUPDE) { + /* We just released a PT, unhold the matching PD */ + vm_page_t pdpg; - if (m->hold_count == 0) { - vm_offset_t pteva; + pdpg = PHYS_TO_VM_PAGE(*pmap_pdpe(pmap, va) & PG_FRAME); + pmap_unwire_pte_hold(pmap, va, pdpg); + } + if (m->pindex >= NUPDE && m->pindex < (NUPDE + NUPDPE)) { + /* We just released a PD, unhold the matching PDP */ + vm_page_t pdppg; + pdppg = PHYS_TO_VM_PAGE(*pmap_pml4e(pmap, va) & PG_FRAME); + pmap_unwire_pte_hold(pmap, va, pdppg); + } + if (pmap_is_current(pmap)) { /* - * unmap the page table page + * Do an invltlb to make the invalidated mapping + * take effect immediately. */ - if (m->pindex >= (NUPDE + NUPDPE)) { - /* PDP page */ - pml4_entry_t *pml4; - pml4 = pmap_pml4e(pmap, va); - pteva = (vm_offset_t) PDPmap + amd64_ptob(m->pindex - (NUPDE + NUPDPE)); - *pml4 = 0; - } else if (m->pindex >= NUPDE) { - /* PD page */ - pdp_entry_t *pdp; - pdp = pmap_pdpe(pmap, va); - pteva = (vm_offset_t) PDmap + amd64_ptob(m->pindex - NUPDE); - *pdp = 0; - } else { - /* PTE page */ - pd_entry_t *pd; - pd = pmap_pde(pmap, va); - pteva = (vm_offset_t) PTmap + amd64_ptob(m->pindex); - *pd = 0; - } - --pmap->pm_stats.resident_count; - if (m->pindex < NUPDE) { - /* We just released a PT, unhold the matching PD */ - vm_page_t pdpg; + pmap_invalidate_page(pmap, pteva); + } - pdpg = PHYS_TO_VM_PAGE(*pmap_pdpe(pmap, va) & PG_FRAME); - vm_page_unhold(pdpg); - if (pdpg->hold_count == 0) - _pmap_unwire_pte_hold(pmap, va, pdpg); - } - if (m->pindex >= NUPDE && m->pindex < (NUPDE + NUPDPE)) { - /* We just released a PD, unhold the matching PDP */ - vm_page_t pdppg; - - pdppg = PHYS_TO_VM_PAGE(*pmap_pml4e(pmap, va) & PG_FRAME); - vm_page_unhold(pdppg); - if (pdppg->hold_count == 0) - _pmap_unwire_pte_hold(pmap, va, pdppg); - } - if (pmap_is_current(pmap)) { - /* - * Do an invltlb to make the invalidated mapping - * take effect immediately. - */ - pmap_invalidate_page(pmap, pteva); - } - - /* - * If the page is finally unwired, simply free it. - */ - --m->wire_count; - if (m->wire_count == 0) { - vm_page_busy(m); - vm_page_free_zero(m); - atomic_subtract_int(&cnt.v_wire_count, 1); - } - return 1; + /* + * If the page is finally unwired, simply free it. + */ + --m->wire_count; + if (m->wire_count == 0) { + vm_page_free_zero(m); + atomic_subtract_int(&cnt.v_wire_count, 1); } - return 0; -} - -static PMAP_INLINE int -pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m) -{ - vm_page_unhold(m); - if (m->hold_count == 0) - return _pmap_unwire_pte_hold(pmap, va, m); - else - return 0; + return 1; } /* ==== //depot/projects/netperf_socket/sys/amd64/conf/GENERIC#13 (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.418 2004/08/01 19:37:34 markm Exp $ +# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.419 2004/08/03 19:24:52 markm Exp $ machine amd64 cpu HAMMER @@ -220,7 +220,6 @@ device loop # Network loopback device mem # Memory and kernel memory devices device io # I/O device -device null # Null and zero devices device random # Entropy device device ether # Ethernet support device sl # Kernel SLIP ==== //depot/projects/netperf_socket/sys/amd64/include/cpu.h#5 (text+ko) ==== @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * from: @(#)cpu.h 5.4 (Berkeley) 5/9/91 - * $FreeBSD: src/sys/amd64/include/cpu.h,v 1.73 2004/06/20 03:52:48 bde Exp $ + * $FreeBSD: src/sys/amd64/include/cpu.h,v 1.74 2004/08/03 18:44:26 mux Exp $ */ #ifndef _MACHINE_CPU_H_ @@ -50,9 +50,10 @@ #undef COPY_SIGCODE /* don't copy sigcode above user stack in exec */ #define cpu_exec(p) /* nothing */ -#define cpu_swapin(p) /* nothing */ +#define cpu_swapin(p) /* nothing */ #define cpu_getstack(td) ((td)->td_frame->tf_rsp) -#define cpu_setstack(td, ap) ((td)->td_frame->tf_rsp = (ap)) +#define cpu_setstack(td, ap) ((td)->td_frame->tf_rsp = (ap)) +#define cpu_spinwait() ia32_pause() #define TRAPF_USERMODE(framep) \ (ISPL((framep)->tf_cs) == SEL_UPL) ==== //depot/projects/netperf_socket/sys/amd64/include/elf.h#3 (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/amd64/include/elf.h,v 1.17 2004/08/02 19:12:17 dfr Exp $ + * $FreeBSD: src/sys/amd64/include/elf.h,v 1.18 2004/08/03 08:21:48 dfr Exp $ */ #ifndef _MACHINE_ELF_H_ @@ -124,14 +124,14 @@ #define R_X86_64_PC16 13 /* Add 16 bit signed extended pc relative symbol value */ #define R_X86_64_8 14 /* Add 8 bit zero extended symbol value */ #define R_X86_64_PC8 15 /* Add 8 bit signed extended pc relative symbol value */ -#define R_X86_64_DTPMOD64 16 /* ID of module containing symbol */ -#define R_X86_64_DTPOFF64 17 /* Offset in TLS block */ -#define R_X86_64_TPOFF64 18 /* Offset in static TLS block */ -#define R_X86_64_TLSGD 19 /* PC relative offset to GD GOT entry */ -#define R_X86_64_TLSLD 20 /* PC relative offset to LD GOT entry */ -#define R_X86_64_DTPOFF32 21 /* Offset in TLS block */ -#define R_X86_64_GOTTPOFF 22 /* PC relative offset to IE GOT entry */ -#define R_X86_64_TPOFF32 23 /* Offset in static TLS block */ +#define R_X86_64_DTPMOD64 16 /* ID of module containing symbol */ +#define R_X86_64_DTPOFF64 17 /* Offset in TLS block */ +#define R_X86_64_TPOFF64 18 /* Offset in static TLS block */ +#define R_X86_64_TLSGD 19 /* PC relative offset to GD GOT entry */ +#define R_X86_64_TLSLD 20 /* PC relative offset to LD GOT entry */ +#define R_X86_64_DTPOFF32 21 /* Offset in TLS block */ +#define R_X86_64_GOTTPOFF 22 /* PC relative offset to IE GOT entry */ +#define R_X86_64_TPOFF32 23 /* Offset in static TLS block */ #define R_X86_64_COUNT 24 /* Count of defined relocation types. */ ==== //depot/projects/netperf_socket/sys/arm/include/cpu.h#2 (text+ko) ==== @@ -1,5 +1,5 @@ /* $NetBSD: cpu.h,v 1.2 2001/02/23 21:23:52 reinoud Exp $ */ -/* $FreeBSD: src/sys/arm/include/cpu.h,v 1.1 2004/05/14 11:46:44 cognet Exp $ */ +/* $FreeBSD: src/sys/arm/include/cpu.h,v 1.2 2004/08/03 18:44:26 mux Exp $ */ #ifndef MACHINE_CPU_H #define MACHINE_CPU_H @@ -32,6 +32,7 @@ #define cpu_getstack(td) ((td)->td_frame->tf_usr_sp) #define cpu_setstack(td, sp) ((td)->td_frame->tf_usr_sp = (sp)) +#define cpu_spinwait() /* nothing */ #define ARM_NVEC 8 #define ARM_VEC_ALL 0xffffffff ==== //depot/projects/netperf_socket/sys/compat/ndis/kern_ndis.c#18 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/ndis/kern_ndis.c,v 1.58 2004/08/01 20:04:30 wpaul Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/ndis/kern_ndis.c,v 1.59 2004/08/04 18:22:50 wpaul Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -782,9 +782,9 @@ return; returnfunc = sc->ndis_chars.nmc_return_packet_func; - irql = FASTCALL1(hal_raise_irql, DISPATCH_LEVEL); + irql = ntoskrnl_raise_irql(DISPATCH_LEVEL); returnfunc(adapter, p); - FASTCALL1(hal_lower_irql, irql); + ntoskrnl_lower_irql(irql); return; } @@ -1132,10 +1132,10 @@ if (adapter == NULL || setfunc == NULL) return(ENXIO); - irql = FASTCALL1(hal_raise_irql, DISPATCH_LEVEL); + irql = ntoskrnl_raise_irql(DISPATCH_LEVEL); rval = setfunc(adapter, oid, buf, *buflen, &byteswritten, &bytesneeded); - FASTCALL1(hal_lower_irql, irql); + ntoskrnl_lower_irql(irql); if (rval == NDIS_STATUS_PENDING) { PROC_LOCK(curthread->td_proc); @@ -1189,9 +1189,9 @@ return(ENXIO); sendfunc = sc->ndis_chars.nmc_sendmulti_func; senddonefunc = sc->ndis_block.nmb_senddone_func; - irql = FASTCALL1(hal_raise_irql, DISPATCH_LEVEL); + irql = ntoskrnl_raise_irql(DISPATCH_LEVEL); sendfunc(adapter, packets, cnt); - FASTCALL1(hal_lower_irql, irql); + ntoskrnl_lower_irql(irql); for (i = 0; i < cnt; i++) { p = packets[i]; @@ -1228,9 +1228,9 @@ sendfunc = sc->ndis_chars.nmc_sendsingle_func; senddonefunc = sc->ndis_block.nmb_senddone_func; - irql = FASTCALL1(hal_raise_irql, DISPATCH_LEVEL); + irql = ntoskrnl_raise_irql(DISPATCH_LEVEL); status = sendfunc(adapter, packet, packet->np_private.npp_flags); - FASTCALL1(hal_lower_irql, irql); + ntoskrnl_lower_irql(irql); if (status == NDIS_STATUS_PENDING) return(0); @@ -1317,9 +1317,9 @@ if (adapter == NULL || resetfunc == NULL) return(EIO); - irql = FASTCALL1(hal_raise_irql, DISPATCH_LEVEL); + irql = ntoskrnl_raise_irql(DISPATCH_LEVEL); rval = resetfunc(&addressing_reset, adapter); - FASTCALL1(hal_lower_irql, irql); + ntoskrnl_lower_irql(irql); if (rval == NDIS_STATUS_PENDING) { PROC_LOCK(curthread->td_proc); @@ -1550,10 +1550,10 @@ if (adapter == NULL || queryfunc == NULL) return(ENXIO); - irql = FASTCALL1(hal_raise_irql, DISPATCH_LEVEL); + irql = ntoskrnl_raise_irql(DISPATCH_LEVEL); rval = queryfunc(adapter, oid, buf, *buflen, &byteswritten, &bytesneeded); - FASTCALL1(hal_lower_irql, irql); + ntoskrnl_lower_irql(irql); /* Wait for requests that block. */ ==== //depot/projects/netperf_socket/sys/compat/ndis/ntoskrnl_var.h#10 (text+ko) ==== @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/compat/ndis/ntoskrnl_var.h,v 1.16 2004/08/01 20:04:30 wpaul Exp $ + * $FreeBSD: src/sys/compat/ndis/ntoskrnl_var.h,v 1.17 2004/08/04 18:22:50 wpaul Exp $ */ #ifndef _NTOSKRNL_VAR_H_ @@ -516,10 +516,10 @@ * routines live in the HAL. We try to imitate this behavior. */ #ifdef __i386__ -#define ntoskrnl_acquire_spinlock(a, b) \ - *(b) = FASTCALL(hal_lock, a, 0) -#define ntoskrnl_release_spinlock(a, b) \ - FASTCALL(hal_unlock, a, b) +#define ntoskrnl_acquire_spinlock(a, b) *(b) = FASTCALL1(hal_lock, a) +#define ntoskrnl_release_spinlock(a, b) FASTCALL2(hal_unlock, a, b) +#define ntoskrnl_raise_irql(a) FASTCALL1(hal_raise_irql, a) +#define ntoskrnl_lower_irql(a) FASTCALL1(hal_lower_irql, a) #endif /* __i386__ */ __END_DECLS ==== //depot/projects/netperf_socket/sys/compat/ndis/subr_ndis.c#14 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.64 2004/08/01 21:15:29 wpaul Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.65 2004/08/04 18:22:50 wpaul Exp $"); /* * This file implements a translation layer between the BSD networking @@ -809,8 +809,7 @@ ndis_lock(lock) ndis_spin_lock *lock; { - lock->nsl_kirql = FASTCALL2(hal_lock, - &lock->nsl_spinlock, DISPATCH_LEVEL); + ntoskrnl_acquire_spinlock(&lock->nsl_spinlock, &lock->nsl_kirql); return; } @@ -822,7 +821,7 @@ ndis_unlock(lock) ndis_spin_lock *lock; { - FASTCALL2(hal_unlock, &lock->nsl_spinlock, lock->nsl_kirql); + ntoskrnl_release_spinlock(&lock->nsl_spinlock, lock->nsl_kirql); return; } @@ -2317,14 +2316,13 @@ { list_entry *flink; - lock->nsl_kirql = FASTCALL2(hal_lock, - &lock->nsl_spinlock, DISPATCH_LEVEL); + ntoskrnl_acquire_spinlock(&lock->nsl_spinlock, &lock->nsl_kirql); flink = head->nle_flink; entry->nle_flink = flink; entry->nle_blink = head; flink->nle_blink = entry; head->nle_flink = entry; - FASTCALL2(hal_unlock, &lock->nsl_spinlock, lock->nsl_kirql); + ntoskrnl_release_spinlock(&lock->nsl_spinlock, lock->nsl_kirql); return(flink); } @@ -2337,13 +2335,12 @@ list_entry *flink; list_entry *entry; - lock->nsl_kirql = FASTCALL2(hal_lock, - &lock->nsl_spinlock, DISPATCH_LEVEL); + ntoskrnl_acquire_spinlock(&lock->nsl_spinlock, &lock->nsl_kirql); entry = head->nle_flink; flink = entry->nle_flink; head->nle_flink = flink; flink->nle_blink = head; - FASTCALL2(hal_unlock, &lock->nsl_spinlock, lock->nsl_kirql); + ntoskrnl_release_spinlock(&lock->nsl_spinlock, lock->nsl_kirql); return(entry); } @@ -2356,14 +2353,13 @@ { list_entry *blink; - lock->nsl_kirql = FASTCALL2(hal_lock, - &lock->nsl_spinlock, DISPATCH_LEVEL); + ntoskrnl_acquire_spinlock(&lock->nsl_spinlock, &lock->nsl_kirql); blink = head->nle_blink; entry->nle_flink = head; entry->nle_blink = blink; blink->nle_flink = entry; head->nle_blink = entry; - FASTCALL2(hal_unlock, &lock->nsl_spinlock, lock->nsl_kirql); + ntoskrnl_release_spinlock(&lock->nsl_spinlock, lock->nsl_kirql); return(blink); } ==== //depot/projects/netperf_socket/sys/compat/ndis/subr_ntoskrnl.c#17 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ntoskrnl.c,v 1.41 2004/08/01 20:04:30 wpaul Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ntoskrnl.c,v 1.42 2004/08/04 18:22:50 wpaul Exp $"); #include <sys/ctype.h> #include <sys/unistd.h> @@ -984,9 +984,9 @@ slist_entry *oldhead; uint8_t irql; - irql = FASTCALL2(hal_lock, lock, DISPATCH_LEVEL); + ntoskrnl_acquire_spinlock(lock, &irql); oldhead = ntoskrnl_pushsl(head, entry); - FASTCALL2(hal_unlock, lock, irql); + ntoskrnl_release_spinlock(lock, irql); return(oldhead); } @@ -997,9 +997,9 @@ slist_entry *first; uint8_t irql; - irql = FASTCALL2(hal_lock, lock, DISPATCH_LEVEL); + ntoskrnl_acquire_spinlock(lock, &irql); first = ntoskrnl_popsl(head); - FASTCALL2(hal_unlock, lock, irql); + ntoskrnl_release_spinlock(lock, irql); return(first); } @@ -1040,9 +1040,9 @@ { uint8_t irql; - irql = FASTCALL2(hal_lock, &ntoskrnl_global, DISPATCH_LEVEL); + ntoskrnl_acquire_spinlock(&ntoskrnl_global, &irql); *addend += inc; - FASTCALL2(hal_unlock, &ntoskrnl_global, irql); + ntoskrnl_release_spinlock(&ntoskrnl_global, irql); return; }; @@ -1686,9 +1686,9 @@ dpc = arg; dpcfunc = (kdpc_func)dpc->k_deferedfunc; - irql = FASTCALL1(hal_raise_irql, DISPATCH_LEVEL); + irql = ntoskrnl_raise_irql(DISPATCH_LEVEL); dpcfunc(dpc, dpc->k_deferredctx, dpc->k_sysarg1, dpc->k_sysarg2); - FASTCALL1(hal_lower_irql, irql); + ntoskrnl_lower_irql(irql); return; } ==== //depot/projects/netperf_socket/sys/conf/NOTES#32 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1253 2004/08/01 11:40:51 markm Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1254 2004/08/03 19:24:53 markm Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -839,9 +839,6 @@ # Cryptographically secure random number generator; /dev/random device random -# The bit-bucket; /dev/null -device null - # The system memory devices; /dev/mem, /dev/kmem device mem ==== //depot/projects/netperf_socket/sys/conf/files#43 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.935 2004/08/01 11:40:51 markm Exp $ +# $FreeBSD: src/sys/conf/files,v 1.936 2004/08/03 19:24:53 markm Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -585,7 +585,7 @@ dev/musycc/musycc.c optional musycc dev/nge/if_nge.c optional nge dev/nmdm/nmdm.c optional nmdm -dev/null/null.c optional null +dev/null/null.c standard dev/patm/if_patm.c optional patm pci dev/patm/if_patm_intr.c optional patm pci dev/patm/if_patm_ioctl.c optional patm pci ==== //depot/projects/netperf_socket/sys/dev/acpica/acpi.c#34 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.178 2004/07/26 06:04:35 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.182 2004/08/03 17:16:30 njl Exp $ */ #include "opt_acpi.h" @@ -188,6 +188,8 @@ DRIVER_MODULE(acpi, nexus, acpi_driver, acpi_devclass, acpi_modevent, 0); MODULE_VERSION(acpi, 1); +#define ACPI_MINIMUM_AWAKETIME 5 + static const char* sleep_state_names[] = { "S0", "S1", "S2", "S3", "S4", "S5", "NONE"}; @@ -238,14 +240,12 @@ ACPI_STATUS acpi_Startup(void) { -#ifdef ACPI_DEBUGGER - char *debugpoint; -#endif static int started = 0; int error, val; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + /* Only run the startup code once. The MADT driver also calls this. */ if (started) return_VALUE (0); started = 1; @@ -260,26 +260,10 @@ AcpiGbl_AllMethodsSerialized = (UINT8)acpi_serialize_methods; /* Start up the ACPI CA subsystem. */ -#ifdef ACPI_DEBUGGER - debugpoint = getenv("debug.acpi.debugger"); - if (debugpoint) { - if (!strcmp(debugpoint, "init")) - acpi_EnterDebugger(); - freeenv(debugpoint); - } -#endif if (ACPI_FAILURE(error = AcpiInitializeSubsystem())) { printf("ACPI: initialisation failed: %s\n", AcpiFormatException(error)); return_VALUE (error); } -#ifdef ACPI_DEBUGGER - debugpoint = getenv("debug.acpi.debugger"); - if (debugpoint) { - if (!strcmp(debugpoint, "tables")) - acpi_EnterDebugger(); - freeenv(debugpoint); - } -#endif >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408042019.i74KJEeS038485>