Date: Sat, 27 Jan 2007 11:04:57 GMT From: Roman Divacky <rdivacky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 113595 for review Message-ID: <200701271104.l0RB4vLH031696@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=113595 Change 113595 by rdivacky@rdivacky_witten on 2007/01/27 11:04:10 IFC Affected files ... .. //depot/projects/linuxolator/src/sys/amd64/amd64/machdep.c#13 integrate .. //depot/projects/linuxolator/src/sys/amd64/amd64/mp_machdep.c#5 integrate .. //depot/projects/linuxolator/src/sys/amd64/amd64/mptable_pci.c#4 integrate .. //depot/projects/linuxolator/src/sys/amd64/amd64/msi.c#3 integrate .. //depot/projects/linuxolator/src/sys/amd64/amd64/nexus.c#5 integrate .. //depot/projects/linuxolator/src/sys/amd64/include/clock.h#3 integrate .. //depot/projects/linuxolator/src/sys/amd64/include/intr_machdep.h#5 integrate .. //depot/projects/linuxolator/src/sys/amd64/isa/clock.c#4 integrate .. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#31 integrate .. //depot/projects/linuxolator/src/sys/amd64/pci/pci_bus.c#4 integrate .. //depot/projects/linuxolator/src/sys/arm/xscale/ixp425/ixp425_mem.c#2 integrate .. //depot/projects/linuxolator/src/sys/cam/scsi/scsi_da.c#8 integrate .. //depot/projects/linuxolator/src/sys/compat/linprocfs/linprocfs.c#11 integrate .. //depot/projects/linuxolator/src/sys/compat/linux/linux_emul.c#26 integrate .. //depot/projects/linuxolator/src/sys/conf/files.sparc64#6 integrate .. //depot/projects/linuxolator/src/sys/conf/options.sun4v#2 integrate .. //depot/projects/linuxolator/src/sys/dev/acpica/acpi_cpu.c#4 integrate .. //depot/projects/linuxolator/src/sys/dev/acpica/acpi_pcib_acpi.c#4 integrate .. //depot/projects/linuxolator/src/sys/dev/acpica/acpi_pcib_pci.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/aic7xxx/aic79xx.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/aic7xxx/aic79xx_pci.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/ath/if_ath.c#7 integrate .. //depot/projects/linuxolator/src/sys/dev/ath/if_ath_pci.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/bce/if_bce.c#10 integrate .. //depot/projects/linuxolator/src/sys/dev/esp/esp_sbus.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/firewire/fwohci_pci.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/fxp/if_fxp.c#6 integrate .. //depot/projects/linuxolator/src/sys/dev/isp/isp.c#9 integrate .. //depot/projects/linuxolator/src/sys/dev/isp/isp_freebsd.c#8 integrate .. //depot/projects/linuxolator/src/sys/dev/isp/isp_freebsd.h#6 integrate .. //depot/projects/linuxolator/src/sys/dev/isp/isp_pci.c#9 integrate .. //depot/projects/linuxolator/src/sys/dev/isp/isp_sbus.c#5 integrate .. //depot/projects/linuxolator/src/sys/dev/isp/isp_target.c#4 integrate .. //depot/projects/linuxolator/src/sys/dev/isp/isp_target.h#3 integrate .. //depot/projects/linuxolator/src/sys/dev/isp/isp_tpublic.h#3 integrate .. //depot/projects/linuxolator/src/sys/dev/isp/ispvar.h#6 integrate .. //depot/projects/linuxolator/src/sys/dev/le/if_le_cbus.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/le/if_le_isa.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/le/if_le_lebuffer.c#1 branch .. //depot/projects/linuxolator/src/sys/dev/le/if_le_ledma.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/le/if_le_pci.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/le/lance.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/le/lebuffer_sbus.c#1 branch .. //depot/projects/linuxolator/src/sys/dev/mc146818/mc146818reg.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/mfi/mfi_pci.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/mii/brgphy.c#7 integrate .. //depot/projects/linuxolator/src/sys/dev/mii/gentbi.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/mii/mii.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/mii/miidevs#6 integrate .. //depot/projects/linuxolator/src/sys/dev/mii/rlphy.c#4 integrate .. //depot/projects/linuxolator/src/sys/dev/mii/ukphy.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/mpt/mpt_cam.c#11 integrate .. //depot/projects/linuxolator/src/sys/dev/pci/pci.c#15 integrate .. //depot/projects/linuxolator/src/sys/dev/pci/pci_if.m#4 integrate .. //depot/projects/linuxolator/src/sys/dev/pci/pci_pci.c#7 integrate .. //depot/projects/linuxolator/src/sys/dev/pci/pci_private.h#6 integrate .. //depot/projects/linuxolator/src/sys/dev/pci/pcib_if.m#4 integrate .. //depot/projects/linuxolator/src/sys/dev/pci/pcib_private.h#5 integrate .. //depot/projects/linuxolator/src/sys/dev/pci/pcireg.h#5 integrate .. //depot/projects/linuxolator/src/sys/dev/pci/pcivar.h#6 integrate .. //depot/projects/linuxolator/src/sys/dev/re/if_re.c#7 integrate .. //depot/projects/linuxolator/src/sys/dev/sk/if_sk.c#4 integrate .. //depot/projects/linuxolator/src/sys/dev/sound/pci/es137x.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/sound/pci/via8233.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/sound/sbus/cs4231.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/sound/usb/uaudio.c#4 integrate .. //depot/projects/linuxolator/src/sys/dev/sound/usb/uaudio_pcm.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/stge/if_stge.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/sym/sym_hipd.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/ti/if_ti.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/usb/ehci_pci.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/usb/uhci_pci.c#2 integrate .. //depot/projects/linuxolator/src/sys/fs/deadfs/dead_vnops.c#2 integrate .. //depot/projects/linuxolator/src/sys/geom/geom_vfs.c#2 integrate .. //depot/projects/linuxolator/src/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c#2 integrate .. //depot/projects/linuxolator/src/sys/i386/cpufreq/powernow.c#2 integrate .. //depot/projects/linuxolator/src/sys/i386/i386/machdep.c#11 integrate .. //depot/projects/linuxolator/src/sys/i386/i386/mp_machdep.c#5 integrate .. //depot/projects/linuxolator/src/sys/i386/i386/mptable_pci.c#4 integrate .. //depot/projects/linuxolator/src/sys/i386/i386/msi.c#3 integrate .. //depot/projects/linuxolator/src/sys/i386/i386/nexus.c#5 integrate .. //depot/projects/linuxolator/src/sys/i386/include/clock.h#3 integrate .. //depot/projects/linuxolator/src/sys/i386/include/intr_machdep.h#5 integrate .. //depot/projects/linuxolator/src/sys/i386/isa/clock.c#4 integrate .. //depot/projects/linuxolator/src/sys/i386/linux/linux_machdep.c#25 integrate .. //depot/projects/linuxolator/src/sys/i386/pci/pci_bus.c#4 integrate .. //depot/projects/linuxolator/src/sys/kern/init_main.c#8 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_fork.c#10 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_idle.c#5 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_intr.c#5 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_kse.c#4 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_kthread.c#2 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_mbuf.c#4 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_switch.c#5 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_thr.c#8 integrate .. //depot/projects/linuxolator/src/sys/kern/sched_4bsd.c#9 integrate .. //depot/projects/linuxolator/src/sys/kern/sched_core.c#3 integrate .. //depot/projects/linuxolator/src/sys/kern/sched_ule.c#7 integrate .. //depot/projects/linuxolator/src/sys/kern/subr_taskqueue.c#2 integrate .. //depot/projects/linuxolator/src/sys/kern/subr_turnstile.c#4 integrate .. //depot/projects/linuxolator/src/sys/kern/uipc_mbuf.c#6 integrate .. //depot/projects/linuxolator/src/sys/kern/uipc_socket.c#9 integrate .. //depot/projects/linuxolator/src/sys/kern/uipc_syscalls.c#6 integrate .. //depot/projects/linuxolator/src/sys/kern/vfs_bio.c#7 integrate .. //depot/projects/linuxolator/src/sys/kern/vfs_export.c#5 integrate .. //depot/projects/linuxolator/src/sys/kern/vfs_lookup.c#5 integrate .. //depot/projects/linuxolator/src/sys/modules/le/Makefile#2 integrate .. //depot/projects/linuxolator/src/sys/netgraph/ng_ppp.c#4 integrate .. //depot/projects/linuxolator/src/sys/netinet/ip_carp.c#5 integrate .. //depot/projects/linuxolator/src/sys/netinet6/nd6.c#7 integrate .. //depot/projects/linuxolator/src/sys/nfs4client/nfs4_vfs_subs.c#2 integrate .. //depot/projects/linuxolator/src/sys/nfs4client/nfs4_vfsops.c#3 integrate .. //depot/projects/linuxolator/src/sys/nfs4client/nfs4_vnops.c#3 integrate .. //depot/projects/linuxolator/src/sys/nfsclient/nfs.h#4 integrate .. //depot/projects/linuxolator/src/sys/nfsclient/nfs_vfsops.c#6 integrate .. //depot/projects/linuxolator/src/sys/nfsclient/nfs_vnops.c#6 integrate .. //depot/projects/linuxolator/src/sys/pc98/cbus/clock.c#3 integrate .. //depot/projects/linuxolator/src/sys/pc98/pc98/machdep.c#8 integrate .. //depot/projects/linuxolator/src/sys/pci/if_rl.c#5 integrate .. //depot/projects/linuxolator/src/sys/powerpc/include/ipl.h#2 delete .. //depot/projects/linuxolator/src/sys/sparc64/sbus/dma_sbus.c#2 integrate .. //depot/projects/linuxolator/src/sys/sparc64/sparc64/upa.c#2 integrate .. //depot/projects/linuxolator/src/sys/sys/buf.h#3 integrate .. //depot/projects/linuxolator/src/sys/sys/bufobj.h#2 integrate .. //depot/projects/linuxolator/src/sys/sys/mbuf.h#6 integrate .. //depot/projects/linuxolator/src/sys/sys/param.h#9 integrate .. //depot/projects/linuxolator/src/sys/sys/proc.h#11 integrate .. //depot/projects/linuxolator/src/sys/sys/sched.h#5 integrate .. //depot/projects/linuxolator/src/sys/ufs/ffs/ffs_alloc.c#4 integrate .. //depot/projects/linuxolator/src/sys/ufs/ffs/ffs_extern.h#3 integrate .. //depot/projects/linuxolator/src/sys/ufs/ffs/ffs_snapshot.c#4 integrate .. //depot/projects/linuxolator/src/sys/ufs/ffs/ffs_vfsops.c#6 integrate .. //depot/projects/linuxolator/src/sys/ufs/ufs/quota.h#2 integrate .. //depot/projects/linuxolator/src/sys/ufs/ufs/ufs_quota.c#5 integrate .. //depot/projects/linuxolator/src/sys/vm/uma.h#3 integrate .. //depot/projects/linuxolator/src/sys/vm/uma_core.c#5 integrate .. //depot/projects/linuxolator/src/sys/vm/vm_glue.c#4 integrate .. //depot/projects/linuxolator/src/sys/vm/vm_zeroidle.c#4 integrate Differences ... ==== //depot/projects/linuxolator/src/sys/amd64/amd64/machdep.c#13 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.667 2006/12/20 04:40:38 davidxu Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.668 2007/01/23 08:01:19 bde Exp $"); #include "opt_atalk.h" #include "opt_atpic.h" @@ -1185,7 +1185,6 @@ * under witness. */ mutex_init(); - mtx_init(&clock_lock, "clk", NULL, MTX_SPIN); mtx_init(&icu_lock, "icu", NULL, MTX_SPIN | MTX_NOWITNESS); /* exceptions */ @@ -1216,6 +1215,12 @@ lidt(&r_idt); /* + * Initialize the i8254 before the console so that console + * initialization can use DELAY(). + */ + i8254_init(); + + /* * Initialize the console before we print anything out. */ cninit(); ==== //depot/projects/linuxolator/src/sys/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.279 2007/01/11 00:17:02 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.280 2007/01/23 08:38:39 jeff Exp $"); #include "opt_cpu.h" #include "opt_kstack_pages.h" @@ -949,15 +949,12 @@ ipi_bitmap = atomic_readandclear_int(&cpu_ipi_pending[cpu]); if (ipi_bitmap & (1 << IPI_PREEMPT)) { + struct thread *running_thread = curthread; mtx_lock_spin(&sched_lock); - /* Don't preempt the idle thread */ - if (curthread != PCPU_GET(idlethread)) { - struct thread *running_thread = curthread; - if (running_thread->td_critnest > 1) - running_thread->td_owepreempt = 1; - else - mi_switch(SW_INVOL | SW_PREEMPT, NULL); - } + if (running_thread->td_critnest > 1) + running_thread->td_owepreempt = 1; + else + mi_switch(SW_INVOL | SW_PREEMPT, NULL); mtx_unlock_spin(&sched_lock); } ==== //depot/projects/linuxolator/src/sys/amd64/amd64/mptable_pci.c#4 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/mptable_pci.c,v 1.6 2006/12/12 19:27:00 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mptable_pci.c,v 1.7 2007/01/22 21:48:42 jhb Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -120,6 +120,7 @@ DEVMETHOD(pcib_alloc_msi, mptable_hostb_alloc_msi), DEVMETHOD(pcib_release_msi, pcib_release_msi), DEVMETHOD(pcib_alloc_msix, mptable_hostb_alloc_msix), + DEVMETHOD(pcib_remap_msix, pcib_remap_msix), DEVMETHOD(pcib_release_msix, pcib_release_msix), { 0, 0 } @@ -176,6 +177,7 @@ DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi), DEVMETHOD(pcib_release_msi, pcib_release_msi), DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix), + DEVMETHOD(pcib_remap_msix, pcib_remap_msix), DEVMETHOD(pcib_release_msix, pcib_release_msix), {0, 0} ==== //depot/projects/linuxolator/src/sys/amd64/amd64/msi.c#3 (text+ko) ==== @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/msi.c,v 1.2 2006/11/15 18:40:00 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/msi.c,v 1.3 2007/01/22 21:48:42 jhb Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -480,6 +480,30 @@ } int +msix_remap(int index, int irq) +{ + struct msi_intsrc *msi; + + sx_xlock(&msi_sx); + msi = (struct msi_intsrc *)intr_lookup_source(irq); + if (msi == NULL) { + sx_xunlock(&msi_sx); + return (ENOENT); + } + + /* Make sure this is an MSI-X message. */ + if (!msi->msi_msix) { + sx_xunlock(&msi_sx); + return (EINVAL); + } + + KASSERT(msi->msi_dev != NULL, ("unowned message")); + msi->msi_index = index; + sx_xunlock(&msi_sx); + return (0); +} + +int msix_release(int irq) { struct msi_intsrc *msi; ==== //depot/projects/linuxolator/src/sys/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.71 2007/01/11 19:40:19 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.72 2007/01/22 21:48:42 jhb Exp $"); /* * This code implements a `root nexus' for Intel Architecture @@ -105,6 +105,7 @@ static int nexus_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs); static int nexus_release_msi(device_t pcib, device_t dev, int count, int *irqs); static int nexus_alloc_msix(device_t pcib, device_t dev, int index, int *irq); +static int nexus_remap_msix(device_t pcib, device_t dev, int index, int irq); static int nexus_release_msix(device_t pcib, device_t dev, int irq); static device_method_t nexus_methods[] = { @@ -135,6 +136,7 @@ DEVMETHOD(pcib_alloc_msi, nexus_alloc_msi), DEVMETHOD(pcib_release_msi, nexus_release_msi), DEVMETHOD(pcib_alloc_msix, nexus_alloc_msix), + DEVMETHOD(pcib_remap_msix, nexus_remap_msix), DEVMETHOD(pcib_release_msix, nexus_release_msix), { 0, 0 } @@ -510,6 +512,13 @@ } static int +nexus_remap_msix(device_t pcib, device_t dev, int index, int irq) +{ + + return (msix_remap(index, irq)); +} + +static int nexus_release_msix(device_t pcib, device_t dev, int irq) { ==== //depot/projects/linuxolator/src/sys/amd64/include/clock.h#3 (text+ko) ==== @@ -3,7 +3,7 @@ * Garrett Wollman, September 1994. * This file is in the public domain. * - * $FreeBSD: src/sys/amd64/include/clock.h,v 1.53 2006/10/02 12:59:55 phk Exp $ + * $FreeBSD: src/sys/amd64/include/clock.h,v 1.54 2007/01/23 08:01:19 bde Exp $ */ #ifndef _MACHINE_CLOCK_H_ @@ -22,7 +22,8 @@ extern int timer0_max_count; extern uint64_t tsc_freq; extern int tsc_is_broken; -extern struct mtx clock_lock; + +void i8254_init(void); /* * Driver to clock driver interface. ==== //depot/projects/linuxolator/src/sys/amd64/include/intr_machdep.h#5 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/intr_machdep.h,v 1.13 2006/12/12 19:24:45 jhb Exp $ + * $FreeBSD: src/sys/amd64/include/intr_machdep.h,v 1.14 2007/01/22 21:48:42 jhb Exp $ */ #ifndef __MACHINE_INTR_MACHDEP_H__ @@ -152,6 +152,7 @@ void msi_init(void); int msi_release(int *irqs, int count); int msix_alloc(device_t dev, int index, int *irq, int *new); +int msix_remap(int index, int irq); int msix_release(int irq); #endif /* !LOCORE */ ==== //depot/projects/linuxolator/src/sys/amd64/isa/clock.c#4 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/isa/clock.c,v 1.228 2006/12/03 03:49:28 bde Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/isa/clock.c,v 1.229 2007/01/23 08:01:20 bde Exp $"); /* * Routines to handle clock hardware. @@ -103,11 +103,11 @@ u_int timer_freq = TIMER_FREQ; int timer0_max_count; int timer0_real_max_count; -struct mtx clock_lock; #define RTC_LOCK mtx_lock_spin(&clock_lock) #define RTC_UNLOCK mtx_unlock_spin(&clock_lock) static int beeping = 0; +static struct mtx clock_lock; static const u_char daysinmonth[] = {31,28,31,30,31,30,31,31,30,31,30,31}; static struct intsrc *i8254_intsrc; static u_int32_t i8254_lastcount; @@ -295,13 +295,6 @@ printf("DELAY(%d)...", n); #endif /* - * Guard against the timer being uninitialized if we are called - * early for console i/o. - */ - if (timer0_max_count == 0) - set_timer_freq(timer_freq, hz); - - /* * Read the counter first, so that the rest of the setup overhead is * counted. Guess the initial overhead is 20 usec (on most systems it * takes about 1.5 usec for each of the i/o's in getit(). The loop @@ -560,10 +553,15 @@ mtx_unlock_spin(&clock_lock); } -/* - * Initialize 8254 timer 0 early so that it can be used in DELAY(). - * XXX initialization of other timers is unintentionally left blank. - */ +/* This is separate from startrtclock() so that it can be called early. */ +void +i8254_init(void) +{ + + mtx_init(&clock_lock, "clk", NULL, MTX_SPIN); + set_timer_freq(timer_freq, hz); +} + void startrtclock() { @@ -572,7 +570,6 @@ writertc(RTC_STATUSA, rtc_statusa); writertc(RTC_STATUSB, RTCSB_24HR); - set_timer_freq(timer_freq, hz); freq = calibrate_clocks(); #ifdef CLK_CALIBRATION_LOOP if (bootverbose) { ==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#31 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.26 2007/01/14 16:20:37 netchild Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.28 2007/01/23 08:46:49 jeff Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -47,6 +47,7 @@ #include <sys/proc.h> #include <sys/resource.h> #include <sys/resourcevar.h> +#include <sys/sched.h> #include <sys/syscallsubr.h> #include <sys/sysproto.h> #include <sys/unistd.h> @@ -502,7 +503,7 @@ /* make it run */ mtx_lock_spin(&sched_lock); TD_SET_CAN_RUN(td2); - setrunqueue(td2, SRQ_BORING); + sched_add(td2, SRQ_BORING); mtx_unlock_spin(&sched_lock); return (0); @@ -543,7 +544,7 @@ /* make it run */ mtx_lock_spin(&sched_lock); TD_SET_CAN_RUN(td2); - setrunqueue(td2, SRQ_BORING); + sched_add(td2, SRQ_BORING); mtx_unlock_spin(&sched_lock); /* wait for the children to exit, ie. emulate vfork */ @@ -742,7 +743,7 @@ */ mtx_lock_spin(&sched_lock); TD_SET_CAN_RUN(td2); - setrunqueue(td2, SRQ_BORING); + sched_add(td2, SRQ_BORING); mtx_unlock_spin(&sched_lock); td->td_retval[0] = p2->p_pid; ==== //depot/projects/linuxolator/src/sys/amd64/pci/pci_bus.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/pci/pci_bus.c,v 1.119 2006/12/12 19:27:00 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/pci/pci_bus.c,v 1.120 2007/01/22 21:48:42 jhb Exp $"); #include "opt_cpu.h" @@ -347,6 +347,7 @@ DEVMETHOD(pcib_alloc_msi, legacy_pcib_alloc_msi), DEVMETHOD(pcib_release_msi, pcib_release_msi), DEVMETHOD(pcib_alloc_msix, legacy_pcib_alloc_msix), + DEVMETHOD(pcib_remap_msix, pcib_remap_msix), DEVMETHOD(pcib_release_msix, pcib_release_msix), { 0, 0 } ==== //depot/projects/linuxolator/src/sys/arm/xscale/ixp425/ixp425_mem.c#2 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/ixp425_mem.c,v 1.1 2006/11/19 23:55:23 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/ixp425_mem.c,v 1.2 2007/01/26 01:37:32 kevlo Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -47,8 +47,8 @@ static uint32_t sdram_64bit[] = { 0x00800000, /* 8M: One 2M x 32 chip */ 0x01000000, /* 16M: Two 2M x 32 chips */ - 0x01000000, /* 16M: One 4M x 32 chip */ - 0x02000000, /* 32M: Two 4M x 32 chips */ + 0x01000000, /* 16M: Two 4M x 16 chips */ + 0x02000000, /* 32M: Four 4M x 32 chips */ 0, 0, 0, 0 }; ==== //depot/projects/linuxolator/src/sys/cam/scsi/scsi_da.c#8 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.200 2006/12/05 07:45:28 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.202 2007/01/23 17:29:31 imp Exp $"); #include <sys/param.h> @@ -466,6 +466,14 @@ {T_DIRECT, SIP_MEDIA_REMOVABLE, "X-Micro", "Flash Disk", "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE }, + { + /* + * EasyMP3 EM732X USB 2.0 Flash MP3 Player + * PR: usb/96546 + */ + {T_DIRECT, SIP_MEDIA_REMOVABLE, "EM732X", "MP3 Player*", + "1.0"}, /*quirks*/ DA_Q_NO_SYNC_CACHE + }, }; static disk_strategy_t dastrategy; ==== //depot/projects/linuxolator/src/sys/compat/linprocfs/linprocfs.c#11 (text+ko) ==== @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.101 2006/11/27 21:10:55 jkim Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.105 2007/01/21 13:18:52 netchild Exp $"); #include <sys/param.h> #include <sys/queue.h> @@ -121,7 +121,7 @@ * This character array is used with ki_stati-1 as an index and tries to * map our states to suitable linux states. */ -static char *linux_state = "RRSTZDD"; +static char linux_state[] = "RRSTZDD"; /* * Filler function for proc/meminfo @@ -513,15 +513,25 @@ linprocfs_doprocstat(PFS_FILL_ARGS) { struct kinfo_proc kp; + char state; + static int ratelimit = 0; PROC_LOCK(p); fill_kinfo_proc(p, &kp); sbuf_printf(sb, "%d", p->p_pid); #define PS_ADD(name, fmt, arg) sbuf_printf(sb, " " fmt, arg) PS_ADD("comm", "(%s)", p->p_comm); - KASSERT(kp.ki_stat <= sizeof(linux_state), - ("linprocfs: don't know how to handle unknown FreeBSD state")); - PS_ADD("state", "%c", linux_state[kp.ki_stat - 1]); + if (kp.ki_stat > sizeof(linux_state)) { + state = 'R'; + + if (ratelimit == 0) { + printf("linprocfs: don't know how to handle unknown FreeBSD state %d/%zd, mapping to R\n", + kp.ki_stat, sizeof(linux_state)); + ++ratelimit; + } + } else + state = linux_state[kp.ki_stat - 1]; + PS_ADD("state", "%c", state); PS_ADD("ppid", "%d", p->p_pptr ? p->p_pptr->p_pid : 0); PS_ADD("pgrp", "%d", p->p_pgid); PS_ADD("session", "%d", p->p_session->s_sid); ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_emul.c#26 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_emul.c,v 1.12 2007/01/07 19:09:20 netchild Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_emul.c,v 1.13 2007/01/20 14:58:59 netchild Exp $"); #include "opt_compat.h" ==== //depot/projects/linuxolator/src/sys/conf/files.sparc64#6 (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.sparc64,v 1.86 2007/01/16 22:08:27 marius Exp $ +# $FreeBSD: src/sys/conf/files.sparc64,v 1.87 2007/01/20 12:53:30 marius Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -49,7 +49,9 @@ dev/fb/machfb.c optional machfb sc dev/hwpmc/hwpmc_sparc64.c optional hwpmc dev/kbd/kbd.c optional atkbd | sc | ukbd +dev/le/if_le_lebuffer.c optional le sbus dev/le/if_le_ledma.c optional le sbus +dev/le/lebuffer_sbus.c optional le sbus dev/ofw/ofw_bus_if.m standard dev/ofw/ofw_bus_subr.c standard dev/ofw/ofw_console.c optional ofw_console ==== //depot/projects/linuxolator/src/sys/conf/options.sun4v#2 (text+ko) ==== @@ -1,12 +1,7 @@ -# $FreeBSD: src/sys/conf/options.sun4v,v 1.1 2006/10/05 06:14:24 kmacy Exp $ +# $FreeBSD: src/sys/conf/options.sun4v,v 1.2 2007/01/19 12:22:50 marius Exp $ SUN4V opt_global.h -GFB_DEBUG opt_gfb.h -GFB_NO_FONT_LOADING opt_gfb.h -GFB_NO_MODE_CHANGE opt_gfb.h - -DEBUGGER_ON_POWERFAIL opt_psycho.h OFW_PCI_DEBUG opt_ofw_pci.h OFWCONS_POLL_HZ opt_ofw.h # Debug IOMMU inserts/removes using diagnostic accesses. Very loud. ==== //depot/projects/linuxolator/src/sys/dev/acpica/acpi_cpu.c#4 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_cpu.c,v 1.62 2007/01/15 18:17:36 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_cpu.c,v 1.63 2007/01/23 07:20:44 njl Exp $"); #include "opt_acpi.h" #include <sys/param.h> @@ -954,6 +954,8 @@ { device_t acpi_dev; + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + /* * Bus mastering arbitration control is needed to keep caches coherent * while sleeping in C3. If it's not present but a working flush cache ==== //depot/projects/linuxolator/src/sys/dev/acpica/acpi_pcib_acpi.c#4 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_acpi.c,v 1.52 2006/12/12 19:27:00 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_acpi.c,v 1.53 2007/01/22 21:48:43 jhb Exp $"); #include "opt_acpi.h" #include <sys/param.h> @@ -110,6 +110,7 @@ DEVMETHOD(pcib_alloc_msi, acpi_pcib_alloc_msi), DEVMETHOD(pcib_release_msi, pcib_release_msi), DEVMETHOD(pcib_alloc_msix, acpi_pcib_alloc_msix), + DEVMETHOD(pcib_remap_msix, pcib_remap_msix), DEVMETHOD(pcib_release_msix, pcib_release_msix), {0, 0} ==== //depot/projects/linuxolator/src/sys/dev/acpica/acpi_pcib_pci.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_pci.c,v 1.15 2006/11/13 21:47:30 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_pci.c,v 1.16 2007/01/22 21:48:43 jhb Exp $"); #include "opt_acpi.h" @@ -96,6 +96,7 @@ DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi), DEVMETHOD(pcib_release_msi, pcib_release_msi), DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix), + DEVMETHOD(pcib_remap_msix, pcib_remap_msix), DEVMETHOD(pcib_release_msix, pcib_release_msix), {0, 0} ==== //depot/projects/linuxolator/src/sys/dev/aic7xxx/aic79xx.h#2 (text+ko) ==== @@ -39,7 +39,7 @@ * * $Id: //depot/aic7xxx/aic7xxx/aic79xx.h#107 $ * - * $FreeBSD: src/sys/dev/aic7xxx/aic79xx.h,v 1.24 2005/01/06 01:42:25 imp Exp $ + * $FreeBSD: src/sys/dev/aic7xxx/aic79xx.h,v 1.25 2007/01/19 22:37:52 jhb Exp $ */ #ifndef _AIC79XX_H_ @@ -1244,6 +1244,9 @@ /* PCI cacheline size. */ u_int pci_cachesize; + /* PCI-X capability offset. */ + int pcix_ptr; + /* IO Cell Parameters */ uint8_t iocell_opts[AHD_NUM_PER_DEV_ANNEXCOLS]; ==== //depot/projects/linuxolator/src/sys/dev/aic7xxx/aic79xx_pci.c#2 (text+ko) ==== @@ -46,7 +46,7 @@ #include "aic79xx_inline.h" #else #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic79xx_pci.c,v 1.24 2005/12/04 02:12:40 ru Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/aic7xxx/aic79xx_pci.c,v 1.25 2007/01/19 22:37:52 jhb Exp $"); #include <dev/aic7xxx/aic79xx_osm.h> #include <dev/aic7xxx/aic79xx_inline.h> #endif @@ -342,7 +342,12 @@ error = entry->setup(ahd); if (error != 0) return (error); - + + /* + * Find the PCI-X cap pointer. If we don't find it, + * pcix_ptr will be 0. + */ + pci_find_extcap(ahd->dev_softc, PCIY_PCIX, &ahd->pcix_ptr); devconfig = aic_pci_read_config(ahd->dev_softc, DEVCONFIG, /*bytes*/4); if ((devconfig & PCIXINITPAT) == PCIXINIT_PCI33_66) { ahd->chip |= AHD_PCI; @@ -350,6 +355,8 @@ ahd->bugs &= ~AHD_PCIX_BUG_MASK; } else { ahd->chip |= AHD_PCIX; + if (ahd->pcix_ptr == 0) + return (ENXIO); } ahd->bus_description = pci_bus_modes[PCI_BUS_MODES_INDEX(devconfig)]; @@ -867,16 +874,16 @@ uint8_t sg_split_status1[2]; ahd_mode_state saved_modes; u_int i; - uint16_t pcix_status; + uint32_t pcix_status; /* * Check for splits in all modes. Modes 0 and 1 * additionally have SG engine splits to look at. */ - pcix_status = aic_pci_read_config(ahd->dev_softc, PCIXR_STATUS, - /*bytes*/2); + pcix_status = aic_pci_read_config(ahd->dev_softc, + ahd->pcix_ptr + PCIXR_STATUS, /*bytes*/ 4); printf("%s: PCI Split Interrupt - PCI-X status = 0x%x\n", - ahd_name(ahd), pcix_status); + ahd_name(ahd), pcix_status >> 16); saved_modes = ahd_save_modes(ahd); for (i = 0; i < 4; i++) { ahd_set_modes(ahd, i, i); @@ -922,8 +929,8 @@ /* * Clear PCI-X status bits. */ - aic_pci_write_config(ahd->dev_softc, PCIXR_STATUS, - pcix_status, /*bytes*/2); + aic_pci_write_config(ahd->dev_softc, ahd->pcix_ptr + PCIXR_STATUS, + pcix_status, /*bytes*/4); ahd_outb(ahd, CLRINT, CLRSPLTINT); ahd_restore_modes(ahd, saved_modes); } ==== //depot/projects/linuxolator/src/sys/dev/ath/if_ath.c#7 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.159 2007/01/15 01:15:57 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.160 2007/01/21 19:32:50 marius Exp $"); /* * Driver for the Atheros Wireless LAN controller. @@ -2511,7 +2511,7 @@ /* * Setup DMA descriptor area. */ - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), /* parent */ PAGE_SIZE, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ ==== //depot/projects/linuxolator/src/sys/dev/ath/if_ath_pci.c#3 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath_pci.c,v 1.16 2006/12/01 16:03:39 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath_pci.c,v 1.17 2007/01/21 19:32:50 marius Exp $"); /* * PCI/Cardbus front-end for the Atheros Wireless LAN controller driver. @@ -177,7 +177,7 @@ /* * Setup DMA descriptor area. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ ==== //depot/projects/linuxolator/src/sys/dev/bce/if_bce.c#10 (text) ==== @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.25 2007/01/13 04:35:15 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.27 2007/01/26 17:03:51 dwhite Exp $"); /* * The following controllers are supported by this driver: @@ -531,13 +531,6 @@ goto bce_attach_fail; } - if (BCE_CHIP_BOND_ID(sc) & BCE_CHIP_BOND_ID_SERDES_BIT) { - BCE_PRINTF(sc, "%s(%d): SerDes controllers are not supported!\n", - __FILE__, __LINE__); - rc = ENODEV; - goto bce_attach_fail; - } - /* * The embedded PCIe to PCI-X bridge (EPB) * in the 5708 cannot address memory above @@ -742,20 +735,13 @@ IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); IFQ_SET_READY(&ifp->if_snd); - if (sc->bce_phy_flags & BCE_PHY_SERDES_FLAG) { - BCE_PRINTF(sc, "%s(%d): SerDes is not supported by this driver!\n", + /* Look for our PHY. */ + if (mii_phy_probe(dev, &sc->bce_miibus, bce_ifmedia_upd, + bce_ifmedia_sts)) { + BCE_PRINTF(sc, "%s(%d): PHY probe failed!\n", __FILE__, __LINE__); - rc = ENODEV; + rc = ENXIO; goto bce_attach_fail; - } else { - /* Look for our PHY. */ - if (mii_phy_probe(dev, &sc->bce_miibus, bce_ifmedia_upd, - bce_ifmedia_sts)) { - BCE_PRINTF(sc, "%s(%d): PHY probe failed!\n", - __FILE__, __LINE__); - rc = ENXIO; - goto bce_attach_fail; - } } /* Attach to the Ethernet interface list. */ @@ -836,12 +822,8 @@ ether_ifdetach(ifp); /* If we have a child device on the MII bus remove it too. */ - if (sc->bce_phy_flags & BCE_PHY_SERDES_FLAG) { - ifmedia_removeall(&sc->bce_ifmedia); - } else { - bus_generic_detach(dev); - device_delete_child(dev, sc->bce_miibus); - } + bus_generic_detach(dev); + device_delete_child(dev, sc->bce_miibus); /* Release all remaining resources. */ bce_release_resources(sc); @@ -1118,7 +1100,8 @@ BCE_CLRBIT(sc, BCE_EMAC_MODE, BCE_EMAC_MODE_PORT); /* Set MII or GMII inerface based on the speed negotiated by the PHY. */ - if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) { + if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T || + IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX) { DBPRINT(sc, BCE_INFO, "Setting GMII interface.\n"); BCE_SETBIT(sc, BCE_EMAC_MODE, BCE_EMAC_MODE_PORT_GMII); } else { @@ -3832,8 +3815,6 @@ ifm = &sc->bce_ifmedia; BCE_LOCK_ASSERT(sc); - /* DRC - ToDo: Add SerDes support. */ - mii = device_get_softc(sc->bce_miibus); sc->bce_link = 0; if (mii->mii_instance) { @@ -3864,8 +3845,6 @@ mii = device_get_softc(sc->bce_miibus); - /* DRC - ToDo: Add SerDes support. */ - mii_pollstat(mii); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; @@ -4879,17 +4858,10 @@ DBPRINT(sc, BCE_VERBOSE, "bce_phy_flags = 0x%08X\n", sc->bce_phy_flags); - if (sc->bce_phy_flags & BCE_PHY_SERDES_FLAG) { - DBPRINT(sc, BCE_VERBOSE, "SerDes media set/get\n"); - - error = ifmedia_ioctl(ifp, ifr, - &sc->bce_ifmedia, command); - } else { - DBPRINT(sc, BCE_VERBOSE, "Copper media set/get\n"); - mii = device_get_softc(sc->bce_miibus); - error = ifmedia_ioctl(ifp, ifr, - &mii->mii_media, command); - } + DBPRINT(sc, BCE_VERBOSE, "Copper media set/get\n"); + mii = device_get_softc(sc->bce_miibus); + error = ifmedia_ioctl(ifp, ifr, + &mii->mii_media, command); break; /* Set interface capability */ @@ -5231,7 +5203,7 @@ { struct ifnet *ifp; struct ifmultiaddr *ifma; - u32 hashes[4] = { 0, 0, 0, 0 }; + u32 hashes[NUM_MC_HASH_REGISTERS] = { 0, 0, 0, 0, 0, 0, 0, 0 }; u32 rx_mode, sort_mode; int h, i; @@ -5279,12 +5251,12 @@ if (ifma->ifma_addr->sa_family != AF_LINK) continue; h = ether_crc32_le(LLADDR((struct sockaddr_dl *) - ifma->ifma_addr), ETHER_ADDR_LEN) & 0x7F; - hashes[(h & 0x60) >> 5] |= 1 << (h & 0x1F); + ifma->ifma_addr), ETHER_ADDR_LEN) & 0xFF; + hashes[(h & 0xE0) >> 5] |= 1 << (h & 0x1F); } IF_ADDR_UNLOCK(ifp); - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_MC_HASH_REGISTERS; i++) REG_WR(sc, BCE_EMAC_MULTICAST_HASH0 + (i * 4), hashes[i]); sort_mode |= BCE_RPM_SORT_USER0_MC_HSH_EN; @@ -5567,8 +5539,6 @@ if (sc->bce_link) goto bce_tick_locked_exit; - /* DRC - ToDo: Add SerDes support and check SerDes link here. */ - mii = device_get_softc(sc->bce_miibus); mii_tick(mii); ==== //depot/projects/linuxolator/src/sys/dev/esp/esp_sbus.c#3 (text+ko) ==== @@ -65,7 +65,7 @@ */ >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701271104.l0RB4vLH031696>