Date: Wed, 25 Aug 2004 00:35:57 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 60382 for review Message-ID: <200408250035.i7P0ZvCI041525@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=60382 Change 60382 by jhb@jhb_slimer on 2004/08/25 00:34:56 IFC @60380. Affected files ... .. //depot/projects/smpng/sys/alpha/linux/linux_proto.h#14 integrate .. //depot/projects/smpng/sys/alpha/linux/linux_syscall.h#12 integrate .. //depot/projects/smpng/sys/alpha/linux/linux_sysent.c#12 integrate .. //depot/projects/smpng/sys/alpha/linux/syscalls.master#14 integrate .. //depot/projects/smpng/sys/alpha/osf1/osf1_misc.c#30 integrate .. //depot/projects/smpng/sys/alpha/osf1/osf1_proto.h#8 integrate .. //depot/projects/smpng/sys/alpha/osf1/osf1_syscall.h#7 integrate .. //depot/projects/smpng/sys/alpha/osf1/osf1_sysent.c#7 integrate .. //depot/projects/smpng/sys/alpha/osf1/syscalls.master#8 integrate .. //depot/projects/smpng/sys/amd64/amd64/machdep.c#28 integrate .. //depot/projects/smpng/sys/amd64/amd64/mp_machdep.c#12 integrate .. //depot/projects/smpng/sys/amd64/amd64/nexus.c#13 integrate .. //depot/projects/smpng/sys/amd64/amd64/pmap.c#30 integrate .. //depot/projects/smpng/sys/amd64/linux32/linux32_machdep.c#2 integrate .. //depot/projects/smpng/sys/boot/alpha/Makefile.inc#3 integrate .. //depot/projects/smpng/sys/boot/alpha/common/Makefile.common#5 integrate .. //depot/projects/smpng/sys/boot/alpha/common/ldscript#1 branch .. //depot/projects/smpng/sys/boot/common/load.c#3 integrate .. //depot/projects/smpng/sys/boot/ficl/Makefile#9 integrate .. //depot/projects/smpng/sys/compat/linux/linux_socket.c#20 integrate .. //depot/projects/smpng/sys/compat/svr4/svr4_fcntl.c#17 integrate .. //depot/projects/smpng/sys/compat/svr4/svr4_proto.h#7 integrate .. //depot/projects/smpng/sys/compat/svr4/svr4_stream.c#20 integrate .. //depot/projects/smpng/sys/compat/svr4/svr4_syscall.h#6 integrate .. //depot/projects/smpng/sys/compat/svr4/svr4_syscallnames.c#6 integrate .. //depot/projects/smpng/sys/compat/svr4/svr4_sysent.c#6 integrate .. //depot/projects/smpng/sys/compat/svr4/syscalls.master#7 integrate .. //depot/projects/smpng/sys/conf/files#118 integrate .. //depot/projects/smpng/sys/conf/options.pc98#41 integrate .. //depot/projects/smpng/sys/contrib/pf/net/pf_ioctl.c#8 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi.c#72 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_pci_link.c#18 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_resource.c#21 integrate .. //depot/projects/smpng/sys/dev/acpica/acpivar.h#47 integrate .. //depot/projects/smpng/sys/dev/aic7xxx/aic79xx_pci.c#19 integrate .. //depot/projects/smpng/sys/dev/aic7xxx/aic7xxx_pci.c#16 integrate .. //depot/projects/smpng/sys/dev/ata/ata-all.c#57 integrate .. //depot/projects/smpng/sys/dev/ata/ata-chipset.c#41 integrate .. //depot/projects/smpng/sys/dev/ata/ata-dma.c#39 integrate .. //depot/projects/smpng/sys/dev/ata/ata-queue.c#17 integrate .. //depot/projects/smpng/sys/dev/ata/atapi-cd.c#51 integrate .. //depot/projects/smpng/sys/dev/fdc/fdc.c#6 integrate .. //depot/projects/smpng/sys/dev/isp/isp_freebsd.c#31 integrate .. //depot/projects/smpng/sys/dev/lnc/if_lnc_pci.c#10 integrate .. //depot/projects/smpng/sys/dev/md/md.c#53 integrate .. //depot/projects/smpng/sys/dev/mpt/mpt.c#6 integrate .. //depot/projects/smpng/sys/dev/mpt/mpt_debug.c#5 integrate .. //depot/projects/smpng/sys/dev/mpt/mpt_freebsd.c#10 integrate .. //depot/projects/smpng/sys/dev/sound/pci/maestro.c#12 integrate .. //depot/projects/smpng/sys/geom/mirror/g_mirror.c#3 integrate .. //depot/projects/smpng/sys/geom/raid3/g_raid3.c#2 integrate .. //depot/projects/smpng/sys/geom/raid3/g_raid3.h#2 integrate .. //depot/projects/smpng/sys/geom/raid3/g_raid3_ctl.c#2 integrate .. //depot/projects/smpng/sys/geom/vinum/geom_vinum_raid5.c#3 integrate .. //depot/projects/smpng/sys/geom/vinum/geom_vinum_rm.c#2 integrate .. //depot/projects/smpng/sys/geom/vinum/geom_vinum_subr.c#5 integrate .. //depot/projects/smpng/sys/i386/acpica/acpi_panasonic.c#3 integrate .. //depot/projects/smpng/sys/i386/conf/NOTES#88 integrate .. //depot/projects/smpng/sys/i386/i386/mp_machdep.c#67 integrate .. //depot/projects/smpng/sys/i386/i386/nexus.c#15 integrate .. //depot/projects/smpng/sys/i386/i386/p4tcc.c#3 integrate .. //depot/projects/smpng/sys/i386/i386/pmap.c#68 integrate .. //depot/projects/smpng/sys/i386/i386/uio_machdep.c#4 integrate .. //depot/projects/smpng/sys/i386/ibcs2/ibcs2_fcntl.c#10 integrate .. //depot/projects/smpng/sys/i386/ibcs2/ibcs2_proto.h#8 integrate .. //depot/projects/smpng/sys/i386/ibcs2/ibcs2_syscall.h#7 integrate .. //depot/projects/smpng/sys/i386/ibcs2/ibcs2_sysent.c#9 integrate .. //depot/projects/smpng/sys/i386/ibcs2/syscalls.master#8 integrate .. //depot/projects/smpng/sys/i386/linux/linux_machdep.c#25 integrate .. //depot/projects/smpng/sys/i386/linux/linux_proto.h#17 integrate .. //depot/projects/smpng/sys/i386/linux/linux_syscall.h#16 integrate .. //depot/projects/smpng/sys/i386/linux/linux_sysent.c#17 integrate .. //depot/projects/smpng/sys/i386/linux/syscalls.master#17 integrate .. //depot/projects/smpng/sys/ia64/conf/GENERIC#40 integrate .. //depot/projects/smpng/sys/ia64/ia64/nexus.c#7 integrate .. //depot/projects/smpng/sys/kern/kern_kse.c#7 integrate .. //depot/projects/smpng/sys/kern/kern_lock.c#33 integrate .. //depot/projects/smpng/sys/kern/kern_module.c#14 integrate .. //depot/projects/smpng/sys/kern/kern_shutdown.c#48 integrate .. //depot/projects/smpng/sys/kern/sched_4bsd.c#34 integrate .. //depot/projects/smpng/sys/kern/subr_bus.c#39 integrate .. //depot/projects/smpng/sys/kern/subr_kdb.c#4 integrate .. //depot/projects/smpng/sys/kern/subr_smp.c#36 integrate .. //depot/projects/smpng/sys/kern/uipc_socket.c#56 integrate .. //depot/projects/smpng/sys/kern/vfs_subr.c#80 integrate .. //depot/projects/smpng/sys/modules/agp/Makefile#7 integrate .. //depot/projects/smpng/sys/modules/ipfw/Makefile#5 integrate .. //depot/projects/smpng/sys/net/if_fwsubr.c#3 integrate .. //depot/projects/smpng/sys/net/if_sl.c#24 integrate .. //depot/projects/smpng/sys/net/route.c#24 integrate .. //depot/projects/smpng/sys/net/rtsock.c#38 integrate .. //depot/projects/smpng/sys/netinet/ip_mroute.c#36 integrate .. //depot/projects/smpng/sys/netinet/ip_output.c#62 integrate .. //depot/projects/smpng/sys/netinet/raw_ip.c#43 integrate .. //depot/projects/smpng/sys/netinet/udp_usrreq.c#48 integrate .. //depot/projects/smpng/sys/netinet6/in6.c#22 integrate .. //depot/projects/smpng/sys/netinet6/in6_ifattach.c#11 integrate .. //depot/projects/smpng/sys/netinet6/in6_pcb.c#34 integrate .. //depot/projects/smpng/sys/netinet6/in6_prefix.c#5 delete .. //depot/projects/smpng/sys/netinet6/in6_prefix.h#2 delete .. //depot/projects/smpng/sys/netinet6/in6_proto.c#9 integrate .. //depot/projects/smpng/sys/netinet6/ip6_input.c#34 integrate .. //depot/projects/smpng/sys/netinet6/nd6.c#21 integrate .. //depot/projects/smpng/sys/pc98/pc98/fd.c#37 integrate .. //depot/projects/smpng/sys/pci/agp_ali.c#10 integrate .. //depot/projects/smpng/sys/pci/agp_intel.c#17 integrate .. //depot/projects/smpng/sys/security/mac_bsdextended/mac_bsdextended.c#11 integrate .. //depot/projects/smpng/sys/sparc64/sparc64/uio_machdep.c#5 integrate .. //depot/projects/smpng/sys/sys/fdcio.h#4 integrate .. //depot/projects/smpng/sys/sys/param.h#69 integrate .. //depot/projects/smpng/sys/sys/smp.h#11 integrate .. //depot/projects/smpng/sys/ufs/ufs/ufs_vnops.c#38 integrate .. //depot/projects/smpng/sys/vm/vm_fault.c#39 integrate .. //depot/projects/smpng/sys/vm/vm_page.h#26 integrate Differences ... ==== //depot/projects/smpng/sys/alpha/linux/linux_proto.h#14 (text+ko) ==== @@ -2,8 +2,8 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/alpha/linux/linux_proto.h,v 1.18 2004/06/04 13:52:51 jhb Exp $ - * created from FreeBSD: src/sys/alpha/linux/syscalls.master,v 1.58 2004/06/04 13:52:23 jhb Exp + * $FreeBSD: src/sys/alpha/linux/linux_proto.h,v 1.19 2004/08/24 20:24:33 jhb Exp $ + * created from FreeBSD: src/sys/alpha/linux/syscalls.master,v 1.59 2004/08/24 20:21:21 jhb Exp */ #ifndef _LINUX_SYSPROTO_H_ ==== //depot/projects/smpng/sys/alpha/linux/linux_syscall.h#12 (text+ko) ==== @@ -2,8 +2,8 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/alpha/linux/linux_syscall.h,v 1.16 2004/06/04 13:52:51 jhb Exp $ - * created from FreeBSD: src/sys/alpha/linux/syscalls.master,v 1.58 2004/06/04 13:52:23 jhb Exp + * $FreeBSD: src/sys/alpha/linux/linux_syscall.h,v 1.17 2004/08/24 20:24:33 jhb Exp $ + * created from FreeBSD: src/sys/alpha/linux/syscalls.master,v 1.59 2004/08/24 20:21:21 jhb Exp */ #define LINUX_SYS_exit 1 ==== //depot/projects/smpng/sys/alpha/linux/linux_sysent.c#12 (text+ko) ==== @@ -2,8 +2,8 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/alpha/linux/linux_sysent.c,v 1.16 2004/06/04 13:52:51 jhb Exp $ - * created from FreeBSD: src/sys/alpha/linux/syscalls.master,v 1.58 2004/06/04 13:52:23 jhb Exp + * $FreeBSD: src/sys/alpha/linux/linux_sysent.c,v 1.17 2004/08/24 20:24:33 jhb Exp $ + * created from FreeBSD: src/sys/alpha/linux/syscalls.master,v 1.59 2004/08/24 20:21:21 jhb Exp */ #include "opt_compat.h" @@ -109,7 +109,7 @@ { 0, (sy_call_t *)linux_getdtablesize }, /* 89 = linux_getdtablesize */ { SYF_MPSAFE | AS(dup2_args), (sy_call_t *)dup2 }, /* 90 = dup2 */ { AS(linux_newfstat_args), (sy_call_t *)linux_newfstat }, /* 91 = linux_newfstat */ - { AS(linux_fcntl_args), (sy_call_t *)linux_fcntl }, /* 92 = linux_fcntl */ + { SYF_MPSAFE | AS(linux_fcntl_args), (sy_call_t *)linux_fcntl }, /* 92 = linux_fcntl */ { AS(osf1_select_args), (sy_call_t *)osf1_select }, /* 93 = osf1_select */ { AS(poll_args), (sy_call_t *)poll }, /* 94 = poll */ { AS(fsync_args), (sy_call_t *)fsync }, /* 95 = fsync */ ==== //depot/projects/smpng/sys/alpha/linux/syscalls.master#14 (text+ko) ==== @@ -1,4 +1,4 @@ - $FreeBSD: src/sys/alpha/linux/syscalls.master,v 1.58 2004/06/04 13:52:23 jhb Exp $ + $FreeBSD: src/sys/alpha/linux/syscalls.master,v 1.59 2004/08/24 20:21:21 jhb Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 ; System call name/number master file (or rather, slave, from LINUX). ==== //depot/projects/smpng/sys/alpha/osf1/osf1_misc.c#30 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/alpha/osf1/osf1_misc.c,v 1.47 2004/07/26 07:24:01 cperciva Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/osf1/osf1_misc.c,v 1.48 2004/08/24 20:21:21 jhb Exp $"); #include <sys/param.h> #include <sys/systm.h> ==== //depot/projects/smpng/sys/alpha/osf1/osf1_proto.h#8 (text+ko) ==== @@ -2,8 +2,8 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/alpha/osf1/osf1_proto.h,v 1.10 2004/03/15 22:44:35 jhb Exp $ - * created from; FreeBSD: src/sys/alpha/osf1/syscalls.master,v 1.9 2004/03/15 22:43:49 jhb Exp + * $FreeBSD: src/sys/alpha/osf1/osf1_proto.h,v 1.11 2004/08/24 20:24:33 jhb Exp $ + * created from; FreeBSD: src/sys/alpha/osf1/syscalls.master,v 1.10 2004/08/24 20:21:21 jhb Exp */ #ifndef _OSF1_SYSPROTO_H_ ==== //depot/projects/smpng/sys/alpha/osf1/osf1_syscall.h#7 (text+ko) ==== @@ -2,8 +2,8 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/alpha/osf1/osf1_syscall.h,v 1.9 2004/03/15 22:44:35 jhb Exp $ - * created from; FreeBSD: src/sys/alpha/osf1/syscalls.master,v 1.9 2004/03/15 22:43:49 jhb Exp + * $FreeBSD: src/sys/alpha/osf1/osf1_syscall.h,v 1.10 2004/08/24 20:24:33 jhb Exp $ + * created from; FreeBSD: src/sys/alpha/osf1/syscalls.master,v 1.10 2004/08/24 20:21:21 jhb Exp */ #define OSF1_SYS_nosys 0 ==== //depot/projects/smpng/sys/alpha/osf1/osf1_sysent.c#7 (text+ko) ==== @@ -2,8 +2,8 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/alpha/osf1/osf1_sysent.c,v 1.9 2004/03/15 22:44:35 jhb Exp $ - * created from; FreeBSD: src/sys/alpha/osf1/syscalls.master,v 1.9 2004/03/15 22:43:49 jhb Exp + * $FreeBSD: src/sys/alpha/osf1/osf1_sysent.c,v 1.10 2004/08/24 20:24:33 jhb Exp $ + * created from; FreeBSD: src/sys/alpha/osf1/syscalls.master,v 1.10 2004/08/24 20:21:21 jhb Exp */ #include "opt_compat.h" @@ -110,7 +110,7 @@ { SYF_MPSAFE | 0, (sy_call_t *)getdtablesize }, /* 89 = getdtablesize */ { SYF_MPSAFE | AS(dup2_args), (sy_call_t *)dup2 }, /* 90 = dup2 */ { AS(osf1_fstat_args), (sy_call_t *)osf1_fstat }, /* 91 = osf1_fstat */ - { AS(osf1_fcntl_args), (sy_call_t *)osf1_fcntl }, /* 92 = osf1_fcntl */ + { SYF_MPSAFE | AS(osf1_fcntl_args), (sy_call_t *)osf1_fcntl }, /* 92 = osf1_fcntl */ { AS(osf1_select_args), (sy_call_t *)osf1_select }, /* 93 = osf1_select */ { AS(poll_args), (sy_call_t *)poll }, /* 94 = poll */ { AS(fsync_args), (sy_call_t *)fsync }, /* 95 = fsync */ ==== //depot/projects/smpng/sys/alpha/osf1/syscalls.master#8 (text+ko) ==== @@ -1,4 +1,4 @@ -; $FreeBSD: src/sys/alpha/osf1/syscalls.master,v 1.9 2004/03/15 22:43:49 jhb Exp $ +; $FreeBSD: src/sys/alpha/osf1/syscalls.master,v 1.10 2004/08/24 20:21:21 jhb Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 ; System call name/number master file (or rather, slave, from OSF1). ==== //depot/projects/smpng/sys/amd64/amd64/machdep.c#28 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.618 2004/08/16 22:57:47 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.619 2004/08/24 00:16:43 peter Exp $"); #include "opt_atalk.h" #include "opt_atpic.h" @@ -498,6 +498,10 @@ cpu_idle(void) { +#ifdef SMP + if (mp_grab_cpu_hlt()) + return; +#endif if (cpu_idle_hlt) { disable_intr(); if (sched_runnable()) ==== //depot/projects/smpng/sys/amd64/amd64/mp_machdep.c#12 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.242 2004/08/13 22:30:55 ambrisko Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.243 2004/08/23 21:39:28 peter Exp $"); #include "opt_cpu.h" #include "opt_kstack_pages.h" @@ -103,7 +103,6 @@ vm_offset_t smp_tlb_addr1; vm_offset_t smp_tlb_addr2; volatile int smp_tlb_wait; -struct mtx smp_tlb_mtx; extern inthand_t IDTVEC(fast_syscall), IDTVEC(fast_syscall32); @@ -319,8 +318,6 @@ /* Install an inter-CPU IPI for CPU stop/restart */ setidt(IPI_STOP, IDTVEC(cpustop), SDT_SYSIGT, SEL_KPL, 0); - mtx_init(&smp_tlb_mtx, "tlb", NULL, MTX_SPIN); - /* Set boot_cpu_id if needed. */ if (boot_cpu_id == -1) { boot_cpu_id = PCPU_GET(apic_id); @@ -711,7 +708,7 @@ ncpu = mp_ncpus - 1; /* does not shootdown self */ if (ncpu < 1) return; /* no other cpus */ - mtx_assert(&smp_tlb_mtx, MA_OWNED); + mtx_assert(&smp_rv_mtx, MA_OWNED); smp_tlb_addr1 = addr1; smp_tlb_addr2 = addr2; atomic_store_rel_int(&smp_tlb_wait, 0); @@ -797,7 +794,7 @@ if (ncpu < 1) return; } - mtx_assert(&smp_tlb_mtx, MA_OWNED); + mtx_assert(&smp_rv_mtx, MA_OWNED); smp_tlb_addr1 = addr1; smp_tlb_addr2 = addr2; atomic_store_rel_int(&smp_tlb_wait, 0); ==== //depot/projects/smpng/sys/amd64/amd64/nexus.c#13 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.62 2004/07/08 01:34:24 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.63 2004/08/24 19:22:54 njl Exp $"); /* * This code implements a `root nexus' for Intel Architecture @@ -97,6 +97,7 @@ void (*)(void *), void *, void **); static int nexus_teardown_intr(device_t, device_t, struct resource *, void *); +static struct resource_list *nexus_get_reslist(device_t dev, device_t child); static int nexus_set_resource(device_t, device_t, int, int, u_long, u_long); static int nexus_get_resource(device_t, device_t, int, int, u_long *, u_long *); static void nexus_delete_resource(device_t, device_t, int, int); @@ -120,6 +121,7 @@ DEVMETHOD(bus_setup_intr, nexus_setup_intr), DEVMETHOD(bus_teardown_intr, nexus_teardown_intr), DEVMETHOD(bus_config_intr, nexus_config_intr), + DEVMETHOD(bus_get_resource_list, nexus_get_reslist), DEVMETHOD(bus_set_resource, nexus_set_resource), DEVMETHOD(bus_get_resource, nexus_get_resource), DEVMETHOD(bus_delete_resource, nexus_delete_resource), @@ -464,6 +466,14 @@ return (intr_config_intr(irq, trig, pol)); } +static struct resource_list * +nexus_get_reslist(device_t dev, device_t child) +{ + struct nexus_device *ndev = DEVTONX(child); + + return (&ndev->nx_resources); +} + static int nexus_set_resource(device_t dev, device_t child, int type, int rid, u_long start, u_long count) { ==== //depot/projects/smpng/sys/amd64/amd64/pmap.c#30 (text+ko) ==== @@ -75,7 +75,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.491 2004/08/08 00:31:58 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.493 2004/08/24 00:17:52 peter Exp $"); /* * Manages physical address maps. @@ -631,7 +631,7 @@ if (smp_started) { if (!(read_rflags() & PSL_I)) panic("%s: interrupts disabled", __func__); - mtx_lock_spin(&smp_tlb_mtx); + mtx_lock_spin(&smp_rv_mtx); } else critical_enter(); /* @@ -652,7 +652,7 @@ smp_masked_invlpg(pmap->pm_active & other_cpus, va); } if (smp_started) - mtx_unlock_spin(&smp_tlb_mtx); + mtx_unlock_spin(&smp_rv_mtx); else critical_exit(); } @@ -667,7 +667,7 @@ if (smp_started) { if (!(read_rflags() & PSL_I)) panic("%s: interrupts disabled", __func__); - mtx_lock_spin(&smp_tlb_mtx); + mtx_lock_spin(&smp_rv_mtx); } else critical_enter(); /* @@ -691,7 +691,7 @@ sva, eva); } if (smp_started) - mtx_unlock_spin(&smp_tlb_mtx); + mtx_unlock_spin(&smp_rv_mtx); else critical_exit(); } @@ -705,7 +705,7 @@ if (smp_started) { if (!(read_rflags() & PSL_I)) panic("%s: interrupts disabled", __func__); - mtx_lock_spin(&smp_tlb_mtx); + mtx_lock_spin(&smp_rv_mtx); } else critical_enter(); /* @@ -726,7 +726,7 @@ smp_masked_invltlb(pmap->pm_active & other_cpus); } if (smp_started) - mtx_unlock_spin(&smp_tlb_mtx); + mtx_unlock_spin(&smp_rv_mtx); else critical_exit(); } @@ -1048,9 +1048,7 @@ if (va >= VM_MAXUSER_ADDRESS) return 0; -/* XXX this should be an error, all cases should be caught now */ - if (ptepde == 0) - ptepde = *pmap_pde(pmap, va); + KASSERT(ptepde != 0, ("pmap_unuse_pt: ptepde != 0")); mpte = PHYS_TO_VM_PAGE(ptepde & PG_FRAME); return pmap_unwire_pte_hold(pmap, va, mpte); } ==== //depot/projects/smpng/sys/amd64/linux32/linux32_machdep.c#2 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.2 2004/08/16 10:54:25 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.3 2004/08/24 20:52:52 jhb Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -849,8 +849,8 @@ ss.ss_size = lss.ss_size; ss.ss_flags = linux_to_bsd_sigaltstack(lss.ss_flags); } - error = kern_sigaltstack(td, (uap->uoss != NULL) ? &oss : NULL, - (uap->uss != NULL) ? &ss : NULL); + error = kern_sigaltstack(td, (uap->uss != NULL) ? &ss : NULL, + (uap->uoss != NULL) ? &oss : NULL); if (!error && uap->uoss != NULL) { lss.ss_sp = PTROUT(oss.ss_sp); lss.ss_size = oss.ss_size; ==== //depot/projects/smpng/sys/boot/alpha/Makefile.inc#3 (text+ko) ==== @@ -1,9 +1,9 @@ -# $FreeBSD: src/sys/boot/alpha/Makefile.inc,v 1.9 2004/02/11 22:01:16 ru Exp $ +# $FreeBSD: src/sys/boot/alpha/Makefile.inc,v 1.11 2004/08/23 16:25:07 obrien Exp $ # Options used when building app-specific libalpha components BINDIR?= /boot -CFLAGS+= -ffreestanding -mno-fp-regs +CFLAGS+= -ffreestanding -mno-fp-regs -Os LDFLAGS+= -nostdlib PRIMARY_LOAD_ADDRESS= 0x20000000 # "Region 1 start" SECONDARY_LOAD_ADDRESS= 0x2000c000 # "Region 1 start" + 48k ==== //depot/projects/smpng/sys/boot/alpha/common/Makefile.common#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/alpha/common/Makefile.common,v 1.18 2004/02/11 22:01:17 ru Exp $ +# $FreeBSD: src/sys/boot/alpha/common/Makefile.common,v 1.19 2004/08/22 00:26:01 marcel Exp $ # # Common Alpha loader build rules @@ -40,7 +40,7 @@ vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} -LDFLAGS=-e start -N -Ttext ${LOAD_ADDRESS} +LDFLAGS=-e start -Ttext ${LOAD_ADDRESS} -T ${.CURDIR}/../common/ldscript FILES= ${BOOT} # XXX INSTALLFLAGS_${BOOT}= -b ==== //depot/projects/smpng/sys/boot/common/load.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/boot/common/load.c,v 1.3 2003/08/25 23:30:41 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/common/load.c,v 1.5 2004/08/22 08:57:05 maxim Exp $"); #include <stand.h> @@ -45,10 +45,10 @@ char *buf; int fd; size_t size, result; - + if ((fd = open(path, F_READ | flags)) == -1) return(NULL); - + printf("%s open, flags 0x%x\n", path, files[fd].f_flags); buf = alloc(LOAD_TINYBUF); @@ -68,12 +68,11 @@ printf("tinybuf loaded, size %d\n", size); getchar(); - - + /* Read everything until we know how big it is */ for (;;) { result = read(fd, buf, LOAD_TINYBUF); - if (size == -1) { + if (result == -1) { free(buf, LOAD_TINYBUF); close(fd); return(NULL); @@ -82,7 +81,7 @@ break; size += result; } - + /* discard the old buffer, close the file */ free(buf, LOAD_TINYBUF); close(fd); ==== //depot/projects/smpng/sys/boot/ficl/Makefile#9 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/ficl/Makefile,v 1.37 2004/02/07 08:10:07 ru Exp $ +# $FreeBSD: src/sys/boot/ficl/Makefile,v 1.39 2004/08/23 16:25:07 obrien Exp $ # .PATH: ${.CURDIR}/${MACHINE_ARCH:S/amd64/i386/} BASE_SRCS= dict.c ficl.c fileaccess.c float.c loader.c math64.c \ @@ -8,7 +8,7 @@ CLEANFILES= softcore.c testmain testmain.o CFLAGS+= -ffreestanding .if ${MACHINE_ARCH} == "alpha" -CFLAGS+= -mno-fp-regs +CFLAGS+= -mno-fp-regs -Os .endif .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" CFLAGS+= -mpreferred-stack-boundary=2 ==== //depot/projects/smpng/sys/compat/linux/linux_socket.c#20 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.51 2004/08/16 07:28:16 tjr Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.53 2004/08/24 20:21:21 jhb Exp $"); /* XXX we use functions that might not exist. */ #include "opt_compat.h" @@ -1004,7 +1004,8 @@ if (error) return (error); - if (bsd_args.msg->msg_control != NULL) { + if (bsd_args.msg->msg_control != NULL && + bsd_args.msg->msg_controllen > 0) { cmsg = (struct cmsghdr*)bsd_args.msg->msg_control; cmsg->cmsg_level = bsd_to_linux_sockopt_level(cmsg->cmsg_level); } ==== //depot/projects/smpng/sys/compat/svr4/svr4_fcntl.c#17 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_fcntl.c,v 1.32 2003/06/22 08:41:41 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_fcntl.c,v 1.33 2004/08/24 20:21:21 jhb Exp $"); #include "opt_mac.h" ==== //depot/projects/smpng/sys/compat/svr4/svr4_proto.h#7 (text+ko) ==== @@ -2,8 +2,8 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/svr4/svr4_proto.h,v 1.15 2004/02/06 20:21:18 jhb Exp $ - * created from FreeBSD: src/sys/compat/svr4/syscalls.master,v 1.15 2004/02/06 20:07:33 jhb Exp + * $FreeBSD: src/sys/compat/svr4/svr4_proto.h,v 1.16 2004/08/24 20:24:33 jhb Exp $ + * created from FreeBSD: src/sys/compat/svr4/syscalls.master,v 1.16 2004/08/24 20:21:21 jhb Exp */ #ifndef _SVR4_SYSPROTO_H_ ==== //depot/projects/smpng/sys/compat/svr4/svr4_stream.c#20 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_stream.c,v 1.49 2004/07/10 15:42:16 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_stream.c,v 1.50 2004/08/24 20:21:21 jhb Exp $"); #define COMPAT_43 1 ==== //depot/projects/smpng/sys/compat/svr4/svr4_syscall.h#6 (text+ko) ==== @@ -2,8 +2,8 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/svr4/svr4_syscall.h,v 1.13 2004/02/06 20:21:18 jhb Exp $ - * created from FreeBSD: src/sys/compat/svr4/syscalls.master,v 1.15 2004/02/06 20:07:33 jhb Exp + * $FreeBSD: src/sys/compat/svr4/svr4_syscall.h,v 1.14 2004/08/24 20:24:33 jhb Exp $ + * created from FreeBSD: src/sys/compat/svr4/syscalls.master,v 1.16 2004/08/24 20:21:21 jhb Exp */ #define SVR4_SYS_exit 1 ==== //depot/projects/smpng/sys/compat/svr4/svr4_syscallnames.c#6 (text+ko) ==== @@ -2,8 +2,8 @@ * System call names. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/svr4/svr4_syscallnames.c,v 1.13 2004/02/06 20:21:18 jhb Exp $ - * created from FreeBSD: src/sys/compat/svr4/syscalls.master,v 1.15 2004/02/06 20:07:33 jhb Exp + * $FreeBSD: src/sys/compat/svr4/svr4_syscallnames.c,v 1.14 2004/08/24 20:24:33 jhb Exp $ + * created from FreeBSD: src/sys/compat/svr4/syscalls.master,v 1.16 2004/08/24 20:21:21 jhb Exp */ const char *svr4_syscallnames[] = { ==== //depot/projects/smpng/sys/compat/svr4/svr4_sysent.c#6 (text+ko) ==== @@ -2,8 +2,8 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/svr4/svr4_sysent.c,v 1.14 2004/02/06 20:21:18 jhb Exp $ - * created from FreeBSD: src/sys/compat/svr4/syscalls.master,v 1.15 2004/02/06 20:07:33 jhb Exp + * $FreeBSD: src/sys/compat/svr4/svr4_sysent.c,v 1.15 2004/08/24 20:24:33 jhb Exp $ + * created from FreeBSD: src/sys/compat/svr4/syscalls.master,v 1.16 2004/08/24 20:21:21 jhb Exp */ #include <sys/types.h> @@ -85,7 +85,7 @@ { AS(svr4_sys_execve_args), (sy_call_t *)svr4_sys_execve }, /* 59 = svr4_sys_execve */ { SYF_MPSAFE | AS(umask_args), (sy_call_t *)umask }, /* 60 = umask */ { AS(chroot_args), (sy_call_t *)chroot }, /* 61 = chroot */ - { AS(svr4_sys_fcntl_args), (sy_call_t *)svr4_sys_fcntl }, /* 62 = svr4_sys_fcntl */ + { SYF_MPSAFE | AS(svr4_sys_fcntl_args), (sy_call_t *)svr4_sys_fcntl }, /* 62 = svr4_sys_fcntl */ { SYF_MPSAFE | AS(svr4_sys_ulimit_args), (sy_call_t *)svr4_sys_ulimit }, /* 63 = svr4_sys_ulimit */ { 0, (sy_call_t *)nosys }, /* 64 = reserved */ { 0, (sy_call_t *)nosys }, /* 65 = reserved */ ==== //depot/projects/smpng/sys/compat/svr4/syscalls.master#7 (text+ko) ==== @@ -1,4 +1,4 @@ - $FreeBSD: src/sys/compat/svr4/syscalls.master,v 1.15 2004/02/06 20:07:33 jhb Exp $ + $FreeBSD: src/sys/compat/svr4/syscalls.master,v 1.16 2004/08/24 20:21:21 jhb Exp $ ; from: @(#)syscalls.master 8.1 (Berkeley) 7/19/93 ; ; System call name/number master file (or rather, slave, from SVR4). ==== //depot/projects/smpng/sys/conf/files#118 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.943 2004/08/17 22:05:53 andre Exp $ +# $FreeBSD: src/sys/conf/files,v 1.944 2004/08/23 03:00:25 rwatson Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -1517,7 +1517,6 @@ netinet6/in6_gif.c optional gif inet6 netinet6/in6_ifattach.c optional inet6 netinet6/in6_pcb.c optional inet6 -netinet6/in6_prefix.c optional inet6 netinet6/in6_proto.c optional inet6 netinet6/in6_rmx.c optional inet6 netinet6/in6_src.c optional inet6 ==== //depot/projects/smpng/sys/conf/options.pc98#41 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options.pc98,v 1.178 2004/08/18 03:46:39 rwatson Exp $ +# $FreeBSD: src/sys/conf/options.pc98,v 1.179 2004/08/22 15:13:08 nyan Exp $ # Options specific to the pc98 platform kernels AUTO_EOI_1 opt_auto_eoi.h @@ -108,6 +108,3 @@ DEV_APIC opt_apic.h DEV_MECIA opt_mecia.h DEV_NPX opt_npx.h - -# agp options -AGP_AMD64_GART opt_agp.h ==== //depot/projects/smpng/sys/contrib/pf/net/pf_ioctl.c#8 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/contrib/pf/net/pf_ioctl.c,v 1.12 2004/08/12 14:15:42 mlaier Exp $ */ +/* $FreeBSD: src/sys/contrib/pf/net/pf_ioctl.c,v 1.13 2004/08/22 15:23:48 mlaier Exp $ */ /* $OpenBSD: pf_ioctl.c,v 1.112.2.2 2004/07/24 18:28:12 brad Exp $ */ /* @@ -66,6 +66,7 @@ #ifdef __FreeBSD__ #include <sys/module.h> #include <sys/conf.h> +#include <sys/proc.h> #else #include <sys/timeout.h> #include <sys/pool.h> @@ -979,7 +980,11 @@ int error = 0; /* XXX keep in sync with switch() below */ +#ifdef __FreeBSD__ + if (securelevel_gt(td->td_ucred, 1)) +#else if (securelevel > 1) +#endif switch (cmd) { case DIOCGETRULES: case DIOCGETRULE: ==== //depot/projects/smpng/sys/dev/acpica/acpi.c#72 (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.188 2004/08/18 07:00:43 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.189 2004/08/23 16:28:42 njl Exp $ */ #include "opt_acpi.h" @@ -83,9 +83,6 @@ /* Bitmap of device quirks. */ int acpi_quirks; -/* Local pools for managing system resources for ACPI child devices. */ -struct rman acpi_rman_io, acpi_rman_mem; - static int acpi_modevent(struct module *mod, int event, void *junk); static void acpi_identify(driver_t *driver, device_t parent); static int acpi_probe(device_t dev); @@ -99,6 +96,9 @@ static int acpi_write_ivar(device_t dev, device_t child, int index, uintptr_t value); static struct resource_list *acpi_get_rlist(device_t dev, device_t child); +static int acpi_sysres_alloc(device_t dev); +static struct resource_list_entry *acpi_sysres_find(device_t dev, int type, + u_long addr); static struct resource *acpi_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags); @@ -189,6 +189,9 @@ ACPI_SERIAL_DECL(acpi, "ACPI root bus"); +/* Local pools for managing system resources for ACPI child devices. */ +static struct rman acpi_rman_io, acpi_rman_mem; + #define ACPI_MINIMUM_AWAKETIME 5 static const char* sleep_state_names[] = { @@ -745,6 +748,75 @@ return (&ad->ad_rl); } +/* + * Pre-allocate/manage all memory and IO resources. Since rman can't handle + * duplicates, we merge any in the sysresource attach routine. + */ +static int +acpi_sysres_alloc(device_t dev) +{ + struct resource *res; + struct resource_list *rl; + struct resource_list_entry *rle; + struct rman *rm; + + rl = BUS_GET_RESOURCE_LIST(device_get_parent(dev), dev); + SLIST_FOREACH(rle, rl, link) { + if (rle->res != NULL) { + device_printf(dev, "duplicate resource for %lx\n", rle->start); + continue; + } + + /* Only memory and IO resources are valid here. */ + switch (rle->type) { + case SYS_RES_IOPORT: + rm = &acpi_rman_io; + break; + case SYS_RES_MEMORY: + rm = &acpi_rman_mem; + break; + default: + continue; + } + + /* Pre-allocate resource and add to our rman pool. */ + res = BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, rle->type, + &rle->rid, rle->start, rle->start + rle->count - 1, rle->count, 0); + if (res != NULL) { + rman_manage_region(rm, rman_get_start(res), rman_get_end(res)); + rle->res = res; + } else + device_printf(dev, "reservation of %lx, %lx (%d) failed\n", + rle->start, rle->count, rle->type); + } + return (0); +} + +/* Find if we manage a given resource. */ +static struct resource_list_entry * +acpi_sysres_find(device_t dev, int type, u_long addr) +{ + struct resource_list *rl; + struct resource_list_entry *rle; + + ACPI_SERIAL_ASSERT(acpi); + + /* We only consider IO and memory resources for our pool. */ + rle = NULL; + if (type != SYS_RES_IOPORT && type != SYS_RES_MEMORY) + goto out; + + rl = BUS_GET_RESOURCE_LIST(device_get_parent(dev), dev); + SLIST_FOREACH(rle, rl, link) { + if (type == rle->type && addr >= rle->start && + addr < rle->start + rle->count) + break; + } + +out: + return (rle); +} + static struct resource * acpi_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) @@ -774,7 +846,7 @@ } /* If we don't manage this address, pass the request up to the parent. */ - rle = acpi_sysres_find(type, start); + rle = acpi_sysres_find(bus, type, start); if (rle == NULL) { res = BUS_ALLOC_RESOURCE(device_get_parent(bus), child, type, rid, start, end, count, flags); @@ -844,7 +916,7 @@ * If we know about this address, deactivate it and release it to the * local pool. If we don't, pass this request up to the parent. */ - if (acpi_sysres_find(type, rman_get_start(r)) == NULL) { + if (acpi_sysres_find(bus, type, rman_get_start(r)) == NULL) { if (rman_get_flags(r) & RF_ACTIVE) { ret = bus_deactivate_resource(child, type, rid, r); if (ret != 0) @@ -1134,6 +1206,9 @@ } } + /* Pre-allocate resources for our rman from any sysresource devices. */ + acpi_sysres_alloc(bus); + /* Create any static children by calling device identify methods. */ ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "device identify routines\n")); bus_generic_probe(bus); @@ -1757,7 +1832,7 @@ case ACPI_STATE_S2: case ACPI_STATE_S3: case ACPI_STATE_S4: - status = AcpiGetSleepTypeData((UINT8)state, &TypeA, &TypeB); + status = AcpiGetSleepTypeData(state, &TypeA, &TypeB); if (status == AE_NOT_FOUND) { device_printf(sc->acpi_dev, "Sleep state S%d not supported by BIOS\n", state); @@ -1807,7 +1882,7 @@ AcpiEnable(); } else { ACPI_DISABLE_IRQS(); - status = AcpiEnterSleepState((UINT8)state); + status = AcpiEnterSleepState(state); if (ACPI_FAILURE(status)) { device_printf(sc->acpi_dev, "AcpiEnterSleepState failed - %s\n", AcpiFormatException(status)); ==== //depot/projects/smpng/sys/dev/acpica/acpi_pci_link.c#18 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.25 2004/08/18 16:39:59 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.26 2004/08/21 18:18:32 njl Exp $"); #include "opt_acpi.h" #include <sys/param.h> @@ -1018,7 +1018,7 @@ /* Walk through all PRT entries for this PCI bridge. */ ACPI_SERIAL_BEGIN(pci_link); TAILQ_FOREACH(entry, &acpi_prt_entries, links) { - if (entry->pcidev == dev || entry->pci_link == NULL) + if (entry->pcidev != dev || entry->pci_link == NULL) continue; link = entry->pci_link; ==== //depot/projects/smpng/sys/dev/acpica/acpi_resource.c#21 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_resource.c,v 1.30 2004/08/20 17:04:49 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_resource.c,v 1.31 2004/08/23 16:28:42 njl Exp $"); #include "opt_acpi.h" #include <sys/param.h> @@ -504,51 +504,6 @@ void *ar_parent; }; -/* - * Add a resource to the device's resource list. We define our own function - * for this since bus_set_resource() doesn't handle duplicates of any kind. - * - * XXX This should be merged into resource_list_add() eventually. - */ -static int -acpi_reslist_add(device_t dev, int type, int rid, u_long start, u_long count) -{ - struct resource_list_entry *rle; - struct resource_list *rl; - u_long end; - - end = start + count - 1; - rl = BUS_GET_RESOURCE_LIST(device_get_parent(dev), dev); - - /* - * Loop through all current resources to see if the new one overlaps - * any existing ones. If so, the old one always takes precedence and - * the new one is adjusted (or rejected). We check for three cases: - * - * 1. Tail of new resource overlaps head of old resource: truncate the - * new resource so it is contiguous with the start of the old. - * 2. New resource wholly contained within the old resource: error. - * 3. Head of new resource overlaps tail of old resource: truncate the - * new resource so it is contiguous, following the old. - */ - SLIST_FOREACH(rle, rl, link) { - if (rle->type == type) { - if (start < rle->start && end >= rle->start) { - count = rle->start - start; - break; - } else if (start >= rle->start && start <= rle->end) { - if (end > rle->end) { - start = rle->end + 1; - count = end - start + 1; - break; - } else - return (EEXIST); - } - } - } - return (bus_set_resource(dev, type, rid, start, count)); -} - static void acpi_res_set_init(device_t dev, void *arg, void **context) { @@ -579,7 +534,7 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408250035.i7P0ZvCI041525>