Date: Fri, 12 Jan 2007 04:05:21 GMT From: Paolo Pisati <piso@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 112805 for review Message-ID: <200701120405.l0C45LLO080182@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=112805 Change 112805 by piso@piso_longino on 2007/01/12 04:04:39 IFC@112802 Affected files ... .. //depot/projects/soc2006/intr_filter/amd64/amd64/identcpu.c#3 integrate .. //depot/projects/soc2006/intr_filter/amd64/amd64/mp_machdep.c#4 integrate .. //depot/projects/soc2006/intr_filter/amd64/amd64/nexus.c#5 integrate .. //depot/projects/soc2006/intr_filter/amd64/include/specialreg.h#3 integrate .. //depot/projects/soc2006/intr_filter/amd64/linux32/linux32_machdep.c#6 integrate .. //depot/projects/soc2006/intr_filter/arm/at91/at91_mci.c#2 integrate .. //depot/projects/soc2006/intr_filter/arm/at91/at91_pmc.c#4 integrate .. //depot/projects/soc2006/intr_filter/arm/at91/at91_st.c#8 integrate .. //depot/projects/soc2006/intr_filter/arm/at91/files.at91#4 integrate .. //depot/projects/soc2006/intr_filter/arm/at91/if_ate.c#7 integrate .. //depot/projects/soc2006/intr_filter/arm/conf/BWCT#1 branch .. //depot/projects/soc2006/intr_filter/arm/conf/BWCT.hints#1 branch .. //depot/projects/soc2006/intr_filter/arm/include/atomic.h#3 integrate .. //depot/projects/soc2006/intr_filter/boot/common/pnp.c#2 integrate .. //depot/projects/soc2006/intr_filter/boot/common/pnpdata#2 delete .. //depot/projects/soc2006/intr_filter/bsm/audit.h#3 integrate .. //depot/projects/soc2006/intr_filter/bsm/audit_internal.h#3 integrate .. //depot/projects/soc2006/intr_filter/bsm/audit_kevents.h#4 integrate .. //depot/projects/soc2006/intr_filter/bsm/audit_record.h#4 integrate .. //depot/projects/soc2006/intr_filter/compat/linux/linux_emul.c#6 integrate .. //depot/projects/soc2006/intr_filter/compat/linux/linux_emul.h#4 integrate .. //depot/projects/soc2006/intr_filter/compat/linux/linux_mib.c#3 integrate .. //depot/projects/soc2006/intr_filter/compat/linux/linux_misc.c#10 integrate .. //depot/projects/soc2006/intr_filter/compat/linux/linux_signal.c#5 integrate .. //depot/projects/soc2006/intr_filter/conf/NOTES#13 integrate .. //depot/projects/soc2006/intr_filter/conf/files#12 integrate .. //depot/projects/soc2006/intr_filter/conf/options#11 integrate .. //depot/projects/soc2006/intr_filter/conf/options.arm#6 integrate .. //depot/projects/soc2006/intr_filter/dev/acpica/acpi.c#5 integrate .. //depot/projects/soc2006/intr_filter/dev/acpica/acpi_cpu.c#2 integrate .. //depot/projects/soc2006/intr_filter/dev/acpica/acpi_package.c#2 integrate .. //depot/projects/soc2006/intr_filter/dev/acpica/acpi_perf.c#3 integrate .. //depot/projects/soc2006/intr_filter/dev/acpica/acpi_throttle.c#2 integrate .. //depot/projects/soc2006/intr_filter/dev/acpica/acpivar.h#4 integrate .. //depot/projects/soc2006/intr_filter/dev/ata/ata-chipset.c#10 integrate .. //depot/projects/soc2006/intr_filter/dev/ata/ata-pci.h#8 integrate .. //depot/projects/soc2006/intr_filter/dev/bce/if_bce.c#9 integrate .. //depot/projects/soc2006/intr_filter/dev/bce/if_bcereg.h#4 integrate .. //depot/projects/soc2006/intr_filter/dev/bge/if_bgereg.h#9 integrate .. //depot/projects/soc2006/intr_filter/dev/fb/boot_font.c#2 integrate .. //depot/projects/soc2006/intr_filter/dev/fb/creatorreg.h#1 branch .. //depot/projects/soc2006/intr_filter/dev/fb/gallant12x22.c#1 branch .. //depot/projects/soc2006/intr_filter/dev/fb/gfb.c#2 delete .. //depot/projects/soc2006/intr_filter/dev/fb/gfb.h#2 integrate .. //depot/projects/soc2006/intr_filter/dev/gfb/gfb_pci.c#2 delete .. //depot/projects/soc2006/intr_filter/dev/gfb/gfb_pci.h#2 delete .. //depot/projects/soc2006/intr_filter/dev/hptmv/entry.c#3 integrate .. //depot/projects/soc2006/intr_filter/dev/ichsmb/ichsmb.c#3 integrate .. //depot/projects/soc2006/intr_filter/dev/ichsmb/ichsmb_pci.c#3 integrate .. //depot/projects/soc2006/intr_filter/dev/idt/idtreg.h#2 integrate .. //depot/projects/soc2006/intr_filter/dev/isp/isp.c#11 integrate .. //depot/projects/soc2006/intr_filter/dev/isp/isp_freebsd.h#6 integrate .. //depot/projects/soc2006/intr_filter/dev/isp/isp_pci.c#12 integrate .. //depot/projects/soc2006/intr_filter/dev/mfi/mfi.c#11 integrate .. //depot/projects/soc2006/intr_filter/dev/mii/miidevs#5 integrate .. //depot/projects/soc2006/intr_filter/dev/mii/rlswitch.c#1 branch .. //depot/projects/soc2006/intr_filter/dev/mpt/mpt.c#7 integrate .. //depot/projects/soc2006/intr_filter/dev/mpt/mpt.h#7 integrate .. //depot/projects/soc2006/intr_filter/dev/mpt/mpt_cam.c#10 integrate .. //depot/projects/soc2006/intr_filter/dev/mpt/mpt_pci.c#9 integrate .. //depot/projects/soc2006/intr_filter/dev/msk/if_msk.c#4 integrate .. //depot/projects/soc2006/intr_filter/dev/re/if_re.c#13 integrate .. //depot/projects/soc2006/intr_filter/dev/sound/pci/emu10kx-pcm.c#3 integrate .. //depot/projects/soc2006/intr_filter/dev/sound/pci/emu10kx.c#4 integrate .. //depot/projects/soc2006/intr_filter/dev/sound/pci/emu10kx.h#3 integrate .. //depot/projects/soc2006/intr_filter/dev/sound/pci/hda/hdac.c#6 integrate .. //depot/projects/soc2006/intr_filter/dev/sound/pcm/feeder.c#3 integrate .. //depot/projects/soc2006/intr_filter/dev/sound/usb/uaudio.c#4 integrate .. //depot/projects/soc2006/intr_filter/dev/syscons/scvesactl.c#2 integrate .. //depot/projects/soc2006/intr_filter/dev/usb/if_aue.c#7 integrate .. //depot/projects/soc2006/intr_filter/dev/usb/if_auereg.h#5 integrate .. //depot/projects/soc2006/intr_filter/dev/usb/usb_ethersubr.c#4 integrate .. //depot/projects/soc2006/intr_filter/dev/usb/usb_ethersubr.h#3 integrate .. //depot/projects/soc2006/intr_filter/fs/msdosfs/bpb.h#3 integrate .. //depot/projects/soc2006/intr_filter/fs/msdosfs/msdosfs_vfsops.c#6 integrate .. //depot/projects/soc2006/intr_filter/fs/udf/udf_vfsops.c#6 integrate .. //depot/projects/soc2006/intr_filter/fs/unionfs/union_subr.c#3 integrate .. //depot/projects/soc2006/intr_filter/fs/unionfs/union_vnops.c#4 integrate .. //depot/projects/soc2006/intr_filter/i386/i386/identcpu.c#5 integrate .. //depot/projects/soc2006/intr_filter/i386/i386/mp_machdep.c#4 integrate .. //depot/projects/soc2006/intr_filter/i386/i386/nexus.c#5 integrate .. //depot/projects/soc2006/intr_filter/i386/include/specialreg.h#4 integrate .. //depot/projects/soc2006/intr_filter/i386/linux/linux_machdep.c#5 integrate .. //depot/projects/soc2006/intr_filter/kern/kern_acct.c#4 integrate .. //depot/projects/soc2006/intr_filter/kern/kern_descrip.c#7 integrate .. //depot/projects/soc2006/intr_filter/kern/kern_prot.c#5 integrate .. //depot/projects/soc2006/intr_filter/kern/sched_ule.c#8 integrate .. //depot/projects/soc2006/intr_filter/kern/subr_turnstile.c#4 integrate .. //depot/projects/soc2006/intr_filter/kern/tty_pts.c#4 integrate .. //depot/projects/soc2006/intr_filter/kern/uipc_socket.c#10 integrate .. //depot/projects/soc2006/intr_filter/kern/uipc_usrreq.c#8 integrate .. //depot/projects/soc2006/intr_filter/modules/sound/driver/emu10kx/Makefile#2 integrate .. //depot/projects/soc2006/intr_filter/net80211/ieee80211.c#5 integrate .. //depot/projects/soc2006/intr_filter/net80211/ieee80211_freebsd.c#4 integrate .. //depot/projects/soc2006/intr_filter/net80211/ieee80211_freebsd.h#3 integrate .. //depot/projects/soc2006/intr_filter/net80211/ieee80211_input.c#7 integrate .. //depot/projects/soc2006/intr_filter/net80211/ieee80211_node.c#3 integrate .. //depot/projects/soc2006/intr_filter/net80211/ieee80211_proto.c#4 integrate .. //depot/projects/soc2006/intr_filter/net80211/ieee80211_proto.h#3 integrate .. //depot/projects/soc2006/intr_filter/net80211/ieee80211_var.h#5 integrate .. //depot/projects/soc2006/intr_filter/netatalk/COPYRIGHT#2 integrate .. //depot/projects/soc2006/intr_filter/netatalk/aarp.c#3 integrate .. //depot/projects/soc2006/intr_filter/netatalk/ddp_input.c#3 integrate .. //depot/projects/soc2006/intr_filter/netatalk/ddp_pcb.c#4 integrate .. //depot/projects/soc2006/intr_filter/netatalk/ddp_pcb.h#2 integrate .. //depot/projects/soc2006/intr_filter/netatalk/ddp_usrreq.c#3 integrate .. //depot/projects/soc2006/intr_filter/netgraph/ng_deflate.c#2 integrate .. //depot/projects/soc2006/intr_filter/netinet/ip_fw2.c#11 integrate .. //depot/projects/soc2006/intr_filter/netinet/udp_usrreq.c#6 integrate .. //depot/projects/soc2006/intr_filter/netipx/ipx.c#2 integrate .. //depot/projects/soc2006/intr_filter/netipx/ipx.h#2 integrate .. //depot/projects/soc2006/intr_filter/netipx/ipx_cksum.c#2 integrate .. //depot/projects/soc2006/intr_filter/netipx/ipx_if.h#2 integrate .. //depot/projects/soc2006/intr_filter/netipx/ipx_input.c#2 integrate .. //depot/projects/soc2006/intr_filter/netipx/ipx_ip.c#2 integrate .. //depot/projects/soc2006/intr_filter/netipx/ipx_ip.h#2 integrate .. //depot/projects/soc2006/intr_filter/netipx/ipx_outputfl.c#2 integrate .. //depot/projects/soc2006/intr_filter/netipx/ipx_pcb.c#3 integrate .. //depot/projects/soc2006/intr_filter/netipx/ipx_pcb.h#2 integrate .. //depot/projects/soc2006/intr_filter/netipx/ipx_proto.c#2 integrate .. //depot/projects/soc2006/intr_filter/netipx/ipx_usrreq.c#4 integrate .. //depot/projects/soc2006/intr_filter/netipx/ipx_var.h#2 integrate .. //depot/projects/soc2006/intr_filter/netipx/spx.h#2 integrate .. //depot/projects/soc2006/intr_filter/netipx/spx_debug.c#2 integrate .. //depot/projects/soc2006/intr_filter/netipx/spx_debug.h#2 integrate .. //depot/projects/soc2006/intr_filter/netipx/spx_timer.h#2 integrate .. //depot/projects/soc2006/intr_filter/netipx/spx_usrreq.c#3 integrate .. //depot/projects/soc2006/intr_filter/netipx/spx_var.h#2 integrate .. //depot/projects/soc2006/intr_filter/netnatm/natm.c#3 integrate .. //depot/projects/soc2006/intr_filter/netnatm/natm.h#2 integrate .. //depot/projects/soc2006/intr_filter/netnatm/natm_pcb.c#2 integrate .. //depot/projects/soc2006/intr_filter/netnatm/natm_proto.c#2 integrate .. //depot/projects/soc2006/intr_filter/pc98/pc98/machdep.c#7 integrate .. //depot/projects/soc2006/intr_filter/pci/agp_intel.c#2 integrate .. //depot/projects/soc2006/intr_filter/pci/agpreg.h#2 integrate .. //depot/projects/soc2006/intr_filter/pci/alpm.c#3 integrate .. //depot/projects/soc2006/intr_filter/pci/amdpm.c#3 integrate .. //depot/projects/soc2006/intr_filter/pci/amdsmb.c#3 integrate .. //depot/projects/soc2006/intr_filter/pci/intpm.c#5 integrate .. //depot/projects/soc2006/intr_filter/pci/intpmreg.h#3 integrate .. //depot/projects/soc2006/intr_filter/pci/nfsmb.c#5 integrate .. //depot/projects/soc2006/intr_filter/pci/viapm.c#3 integrate .. //depot/projects/soc2006/intr_filter/powerpc/conf/NOTES#4 integrate .. //depot/projects/soc2006/intr_filter/security/audit/audit_arg.c#6 integrate .. //depot/projects/soc2006/intr_filter/sparc64/include/ofw_nexus.h#1 branch .. //depot/projects/soc2006/intr_filter/sparc64/pci/ofw_pcibus.c#3 integrate .. //depot/projects/soc2006/intr_filter/sparc64/pci/psycho.c#8 integrate .. //depot/projects/soc2006/intr_filter/sparc64/pci/psychoreg.h#2 integrate .. //depot/projects/soc2006/intr_filter/sys/copyright.h#4 integrate .. //depot/projects/soc2006/intr_filter/sys/file.h#2 integrate .. //depot/projects/soc2006/intr_filter/sys/priority.h#2 integrate .. //depot/projects/soc2006/intr_filter/sys/rtprio.h#5 integrate .. //depot/projects/soc2006/intr_filter/sys/unpcb.h#3 integrate .. //depot/projects/soc2006/intr_filter/ufs/ufs/ufs_acl.c#2 integrate .. //depot/projects/soc2006/intr_filter/vm/swap_pager.c#5 integrate .. //depot/projects/soc2006/intr_filter/vm/uma.h#2 integrate .. //depot/projects/soc2006/intr_filter/vm/uma_core.c#4 integrate .. //depot/projects/soc2006/intr_filter/vm/vm_kern.c#4 integrate Differences ... ==== //depot/projects/soc2006/intr_filter/amd64/amd64/identcpu.c#3 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.148 2006/08/01 01:23:39 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.149 2007/01/09 19:23:21 jkim Exp $"); #include "opt_cpu.h" @@ -228,8 +228,8 @@ "\007<b6>" "\010EST" /* Enhanced SpeedStep */ "\011TM2" /* Thermal Monitor 2 */ - "\012<b9>" - "\013CNTX-ID" /* L1 context ID available */ + "\012SSSE3" /* SSSE3 */ + "\013CNXT-ID" /* L1 context ID available */ "\014<b11>" "\015<b12>" "\016CX16" /* CMPXCHG16B Instruction */ ==== //depot/projects/soc2006/intr_filter/amd64/amd64/mp_machdep.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.278 2006/10/10 23:23:11 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.279 2007/01/11 00:17:02 jeff Exp $"); #include "opt_cpu.h" #include "opt_kstack_pages.h" @@ -948,11 +948,10 @@ ipi_bitmap = atomic_readandclear_int(&cpu_ipi_pending[cpu]); -#ifdef IPI_PREEMPTION - if (ipi_bitmap & IPI_PREEMPT) { + if (ipi_bitmap & (1 << IPI_PREEMPT)) { mtx_lock_spin(&sched_lock); /* Don't preempt the idle thread */ - if (curthread->td_priority < PRI_MIN_IDLE) { + if (curthread != PCPU_GET(idlethread)) { struct thread *running_thread = curthread; if (running_thread->td_critnest > 1) running_thread->td_owepreempt = 1; @@ -961,7 +960,6 @@ } mtx_unlock_spin(&sched_lock); } -#endif /* Nothing to do for AST */ } ==== //depot/projects/soc2006/intr_filter/amd64/amd64/nexus.c#5 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.70 2006/11/13 22:23:32 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.71 2007/01/11 19:40:19 jhb Exp $"); /* * This code implements a `root nexus' for Intel Architecture @@ -372,24 +372,9 @@ * If this is a memory resource, map it into the kernel. */ if (rman_get_bustag(r) == AMD64_BUS_SPACE_MEM) { - caddr_t vaddr = 0; + void *vaddr; - if (rman_get_end(r) < 1024 * 1024) { - /* - * The first 1Mb is mapped at KERNBASE. - */ - vaddr = (caddr_t)(uintptr_t)(KERNBASE + rman_get_start(r)); - } else { - u_int64_t paddr; - u_int64_t psize; - u_int32_t poffs; - - paddr = rman_get_start(r); - psize = rman_get_size(r); - - poffs = paddr - trunc_page(paddr); - vaddr = (caddr_t) pmap_mapdev(paddr-poffs, psize+poffs) + poffs; - } + vaddr = pmap_mapdev(rman_get_start(r), rman_get_size(r)); rman_set_virtual(r, vaddr); rman_set_bushandle(r, (bus_space_handle_t) vaddr); } @@ -403,12 +388,9 @@ /* * If this is a memory resource, unmap it. */ - if ((rman_get_bustag(r) == AMD64_BUS_SPACE_MEM) && - (rman_get_end(r) >= 1024 * 1024)) { - u_int32_t psize; - - psize = rman_get_size(r); - pmap_unmapdev((vm_offset_t)rman_get_virtual(r), psize); + if (rman_get_bustag(r) == AMD64_BUS_SPACE_MEM) { + pmap_unmapdev((vm_offset_t)rman_get_virtual(r), + rman_get_size(r)); } return (rman_deactivate_resource(r)); ==== //depot/projects/soc2006/intr_filter/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.35 2006/07/13 16:09:40 jkim Exp $ + * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.36 2007/01/09 19:23:21 jkim Exp $ */ #ifndef _MACHINE_SPECIALREG_H_ @@ -118,7 +118,8 @@ #define CPUID2_VMX 0x00000020 #define CPUID2_EST 0x00000080 #define CPUID2_TM2 0x00000100 -#define CPUID2_CNTXID 0x00000400 +#define CPUID2_SSSE3 0x00000200 +#define CPUID2_CNXTID 0x00000400 #define CPUID2_CX16 0x00002000 #define CPUID2_XTPR 0x00004000 ==== //depot/projects/soc2006/intr_filter/amd64/linux32/linux32_machdep.c#6 (text+ko) ==== @@ -29,11 +29,13 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.23 2006/12/20 20:17:34 jkim Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.25 2007/01/07 19:00:38 netchild Exp $"); #include <sys/param.h> #include <sys/kernel.h> #include <sys/systm.h> +#include <sys/file.h> +#include <sys/fcntl.h> #include <sys/clock.h> #include <sys/imgact.h> #include <sys/limits.h> @@ -562,7 +564,7 @@ /* create the emuldata */ error = linux_proc_init(td, p2->p_pid, args->flags); /* reference it - no need to check this */ - em = em_find(p2, EMUL_UNLOCKED); + em = em_find(p2, EMUL_DOLOCK); KASSERT(em != NULL, ("clone: emuldata not found.\n")); /* and adjust it */ if (args->flags & CLONE_PARENT_SETTID) { @@ -728,9 +730,20 @@ off_t pos; } */ bsd_args; int error; + struct file *fp; error = 0; bsd_args.flags = 0; + fp = NULL; + + /* + * Linux mmap(2): + * You must specify exactly one of MAP_SHARED and MAP_PRIVATE + */ + if (! ((linux_args->flags & LINUX_MAP_SHARED) ^ + (linux_args->flags & LINUX_MAP_PRIVATE))) + return (EINVAL); + if (linux_args->flags & LINUX_MAP_SHARED) bsd_args.flags |= MAP_SHARED; if (linux_args->flags & LINUX_MAP_PRIVATE) @@ -813,17 +826,44 @@ bsd_args.addr = (caddr_t)PTRIN(linux_args->addr); bsd_args.len = linux_args->len; } + /* - * XXX i386 Linux always emulator forces PROT_READ on (why?) - * so we do the same. We add PROT_EXEC to work around buggy - * applications (e.g. Java) that take advantage of the fact - * that execute permissions are not enforced by x86 CPUs. + * We add PROT_EXEC to work around buggy applications (e.g. Java) + * that take advantage of the fact that execute permissions are not + * enforced by x86 CPUs. */ - bsd_args.prot = linux_args->prot | PROT_EXEC | PROT_READ; + bsd_args.prot = linux_args->prot | PROT_EXEC; if (linux_args->flags & LINUX_MAP_ANON) bsd_args.fd = -1; - else + else { + /* + * Linux follows Solaris mmap(2) description: + * The file descriptor fildes is opened with + * read permission, regardless of the + * protection options specified. + * If PROT_WRITE is specified, the application + * must have opened the file descriptor + * fildes with write permission unless + * MAP_PRIVATE is specified in the flag + * argument as described below. + */ + + if ((error = fget(td, linux_args->fd, &fp)) != 0) + return (error); + if (fp->f_type != DTYPE_VNODE) { + fdrop(fp, td); + return (EINVAL); + } + + /* Linux mmap() just fails for O_WRONLY files */ + if (! (fp->f_flag & FREAD)) { + fdrop(fp, td); + return (EACCES); + } + bsd_args.fd = linux_args->fd; + fdrop(fp, td); + } bsd_args.pos = (off_t)linux_args->pgoff * PAGE_SIZE; bsd_args.pad = 0; ==== //depot/projects/soc2006/intr_filter/arm/at91/at91_mci.c#2 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/at91/at91_mci.c,v 1.1 2006/10/20 06:44:04 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/at91_mci.c,v 1.2 2007/01/05 01:18:32 ticso Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -403,12 +403,14 @@ } // printf("CMDR %x ARGR %x with data\n", cmdr, cmd->arg); WR4(sc, MCI_ARGR, cmd->arg); - WR4(sc, MCI_CMDR, cmdr); if (cmdr & MCI_CMDR_TRCMD_START) { - if (cmdr & MCI_CMDR_TRDIR) + if (cmdr & MCI_CMDR_TRDIR) { WR4(sc, PDC_PTCR, PDC_PTCR_RXTEN); - else + WR4(sc, MCI_CMDR, cmdr); + } else { + WR4(sc, MCI_CMDR, cmdr); WR4(sc, PDC_PTCR, PDC_PTCR_TXTEN); + } } WR4(sc, MCI_IER, MCI_SR_ERROR | ier); } ==== //depot/projects/soc2006/intr_filter/arm/at91/at91_pmc.c#4 (text) ==== @@ -25,7 +25,7 @@ #include "opt_at91.h" #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/at91/at91_pmc.c,v 1.3 2006/07/14 22:01:51 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/at91_pmc.c,v 1.4 2007/01/05 01:14:14 ticso Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -399,7 +399,7 @@ pmc_softc->dev = dev; if ((err = at91_pmc_activate(dev)) != 0) return err; -#ifdef AT91_TSC +#if defined(AT91_TSC) | defined (AT91_BWCT) at91_pmc_init_clock(pmc_softc, 16000000); #else at91_pmc_init_clock(pmc_softc, 10000000); ==== //depot/projects/soc2006/intr_filter/arm/at91/at91_st.c#8 (text) ==== @@ -23,7 +23,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/at91/at91_st.c,v 1.6 2006/12/15 21:44:48 n_hibma Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/at91_st.c,v 1.7 2007/01/05 02:52:06 ticso Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -208,11 +208,14 @@ void *ih; device_t dev = timer_softc->sc_dev; + rel_value = 32768 / hz; + if (rel_value < 1) + rel_value = 1; if (32768 % hz) { - printf("Cannot get %d Hz clock; using 128Hz\n", hz); - hz = 128; + printf("Cannot get %d Hz clock; using %dHz\n", hz, 32768 / rel_value); + hz = 32768 / rel_value; + tick = 1000000 / hz; } - rel_value = 32768 / hz; /* Disable all interrupts. */ WR4(ST_IDR, 0xffffffff); /* The system timer shares the system irq (1) */ ==== //depot/projects/soc2006/intr_filter/arm/at91/files.at91#4 (text) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/arm/at91/files.at91,v 1.6 2006/07/14 22:41:54 imp Exp $ +# $FreeBSD: src/sys/arm/at91/files.at91,v 1.7 2007/01/05 02:06:53 ticso Exp $ arm/arm/cpufunc_asm_arm9.S standard arm/arm/irq_dispatch.S standard arm/at91/at91.c standard @@ -6,7 +6,7 @@ arm/at91/at91_mci.c optional at91_mci arm/at91/at91_pio.c standard arm/at91/at91_pmc.c standard -arm/at91/at91_rtc.c standard +arm/at91/at91_rtc.c optional at91_rtc arm/at91/at91_ssc.c optional at91_ssc arm/at91/at91_spi.c optional at91_spi \ dependency "spibus_if.h" ==== //depot/projects/soc2006/intr_filter/arm/at91/if_ate.c#7 (text) ==== @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/at91/if_ate.c,v 1.13 2007/01/01 00:48:25 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/if_ate.c,v 1.15 2007/01/05 01:07:59 ticso Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -72,7 +72,7 @@ #include "miibus_if.h" -#define ATE_MAX_TX_BUFFERS 64 /* We have ping-pong tx buffers */ +#define ATE_MAX_TX_BUFFERS 2 /* We have ping-pong tx buffers */ #define ATE_MAX_RX_BUFFERS 64 struct ate_softc @@ -205,6 +205,8 @@ if_initname(ifp, device_get_name(dev), device_get_unit(dev)); ifp->if_mtu = ETHERMTU; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_capabilities |= IFCAP_VLAN_MTU; + ifp->if_capenable |= IFCAP_VLAN_MTU; /* the hw bits already set */ ifp->if_start = atestart; ifp->if_ioctl = ateioctl; ifp->if_init = ateinit; @@ -752,6 +754,9 @@ */ ate_setmcast(sc); + /* enable big packets */ + WR4(sc, ETH_CFG, RD4(sc, ETH_CFG) | ETH_CFG_BIG); + /* * Set 'running' flag, and clear output active flag * and attempt to start the output @@ -914,7 +919,7 @@ struct ate_softc *sc = ifp->if_softc; struct mii_data *mii; struct ifreq *ifr = (struct ifreq *)data; - int error = 0; + int mask, error = 0; switch (cmd) { case SIOCSIFFLAGS: @@ -944,6 +949,19 @@ mii = device_get_softc(sc->miibus); error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, cmd); break; + case SIOCSIFCAP: + mask = ifp->if_capenable ^ ifr->ifr_reqcap; + if (mask & IFCAP_VLAN_MTU) { + ATE_LOCK(sc); + if (ifr->ifr_reqcap & IFCAP_VLAN_MTU) { + WR4(sc, ETH_CFG, RD4(sc, ETH_CFG) | ETH_CFG_BIG); + ifp->if_capenable |= IFCAP_VLAN_MTU; + } else { + WR4(sc, ETH_CFG, RD4(sc, ETH_CFG) & ~ETH_CFG_BIG); + ifp->if_capenable &= ~IFCAP_VLAN_MTU; + } + ATE_UNLOCK(sc); + } default: error = ether_ioctl(ifp, cmd, data); break; ==== //depot/projects/soc2006/intr_filter/arm/include/atomic.h#3 (text+ko) ==== @@ -33,7 +33,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/arm/include/atomic.h,v 1.20 2006/11/07 11:53:44 cognet Exp $ + * $FreeBSD: src/sys/arm/include/atomic.h,v 1.21 2007/01/05 02:50:27 ticso Exp $ */ #ifndef _MACHINE_ATOMIC_H_ @@ -308,46 +308,76 @@ #endif /* _LOCORE */ +#define atomic_add_long(p, v) \ + atomic_add_32((volatile u_int *)(p), (u_int)(v)) +#define atomic_add_acq_long atomic_add_long +#define atomic_add_rel_long atomic_add_long +#define atomic_subtract_long(p, v) \ + atomic_subtract_32((volatile u_int *)(p), (u_int)(v)) +#define atomic_subtract_acq_long atomic_subtract_long +#define atomic_subtract_rel_long atomic_subtract_long +#define atomic_clear_long(p, v) \ + atomic_clear_32((volatile u_int *)(p), (u_int)(v)) +#define atomic_clear_acq_long atomic_clear_long +#define atomic_clear_rel_long atomic_clear_long +#define atomic_set_long(p, v) \ + atomic_set_32((volatile u_int *)(p), (u_int)(v)) +#define atomic_set_acq_long atomic_set_long +#define atomic_set_rel_long atomic_set_long +#define atomic_cmpset_long(dst, old, new) \ + atomic_cmpset_32((volatile u_int *)(dst), (u_int)(old), (u_int)(new)) +#define atomic_cmpset_acq_long atomic_cmpset_long +#define atomic_cmpset_rel_long atomic_cmpset_long +#define atomic_fetchadd_long(p, v) \ + atomic_fetchadd_32((volatile u_int *)(p), (u_int)(v)) +#define atomic_readandclear_long(p) \ + atomic_readandclear_long((volatile u_int *)(p)) +#define atomic_load_long(p) \ + atomic_load_32((volatile u_int *)(p)) +#define atomic_load_acq_long atomic_load_long +#define atomic_store_rel_long(p, v) \ + atomic_store_rel_32((volatile u_int *)(p), (u_int)(v)) -static __inline int -atomic_cmpset_long(volatile u_long *dst, u_long exp, u_long src) -{ - return (atomic_cmpset_32((volatile u_int *)dst, (u_int)exp, - (u_int)src)); -} + +#define atomic_clear_ptr atomic_clear_32 +#define atomic_set_ptr atomic_set_32 +#define atomic_cmpset_ptr atomic_cmpset_32 +#define atomic_cmpset_rel_ptr atomic_cmpset_ptr +#define atomic_cmpset_acq_ptr atomic_cmpset_ptr +#define atomic_store_ptr atomic_store_32 +#define atomic_store_rel_ptr atomic_store_ptr -#define atomic_set_rel_int atomic_set_32 -#define atomic_set_acq_long atomic_set_32 +#define atomic_add_int atomic_add_32 +#define atomic_add_acq_int atomic_add_int +#define atomic_add_rel_int atomic_add_int +#define atomic_subtract_int atomic_subtract_32 +#define atomic_subtract_acq_int atomic_subtract_int +#define atomic_subtract_rel_int atomic_subtract_int +#define atomic_clear_int atomic_clear_32 +#define atomic_clear_acq_int atomic_clear_int +#define atomic_clear_rel_int atomic_clear_int #define atomic_set_int atomic_set_32 +#define atomic_set_acq_int atomic_set_int +#define atomic_set_rel_int atomic_set_int +#define atomic_cmpset_int atomic_cmpset_32 +#define atomic_cmpset_acq_int atomic_cmpset_int +#define atomic_cmpset_rel_int atomic_cmpset_int +#define atomic_fetchadd_int atomic_fetchadd_32 #define atomic_readandclear_int atomic_readandclear_32 -#define atomic_clear_int atomic_clear_32 -#define atomic_clear_acq_long atomic_clear_32 -#define atomic_subtract_int atomic_subtract_32 -#define atomic_subtract_rel_int atomic_subtract_32 +#define atomic_load_acq_int atomic_load_32 +#define atomic_store_rel_int atomic_store_32 + +#define atomic_add_acq_32 atomic_add_32 +#define atomic_add_rel_32 atomic_add_32 +#define atomic_subtract_acq_32 atomic_subtract_32 #define atomic_subtract_rel_32 atomic_subtract_32 -#define atomic_subtract_acq_int atomic_subtract_32 -#define atomic_add_int atomic_add_32 -#define atomic_add_acq_long atomic_add_32 -#define atomic_add_rel_int atomic_add_32 -#define atomic_add_rel_32 atomic_add_32 -#define atomic_add_acq_int atomic_add_32 -#define atomic_cmpset_int atomic_cmpset_32 -#define atomic_cmpset_rel_int atomic_cmpset_32 -#define atomic_cmpset_rel_ptr atomic_cmpset_ptr -#define atomic_cmpset_acq_int atomic_cmpset_32 -#define atomic_cmpset_acq_ptr atomic_cmpset_ptr -#define atomic_cmpset_acq_long atomic_cmpset_long +#define atomic_clear_acq_32 atomic_clear_32 +#define atomic_clear_rel_32 atomic_clear_32 +#define atomic_set_acq_32 atomic_set_32 +#define atomic_set_rel_32 atomic_set_32 #define atomic_cmpset_acq_32 atomic_cmpset_32 -#define atomic_store_rel_ptr atomic_store_ptr -#define atomic_store_rel_int atomic_store_32 #define atomic_cmpset_rel_32 atomic_cmpset_32 -#define atomic_cmpset_rel_ptr atomic_cmpset_ptr -#define atomic_load_acq_int atomic_load_32 #define atomic_load_acq_32 atomic_load_32 -#define atomic_clear_ptr atomic_clear_32 -#define atomic_store_ptr atomic_store_32 -#define atomic_cmpset_ptr atomic_cmpset_32 -#define atomic_set_ptr atomic_set_32 -#define atomic_fetchadd_int atomic_fetchadd_32 +#define atomic_store_rel_32 atomic_store_32 #endif /* _MACHINE_ATOMIC_H_ */ ==== //depot/projects/soc2006/intr_filter/boot/common/pnp.c#2 (text+ko) ==== @@ -4,7 +4,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/boot/common/pnp.c,v 1.16 2003/08/25 23:30:41 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/common/pnp.c,v 1.17 2007/01/07 22:25:45 marius Exp $"); /* * "Plug and Play" functionality. @@ -82,52 +82,6 @@ return(CMD_OK); } -#if 0 -/* - * Try to load outstanding modules (eg. after disk change) - */ -COMMAND_SET(pnpload, "pnpload", "load modules for PnP devices", pnp_load); - -static int -pnp_load(int argc, char *argv[]) -{ - struct pnpinfo *pi; - char *modfname; - - /* find anything? */ - if (STAILQ_FIRST(&pnp_devices) != NULL) { - - /* check for kernel, assign modules handled by static drivers there */ - if (pnp_scankernel()) { - command_errmsg = "cannot load drivers until kernel loaded"; - return(CMD_ERROR); - } - if (fname == NULL) { - /* default paths */ - pnp_readconf("/boot/pnpdata.local"); - pnp_readconf("/boot/pnpdata"); - } else { - if (pnp_readconf(fname)) { - sprintf(command_errbuf, "can't read PnP information from '%s'", fname); - return(CMD_ERROR); - } - } - - /* try to load any modules that have been nominated */ - STAILQ_FOREACH(pi, &pnp_devices, pi_link) { - /* Already loaded? */ - if ((pi->pi_module != NULL) && (file_findfile(pi->pi_module, NULL) == NULL)) { - modfname = malloc(strlen(pi->pi_module) + 4); - sprintf(modfname, "%s.ko", pi->pi_module); /* XXX implicit knowledge of KLD module filenames */ - if (mod_load(pi->pi_module, pi->pi_argc, pi->pi_argv)) - printf("Could not load module '%s' for device '%s'\n", modfname, STAILQ_FIRST(&pi->pi_ident)->id_ident); - free(modfname); - } - } - } - return(CMD_OK); -} -#endif /* * Throw away anything we think we know about PnP devices. */ @@ -142,159 +96,7 @@ pnp_freeinfo(pi); } } -#if 0 -/* - * The PnP configuration database consists of a flat text file with - * entries one per line. Valid lines are: - * - * # <text> - * - * This line is a comment, and ignored. - * - * [<name>] - * - * Entries following this line are for devices connected to the - * bus <name>, At least one such entry must be encountered - * before identifiers are recognised. - * - * ident=<identifier> rev=<revision> module=<module> args=<arguments> - * - * This line describes an identifier:module mapping. The 'ident' - * and 'module' fields are required; the 'rev' field is currently - * ignored (but should be used), and the 'args' field must come - * last. - * - * Comments may be appended to lines; any character including or following - * '#' on a line is ignored. - */ -static int -pnp_readconf(char *path) -{ - struct pnpinfo *pi; - struct pnpident *id; - int fd, line; - char lbuf[128], *currbus, *ident, *revision, *module, *args; - char *cp, *ep, *tp, c; - - /* try to open the file */ - if ((fd = open(path, O_RDONLY)) >= 0) { - line = 0; - currbus = NULL; - - while (fgetstr(lbuf, sizeof(lbuf), fd) > 0) { - line++; - /* Find the first non-space character on the line */ - for (cp = lbuf; (*cp != 0) && !isspace(*cp); cp++) - ; - - /* keep/discard? */ - if ((*cp == 0) || (*cp == '#')) - continue; - - /* cut trailing comment? */ - if ((ep = strchr(cp, '#')) != NULL) - *ep = 0; - - /* bus declaration? */ - if (*cp == '[') { - if (((ep = strchr(cp, ']')) == NULL) || ((ep - cp) < 2)) { - printf("%s line %d: bad bus specification\n", path, line); - } else { - if (currbus != NULL) - free(currbus); - *ep = 0; - currbus = strdup(cp + 1); - } - continue; - } - - /* XXX should we complain? */ - if (currbus == NULL) - continue; - - /* mapping */ - for (ident = module = args = revision = NULL; *cp != 0;) { - - /* discard leading whitespace */ - if (isspace(*cp)) { - cp++; - continue; - } - - /* scan for terminator, separator */ - for (ep = cp; (*ep != 0) && (*ep != '=') && !isspace(*ep); ep++) - ; - - if (*ep == '=') { - *ep = 0; - for (tp = ep + 1; (*tp != 0) && !isspace(*tp); tp++) - ; - c = *tp; - *tp = 0; - if ((ident == NULL) && !strcmp(cp, "ident")) { - ident = ep + 1; - } else if ((revision == NULL) && !strcmp(cp, "revision")) { - revision = ep + 1; - } else if ((args == NULL) && !strcmp(cp, "args")) { - *tp = c; - while (*tp != 0) /* skip to end of string */ - tp++; - args = ep + 1; - } else { - /* XXX complain? */ - } - cp = tp; - continue; - } - - /* it's garbage or a keyword - ignore it for now */ - cp = ep; - } - - /* we must have at least ident and module set to be interesting */ - if ((ident == NULL) || (module == NULL)) - continue; - - /* - * Loop looking for module/bus that might match this, but aren't already - * assigned. - * XXX no revision parse/test here yet. - */ - STAILQ_FOREACH(pi, &pnp_devices, pi_link) { - - /* no driver assigned, bus matches OK */ - if ((pi->pi_module == NULL) && - !strcmp(pi->pi_handler->pp_name, currbus)) { - - /* scan idents, take first match */ - STAILQ_FOREACH(id, &pi->pi_ident, id_link) - if (!strcmp(id->id_ident, ident)) - break; - - /* find a match? */ - if (id != NULL) { - if (args != NULL) - if (parse(&pi->pi_argc, &pi->pi_argv, args)) { - printf("%s line %d: bad arguments\n", path, line); - continue; - } - pi->pi_module = strdup(module); - printf("use module '%s' for %s:%s\n", module, pi->pi_handler->pp_name, id->id_ident); - } - } - } - } - close(fd); - } - return(CMD_OK); -} -static int -pnp_scankernel(void) -{ - return(CMD_OK); -} -#endif /* * Add a unique identifier to (pi) */ ==== //depot/projects/soc2006/intr_filter/bsm/audit.h#3 (text) ==== ==== //depot/projects/soc2006/intr_filter/bsm/audit_internal.h#3 (text) ==== ==== //depot/projects/soc2006/intr_filter/bsm/audit_kevents.h#4 (text) ==== ==== //depot/projects/soc2006/intr_filter/bsm/audit_record.h#4 (text) ==== ==== //depot/projects/soc2006/intr_filter/compat/linux/linux_emul.c#6 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_emul.c,v 1.10 2006/12/31 12:42:55 netchild Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_emul.c,v 1.12 2007/01/07 19:09:20 netchild Exp $"); #include "opt_compat.h" @@ -63,12 +63,12 @@ { struct linux_emuldata *em; - if (locked == EMUL_UNLOCKED) + if (locked == EMUL_DOLOCK) EMUL_LOCK(&emul_lock); em = p->p_emuldata; - if (em == NULL && locked == EMUL_UNLOCKED) + if (em == NULL && locked == EMUL_DOLOCK) EMUL_UNLOCK(&emul_lock); return (em); @@ -104,7 +104,7 @@ EMUL_LOCK(&emul_lock); } else { /* lookup the old one */ - em = em_find(td->td_proc, EMUL_UNLOCKED); + em = em_find(td->td_proc, EMUL_DOLOCK); KASSERT(em != NULL, ("proc_init: emuldata not found in exec case.\n")); } @@ -119,10 +119,12 @@ if (child != 0) { if (flags & CLONE_THREAD) { /* lookup the parent */ - p_em = em_find(td->td_proc, EMUL_LOCKED); + EMUL_SHARED_WLOCK(&emul_shared_lock); + p_em = em_find(td->td_proc, EMUL_DONTLOCK); KASSERT(p_em != NULL, ("proc_init: parent emuldata not found for CLONE_THREAD\n")); em->shared = p_em->shared; em->shared->refs++; + EMUL_SHARED_WUNLOCK(&emul_shared_lock); } else { /* * handled earlier to avoid malloc(M_WAITOK) with @@ -159,7 +161,7 @@ return; /* find the emuldata */ - em = em_find(p, EMUL_UNLOCKED); + em = em_find(p, EMUL_DOLOCK); KASSERT(em != NULL, ("proc_exit: emuldata not found.\n")); @@ -217,7 +219,7 @@ continue; if (__predict_false(q->p_sysent != &elf_linux_sysvec)) continue; - em = em_find(q, EMUL_UNLOCKED); + em = em_find(q, EMUL_DOLOCK); KASSERT(em != NULL, ("linux_reparent: emuldata not found: %i\n", q->p_pid)); if (em->pdeath_signal != 0) { PROC_LOCK(q); @@ -244,7 +246,7 @@ && p->p_sysent == &elf_linux_sysvec)) { struct linux_emuldata *em; - em = em_find(p, EMUL_UNLOCKED); + em = em_find(p, EMUL_DOLOCK); >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701120405.l0C45LLO080182>