Date: Thu, 16 Aug 2007 17:22:50 GMT From: Rui Paulo <rpaulo@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 125221 for review Message-ID: <200708161722.l7GHMoej099869@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=125221 Change 125221 by rpaulo@rpaulo_alpha on 2007/08/16 17:22:03 IFC Affected files ... .. //depot/projects/soc2007/rpaulo-macbook/amd64/amd64/local_apic.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/amd64/amd64/mp_machdep.c#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/amd64/conf/NOTES#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/amd64/include/specialreg.h#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/arm/arm/cpufunc.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/arm/arm/genassym.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/arm/arm/swtch.S#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/boot/arm/at91/libat91/Makefile#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/compat/freebsd32/freebsd32_proto.h#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/compat/freebsd32/freebsd32_syscall.h#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/compat/freebsd32/freebsd32_syscalls.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/compat/freebsd32/freebsd32_sysent.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/compat/freebsd32/syscalls.master#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/compat/linux/linux_socket.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/conf/NOTES#16 integrate .. //depot/projects/soc2007/rpaulo-macbook/conf/files#22 integrate .. //depot/projects/soc2007/rpaulo-macbook/conf/files.amd64#8 integrate .. //depot/projects/soc2007/rpaulo-macbook/conf/files.i386#8 integrate .. //depot/projects/soc2007/rpaulo-macbook/conf/kern.pre.mk#7 integrate .. //depot/projects/soc2007/rpaulo-macbook/conf/options#13 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/adlink/adlink.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/an/if_an.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/ata/ata-raid.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/ath/if_ath.c#7 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/coretemp/coretemp.c#1 branch .. //depot/projects/soc2007/rpaulo-macbook/dev/cxgb/cxgb_adapter.h#6 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/cxgb/cxgb_main.c#8 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/cxgb/cxgb_offload.c#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/cxgb/cxgb_sge.c#7 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/dc/if_dc.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/dc/if_dcreg.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/em/if_em.c#9 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/ichwd/ichwd.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/ichwd/ichwd.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/mfi/mfi.c#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/mfi/mfi_disk.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/mfi/mfi_pci.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/mfi/mfireg.h#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/mfi/mfivar.h#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/mpt/mpt.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/mpt/mpt.h#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/mpt/mpt_cam.c#6 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/nmdm/nmdm.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/re/if_re.c#6 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/streams/streams.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/usb/ehci.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/usb/if_axe.c#7 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/usb/if_axereg.h#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/dev/wi/if_wi.c#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/msdosfs/denode.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/msdosfs/msdosfs_conv.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/msdosfs/msdosfs_denode.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/msdosfs/msdosfs_fat.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/msdosfs/msdosfs_fileno.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/msdosfs/msdosfs_iconv.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/msdosfs/msdosfs_lookup.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/msdosfs/msdosfs_vfsops.c#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/msdosfs/msdosfs_vnops.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/tmpfs/tmpfs.h#6 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/tmpfs/tmpfs_subr.c#7 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/tmpfs/tmpfs_vfsops.c#8 integrate .. //depot/projects/soc2007/rpaulo-macbook/fs/tmpfs/tmpfs_vnops.c#7 integrate .. //depot/projects/soc2007/rpaulo-macbook/gnu/fs/ext2fs/ext2_vfsops.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/i386/conf/NOTES#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/i386/i386/local_apic.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/i386/i386/machdep.c#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/i386/i386/mp_machdep.c#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/i386/include/cpufunc.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/i386/include/specialreg.h#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/ia64/ia64/clock.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/ia64/ia64/exception.S#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/ia64/ia64/interrupt.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/ia64/ia64/machdep.c#7 integrate .. //depot/projects/soc2007/rpaulo-macbook/ia64/ia64/mp_machdep.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/ia64/ia64/pmap.c#7 integrate .. //depot/projects/soc2007/rpaulo-macbook/ia64/include/ia64_cpu.h#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/ia64/include/md_var.h#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/init_sysent.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/kern_descrip.c#7 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/kern_lockf.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/kern_poll.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/kern_switch.c#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/kern_thr.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/sched_ule.c#8 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/sys_socket.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/syscalls.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/syscalls.master#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/systrace_args.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/uipc_domain.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/uipc_syscalls.c#7 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/vfs_mount.c#6 integrate .. //depot/projects/soc2007/rpaulo-macbook/kern/vfs_subr.c#6 integrate .. //depot/projects/soc2007/rpaulo-macbook/modules/Makefile#14 integrate .. //depot/projects/soc2007/rpaulo-macbook/modules/coretemp/Makefile#1 branch .. //depot/projects/soc2007/rpaulo-macbook/modules/netgraph/bluetooth/Makefile#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/net/bpf.c#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/net/bpfdesc.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/net/bridgestp.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/net/bridgestp.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/net/netisr.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/netgraph/bluetooth/drivers/h4/TODO#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/netgraph/bluetooth/drivers/h4/ng_h4.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/netgraph/bluetooth/drivers/h4/ng_h4_prse.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/netgraph/bluetooth/drivers/h4/ng_h4_var.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/netgraph/netflow/netflow.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/netgraph/ng_ppp.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/netgraph/ng_ppp.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/in_mcast.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/in_pcb.h#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/ip_divert.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/ip_dummynet.c#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/ip_fw2.c#7 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/ip_input.c#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/ip_ipsec.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/ip_ipsec.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/ip_mroute.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/sctp_asconf.c#11 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/sctp_constants.h#10 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/sctp_input.c#16 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/sctp_output.c#16 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/sctp_pcb.c#16 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/sctp_timer.c#11 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/sctp_uio.h#9 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/sctp_usrreq.c#15 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/sctputil.c#16 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/tcp_subr.c#13 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet/tcp_syncache.c#10 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet6/ip6_ipsec.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/netinet6/ip6_ipsec.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/netipsec/xform_ah.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/netipsec/xform_esp.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/netipsec/xform_ipcomp.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/nfsclient/bootp_subr.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/nfsclient/krpc_subr.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/nfsclient/nfs_socket.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/nfsclient/nfs_vfsops.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/nfsserver/nfs_srvsock.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/nfsserver/nfs_srvsubs.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/nfsserver/nfs_syscalls.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/pci/if_xl.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/pci/viapm.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/include/interruptvar.h#2 delete .. //depot/projects/soc2007/rpaulo-macbook/powerpc/include/intr_machdep.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/include/md_var.h#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/include/openpicvar.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/include/trap.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/powermac/hrowpic.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/powermac/hrowpicvar.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/powermac/openpic_macio.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/powerpc/autoconf.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/powerpc/interrupt.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/powerpc/intr_machdep.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/powerpc/nexus.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/powerpc/openpic.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/powerpc/pic_if.m#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/powerpc/trap.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/powerpc/psim/openpic_iobus.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/rpc/rpcclnt.c#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/security/mac/mac_syscalls.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/sparc64/include/iommureg.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/sparc64/include/iommuvar.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/sparc64/pci/psycho.c#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/sparc64/pci/psychoreg.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/sparc64/sbus/sbus.c#4 integrate .. //depot/projects/soc2007/rpaulo-macbook/sparc64/sbus/sbusreg.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/sparc64/sparc64/iommu.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/sys/ata.h#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/sys/mutex.h#5 integrate .. //depot/projects/soc2007/rpaulo-macbook/sys/syscall.h#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/sys/syscall.mk#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/sys/sysproto.h#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/sys/thr.h#3 integrate .. //depot/projects/soc2007/rpaulo-macbook/vm/device_pager.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/vm/phys_pager.c#2 integrate .. //depot/projects/soc2007/rpaulo-macbook/vm/swap_pager.c#7 integrate .. //depot/projects/soc2007/rpaulo-macbook/vm/vm_pager.c#2 integrate Differences ... ==== //depot/projects/soc2007/rpaulo-macbook/amd64/amd64/local_apic.c#4 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.40 2007/05/08 22:01:02 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.41 2007/08/02 21:17:58 peter Exp $"); #include "opt_hwpmc_hooks.h" @@ -1060,10 +1060,6 @@ if (retval != 0) printf("%s: Failed to setup the local APIC: returned %d\n", best_enum->apic_name, retval); -#ifdef SMP - /* Last, setup the cpu topology now that we have probed CPUs */ - mp_topology(); -#endif } SYSINIT(apic_setup_local, SI_SUB_CPU, SI_ORDER_FIRST, apic_setup_local, NULL) ==== //depot/projects/soc2007/rpaulo-macbook/amd64/amd64/mp_machdep.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.286 2007/06/04 23:56:07 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.287 2007/08/02 21:17:58 peter Exp $"); #include "opt_cpu.h" #include "opt_kstack_pages.h" @@ -186,26 +186,14 @@ mp_topology(void) { struct cpu_group *group; - u_int regs[4]; - int logical_cpus; int apic_id; int groups; int cpu; /* Build the smp_topology map. */ /* Nothing to do if there is no HTT support. */ - if ((cpu_feature & CPUID_HTT) == 0) + if (hyperthreading_cpus <= 1) return; - logical_cpus = (cpu_procinfo & CPUID_HTT_CORES) >> 16; - if (logical_cpus <= 1) - return; - /* Nothing to do if reported cores are physical cores. */ - if (strcmp(cpu_vendor, "GenuineIntel") == 0 && cpu_high >= 4) { - cpuid_count(4, 0, regs); - if ((regs[0] & 0x1f) != 0 && - logical_cpus <= ((regs[0] >> 26) & 0x3f) + 1) - return; - } group = &mp_groups[0]; groups = 1; for (cpu = 0, apic_id = 0; apic_id <= MAX_APIC_ID; apic_id++) { @@ -215,7 +203,8 @@ * If the current group has members and we're not a logical * cpu, create a new group. */ - if (group->cg_count != 0 && (apic_id % logical_cpus) == 0) { + if (group->cg_count != 0 && + (apic_id % hyperthreading_cpus) == 0) { group++; groups++; } @@ -420,6 +409,9 @@ } set_interrupt_apic_ids(); + + /* Last, setup the cpu topology now that we have probed CPUs */ + mp_topology(); } ==== //depot/projects/soc2007/rpaulo-macbook/amd64/conf/NOTES#4 (text+ko) ==== @@ -4,7 +4,7 @@ # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. # -# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.68 2007/07/04 00:18:38 bz Exp $ +# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.69 2007/08/15 19:26:02 des Exp $ # # @@ -446,6 +446,13 @@ # device ichwd +# +# Temperature sensors: +# +# coretemp: on-die sensor on Intel Core and newer CPUs +# +device coretemp + #--------------------------------------------------------------------------- # ISDN4BSD # ==== //depot/projects/soc2007/rpaulo-macbook/amd64/include/specialreg.h#3 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * from: @(#)specialreg.h 7.1 (Berkeley) 5/9/91 - * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.39 2007/05/31 11:26:44 des Exp $ + * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.40 2007/08/15 19:26:01 des Exp $ */ #ifndef _MACHINE_SPECIALREG_H_ @@ -179,6 +179,7 @@ #define MSR_BIOS_SIGN 0x08b #define MSR_PERFCTR0 0x0c1 #define MSR_PERFCTR1 0x0c2 +#define MSR_IA32_EXT_CONFIG 0x0ee /* Undocumented. Core Solo/Duo only */ #define MSR_MTRRcap 0x0fe #define MSR_BBL_CR_ADDR 0x116 #define MSR_BBL_CR_DECC 0x118 ==== //depot/projects/soc2007/rpaulo-macbook/arm/arm/cpufunc.c#3 (text+ko) ==== @@ -45,7 +45,7 @@ * Created : 30/01/97 */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/arm/cpufunc.c,v 1.17 2007/07/27 14:39:41 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/cpufunc.c,v 1.18 2007/08/07 18:37:21 cognet Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -148,9 +148,9 @@ arm7tdmi_cache_flushID, /* idcache_wbinv_all */ (void *)arm7tdmi_cache_flushID, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ - cpufunc_nullop, /* l2cache_wbinv_range */ - cpufunc_nullop, /* l2cache_inv_range */ - cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_wbinv_range */ + (void *)cpufunc_nullop, /* l2cache_inv_range */ + (void *)cpufunc_nullop, /* l2cache_wb_range */ /* Other functions */ @@ -210,9 +210,9 @@ arm8_cache_purgeID, /* idcache_wbinv_all */ (void *)arm8_cache_purgeID, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ - cpufunc_nullop, /* l2cache_wbinv_range */ - cpufunc_nullop, /* l2cache_inv_range */ - cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_wbinv_range */ + (void *)cpufunc_nullop, /* l2cache_inv_range */ + (void *)cpufunc_nullop, /* l2cache_wb_range */ /* Other functions */ @@ -271,9 +271,9 @@ arm9_idcache_wbinv_all, /* idcache_wbinv_all */ arm9_idcache_wbinv_range, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ - cpufunc_nullop, /* l2cache_wbinv_range */ - cpufunc_nullop, /* l2cache_inv_range */ - cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_wbinv_range */ + (void *)cpufunc_nullop, /* l2cache_inv_range */ + (void *)cpufunc_nullop, /* l2cache_wb_range */ /* Other functions */ @@ -333,9 +333,9 @@ arm10_idcache_wbinv_all, /* idcache_wbinv_all */ arm10_idcache_wbinv_range, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ - cpufunc_nullop, /* l2cache_wbinv_range */ - cpufunc_nullop, /* l2cache_inv_range */ - cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_wbinv_range */ + (void *)cpufunc_nullop, /* l2cache_inv_range */ + (void *)cpufunc_nullop, /* l2cache_wb_range */ /* Other functions */ @@ -395,9 +395,9 @@ sa1_cache_purgeID, /* idcache_wbinv_all */ sa1_cache_purgeID_rng, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ - cpufunc_nullop, /* l2cache_wbinv_range */ - cpufunc_nullop, /* l2cache_inv_range */ - cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_wbinv_range */ + (void *)cpufunc_nullop, /* l2cache_inv_range */ + (void *)cpufunc_nullop, /* l2cache_wb_range */ /* Other functions */ @@ -456,9 +456,9 @@ sa1_cache_purgeID, /* idcache_wbinv_all */ sa1_cache_purgeID_rng, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ - cpufunc_nullop, /* l2cache_wbinv_range */ - cpufunc_nullop, /* l2cache_inv_range */ - cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_wbinv_range */ + (void *)cpufunc_nullop, /* l2cache_inv_range */ + (void *)cpufunc_nullop, /* l2cache_wb_range */ /* Other functions */ @@ -517,9 +517,9 @@ sa1_cache_purgeID, /* idcache_wbinv_all */ sa1_cache_purgeID_rng, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ - cpufunc_nullop, /* l2cache_wbinv_range */ - cpufunc_nullop, /* l2cache_inv_range */ - cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_wbinv_range */ + (void *)cpufunc_nullop, /* l2cache_inv_range */ + (void *)cpufunc_nullop, /* l2cache_wb_range */ /* Other functions */ @@ -581,9 +581,9 @@ xscale_cache_purgeID, /* idcache_wbinv_all */ xscale_cache_purgeID_rng, /* idcache_wbinv_range */ cpufunc_nullop, /* l2cache_wbinv_all */ - cpufunc_nullop, /* l2cache_wbinv_range */ - cpufunc_nullop, /* l2cache_inv_range */ - cpufunc_nullop, /* l2cache_wb_range */ + (void *)cpufunc_nullop, /* l2cache_wbinv_range */ + (void *)cpufunc_nullop, /* l2cache_inv_range */ + (void *)cpufunc_nullop, /* l2cache_wb_range */ /* Other functions */ ==== //depot/projects/soc2007/rpaulo-macbook/arm/arm/genassym.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/arm/genassym.c,v 1.9 2007/05/23 13:21:57 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/genassym.c,v 1.10 2007/08/08 09:27:52 cognet Exp $"); #include <sys/param.h> #include <sys/systm.h> #include <sys/assym.h> @@ -92,6 +92,7 @@ ASSYM(TD_PROC, offsetof(struct thread, td_proc)); ASSYM(TD_FRAME, offsetof(struct thread, td_frame)); ASSYM(TD_MD, offsetof(struct thread, td_md)); +ASSYM(TD_LOCK, offsetof(struct thread, td_lock)); ASSYM(MD_TP, offsetof(struct mdthread, md_tp)); ASSYM(TF_R0, offsetof(struct trapframe, tf_r0)); ==== //depot/projects/soc2007/rpaulo-macbook/arm/arm/swtch.S#2 (text+ko) ==== @@ -83,7 +83,7 @@ #include <machine/asm.h> #include <machine/asmacros.h> #include <machine/armreg.h> -__FBSDID("$FreeBSD: src/sys/arm/arm/swtch.S,v 1.19 2006/04/09 20:16:47 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/swtch.S,v 1.20 2007/08/07 18:20:55 cognet Exp $"); /* @@ -127,6 +127,8 @@ .word _C_LABEL(block_userspace_access) .Lcpu_do_powersave: .word _C_LABEL(cpu_do_powersave) +.Lblocked_lock: + .word _C_LABEL(blocked_lock) ENTRY(cpu_throw) mov r5, r1 @@ -214,6 +216,7 @@ ENTRY(cpu_switch) stmfd sp!, {r4-r7, lr} + mov r6, r2 /* Save the mutex */ .Lswitch_resume: /* rem: r0 = old lwp */ @@ -241,10 +244,11 @@ /* Stage two : Save old context */ - /* Get the user structure for the old lwp. */ + /* Get the user structure for the old thread. */ ldr r2, [r0, #(TD_PCB)] + mov r4, r0 /* Save the old thread. */ - /* Save all the registers in the old lwp's pcb */ + /* Save all the registers in the old thread's pcb */ #ifndef __XSCALE__ add r7, r2, #(PCB_R8) stmia r7, {r8-r13} @@ -324,8 +328,7 @@ mov lr, pc ldr pc, [r1, #CF_IDCACHE_WBINV_ALL] .Lcs_cache_purge_skipped: - /* rem: r4 = &block_userspace_access */ - /* rem: r6 = new lwp */ + /* rem: r6 = lock */ /* rem: r9 = new PCB */ /* rem: r10 = old L1 */ /* rem: r11 = new L1 */ @@ -389,6 +392,17 @@ .Lcs_context_switched: + /* Release the old thread */ + str r6, [r4, #TD_LOCK] + ldr r6, .Lblocked_lock + ldr r3, .Lcurthread + ldr r3, [r3] + +1: + ldr r4, [r3, #TD_LOCK] + cmp r4, r6 + beq 1b + /* XXXSCW: Safe to re-enable FIQs here */ /* rem: r9 = new PCB */ @@ -419,7 +433,7 @@ ldr r13, [r7, #(PCB_SP)] #endif - /* rem: r6 = new lwp */ + /* rem: r6 = lock */ /* rem: r7 = new pcb */ #ifdef ARMFPE @@ -429,7 +443,7 @@ #endif /* rem: r5 = new lwp's proc */ - /* rem: r6 = new lwp */ + /* rem: r6 = lock */ /* rem: r7 = new PCB */ .Lswitch_return: ==== //depot/projects/soc2007/rpaulo-macbook/boot/arm/at91/libat91/Makefile#3 (text) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/arm/at91/libat91/Makefile,v 1.9 2007/07/13 14:27:04 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/libat91/Makefile,v 1.10 2007/08/09 05:16:55 imp Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -8,7 +8,7 @@ putchar.c printf.c reset.c spi_flash.c xmodem.c \ sd-card.c strcvt.c strlen.c strcmp.c memcpy.c strcpy.c \ memset.c memcmp.c -SRCS+=ashldi3.c divsi3.c +SRCS+=ashldi3.c divsi3.S NO_MAN= .if ${MK_TAG_LIST} != "no" ==== //depot/projects/soc2007/rpaulo-macbook/compat/freebsd32/freebsd32_proto.h#3 (text+ko) ==== @@ -2,7 +2,7 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.77 2007/07/04 23:03:50 peter Exp $ + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.78 2007/08/16 05:32:25 davidxu Exp $ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp */ ==== //depot/projects/soc2007/rpaulo-macbook/compat/freebsd32/freebsd32_syscall.h#3 (text+ko) ==== @@ -2,7 +2,7 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.75 2007/07/04 23:03:50 peter Exp $ + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.76 2007/08/16 05:32:25 davidxu Exp $ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp */ @@ -337,4 +337,5 @@ #define FREEBSD32_SYS_freebsd32_lseek 478 #define FREEBSD32_SYS_freebsd32_truncate 479 #define FREEBSD32_SYS_freebsd32_ftruncate 480 -#define FREEBSD32_SYS_MAXSYSCALL 481 +#define FREEBSD32_SYS_thr_kill2 481 +#define FREEBSD32_SYS_MAXSYSCALL 482 ==== //depot/projects/soc2007/rpaulo-macbook/compat/freebsd32/freebsd32_syscalls.c#3 (text+ko) ==== @@ -2,7 +2,7 @@ * System call names. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.66 2007/07/04 23:03:50 peter Exp $ + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.67 2007/08/16 05:32:25 davidxu Exp $ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp */ @@ -488,4 +488,5 @@ "freebsd32_lseek", /* 478 = freebsd32_lseek */ "freebsd32_truncate", /* 479 = freebsd32_truncate */ "freebsd32_ftruncate", /* 480 = freebsd32_ftruncate */ + "thr_kill2", /* 481 = thr_kill2 */ }; ==== //depot/projects/soc2007/rpaulo-macbook/compat/freebsd32/freebsd32_sysent.c#3 (text+ko) ==== @@ -2,7 +2,7 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.76 2007/07/04 23:03:50 peter Exp $ + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.77 2007/08/16 05:32:25 davidxu Exp $ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp */ @@ -519,4 +519,5 @@ { AS(freebsd32_lseek_args), (sy_call_t *)freebsd32_lseek, AUE_LSEEK, NULL, 0, 0 }, /* 478 = freebsd32_lseek */ { AS(freebsd32_truncate_args), (sy_call_t *)freebsd32_truncate, AUE_TRUNCATE, NULL, 0, 0 }, /* 479 = freebsd32_truncate */ { AS(freebsd32_ftruncate_args), (sy_call_t *)freebsd32_ftruncate, AUE_FTRUNCATE, NULL, 0, 0 }, /* 480 = freebsd32_ftruncate */ + { AS(thr_kill2_args), (sy_call_t *)thr_kill2, AUE_KILL, NULL, 0, 0 }, /* 481 = thr_kill2 */ }; ==== //depot/projects/soc2007/rpaulo-macbook/compat/freebsd32/syscalls.master#4 (text+ko) ==== @@ -1,4 +1,4 @@ - $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.90 2007/07/04 23:02:40 peter Exp $ + $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.91 2007/08/16 05:30:04 davidxu Exp $ ; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94 ; from: src/sys/kern/syscalls.master 1.107 ; @@ -794,3 +794,4 @@ u_int32_t lengthlo, u_int32_t lengthhi); } 480 AUE_FTRUNCATE STD { int freebsd32_ftruncate(int fd, \ u_int32_t lengthlo, u_int32_t lengthhi); } +481 AUE_KILL NOPROTO { int thr_kill2(pid_t pid, long id, int sig); } ==== //depot/projects/soc2007/rpaulo-macbook/compat/linux/linux_socket.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.73 2007/04/14 10:35:09 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.74 2007/08/06 14:25:59 rwatson Exp $"); /* XXX we use functions that might not exist. */ #include "opt_compat.h" @@ -670,7 +670,6 @@ * socket and use the file descriptor reference instead of * creating a new one. */ - NET_LOCK_GIANT(); error = fgetsock(td, linux_args.s, &so, &fflag); if (error == 0) { error = EISCONN; @@ -683,7 +682,6 @@ } fputsock(so); } - NET_UNLOCK_GIANT(); return (error); } ==== //depot/projects/soc2007/rpaulo-macbook/conf/NOTES#16 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1447 2007/07/24 15:35:01 scottl Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1449 2007/08/13 17:19:27 emax Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -501,15 +501,15 @@ options IPSEC #IP security (requires device crypto) #options IPSEC_DEBUG #debug for IP security # -# Set IPSEC_FILTERGIF to force packets coming through a gif tunnel -# to be processed by any configured packet filtering (ipfw, ipf). -# The default is that packets coming from a tunnel are _not_ processed; +# Set IPSEC_FILTERTUNNEL to force packets coming through a tunnel +# to be processed by any configured packet filtering twice. +# The default is that packets coming out of a tunnel are _not_ processed; # they are assumed trusted. # # IPSEC history is preserved for such packets, and can be filtered # using ipfw(8)'s 'ipsec' keyword, when this option is enabled. # -#options IPSEC_FILTERGIF #filter ipsec packets from a tunnel +#options IPSEC_FILTERTUNNEL #filter ipsec packets from a tunnel options IPX #IPX/SPX communications protocols @@ -627,7 +627,7 @@ options NETGRAPH_ATM_ATMPIF options NETGRAPH_BLUETOOTH # ng_bluetooth(4) options NETGRAPH_BLUETOOTH_BT3C # ng_bt3c(4) -# options NETGRAPH_BLUETOOTH_H4 # ng_h4(4) - not MPSAFE +options NETGRAPH_BLUETOOTH_H4 # ng_h4(4) options NETGRAPH_BLUETOOTH_HCI # ng_hci(4) options NETGRAPH_BLUETOOTH_L2CAP # ng_l2cap(4) options NETGRAPH_BLUETOOTH_SOCKET # ng_btsocket(4) ==== //depot/projects/soc2007/rpaulo-macbook/conf/files#22 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1241 2007/07/24 15:35:01 scottl Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1242 2007/08/09 01:11:21 marcel Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -259,7 +259,7 @@ contrib/ipfilter/netinet/ip_state.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_lookup.c optional ipfilter inet \ - compile-with "${NORMAL_C} -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} -Wno-error -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_pool.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_htable.c optional ipfilter inet \ ==== //depot/projects/soc2007/rpaulo-macbook/conf/files.amd64#8 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.amd64,v 1.106 2007/07/05 06:12:40 peter Exp $ +# $FreeBSD: src/sys/conf/files.amd64,v 1.107 2007/08/15 19:26:01 des Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -147,6 +147,7 @@ dev/atkbdc/atkbdc_subr.c optional atkbdc dev/atkbdc/psm.c optional psm atkbdc dev/backlight/backlight.c optional backlight +dev/coretemp/coretemp.c optional coretemp # There are no systems with isa slots, so all ed isa entries should go.. dev/ed/if_ed_3c503.c optional ed isa ed_3c503 dev/ed/if_ed_isa.c optional ed isa ==== //depot/projects/soc2007/rpaulo-macbook/conf/files.i386#8 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.i386,v 1.579 2007/07/05 06:12:40 peter Exp $ +# $FreeBSD: src/sys/conf/files.i386,v 1.580 2007/08/15 19:26:01 des Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -160,6 +160,7 @@ dev/ce/if_ce.c optional ce dev/ce/tau32-ddk.c optional ce dev/cm/if_cm_isa.c optional cm isa +dev/coretemp/coretemp.c optional coretemp dev/cp/cpddk.c optional cp dev/cp/if_cp.c optional cp dev/ctau/ctau.c optional ctau ==== //depot/projects/soc2007/rpaulo-macbook/conf/kern.pre.mk#7 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.91 2007/07/31 03:15:32 marcel Exp $ +# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.92 2007/08/08 19:12:06 marcel Exp $ # Part of a unified Makefile for building kernels. This part contains all # of the definitions that need to be before %BEFORE_DEPEND. @@ -88,7 +88,8 @@ CFLAGS+= --param inline-unit-growth=100 CFLAGS+= --param large-function-growth=1000 .if ${MACHINE_ARCH} == "amd64" || ${MACHINE} == "i386" || \ - ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64" + ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "powerpc" || \ + ${MACHINE_ARCH} == "sparc64" WERROR?= -Werror .endif .endif ==== //depot/projects/soc2007/rpaulo-macbook/conf/options#13 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.603 2007/07/24 15:35:01 scottl Exp $ +# $FreeBSD: src/sys/conf/options,v 1.605 2007/08/06 14:25:59 rwatson Exp $ # # On the handling of kernel options # @@ -362,7 +362,7 @@ INET6 opt_inet6.h IPSEC opt_ipsec.h IPSEC_DEBUG opt_ipsec.h -IPSEC_FILTERGIF opt_ipsec.h +IPSEC_FILTERTUNNEL opt_ipsec.h IPDIVERT DUMMYNET opt_ipdn.h IPFILTER opt_ipfilter.h @@ -383,7 +383,6 @@ MBUF_STRESS_TEST NCP NETATALK opt_atalk.h -NET_WITH_GIANT opt_net.h PPP_BSDCOMP opt_ppp.h PPP_DEFLATE opt_ppp.h PPP_FILTER opt_ppp.h ==== //depot/projects/soc2007/rpaulo-macbook/dev/adlink/adlink.c#2 (text+ko) ==== @@ -43,7 +43,7 @@ #ifdef _KERNEL #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/adlink/adlink.c,v 1.16 2007/02/23 12:18:29 piso Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/adlink/adlink.c,v 1.17 2007/08/04 17:43:11 kib Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -119,6 +119,7 @@ static struct cdevsw adlink_cdevsw = { .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_ioctl = adlink_ioctl, .d_mmap = adlink_mmap, .d_name = "adlink", ==== //depot/projects/soc2007/rpaulo-macbook/dev/an/if_an.c#3 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/an/if_an.c,v 1.81 2007/06/08 01:21:20 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/an/if_an.c,v 1.83 2007/08/07 12:26:19 avatar Exp $"); /* * The Aironet 4500/4800 series cards come in PCMCIA, ISA and PCI form. @@ -1065,8 +1065,10 @@ rx_frame.an_rsvd0); #endif #endif + AN_UNLOCK(sc); (*ifp->if_input)(ifp, m); - + AN_LOCK(sc); + an_rx_desc.an_valid = 1; an_rx_desc.an_len = AN_RX_BUFFER_SIZE; an_rx_desc.an_done = 0; @@ -1914,7 +1916,9 @@ error = 0; break; case SIOCGAIRONET: + AN_UNLOCK(sc); error = copyin(ifr->ifr_data, &sc->areq, sizeof(sc->areq)); + AN_LOCK(sc); if (error != 0) break; #ifdef ANCACHE @@ -1940,12 +1944,16 @@ error = EINVAL; break; } + AN_UNLOCK(sc); error = copyout(&sc->areq, ifr->ifr_data, sizeof(sc->areq)); + AN_LOCK(sc); break; case SIOCSAIRONET: if ((error = priv_check(td, PRIV_DRIVER))) goto out; + AN_UNLOCK(sc); error = copyin(ifr->ifr_data, &sc->areq, sizeof(sc->areq)); + AN_LOCK(sc); if (error != 0) break; an_setdef(sc, &sc->areq); @@ -1953,7 +1961,9 @@ case SIOCGPRIVATE_0: /* used by Cisco client utility */ if ((error = priv_check(td, PRIV_DRIVER))) goto out; + AN_UNLOCK(sc); error = copyin(ifr->ifr_data, &l_ioctl, sizeof(l_ioctl)); + AN_LOCK(sc); if (error) goto out; mode = l_ioctl.command; @@ -1969,18 +1979,24 @@ } if (!error) { /* copy out the updated command info */ + AN_UNLOCK(sc); error = copyout(&l_ioctl, ifr->ifr_data, sizeof(l_ioctl)); + AN_LOCK(sc); } break; case SIOCGPRIVATE_1: /* used by Cisco client utility */ if ((error = priv_check(td, PRIV_DRIVER))) goto out; + AN_UNLOCK(sc); error = copyin(ifr->ifr_data, &l_ioctl, sizeof(l_ioctl)); + AN_LOCK(sc); if (error) goto out; l_ioctl.command = 0; error = AIROMAGIC; + AN_UNLOCK(sc); (void) copyout(&error, l_ioctl.data, sizeof(error)); + AN_LOCK(sc); error = 0; break; case SIOCG80211: @@ -2030,8 +2046,10 @@ ireq->i_len = len; bzero(tmpstr, IEEE80211_NWID_LEN); bcopy(tmpptr, tmpstr, len); + AN_UNLOCK(sc); error = copyout(tmpstr, ireq->i_data, IEEE80211_NWID_LEN); + AN_LOCK(sc); break; case IEEE80211_IOC_NUMSSIDS: sc->areq.an_len = sizeof(sc->areq); @@ -2105,7 +2123,9 @@ */ bzero(tmpstr, len); ireq->i_len = len; + AN_UNLOCK(sc); error = copyout(tmpstr, ireq->i_data, len); + AN_LOCK(sc); break; case IEEE80211_IOC_NUMWEPKEYS: ireq->i_val = 9; /* include home key */ @@ -2183,8 +2203,10 @@ tmpptr = config->an_nodename; bzero(tmpstr, IEEE80211_NWID_LEN); bcopy(tmpptr, tmpstr, ireq->i_len); + AN_UNLOCK(sc); error = copyout(tmpstr, ireq->i_data, IEEE80211_NWID_LEN); + AN_LOCK(sc); break; case IEEE80211_IOC_CHANNEL: sc->areq.an_type = AN_RID_STATUS; @@ -2268,9 +2290,11 @@ error = EINVAL; break; } else { + AN_UNLOCK(sc); error = copyin(ireq->i_data, ssids->an_entry[ireq->i_val].an_ssid, ireq->i_len); + AN_LOCK(sc); ssids->an_entry[ireq->i_val].an_len = ireq->i_len; break; @@ -2305,7 +2329,9 @@ error = EINVAL; break; } + AN_UNLOCK(sc); error = copyin(ireq->i_data, tmpstr, 13); + AN_LOCK(sc); if (error != 0) break; /* @@ -2387,8 +2413,10 @@ break; } bzero(config->an_nodename, 16); + AN_UNLOCK(sc); error = copyin(ireq->i_data, config->an_nodename, ireq->i_len); + AN_LOCK(sc); break; case IEEE80211_IOC_CHANNEL: /* @@ -2430,7 +2458,9 @@ an_setdef(sc, &sc->areq); break; default: + AN_UNLOCK(sc); error = ether_ioctl(ifp, command, data); + AN_LOCK(sc); break; } out: @@ -3159,6 +3189,7 @@ { unsigned short rid; struct an_softc *sc; + int error; switch (l_ioctl->command) { case AIROGCAP: @@ -3210,24 +3241,30 @@ l_ioctl->len = sc->areq.an_len - 4; /* just data */ + AN_UNLOCK(sc); >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708161722.l7GHMoej099869>