]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branches 'core/debugobjects', 'core/iommu', 'core/locking', 'core/printk',...
authorIngo Molnar <mingo@elte.hu>
Thu, 25 Dec 2008 13:06:29 +0000 (14:06 +0100)
committerIngo Molnar <mingo@elte.hu>
Thu, 25 Dec 2008 13:06:29 +0000 (14:06 +0100)
217 files changed:
Documentation/RCU/00-INDEX
Documentation/RCU/trace.txt [new file with mode: 0644]
Documentation/arm/mem_alignment
Documentation/kernel-parameters.txt
Documentation/lockstat.txt
Documentation/sound/alsa/ALSA-Configuration.txt
Documentation/usb/gadget_serial.txt
Documentation/usb/proc_usb_info.txt
Documentation/usb/usbmon.txt
MAINTAINERS
Makefile
arch/arm/common/sa1111.c
arch/arm/kernel/armksyms.c
arch/arm/kernel/traps.c
arch/arm/mach-pxa/include/mach/reset.h
arch/arm/mm/fault.c
arch/avr32/boards/favr-32/flash.c
arch/avr32/boards/favr-32/setup.c
arch/avr32/boot/images/Makefile
arch/avr32/configs/atstk1006_defconfig
arch/avr32/mach-at32ap/at32ap700x.c
arch/ia64/hp/sim/Kconfig
arch/mips/Kconfig.debug
arch/mips/configs/ip32_defconfig
arch/mips/include/asm/asmmacro.h
arch/mips/include/asm/byteorder.h
arch/mips/include/asm/elf.h
arch/mips/mm/dma-default.c
arch/parisc/include/asm/tlbflush.h
arch/powerpc/boot/Makefile
arch/powerpc/kernel/misc_32.S
arch/powerpc/lib/rheap.c
arch/powerpc/mm/hugetlbpage.c
arch/powerpc/mm/numa.c
arch/powerpc/platforms/cell/axon_msi.c
arch/powerpc/platforms/pseries/rtasd.c
arch/sh/Kconfig
arch/sparc/include/asm/ptrace_32.h
arch/sparc/include/asm/ptrace_64.h
arch/um/include/asm/system.h
arch/x86/Kconfig.cpu
arch/x86/include/asm/uaccess.h
arch/x86/include/asm/uaccess_32.h
arch/x86/include/asm/uaccess_64.h
arch/x86/include/asm/vmi.h
arch/x86/kernel/amd_iommu.c
arch/x86/kernel/amd_iommu_init.c
arch/x86/kernel/cpu/mcheck/mce_64.c
arch/x86/kernel/microcode_core.c
arch/x86/kernel/microcode_intel.c
arch/x86/kernel/pci-gart_64.c
arch/x86/kernel/setup.c
arch/x86/kernel/smpboot.c
arch/x86/kernel/vmi_32.c
arch/x86/lib/usercopy_32.c
arch/x86/lib/usercopy_64.c
crypto/async_tx/async_xor.c
drivers/acpi/bus.c
drivers/acpi/toshiba_acpi.c
drivers/acpi/utilities/utglobal.c
drivers/ata/libata-core.c
drivers/ata/pata_hpt366.c
drivers/block/cciss.c
drivers/cdrom/cdrom.c
drivers/char/cp437.uni
drivers/char/vt.c
drivers/char/xilinx_hwicap/buffer_icap.c
drivers/char/xilinx_hwicap/buffer_icap.h
drivers/char/xilinx_hwicap/fifo_icap.c
drivers/char/xilinx_hwicap/fifo_icap.h
drivers/char/xilinx_hwicap/xilinx_hwicap.c
drivers/char/xilinx_hwicap/xilinx_hwicap.h
drivers/dma/dmaengine.c
drivers/dma/ioat_dma.c
drivers/dma/iop-adma.c
drivers/dma/mv_xor.c
drivers/edac/edac_device.c
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/radeon/radeon_irq.c
drivers/i2c/busses/i2c-cpm.c
drivers/i2c/busses/i2c-highlander.c
drivers/i2c/busses/i2c-pmcmsp.c
drivers/i2c/busses/i2c-s3c2410.c
drivers/ide/cs5530.c
drivers/ide/sc1200.c
drivers/ieee1394/nodemgr.c
drivers/md/bitmap.c
drivers/media/dvb/b2c2/Kconfig
drivers/media/dvb/b2c2/flexcop-fe-tuner.c
drivers/media/dvb/b2c2/flexcop-i2c.c
drivers/media/dvb/bt8xx/Kconfig
drivers/media/dvb/dvb-usb/Kconfig
drivers/media/dvb/dvb-usb/dib0700_devices.c
drivers/media/dvb/ttpci/Kconfig
drivers/media/video/compat_ioctl32.c
drivers/media/video/cx18/Kconfig
drivers/media/video/cx23885/Kconfig
drivers/media/video/cx88/Kconfig
drivers/media/video/em28xx/em28xx-video.c
drivers/media/video/gspca/gspca.c
drivers/media/video/pvrusb2/Kconfig
drivers/media/video/saa7134/Kconfig
drivers/message/fusion/mptscsih.c
drivers/net/bnx2.c
drivers/net/e1000e/ich8lan.c
drivers/net/enc28j60.c
drivers/net/jme.h
drivers/net/phy/mdio_bus.c
drivers/net/ppp_generic.c
drivers/net/starfire.c
drivers/net/sungem.c
drivers/net/tlan.c
drivers/pci/hotplug/acpiphp.h
drivers/pci/hotplug/acpiphp_core.c
drivers/pci/hotplug/acpiphp_glue.c
drivers/pci/hotplug/ibmphp_core.c
drivers/pci/hotplug/pciehp_core.c
drivers/pci/pcie/aer/aerdrv_core.c
drivers/pcmcia/bfin_cf_pcmcia.c
drivers/rtc/rtc-isl1208.c
drivers/scsi/aacraid/linit.c
drivers/scsi/device_handler/scsi_dh_hp_sw.c
drivers/scsi/ibmvscsi/ibmvstgt.c
drivers/scsi/libiscsi.c
drivers/scsi/scsi_lib.c
drivers/sh/maple/maple.c
drivers/staging/Kconfig
drivers/usb/class/usbtmc.c
drivers/usb/core/driver.c
drivers/usb/gadget/f_rndis.c
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/ftdi_sio.h
drivers/usb/serial/pl2303.c
drivers/usb/serial/pl2303.h
drivers/usb/serial/ti_usb_3410_5052.c
drivers/usb/storage/unusual_devs.h
drivers/video/aty/radeon_accel.c
drivers/video/aty/radeon_backlight.c
drivers/video/aty/radeon_base.c
drivers/video/aty/radeon_pm.c
drivers/video/aty/radeonfb.h
drivers/w1/w1_io.c
fs/9p/fid.c
fs/9p/v9fs.c
fs/9p/vfs_dentry.c
fs/9p/vfs_inode.c
fs/cifs/cifssmb.c
fs/ocfs2/ocfs2_fs.h
fs/ocfs2/xattr.c
include/acpi/acoutput.h
include/acpi/platform/aclinux.h
include/asm-generic/bug.h
include/linux/bottom_half.h
include/linux/debug_locks.h
include/linux/futex.h
include/linux/hardirq.h
include/linux/kernel.h
include/linux/lockdep.h
include/linux/mutex.h
include/linux/netdevice.h
include/linux/netfilter/nfnetlink_conntrack.h
include/linux/rcuclassic.h
include/linux/rcupdate.h
include/linux/rcutree.h [new file with mode: 0644]
include/linux/smp.h
include/linux/uaccess.h
include/linux/usb/ch9.h
include/net/irda/irda_device.h
include/video/radeon.h
init/Kconfig
kernel/Kconfig.preempt
kernel/Makefile
kernel/cgroup.c
kernel/exit.c
kernel/extable.c
kernel/futex.c
kernel/irq/manage.c
kernel/lockdep.c
kernel/lockdep_proc.c
kernel/mutex.c
kernel/notifier.c
kernel/panic.c
kernel/posix-cpu-timers.c
kernel/posix-timers.c
kernel/printk.c
kernel/rcuclassic.c
kernel/rcupreempt.c
kernel/rcupreempt_trace.c
kernel/rcutorture.c
kernel/rcutree.c [new file with mode: 0644]
kernel/rcutree_trace.c [new file with mode: 0644]
kernel/resource.c
kernel/sched.c
kernel/sched_clock.c
kernel/softirq.c
kernel/softlockup.c
kernel/stacktrace.c
kernel/sys.c
lib/Kconfig.debug
lib/debugobjects.c
lib/dynamic_printk.c
mm/memory.c
mm/migrate.c
mm/slob.c
net/bluetooth/rfcomm/core.c
net/core/netpoll.c
net/ipv4/netfilter/nf_nat_rule.c
net/ipv4/tcp_vegas.c
net/ipv6/ndisc.c
net/netlabel/netlabel_unlabeled.c
net/phonet/pep-gprs.c
net/sched/sch_netem.c
net/socket.c
sound/pci/hda/patch_sigmatel.c
sound/soc/omap/omap-pcm.c

index 461481dfb7c31b4bfbb0509993ec0c2351cc97c2..7dc0695a8f902994647300b87a00cb9241d152fa 100644 (file)
@@ -16,6 +16,8 @@ RTFP.txt
        - List of RCU papers (bibliography) going back to 1980.
 torture.txt
        - RCU Torture Test Operation (CONFIG_RCU_TORTURE_TEST)
+trace.txt
+       - CONFIG_RCU_TRACE debugfs files and formats
 UP.txt
        - RCU on Uniprocessor Systems
 whatisRCU.txt
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt
new file mode 100644 (file)
index 0000000..0688482
--- /dev/null
@@ -0,0 +1,413 @@
+CONFIG_RCU_TRACE debugfs Files and Formats
+
+
+The rcupreempt and rcutree implementations of RCU provide debugfs trace
+output that summarizes counters and state.  This information is useful for
+debugging RCU itself, and can sometimes also help to debug abuses of RCU.
+Note that the rcuclassic implementation of RCU does not provide debugfs
+trace output.
+
+The following sections describe the debugfs files and formats for
+preemptable RCU (rcupreempt) and hierarchical RCU (rcutree).
+
+
+Preemptable RCU debugfs Files and Formats
+
+This implementation of RCU provides three debugfs files under the
+top-level directory RCU: rcu/rcuctrs (which displays the per-CPU
+counters used by preemptable RCU) rcu/rcugp (which displays grace-period
+counters), and rcu/rcustats (which internal counters for debugging RCU).
+
+The output of "cat rcu/rcuctrs" looks as follows:
+
+CPU last cur F M
+  0    5  -5 0 0
+  1   -1   0 0 0
+  2    0   1 0 0
+  3    0   1 0 0
+  4    0   1 0 0
+  5    0   1 0 0
+  6    0   2 0 0
+  7    0  -1 0 0
+  8    0   1 0 0
+ggp = 26226, state = waitzero
+
+The per-CPU fields are as follows:
+
+o      "CPU" gives the CPU number.  Offline CPUs are not displayed.
+
+o      "last" gives the value of the counter that is being decremented
+       for the current grace period phase.  In the example above,
+       the counters sum to 4, indicating that there are still four
+       RCU read-side critical sections still running that started
+       before the last counter flip.
+
+o      "cur" gives the value of the counter that is currently being
+       both incremented (by rcu_read_lock()) and decremented (by
+       rcu_read_unlock()).  In the example above, the counters sum to
+       1, indicating that there is only one RCU read-side critical section
+       still running that started after the last counter flip.
+
+o      "F" indicates whether RCU is waiting for this CPU to acknowledge
+       a counter flip.  In the above example, RCU is not waiting on any,
+       which is consistent with the state being "waitzero" rather than
+       "waitack".
+
+o      "M" indicates whether RCU is waiting for this CPU to execute a
+       memory barrier.  In the above example, RCU is not waiting on any,
+       which is consistent with the state being "waitzero" rather than
+       "waitmb".
+
+o      "ggp" is the global grace-period counter.
+
+o      "state" is the RCU state, which can be one of the following:
+
+       o       "idle": there is no grace period in progress.
+
+       o       "waitack": RCU just incremented the global grace-period
+               counter, which has the effect of reversing the roles of
+               the "last" and "cur" counters above, and is waiting for
+               all the CPUs to acknowledge the flip.  Once the flip has
+               been acknowledged, CPUs will no longer be incrementing
+               what are now the "last" counters, so that their sum will
+               decrease monotonically down to zero.
+
+       o       "waitzero": RCU is waiting for the sum of the "last" counters
+               to decrease to zero.
+
+       o       "waitmb": RCU is waiting for each CPU to execute a memory
+               barrier, which ensures that instructions from a given CPU's
+               last RCU read-side critical section cannot be reordered
+               with instructions following the memory-barrier instruction.
+
+The output of "cat rcu/rcugp" looks as follows:
+
+oldggp=48870  newggp=48873
+
+Note that reading from this file provokes a synchronize_rcu().  The
+"oldggp" value is that of "ggp" from rcu/rcuctrs above, taken before
+executing the synchronize_rcu(), and the "newggp" value is also the
+"ggp" value, but taken after the synchronize_rcu() command returns.
+
+
+The output of "cat rcu/rcugp" looks as follows:
+
+na=1337955 nl=40 wa=1337915 wl=44 da=1337871 dl=0 dr=1337871 di=1337871
+1=50989 e1=6138 i1=49722 ie1=82 g1=49640 a1=315203 ae1=265563 a2=49640
+z1=1401244 ze1=1351605 z2=49639 m1=5661253 me1=5611614 m2=49639
+
+These are counters tracking internal preemptable-RCU events, however,
+some of them may be useful for debugging algorithms using RCU.  In
+particular, the "nl", "wl", and "dl" values track the number of RCU
+callbacks in various states.  The fields are as follows:
+
+o      "na" is the total number of RCU callbacks that have been enqueued
+       since boot.
+
+o      "nl" is the number of RCU callbacks waiting for the previous
+       grace period to end so that they can start waiting on the next
+       grace period.
+
+o      "wa" is the total number of RCU callbacks that have started waiting
+       for a grace period since boot.  "na" should be roughly equal to
+       "nl" plus "wa".
+
+o      "wl" is the number of RCU callbacks currently waiting for their
+       grace period to end.
+
+o      "da" is the total number of RCU callbacks whose grace periods
+       have completed since boot.  "wa" should be roughly equal to
+       "wl" plus "da".
+
+o      "dr" is the total number of RCU callbacks that have been removed
+       from the list of callbacks ready to invoke.  "dr" should be roughly
+       equal to "da".
+
+o      "di" is the total number of RCU callbacks that have been invoked
+       since boot.  "di" should be roughly equal to "da", though some
+       early versions of preemptable RCU had a bug so that only the
+       last CPU's count of invocations was displayed, rather than the
+       sum of all CPU's counts.
+
+o      "1" is the number of calls to rcu_try_flip().  This should be
+       roughly equal to the sum of "e1", "i1", "a1", "z1", and "m1"
+       described below.  In other words, the number of times that
+       the state machine is visited should be equal to the sum of the
+       number of times that each state is visited plus the number of
+       times that the state-machine lock acquisition failed.
+
+o      "e1" is the number of times that rcu_try_flip() was unable to
+       acquire the fliplock.
+
+o      "i1" is the number of calls to rcu_try_flip_idle().
+
+o      "ie1" is the number of times rcu_try_flip_idle() exited early
+       due to the calling CPU having no work for RCU.
+
+o      "g1" is the number of times that rcu_try_flip_idle() decided
+       to start a new grace period.  "i1" should be roughly equal to
+       "ie1" plus "g1".
+
+o      "a1" is the number of calls to rcu_try_flip_waitack().
+
+o      "ae1" is the number of times that rcu_try_flip_waitack() found
+       that at least one CPU had not yet acknowledge the new grace period
+       (AKA "counter flip").
+
+o      "a2" is the number of time rcu_try_flip_waitack() found that
+       all CPUs had acknowledged.  "a1" should be roughly equal to
+       "ae1" plus "a2".  (This particular output was collected on
+       a 128-CPU machine, hence the smaller-than-usual fraction of
+       calls to rcu_try_flip_waitack() finding all CPUs having already
+       acknowledged.)
+
+o      "z1" is the number of calls to rcu_try_flip_waitzero().
+
+o      "ze1" is the number of times that rcu_try_flip_waitzero() found
+       that not all of the old RCU read-side critical sections had
+       completed.
+
+o      "z2" is the number of times that rcu_try_flip_waitzero() finds
+       the sum of the counters equal to zero, in other words, that
+       all of the old RCU read-side critical sections had completed.
+       The value of "z1" should be roughly equal to "ze1" plus
+       "z2".
+
+o      "m1" is the number of calls to rcu_try_flip_waitmb().
+
+o      "me1" is the number of times that rcu_try_flip_waitmb() finds
+       that at least one CPU has not yet executed a memory barrier.
+
+o      "m2" is the number of times that rcu_try_flip_waitmb() finds that
+       all CPUs have executed a memory barrier.
+
+
+Hierarchical RCU debugfs Files and Formats
+
+This implementation of RCU provides three debugfs files under the
+top-level directory RCU: rcu/rcudata (which displays fields in struct
+rcu_data), rcu/rcugp (which displays grace-period counters), and
+rcu/rcuhier (which displays the struct rcu_node hierarchy).
+
+The output of "cat rcu/rcudata" looks as follows:
+
+rcu:
+  0 c=4011 g=4012 pq=1 pqc=4011 qp=0 rpfq=1 rp=3c2a dt=23301/73 dn=2 df=1882 of=0 ri=2126 ql=2 b=10
+  1 c=4011 g=4012 pq=1 pqc=4011 qp=0 rpfq=3 rp=39a6 dt=78073/1 dn=2 df=1402 of=0 ri=1875 ql=46 b=10
+  2 c=4010 g=4010 pq=1 pqc=4010 qp=0 rpfq=-5 rp=1d12 dt=16646/0 dn=2 df=3140 of=0 ri=2080 ql=0 b=10
+  3 c=4012 g=4013 pq=1 pqc=4012 qp=1 rpfq=3 rp=2b50 dt=21159/1 dn=2 df=2230 of=0 ri=1923 ql=72 b=10
+  4 c=4012 g=4013 pq=1 pqc=4012 qp=1 rpfq=3 rp=1644 dt=5783/1 dn=2 df=3348 of=0 ri=2805 ql=7 b=10
+  5 c=4012 g=4013 pq=0 pqc=4011 qp=1 rpfq=3 rp=1aac dt=5879/1 dn=2 df=3140 of=0 ri=2066 ql=10 b=10
+  6 c=4012 g=4013 pq=1 pqc=4012 qp=1 rpfq=3 rp=ed8 dt=5847/1 dn=2 df=3797 of=0 ri=1266 ql=10 b=10
+  7 c=4012 g=4013 pq=1 pqc=4012 qp=1 rpfq=3 rp=1fa2 dt=6199/1 dn=2 df=2795 of=0 ri=2162 ql=28 b=10
+rcu_bh:
+  0 c=-268 g=-268 pq=1 pqc=-268 qp=0 rpfq=-145 rp=21d6 dt=23301/73 dn=2 df=0 of=0 ri=0 ql=0 b=10
+  1 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-170 rp=20ce dt=78073/1 dn=2 df=26 of=0 ri=5 ql=0 b=10
+  2 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-83 rp=fbd dt=16646/0 dn=2 df=28 of=0 ri=4 ql=0 b=10
+  3 c=-268 g=-268 pq=1 pqc=-268 qp=0 rpfq=-105 rp=178c dt=21159/1 dn=2 df=28 of=0 ri=2 ql=0 b=10
+  4 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-30 rp=b54 dt=5783/1 dn=2 df=32 of=0 ri=0 ql=0 b=10
+  5 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-29 rp=df5 dt=5879/1 dn=2 df=30 of=0 ri=3 ql=0 b=10
+  6 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-28 rp=788 dt=5847/1 dn=2 df=32 of=0 ri=0 ql=0 b=10
+  7 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-53 rp=1098 dt=6199/1 dn=2 df=30 of=0 ri=3 ql=0 b=10
+
+The first section lists the rcu_data structures for rcu, the second for
+rcu_bh.  Each section has one line per CPU, or eight for this 8-CPU system.
+The fields are as follows:
+
+o      The number at the beginning of each line is the CPU number.
+       CPUs numbers followed by an exclamation mark are offline,
+       but have been online at least once since boot.  There will be
+       no output for CPUs that have never been online, which can be
+       a good thing in the surprisingly common case where NR_CPUS is
+       substantially larger than the number of actual CPUs.
+
+o      "c" is the count of grace periods that this CPU believes have
+       completed.  CPUs in dynticks idle mode may lag quite a ways
+       behind, for example, CPU 4 under "rcu" above, which has slept
+       through the past 25 RCU grace periods.  It is not unusual to
+       see CPUs lagging by thousands of grace periods.
+
+o      "g" is the count of grace periods that this CPU believes have
+       started.  Again, CPUs in dynticks idle mode may lag behind.
+       If the "c" and "g" values are equal, this CPU has already
+       reported a quiescent state for the last RCU grace period that
+       it is aware of, otherwise, the CPU believes that it owes RCU a
+       quiescent state.
+
+o      "pq" indicates that this CPU has passed through a quiescent state
+       for the current grace period.  It is possible for "pq" to be
+       "1" and "c" different than "g", which indicates that although
+       the CPU has passed through a quiescent state, either (1) this
+       CPU has not yet reported that fact, (2) some other CPU has not
+       yet reported for this grace period, or (3) both.
+
+o      "pqc" indicates which grace period the last-observed quiescent
+       state for this CPU corresponds to.  This is important for handling
+       the race between CPU 0 reporting an extended dynticks-idle
+       quiescent state for CPU 1 and CPU 1 suddenly waking up and
+       reporting its own quiescent state.  If CPU 1 was the last CPU
+       for the current grace period, then the CPU that loses this race
+       will attempt to incorrectly mark CPU 1 as having checked in for
+       the next grace period!
+
+o      "qp" indicates that RCU still expects a quiescent state from
+       this CPU.
+
+o      "rpfq" is the number of rcu_pending() calls on this CPU required
+       to induce this CPU to invoke force_quiescent_state().
+
+o      "rp" is low-order four hex digits of the count of how many times
+       rcu_pending() has been invoked on this CPU.
+
+o      "dt" is the current value of the dyntick counter that is incremented
+       when entering or leaving dynticks idle state, either by the
+       scheduler or by irq.  The number after the "/" is the interrupt
+       nesting depth when in dyntick-idle state, or one greater than
+       the interrupt-nesting depth otherwise.
+
+       This field is displayed only for CONFIG_NO_HZ kernels.
+
+o      "dn" is the current value of the dyntick counter that is incremented
+       when entering or leaving dynticks idle state via NMI.  If both
+       the "dt" and "dn" values are even, then this CPU is in dynticks
+       idle mode and may be ignored by RCU.  If either of these two
+       counters is odd, then RCU must be alert to the possibility of
+       an RCU read-side critical section running on this CPU.
+
+       This field is displayed only for CONFIG_NO_HZ kernels.
+
+o      "df" is the number of times that some other CPU has forced a
+       quiescent state on behalf of this CPU due to this CPU being in
+       dynticks-idle state.
+
+       This field is displayed only for CONFIG_NO_HZ kernels.
+
+o      "of" is the number of times that some other CPU has forced a
+       quiescent state on behalf of this CPU due to this CPU being
+       offline.  In a perfect world, this might neve happen, but it
+       turns out that offlining and onlining a CPU can take several grace
+       periods, and so there is likely to be an extended period of time
+       when RCU believes that the CPU is online when it really is not.
+       Please note that erring in the other direction (RCU believing a
+       CPU is offline when it is really alive and kicking) is a fatal
+       error, so it makes sense to err conservatively.
+
+o      "ri" is the number of times that RCU has seen fit to send a
+       reschedule IPI to this CPU in order to get it to report a
+       quiescent state.
+
+o      "ql" is the number of RCU callbacks currently residing on
+       this CPU.  This is the total number of callbacks, regardless
+       of what state they are in (new, waiting for grace period to
+       start, waiting for grace period to end, ready to invoke).
+
+o      "b" is the batch limit for this CPU.  If more than this number
+       of RCU callbacks is ready to invoke, then the remainder will
+       be deferred.
+
+
+The output of "cat rcu/rcugp" looks as follows:
+
+rcu: completed=33062  gpnum=33063
+rcu_bh: completed=464  gpnum=464
+
+Again, this output is for both "rcu" and "rcu_bh".  The fields are
+taken from the rcu_state structure, and are as follows:
+
+o      "completed" is the number of grace periods that have completed.
+       It is comparable to the "c" field from rcu/rcudata in that a
+       CPU whose "c" field matches the value of "completed" is aware
+       that the corresponding RCU grace period has completed.
+
+o      "gpnum" is the number of grace periods that have started.  It is
+       comparable to the "g" field from rcu/rcudata in that a CPU
+       whose "g" field matches the value of "gpnum" is aware that the
+       corresponding RCU grace period has started.
+
+       If these two fields are equal (as they are for "rcu_bh" above),
+       then there is no grace period in progress, in other words, RCU
+       is idle.  On the other hand, if the two fields differ (as they
+       do for "rcu" above), then an RCU grace period is in progress.
+
+
+The output of "cat rcu/rcuhier" looks as follows, with very long lines:
+
+c=6902 g=6903 s=2 jfq=3 j=72c7 nfqs=13142/nfqsng=0(13142) fqlh=6
+1/1 0:127 ^0    
+3/3 0:35 ^0    0/0 36:71 ^1    0/0 72:107 ^2    0/0 108:127 ^3    
+3/3f 0:5 ^0    2/3 6:11 ^1    0/0 12:17 ^2    0/0 18:23 ^3    0/0 24:29 ^4    0/0 30:35 ^5    0/0 36:41 ^0    0/0 42:47 ^1    0/0 48:53 ^2    0/0 54:59 ^3    0/0 60:65 ^4    0/0 66:71 ^5    0/0 72:77 ^0    0/0 78:83 ^1    0/0 84:89 ^2    0/0 90:95 ^3    0/0 96:101 ^4    0/0 102:107 ^5    0/0 108:113 ^0    0/0 114:119 ^1    0/0 120:125 ^2    0/0 126:127 ^3    
+rcu_bh:
+c=-226 g=-226 s=1 jfq=-5701 j=72c7 nfqs=88/nfqsng=0(88) fqlh=0
+0/1 0:127 ^0    
+0/3 0:35 ^0    0/0 36:71 ^1    0/0 72:107 ^2    0/0 108:127 ^3    
+0/3f 0:5 ^0    0/3 6:11 ^1    0/0 12:17 ^2    0/0 18:23 ^3    0/0 24:29 ^4    0/0 30:35 ^5    0/0 36:41 ^0    0/0 42:47 ^1    0/0 48:53 ^2    0/0 54:59 ^3    0/0 60:65 ^4    0/0 66:71 ^5    0/0 72:77 ^0    0/0 78:83 ^1    0/0 84:89 ^2    0/0 90:95 ^3    0/0 96:101 ^4    0/0 102:107 ^5    0/0 108:113 ^0    0/0 114:119 ^1    0/0 120:125 ^2    0/0 126:127 ^3
+
+This is once again split into "rcu" and "rcu_bh" portions.  The fields are
+as follows:
+
+o      "c" is exactly the same as "completed" under rcu/rcugp.
+
+o      "g" is exactly the same as "gpnum" under rcu/rcugp.
+
+o      "s" is the "signaled" state that drives force_quiescent_state()'s
+       state machine.
+
+o      "jfq" is the number of jiffies remaining for this grace period
+       before force_quiescent_state() is invoked to help push things
+       along.  Note that CPUs in dyntick-idle mode thoughout the grace
+       period will not report on their own, but rather must be check by
+       some other CPU via force_quiescent_state().
+
+o      "j" is the low-order four hex digits of the jiffies counter.
+       Yes, Paul did run into a number of problems that turned out to
+       be due to the jiffies counter no longer counting.  Why do you ask?
+
+o      "nfqs" is the number of calls to force_quiescent_state() since
+       boot.
+
+o      "nfqsng" is the number of useless calls to force_quiescent_state(),
+       where there wasn't actually a grace period active.  This can
+       happen due to races.  The number in parentheses is the difference
+       between "nfqs" and "nfqsng", or the number of times that
+       force_quiescent_state() actually did some real work.
+
+o      "fqlh" is the number of calls to force_quiescent_state() that
+       exited immediately (without even being counted in nfqs above)
+       due to contention on ->fqslock.
+
+o      Each element of the form "1/1 0:127 ^0" represents one struct
+       rcu_node.  Each line represents one level of the hierarchy, from
+       root to leaves.  It is best to think of the rcu_data structures
+       as forming yet another level after the leaves.  Note that there
+       might be either one, two, or three levels of rcu_node structures,
+       depending on the relationship between CONFIG_RCU_FANOUT and
+       CONFIG_NR_CPUS.
+       
+       o       The numbers separated by the "/" are the qsmask followed
+               by the qsmaskinit.  The qsmask will have one bit
+               set for each entity in the next lower level that
+               has not yet checked in for the current grace period.
+               The qsmaskinit will have one bit for each entity that is
+               currently expected to check in during each grace period.
+               The value of qsmaskinit is assigned to that of qsmask
+               at the beginning of each grace period.
+
+               For example, for "rcu", the qsmask of the first entry
+               of the lowest level is 0x14, meaning that we are still
+               waiting for CPUs 2 and 4 to check in for the current
+               grace period.
+
+       o       The numbers separated by the ":" are the range of CPUs
+               served by this struct rcu_node.  This can be helpful
+               in working out how the hierarchy is wired together.
+
+               For example, the first entry at the lowest level shows
+               "0:5", indicating that it covers CPUs 0 through 5.
+
+       o       The number after the "^" indicates the bit in the
+               next higher level rcu_node structure that this
+               rcu_node structure corresponds to.
+
+               For example, the first entry at the lowest level shows
+               "^0", indicating that it corresponds to bit zero in
+               the first entry at the middle level.
index d145ccca169a37aa3ff42b06c734d9068525d9d7..c7c7a114c78c795c702f8543c57c7558466a9a4b 100644 (file)
@@ -24,7 +24,7 @@ real bad - it changes the behaviour of all unaligned instructions in user
 space, and might cause programs to fail unexpectedly.
 
 To change the alignment trap behavior, simply echo a number into
-/proc/sys/debug/alignment.  The number is made up from various bits:
+/proc/cpu/alignment.  The number is made up from various bits:
 
 bit            behavior when set
 ---            -----------------
index e0f346d201edb70fae654c55f6be842c4465a5ff..c9115c1b672c6e9eadb9ce59c2c198fea024823c 100644 (file)
@@ -220,14 +220,17 @@ and is between 256 and 4096 characters. It is defined in the file
                        Bits in debug_level correspond to a level in
                        ACPI_DEBUG_PRINT statements, e.g.,
                            ACPI_DEBUG_PRINT((ACPI_DB_INFO, ...
-                       See Documentation/acpi/debug.txt for more information
-                       about debug layers and levels.
+                       The debug_level mask defaults to "info".  See
+                       Documentation/acpi/debug.txt for more information about
+                       debug layers and levels.
 
+                       Enable processor driver info messages:
+                           acpi.debug_layer=0x20000000
+                       Enable PCI/PCI interrupt routing info messages:
+                           acpi.debug_layer=0x400000
                        Enable AML "Debug" output, i.e., stores to the Debug
                        object while interpreting AML:
                            acpi.debug_layer=0xffffffff acpi.debug_level=0x2
-                       Enable PCI/PCI interrupt routing info messages:
-                           acpi.debug_layer=0x400000 acpi.debug_level=0x4
                        Enable all messages related to ACPI hardware:
                            acpi.debug_layer=0x2 acpi.debug_level=0xffffffff
 
index 4ba4664ce5c315d024c3bc7fd515e44ac92d4653..9cb9138f7a79bcd67bf4ac2f69741e812b5a14c2 100644 (file)
@@ -71,35 +71,50 @@ Look at the current lock statistics:
 
 # less /proc/lock_stat
 
-01 lock_stat version 0.2
+01 lock_stat version 0.3
 02 -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 03                               class name    con-bounces    contentions   waittime-min   waittime-max waittime-total    acq-bounces   acquisitions   holdtime-min   holdtime-max holdtime-total
 04 -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 05
-06               &inode->i_data.tree_lock-W:            15          21657           0.18     1093295.30 11547131054.85             58          10415           0.16          87.51        6387.60
-07               &inode->i_data.tree_lock-R:             0              0           0.00           0.00           0.00          23302         231198           0.25           8.45       98023.38
-08               --------------------------
-09                 &inode->i_data.tree_lock              0          [<ffffffff8027c08f>] add_to_page_cache+0x5f/0x190
-10
-11 ...............................................................................................................................................................................................
-12
-13                              dcache_lock:          1037           1161           0.38          45.32         774.51           6611         243371           0.15         306.48       77387.24
-14                              -----------
-15                              dcache_lock            180          [<ffffffff802c0d7e>] sys_getcwd+0x11e/0x230
-16                              dcache_lock            165          [<ffffffff802c002a>] d_alloc+0x15a/0x210
-17                              dcache_lock             33          [<ffffffff8035818d>] _atomic_dec_and_lock+0x4d/0x70
-18                              dcache_lock              1          [<ffffffff802beef8>] shrink_dcache_parent+0x18/0x130
+06                          &mm->mmap_sem-W:           233            538 18446744073708       22924.27      607243.51           1342          45806           1.71        8595.89     1180582.34
+07                          &mm->mmap_sem-R:           205            587 18446744073708       28403.36      731975.00           1940         412426           0.58      187825.45     6307502.88
+08                          ---------------
+09                            &mm->mmap_sem            487          [<ffffffff8053491f>] do_page_fault+0x466/0x928
+10                            &mm->mmap_sem            179          [<ffffffff802a6200>] sys_mprotect+0xcd/0x21d
+11                            &mm->mmap_sem            279          [<ffffffff80210a57>] sys_mmap+0x75/0xce
+12                            &mm->mmap_sem             76          [<ffffffff802a490b>] sys_munmap+0x32/0x59
+13                          ---------------
+14                            &mm->mmap_sem            270          [<ffffffff80210a57>] sys_mmap+0x75/0xce
+15                            &mm->mmap_sem            431          [<ffffffff8053491f>] do_page_fault+0x466/0x928
+16                            &mm->mmap_sem            138          [<ffffffff802a490b>] sys_munmap+0x32/0x59
+17                            &mm->mmap_sem            145          [<ffffffff802a6200>] sys_mprotect+0xcd/0x21d
+18
+19 ...............................................................................................................................................................................................
+20
+21                              dcache_lock:           621            623           0.52         118.26        1053.02           6745          91930           0.29         316.29      118423.41
+22                              -----------
+23                              dcache_lock            179          [<ffffffff80378274>] _atomic_dec_and_lock+0x34/0x54
+24                              dcache_lock            113          [<ffffffff802cc17b>] d_alloc+0x19a/0x1eb
+25                              dcache_lock             99          [<ffffffff802ca0dc>] d_rehash+0x1b/0x44
+26                              dcache_lock            104          [<ffffffff802cbca0>] d_instantiate+0x36/0x8a
+27                              -----------
+28                              dcache_lock            192          [<ffffffff80378274>] _atomic_dec_and_lock+0x34/0x54
+29                              dcache_lock             98          [<ffffffff802ca0dc>] d_rehash+0x1b/0x44
+30                              dcache_lock             72          [<ffffffff802cc17b>] d_alloc+0x19a/0x1eb
+31                              dcache_lock            112          [<ffffffff802cbca0>] d_instantiate+0x36/0x8a
 
 This excerpt shows the first two lock class statistics. Line 01 shows the
 output version - each time the format changes this will be updated. Line 02-04
-show the header with column descriptions. Lines 05-10 and 13-18 show the actual
+show the header with column descriptions. Lines 05-18 and 20-31 show the actual
 statistics. These statistics come in two parts; the actual stats separated by a
-short separator (line 08, 14) from the contention points.
+short separator (line 08, 13) from the contention points.
 
-The first lock (05-10) is a read/write lock, and shows two lines above the
+The first lock (05-18) is a read/write lock, and shows two lines above the
 short separator. The contention points don't match the column descriptors,
-they have two: contentions and [<IP>] symbol.
+they have two: contentions and [<IP>] symbol. The second set of contention
+points are the points we're contending with.
 
+The integer part of the time values is in us.
 
 View the top contending locks:
 
index 3cd2ad958176c9e4f4969de00597ea55633d0c2c..394d7d378dc74daf6899621d2bca0c37cdd598cf 100644 (file)
@@ -1063,6 +1063,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
 
        STAC9227/9228/9229/927x
          ref           Reference board
+         ref-no-jd     Reference board without HP/Mic jack detection
          3stack        D965 3stack
          5stack        D965 5stack + SPDIF
          dell-3stack   Dell Dimension E520
@@ -1076,6 +1077,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
 
        STAC92HD73*
          ref           Reference board
+         no-jd         BIOS setup but without jack-detection
          dell-m6-amic  Dell desktops/laptops with analog mics
          dell-m6-dmic  Dell desktops/laptops with digital mics
          dell-m6       Dell desktops/laptops with both type of mics
index 9b22bd14c3481789ac126c34842002ef7093a72a..eac7df94d8e3b7a9367e47f0c74e690502969be7 100644 (file)
@@ -114,11 +114,11 @@ modules.
 Then you must load the gadget serial driver.  To load it as an
 ACM device (recommended for interoperability), do this:
 
-  modprobe g_serial use_acm=1
+  modprobe g_serial
 
 To load it as a vendor specific bulk in/out device, do this:
 
-  modprobe g_serial
+  modprobe g_serial use_acm=0
 
 This will also automatically load the underlying gadget peripheral
 controller driver.  This must be done each time you reboot the gadget
index 077e9032d0cda17b08be1e8f85b496f37cef6b85..fafcd47232600a1a80351fcd5dfc79492e6ce8e9 100644 (file)
@@ -49,8 +49,10 @@ it and 002/048 sometime later.
 
 These files can be read as binary data.  The binary data consists
 of first the device descriptor, then the descriptors for each
-configuration of the device.  That information is also shown in
-text form by the /proc/bus/usb/devices file, described later.
+configuration of the device.  Multi-byte fields in the device and
+configuration descriptors, but not other descriptors, are converted
+to host endianness by the kernel.  This information is also shown
+in text form by the /proc/bus/usb/devices file, described later.
 
 These files may also be used to write user-level drivers for the USB
 devices.  You would open the /proc/bus/usb/BBB/DDD file read/write,
index 2917ce4ffdc4f5df267bdc9b5f239a9679c2e6d4..270481906dc80d1b25a0c29f607ef55e83ae16be 100644 (file)
@@ -34,11 +34,12 @@ if usbmon is built into the kernel.
 Verify that bus sockets are present.
 
 # ls /sys/kernel/debug/usbmon
-0s  0t  0u  1s  1t  1u  2s  2t  2u  3s  3t  3u  4s  4t  4u
+0s  0u  1s  1t  1u  2s  2t  2u  3s  3t  3u  4s  4t  4u
 #
 
-Now you can choose to either use the sockets numbered '0' (to capture packets on
-all buses), and skip to step #3, or find the bus used by your device with step #2.
+Now you can choose to either use the socket '0u' (to capture packets on all
+buses), and skip to step #3, or find the bus used by your device with step #2.
+This allows to filter away annoying devices that talk continuously.
 
 2. Find which bus connects to the desired device
 
@@ -99,8 +100,9 @@ on the event type, but there is a set of words, common for all types.
 
 Here is the list of words, from left to right:
 
-- URB Tag. This is used to identify URBs is normally a kernel mode address
- of the URB structure in hexadecimal.
+- URB Tag. This is used to identify URBs, and is normally an in-kernel address
+  of the URB structure in hexadecimal, but can be a sequence number or any
+  other unique string, within reason.
 
 - Timestamp in microseconds, a decimal number. The timestamp's resolution
   depends on available clock, and so it can be much worse than a microsecond
index 24741de12a39b8d680974f385770842e0b376bf0..fbc8fa58d56d4ec7cd09603341a4941f0a42788c 100644 (file)
@@ -1527,10 +1527,10 @@ W:      http://ebtables.sourceforge.net/
 S:     Maintained
 
 ECRYPT FILE SYSTEM
-P:     Mike Halcrow, Phillip Hellewell
-M:     mhalcrow@us.ibm.com, phillip@hellewell.homeip.net
-L:     ecryptfs-devel@lists.sourceforge.net
-W:     http://ecryptfs.sourceforge.net/
+P:     Tyler Hicks, Dustin Kirkland
+M:     tyhicks@linux.vnet.ibm.com, kirkland@canonical.com
+L:     ecryptfs-devel@lists.launchpad.net
+W:     https://launchpad.net/ecryptfs
 S:     Supported
 
 EDAC-CORE
@@ -2191,9 +2191,9 @@ S:        Supported
 
 INOTIFY
 P:     John McCutchan
-M:     ttb@tentacle.dhs.org
+M:     john@johnmccutchan.com
 P:     Robert Love
-M:     rml@novell.com
+M:     rlove@rlove.org
 L:     linux-kernel@vger.kernel.org
 S:     Maintained
 
@@ -4529,7 +4529,7 @@ S:        Maintained
 USB VIDEO CLASS
 P:     Laurent Pinchart
 M:     laurent.pinchart@skynet.be
-L:     linux-uvc-devel@lists.berlios.de
+L:     linux-uvc-devel@lists.berlios.de (subscribers-only)
 L:     video4linux-list@redhat.com
 W:     http://linux-uvc.berlios.de
 S:     Maintained
index 6c2f51b70454578b8c2210e8069b2e1388d722f8..71e98e9e6acd3fd69d868843a000e7d8fc0363f2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 28
-EXTRAVERSION = -rc8
+EXTRAVERSION =
 NAME = Erotic Pickled Herring
 
 # *DOCUMENTATION*
index 47ccec95f3e867ce5141f7e0db7bdb7f2e57667d..ef12794c3c68f7f2d6be4ec3dcda643540ed091d 100644 (file)
@@ -630,7 +630,7 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
                return -ENOMEM;
 
        sachip->clk = clk_get(me, "SA1111_CLK");
-       if (!sachip->clk) {
+       if (IS_ERR(sachip->clk)) {
                ret = PTR_ERR(sachip->clk);
                goto err_free;
        }
index c74f766ffc124406e56ab76918db8bdf4c1e30ec..23af3c972c9a7d202c0a71a340e29067d4ac8d74 100644 (file)
@@ -115,6 +115,8 @@ EXPORT_SYMBOL(__strnlen_user);
 EXPORT_SYMBOL(__strncpy_from_user);
 
 #ifdef CONFIG_MMU
+EXPORT_SYMBOL(copy_page);
+
 EXPORT_SYMBOL(__copy_from_user);
 EXPORT_SYMBOL(__copy_to_user);
 EXPORT_SYMBOL(__clear_user);
@@ -181,8 +183,6 @@ EXPORT_SYMBOL(_find_first_bit_be);
 EXPORT_SYMBOL(_find_next_bit_be);
 #endif
 
-EXPORT_SYMBOL(copy_page);
-
 #ifdef CONFIG_FUNCTION_TRACER
 EXPORT_SYMBOL(mcount);
 #endif
index 57e6874d0b809a21a27afe21d436fa8dca9046e9..79abc4ddc0cf602cf8ae77728fefd8d2080ea826 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/personality.h>
 #include <linux/kallsyms.h>
 #include <linux/delay.h>
+#include <linux/hardirq.h>
 #include <linux/init.h>
 #include <linux/uaccess.h>
 
index 7b8842cfa5fce30753914f538a0d125d2d1a349d..31e6a7b6ad80d27f055b9ce49da0b7e036e06755 100644 (file)
@@ -12,9 +12,8 @@ extern void clear_reset_status(unsigned int mask);
 
 /**
  * init_gpio_reset() - register GPIO as reset generator
- *
- * @gpio - gpio nr
- * @output - set gpio as out/low instead of input during normal work
+ * @gpio: gpio nr
+ * @output: set gpio as out/low instead of input during normal work
  */
 extern int init_gpio_reset(int gpio, int output);
 
index 2df8d9facf5741c060bb9f028c93b7c3bbe33a6e..22c9530e91e2fd8568fa78e1e5aec95ed7a72a24 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/module.h>
 #include <linux/signal.h>
 #include <linux/mm.h>
+#include <linux/hardirq.h>
 #include <linux/init.h>
 #include <linux/kprobes.h>
 #include <linux/uaccess.h>
index 5f139b7cb5f7c0aeb22d7b9b2cdba3b3682702f1..604bbd5e41d9b6c6c98dd7ceec835a345e1b22fd 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
 
-#include <asm/arch/smc.h>
+#include <mach/smc.h>
 
 static struct smc_timing flash_timing __initdata = {
        .ncs_read_setup         = 0,
index 7538f3d2b9e0742a4a5647cc37a5b1fa7f6e611d..1ee4faf0742dba057a8dd6db0eb589e9758d5936 100644 (file)
 
 #include <asm/setup.h>
 
-#include <asm/arch/at32ap700x.h>
-#include <asm/arch/init.h>
-#include <asm/arch/board.h>
-#include <asm/arch/portmux.h>
+#include <mach/at32ap700x.h>
+#include <mach/init.h>
+#include <mach/board.h>
+#include <mach/portmux.h>
 
 /* Oscillator frequencies. These are board-specific */
 unsigned long at32_board_osc_rates[3] = {
index 219720a47bf93772c77d8a57787fe46812bbb006..1848bf0d7f62642568356ded4833102e91724216 100644 (file)
@@ -10,7 +10,7 @@ MKIMAGE               := $(srctree)/scripts/mkuboot.sh
 
 extra-y                := vmlinux.bin vmlinux.gz
 
-OBJCOPYFLAGS_vmlinux.bin := -O binary
+OBJCOPYFLAGS_vmlinux.bin := -O binary -R .note.gnu.build-id
 $(obj)/vmlinux.bin: vmlinux FORCE
        $(call if_changed,objcopy)
 
index 8b6e54c9946aa835c1afb055350b8c3d166f839c..6c45a3b77aa3a877dc327ae0b978c7b42cae2d07 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27-rc1
-# Tue Aug  5 15:40:26 2008
+# Linux kernel version: 2.6.28-rc8
+# Thu Dec 18 11:22:23 2008
 #
 CONFIG_AVR32=y
 CONFIG_GENERIC_GPIO=y
@@ -67,6 +67,7 @@ CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_SLUB_DEBUG=y
 # CONFIG_SLAB is not set
@@ -77,15 +78,8 @@ CONFIG_PROFILING=y
 CONFIG_OPROFILE=m
 CONFIG_HAVE_OPROFILE=y
 CONFIG_KPROBES=y
-# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
-# CONFIG_HAVE_IOREMAP_PROT is not set
 CONFIG_HAVE_KPROBES=y
-# CONFIG_HAVE_KRETPROBES is not set
-# CONFIG_HAVE_ARCH_TRACEHOOK is not set
-# CONFIG_HAVE_DMA_ATTRS is not set
-# CONFIG_USE_GENERIC_SMP_HELPERS is not set
 CONFIG_HAVE_CLK=y
-CONFIG_PROC_PAGE_MONITOR=y
 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -118,6 +112,7 @@ CONFIG_DEFAULT_CFQ=y
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="cfq"
 CONFIG_CLASSIC_RCU=y
+CONFIG_FREEZER=y
 
 #
 # System Type and features
@@ -134,6 +129,8 @@ CONFIG_CPU_AT32AP700X=y
 CONFIG_CPU_AT32AP7000=y
 CONFIG_BOARD_ATSTK1000=y
 # CONFIG_BOARD_ATNGW100 is not set
+# CONFIG_BOARD_FAVR_32 is not set
+# CONFIG_BOARD_MIMC200 is not set
 # CONFIG_BOARD_ATSTK1002 is not set
 # CONFIG_BOARD_ATSTK1003 is not set
 # CONFIG_BOARD_ATSTK1004 is not set
@@ -171,14 +168,14 @@ CONFIG_FLATMEM_MANUAL=y
 # CONFIG_SPARSEMEM_MANUAL is not set
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
-# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=0
 CONFIG_NR_QUICK=2
 CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
 # CONFIG_OWNERSHIP_TRACE is not set
 CONFIG_NMI_DEBUGGING=y
 # CONFIG_HZ_100 is not set
@@ -186,7 +183,7 @@ CONFIG_HZ_250=y
 # CONFIG_HZ_300 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
-# CONFIG_SCHED_HRTICK is not set
+CONFIG_SCHED_HRTICK=y
 CONFIG_CMDLINE=""
 
 #
@@ -228,6 +225,8 @@ CONFIG_CPU_FREQ_AT32AP=y
 # Executable file formats
 #
 CONFIG_BINFMT_ELF=y
+CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
+# CONFIG_HAVE_AOUT is not set
 # CONFIG_BINFMT_MISC is not set
 CONFIG_NET=y
 
@@ -299,6 +298,7 @@ CONFIG_IPV6_TUNNEL=m
 # CONFIG_ATM is not set
 CONFIG_STP=m
 CONFIG_BRIDGE=m
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 CONFIG_LLC=m
@@ -321,14 +321,8 @@ CONFIG_LLC=m
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-
-#
-# Wireless
-#
-# CONFIG_CFG80211 is not set
-# CONFIG_WIRELESS_EXT is not set
-# CONFIG_MAC80211 is not set
-# CONFIG_IEEE80211 is not set
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
 
@@ -359,6 +353,7 @@ CONFIG_MTD_CMDLINE_PARTS=y
 # User Modules And Translation Layers
 #
 CONFIG_MTD_CHAR=y
+CONFIG_HAVE_MTD_OTP=y
 CONFIG_MTD_BLKDEVS=y
 CONFIG_MTD_BLOCK=y
 # CONFIG_FTL is not set
@@ -407,6 +402,8 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
 # Self-contained MTD device drivers
 #
 CONFIG_MTD_DATAFLASH=m
+# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set
+CONFIG_MTD_DATAFLASH_OTP=y
 CONFIG_MTD_M25P80=m
 CONFIG_M25PXX_USE_FAST_READ=y
 # CONFIG_MTD_SLRAM is not set
@@ -464,9 +461,10 @@ CONFIG_ATMEL_TCLIB=y
 CONFIG_ATMEL_TCB_CLKSRC=y
 CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0
 # CONFIG_EEPROM_93CX6 is not set
+# CONFIG_ICS932S401 is not set
 CONFIG_ATMEL_SSC=m
 # CONFIG_ENCLOSURE_SERVICES is not set
-# CONFIG_HAVE_IDE is not set
+# CONFIG_C2PORT is not set
 
 #
 # SCSI device support
@@ -548,6 +546,9 @@ CONFIG_MACB=y
 # CONFIG_IBM_NEW_EMAC_RGMII is not set
 # CONFIG_IBM_NEW_EMAC_TAH is not set
 # CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_B44 is not set
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
@@ -653,6 +654,7 @@ CONFIG_UNIX98_PTYS=y
 CONFIG_I2C=m
 CONFIG_I2C_BOARDINFO=y
 CONFIG_I2C_CHARDEV=m
+CONFIG_I2C_HELPER_AUTO=y
 CONFIG_I2C_ALGOBIT=m
 
 #
@@ -716,6 +718,10 @@ CONFIG_GPIOLIB=y
 # CONFIG_DEBUG_GPIO is not set
 CONFIG_GPIO_SYSFS=y
 
+#
+# Memory mapped GPIO expanders:
+#
+
 #
 # I2C GPIO expanders:
 #
@@ -745,11 +751,11 @@ CONFIG_WATCHDOG=y
 #
 # CONFIG_SOFT_WATCHDOG is not set
 CONFIG_AT32AP700X_WDT=y
+CONFIG_SSB_POSSIBLE=y
 
 #
 # Sonics Silicon Backplane
 #
-CONFIG_SSB_POSSIBLE=y
 # CONFIG_SSB is not set
 
 #
@@ -758,6 +764,10 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_MFD_CORE is not set
 # CONFIG_MFD_SM501 is not set
 # CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_WM8400 is not set
+# CONFIG_MFD_WM8350_I2C is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
@@ -783,6 +793,7 @@ CONFIG_SSB_POSSIBLE=y
 CONFIG_FB=y
 # CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
@@ -804,10 +815,13 @@ CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_S1D13XXX is not set
 CONFIG_FB_ATMEL=y
 # CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
 CONFIG_LCD_CLASS_DEVICE=y
 CONFIG_LCD_LTV350QV=y
 # CONFIG_LCD_ILI9320 is not set
+# CONFIG_LCD_TDO24M is not set
 # CONFIG_LCD_VGG2432A4 is not set
 # CONFIG_LCD_PLATFORM is not set
 # CONFIG_BACKLIGHT_CLASS_DEVICE is not set
@@ -818,6 +832,7 @@ CONFIG_LCD_LTV350QV=y
 # CONFIG_DISPLAY_SUPPORT is not set
 # CONFIG_LOGO is not set
 CONFIG_SOUND=m
+CONFIG_SOUND_OSS_CORE=y
 CONFIG_SND=m
 CONFIG_SND_TIMER=m
 CONFIG_SND_PCM=m
@@ -848,28 +863,32 @@ CONFIG_USB_SUPPORT=y
 # CONFIG_USB_ARCH_HAS_EHCI is not set
 # CONFIG_USB_OTG_WHITELIST is not set
 # CONFIG_USB_OTG_BLACKLIST_HUB is not set
+# CONFIG_USB_MUSB_HDRC is not set
+# CONFIG_USB_GADGET_MUSB_HDRC is not set
 
 #
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
 #
 CONFIG_USB_GADGET=y
 # CONFIG_USB_GADGET_DEBUG is not set
 # CONFIG_USB_GADGET_DEBUG_FILES is not set
 # CONFIG_USB_GADGET_DEBUG_FS is not set
+CONFIG_USB_GADGET_VBUS_DRAW=2
 CONFIG_USB_GADGET_SELECTED=y
-# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_AT91 is not set
 CONFIG_USB_GADGET_ATMEL_USBA=y
 CONFIG_USB_ATMEL_USBA=y
 # CONFIG_USB_GADGET_FSL_USB2 is not set
-# CONFIG_USB_GADGET_NET2280 is not set
-# CONFIG_USB_GADGET_PXA25X is not set
-# CONFIG_USB_GADGET_M66592 is not set
-# CONFIG_USB_GADGET_PXA27X is not set
-# CONFIG_USB_GADGET_GOKU is not set
 # CONFIG_USB_GADGET_LH7A40X is not set
 # CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_PXA25X is not set
+# CONFIG_USB_GADGET_PXA27X is not set
 # CONFIG_USB_GADGET_S3C2410 is not set
-# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_FSL_QE is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_GOKU is not set
 # CONFIG_USB_GADGET_DUMMY_HCD is not set
 CONFIG_USB_GADGET_DUALSPEED=y
 CONFIG_USB_ZERO=m
@@ -887,7 +906,7 @@ CONFIG_MMC=y
 # CONFIG_MMC_UNSAFE_RESUME is not set
 
 #
-# MMC/SD Card Drivers
+# MMC/SD/SDIO Card Drivers
 #
 CONFIG_MMC_BLOCK=y
 CONFIG_MMC_BLOCK_BOUNCE=y
@@ -895,10 +914,11 @@ CONFIG_MMC_BLOCK_BOUNCE=y
 # CONFIG_MMC_TEST is not set
 
 #
-# MMC/SD Host Controller Drivers
+# MMC/SD/SDIO Host Controller Drivers
 #
 # CONFIG_MMC_SDHCI is not set
 CONFIG_MMC_ATMELMCI=y
+# CONFIG_MMC_ATMELMCI_DMA is not set
 CONFIG_MMC_SPI=m
 # CONFIG_MEMSTICK is not set
 CONFIG_NEW_LEDS=y
@@ -918,6 +938,7 @@ CONFIG_LEDS_GPIO=m
 CONFIG_LEDS_TRIGGERS=y
 CONFIG_LEDS_TRIGGER_TIMER=m
 CONFIG_LEDS_TRIGGER_HEARTBEAT=m
+# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
 CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
 # CONFIG_ACCESSIBILITY is not set
 CONFIG_RTC_LIB=y
@@ -950,25 +971,31 @@ CONFIG_RTC_INTF_DEV=y
 # CONFIG_RTC_DRV_M41T80 is not set
 # CONFIG_RTC_DRV_S35390A is not set
 # CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
 
 #
 # SPI RTC drivers
 #
 # CONFIG_RTC_DRV_M41T94 is not set
 # CONFIG_RTC_DRV_DS1305 is not set
+# CONFIG_RTC_DRV_DS1390 is not set
 # CONFIG_RTC_DRV_MAX6902 is not set
 # CONFIG_RTC_DRV_R9701 is not set
 # CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_DS3234 is not set
 
 #
 # Platform RTC drivers
 #
+# CONFIG_RTC_DRV_DS1286 is not set
 # CONFIG_RTC_DRV_DS1511 is not set
 # CONFIG_RTC_DRV_DS1553 is not set
 # CONFIG_RTC_DRV_DS1742 is not set
 # CONFIG_RTC_DRV_STK17TA8 is not set
 # CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
 # CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
 # CONFIG_RTC_DRV_V3020 is not set
 
 #
@@ -989,6 +1016,8 @@ CONFIG_DMA_ENGINE=y
 # CONFIG_NET_DMA is not set
 CONFIG_DMATEST=m
 # CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # File systems
@@ -998,12 +1027,17 @@ CONFIG_EXT2_FS=m
 # CONFIG_EXT2_FS_XIP is not set
 CONFIG_EXT3_FS=m
 # CONFIG_EXT3_FS_XATTR is not set
-# CONFIG_EXT4DEV_FS is not set
+CONFIG_EXT4_FS=m
+CONFIG_EXT4DEV_COMPAT=y
+# CONFIG_EXT4_FS_XATTR is not set
 CONFIG_JBD=m
 # CONFIG_JBD_DEBUG is not set
+CONFIG_JBD2=m
+# CONFIG_JBD2_DEBUG is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
+CONFIG_FILE_LOCKING=y
 # CONFIG_XFS_FS is not set
 # CONFIG_OCFS2_FS is not set
 # CONFIG_DNOTIFY is not set
@@ -1036,6 +1070,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
@@ -1054,7 +1089,8 @@ CONFIG_TMPFS=y
 # CONFIG_EFS_FS is not set
 CONFIG_JFFS2_FS=y
 CONFIG_JFFS2_FS_DEBUG=0
-# CONFIG_JFFS2_FS_WRITEBUFFER is not set
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
 # CONFIG_JFFS2_SUMMARY is not set
 # CONFIG_JFFS2_FS_XATTR is not set
 # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
@@ -1088,6 +1124,7 @@ CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -1185,10 +1222,21 @@ CONFIG_DEBUG_BUGVERBOSE=y
 CONFIG_FRAME_POINTER=y
 # CONFIG_BOOT_PRINTK_DELAY is not set
 # CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 # CONFIG_KPROBES_SANITY_TEST is not set
 # CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
 # CONFIG_LKDTM is not set
 # CONFIG_FAULT_INJECTION is not set
+
+#
+# Tracers
+#
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 # CONFIG_SAMPLES is not set
 
 #
@@ -1196,17 +1244,26 @@ CONFIG_FRAME_POINTER=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
 # CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_CRYPTO=y
 
 #
 # Crypto core or helper
 #
+CONFIG_CRYPTO_FIPS=y
 CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI2=y
 CONFIG_CRYPTO_AEAD=m
+CONFIG_CRYPTO_AEAD2=y
 CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_BLKCIPHER2=y
 CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG=m
+CONFIG_CRYPTO_RNG2=y
 CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_MANAGER2=y
 # CONFIG_CRYPTO_GF128MUL is not set
 # CONFIG_CRYPTO_NULL is not set
 # CONFIG_CRYPTO_CRYPTD is not set
@@ -1257,7 +1314,7 @@ CONFIG_CRYPTO_SHA1=m
 #
 # Ciphers
 #
-# CONFIG_CRYPTO_AES is not set
+CONFIG_CRYPTO_AES=m
 # CONFIG_CRYPTO_ANUBIS is not set
 # CONFIG_CRYPTO_ARC4 is not set
 # CONFIG_CRYPTO_BLOWFISH is not set
@@ -1278,14 +1335,17 @@ CONFIG_CRYPTO_DES=m
 #
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_LZO=y
+
+#
+# Random Number Generation
+#
+CONFIG_CRYPTO_ANSI_CPRNG=m
 # CONFIG_CRYPTO_HW is not set
 
 #
 # Library routines
 #
 CONFIG_BITREVERSE=y
-# CONFIG_GENERIC_FIND_FIRST_BIT is not set
-# CONFIG_GENERIC_FIND_NEXT_BIT is not set
 CONFIG_CRC_CCITT=m
 CONFIG_CRC16=y
 CONFIG_CRC_T10DIF=m
index 0c6e02f80a31ce6cd562aa2147d0144a3e89b913..066252eebf614e98ffb96c1c58705cbb9e35840b 100644 (file)
@@ -967,28 +967,28 @@ static inline void configure_usart0_pins(void)
 {
        u32 pin_mask = (1 << 8) | (1 << 9); /* RXD & TXD */
 
-       select_peripheral(PIOA, pin_mask, PERIPH_B, 0);
+       select_peripheral(PIOA, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP);
 }
 
 static inline void configure_usart1_pins(void)
 {
        u32 pin_mask = (1 << 17) | (1 << 18); /* RXD & TXD */
 
-       select_peripheral(PIOA, pin_mask, PERIPH_A, 0);
+       select_peripheral(PIOA, pin_mask, PERIPH_A, AT32_GPIOF_PULLUP);
 }
 
 static inline void configure_usart2_pins(void)
 {
        u32 pin_mask = (1 << 26) | (1 << 27); /* RXD & TXD */
 
-       select_peripheral(PIOB, pin_mask, PERIPH_B, 0);
+       select_peripheral(PIOB, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP);
 }
 
 static inline void configure_usart3_pins(void)
 {
        u32 pin_mask = (1 << 18) | (1 << 17); /* RXD & TXD */
 
-       select_peripheral(PIOB, pin_mask, PERIPH_B, 0);
+       select_peripheral(PIOB, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP);
 }
 
 static struct platform_device *__initdata at32_usarts[4];
index f92306bbedb848eb146ece3afde7729abdddac13..8d513a8c5266b4db31ef1cb6fd6eb75777c7dda3 100644 (file)
@@ -4,6 +4,7 @@ menu "HP Simulator drivers"
 
 config HP_SIMETH
        bool "Simulated Ethernet "
+       depends on NET
 
 config HP_SIMSERIAL
        bool "Simulated serial driver support"
index 765c8e287d2b2b45f2687f607c61ecc1d1096cad..364ca89388072bdef9c9083183b329cec5828af7 100644 (file)
@@ -48,7 +48,7 @@ config RUNTIME_DEBUG
        help
          If you say Y here, some debugging macros will do run-time checking.
          If you say N here, those macros will mostly turn to no-ops.  See
-         include/asm-mips/debug.h for debuging macros.
+         arch/mips/include/asm/debug.h for debugging macros.
          If unsure, say N.
 
 endmenu
index fe4699df9626c27fc1113c0d6d9e09c36c7277e8..de4c7a0a96ddde228e6b2806ea5f5a48a8758a4c 100644 (file)
@@ -1,71 +1,71 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.20
-# Tue Feb 20 21:47:33 2007
+# Linux kernel version: 2.6.28-rc7
+# Wed Dec 10 14:39:08 2008
 #
 CONFIG_MIPS=y
 
 #
 # Machine selection
 #
-CONFIG_ZONE_DMA=y
-# CONFIG_MIPS_MTX1 is not set
-# CONFIG_MIPS_BOSPORUS is not set
-# CONFIG_MIPS_PB1000 is not set
-# CONFIG_MIPS_PB1100 is not set
-# CONFIG_MIPS_PB1500 is not set
-# CONFIG_MIPS_PB1550 is not set
-# CONFIG_MIPS_PB1200 is not set
-# CONFIG_MIPS_DB1000 is not set
-# CONFIG_MIPS_DB1100 is not set
-# CONFIG_MIPS_DB1500 is not set
-# CONFIG_MIPS_DB1550 is not set
-# CONFIG_MIPS_DB1200 is not set
-# CONFIG_MIPS_MIRAGE is not set
+# CONFIG_MACH_ALCHEMY is not set
 # CONFIG_BASLER_EXCITE is not set
+# CONFIG_BCM47XX is not set
 # CONFIG_MIPS_COBALT is not set
 # CONFIG_MACH_DECSTATION is not set
 # CONFIG_MACH_JAZZ is not set
+# CONFIG_LASAT is not set
+# CONFIG_LEMOTE_FULONG is not set
 # CONFIG_MIPS_MALTA is not set
-# CONFIG_WR_PPMC is not set
 # CONFIG_MIPS_SIM is not set
-# CONFIG_MOMENCO_JAGUAR_ATX is not set
-# CONFIG_MIPS_XXS1500 is not set
+# CONFIG_MACH_EMMA is not set
+# CONFIG_MACH_VR41XX is not set
+# CONFIG_NXP_STB220 is not set
+# CONFIG_NXP_STB225 is not set
 # CONFIG_PNX8550_JBS is not set
 # CONFIG_PNX8550_STB810 is not set
-# CONFIG_MACH_VR41XX is not set
+# CONFIG_PMC_MSP is not set
 # CONFIG_PMC_YOSEMITE is not set
-# CONFIG_MARKEINS is not set
 # CONFIG_SGI_IP22 is not set
 # CONFIG_SGI_IP27 is not set
+# CONFIG_SGI_IP28 is not set
 CONFIG_SGI_IP32=y
-# CONFIG_SIBYTE_BIGSUR is not set
-# CONFIG_SIBYTE_SWARM is not set
-# CONFIG_SIBYTE_SENTOSA is not set
-# CONFIG_SIBYTE_RHONE is not set
-# CONFIG_SIBYTE_CARMEL is not set
-# CONFIG_SIBYTE_LITTLESUR is not set
 # CONFIG_SIBYTE_CRHINE is not set
+# CONFIG_SIBYTE_CARMEL is not set
 # CONFIG_SIBYTE_CRHONE is not set
+# CONFIG_SIBYTE_RHONE is not set
+# CONFIG_SIBYTE_SWARM is not set
+# CONFIG_SIBYTE_LITTLESUR is not set
+# CONFIG_SIBYTE_SENTOSA is not set
+# CONFIG_SIBYTE_BIGSUR is not set
 # CONFIG_SNI_RM is not set
-# CONFIG_TOSHIBA_JMR3927 is not set
-# CONFIG_TOSHIBA_RBTX4927 is not set
-# CONFIG_TOSHIBA_RBTX4938 is not set
+# CONFIG_MACH_TX39XX is not set
+# CONFIG_MACH_TX49XX is not set
+# CONFIG_MIKROTIK_RB532 is not set
+# CONFIG_WR_PPMC is not set
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_ARCH_HAS_ILOG2_U32 is not set
 # CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_ARCH_SUPPORTS_OPROFILE=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 # CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
 CONFIG_ARC=y
+CONFIG_CEVT_R4K=y
+CONFIG_CSRC_R4K=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DMA_NEED_PCI_MAP_STATE=y
+# CONFIG_HOTPLUG_CPU is not set
+# CONFIG_NO_IOPORT is not set
 CONFIG_CPU_BIG_ENDIAN=y
 # CONFIG_CPU_LITTLE_ENDIAN is not set
 CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
+CONFIG_IRQ_CPU=y
 CONFIG_ARC32=y
 CONFIG_BOOT_ELF32=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
@@ -75,6 +75,7 @@ CONFIG_ARC_PROMLIB=y
 #
 # CPU selection
 #
+# CONFIG_CPU_LOONGSON2 is not set
 # CONFIG_CPU_MIPS32_R1 is not set
 # CONFIG_CPU_MIPS32_R2 is not set
 # CONFIG_CPU_MIPS64_R1 is not set
@@ -87,6 +88,7 @@ CONFIG_ARC_PROMLIB=y
 # CONFIG_CPU_TX49XX is not set
 CONFIG_CPU_R5000=y
 # CONFIG_CPU_R5432 is not set
+# CONFIG_CPU_R5500 is not set
 # CONFIG_CPU_R6000 is not set
 # CONFIG_CPU_NEVADA is not set
 # CONFIG_CPU_R8000 is not set
@@ -116,65 +118,73 @@ CONFIG_RM7000_CPU_SCACHE=y
 CONFIG_MIPS_MT_DISABLED=y
 # CONFIG_MIPS_MT_SMP is not set
 # CONFIG_MIPS_MT_SMTC is not set
-# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
 # CONFIG_SPARSEMEM_MANUAL is not set
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_RESOURCES_64BIT=y
-CONFIG_ZONE_DMA_FLAG=1
+CONFIG_PHYS_ADDR_T_64BIT=y
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
 # CONFIG_HZ_48 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_128 is not set
-# CONFIG_HZ_250 is not set
+CONFIG_HZ_250=y
 # CONFIG_HZ_256 is not set
-CONFIG_HZ_1000=y
+# CONFIG_HZ_1000 is not set
 # CONFIG_HZ_1024 is not set
 CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
-CONFIG_HZ=1000
-# CONFIG_PREEMPT_NONE is not set
-CONFIG_PREEMPT_VOLUNTARY=y
+CONFIG_HZ=250
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
 # CONFIG_KEXEC is not set
+# CONFIG_SECCOMP is not set
 CONFIG_LOCKDEP_SUPPORT=y
 CONFIG_STACKTRACE_SUPPORT=y
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
-# Code maturity level options
+# General setup
 #
 CONFIG_EXPERIMENTAL=y
 CONFIG_BROKEN_ON_SMP=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
 CONFIG_LOCALVERSION=""
 CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
-# CONFIG_IPC_NS is not set
 CONFIG_SYSVIPC_SYSCTL=y
-# CONFIG_POSIX_MQUEUE is not set
+CONFIG_POSIX_MQUEUE=y
 CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 # CONFIG_TASKSTATS is not set
-# CONFIG_UTS_NS is not set
-# CONFIG_AUDIT is not set
-# CONFIG_IKCONFIG is not set
+CONFIG_AUDIT=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_GROUP_SCHED is not set
 CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
 CONFIG_RELAY=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+# CONFIG_NAMESPACES is not set
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
 CONFIG_SYSCTL_SYSCALL=y
@@ -184,27 +194,43 @@ CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
+CONFIG_PCSPKR_PLATFORM=y
+CONFIG_COMPAT_BRK=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
 CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
-CONFIG_SLAB=y
+CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_PCI_QUIRKS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_PROFILING=y
+# CONFIG_MARKERS is not set
+CONFIG_OPROFILE=m
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
+CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-
-#
-# Loadable module support
-#
-# CONFIG_MODULES is not set
-
-#
-# Block layer
-#
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
 CONFIG_BLOCK=y
 # CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+CONFIG_BLOCK_COMPAT=y
 
 #
 # IO Schedulers
@@ -213,59 +239,50 @@ CONFIG_IOSCHED_NOOP=y
 CONFIG_IOSCHED_AS=y
 CONFIG_IOSCHED_DEADLINE=y
 CONFIG_IOSCHED_CFQ=y
-CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_AS is not set
 # CONFIG_DEFAULT_DEADLINE is not set
-# CONFIG_DEFAULT_CFQ is not set
+CONFIG_DEFAULT_CFQ=y
 # CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_DEFAULT_IOSCHED="cfq"
+CONFIG_CLASSIC_RCU=y
+# CONFIG_FREEZER is not set
 
 #
 # Bus options (PCI, PCMCIA, EISA, ISA, TC)
 #
 CONFIG_HW_HAS_PCI=y
 CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCI_LEGACY is not set
 CONFIG_MMU=y
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
 # CONFIG_PCCARD is not set
-
-#
-# PCI Hotplug Support
-#
 # CONFIG_HOTPLUG_PCI is not set
 
 #
 # Executable file formats
 #
 CONFIG_BINFMT_ELF=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+# CONFIG_HAVE_AOUT is not set
 CONFIG_BINFMT_MISC=y
-# CONFIG_BUILD_ELF64 is not set
 CONFIG_MIPS32_COMPAT=y
 CONFIG_COMPAT=y
 CONFIG_SYSVIPC_COMPAT=y
 CONFIG_MIPS32_O32=y
-# CONFIG_MIPS32_N32 is not set
+CONFIG_MIPS32_N32=y
 CONFIG_BINFMT_ELF32=y
 
 #
 # Power management options
 #
-CONFIG_PM=y
-# CONFIG_PM_LEGACY is not set
-# CONFIG_PM_DEBUG is not set
-# CONFIG_PM_SYSFS_DEPRECATED is not set
-
-#
-# Networking
-#
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+# CONFIG_PM is not set
 CONFIG_NET=y
 
 #
 # Networking options
 #
-# CONFIG_NETDEBUG is not set
 CONFIG_PACKET=y
 CONFIG_PACKET_MMAP=y
 CONFIG_UNIX=y
@@ -273,56 +290,83 @@ CONFIG_XFRM=y
 CONFIG_XFRM_USER=y
 # CONFIG_XFRM_SUB_POLICY is not set
 CONFIG_XFRM_MIGRATE=y
+# CONFIG_XFRM_STATISTICS is not set
+CONFIG_XFRM_IPCOMP=m
 CONFIG_NET_KEY=y
 CONFIG_NET_KEY_MIGRATE=y
 CONFIG_INET=y
-# CONFIG_IP_MULTICAST is not set
+CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_FIB_HASH=y
 CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_DHCP=y
 CONFIG_IP_PNP_BOOTP=y
 # CONFIG_IP_PNP_RARP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
+# CONFIG_NET_IPGRE_BROADCAST is not set
+# CONFIG_IP_MROUTE is not set
 # CONFIG_ARPD is not set
 # CONFIG_SYN_COOKIES is not set
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_INET_XFRM_TUNNEL is not set
-# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+CONFIG_INET_XFRM_TUNNEL=m
+CONFIG_INET_TUNNEL=m
 CONFIG_INET_XFRM_MODE_TRANSPORT=y
 CONFIG_INET_XFRM_MODE_TUNNEL=y
 CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
-# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_ADVANCED=y
+CONFIG_TCP_CONG_BIC=m
 CONFIG_TCP_CONG_CUBIC=y
+CONFIG_TCP_CONG_WESTWOOD=m
+CONFIG_TCP_CONG_HTCP=m
+# CONFIG_TCP_CONG_HSTCP is not set
+# CONFIG_TCP_CONG_HYBLA is not set
+# CONFIG_TCP_CONG_VEGAS is not set
+# CONFIG_TCP_CONG_SCALABLE is not set
+# CONFIG_TCP_CONG_LP is not set
+# CONFIG_TCP_CONG_VENO is not set
+# CONFIG_TCP_CONG_YEAH is not set
+# CONFIG_TCP_CONG_ILLINOIS is not set
+# CONFIG_DEFAULT_BIC is not set
+CONFIG_DEFAULT_CUBIC=y
+# CONFIG_DEFAULT_HTCP is not set
+# CONFIG_DEFAULT_VEGAS is not set
+# CONFIG_DEFAULT_WESTWOOD is not set
+# CONFIG_DEFAULT_RENO is not set
 CONFIG_DEFAULT_TCP_CONG="cubic"
 CONFIG_TCP_MD5SIG=y
-# CONFIG_IPV6 is not set
-# CONFIG_INET6_XFRM_TUNNEL is not set
-# CONFIG_INET6_TUNNEL is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_NDISC_NODETYPE=y
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_IPV6_MROUTE is not set
 CONFIG_NETWORK_SECMARK=y
 # CONFIG_NETFILTER is not set
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
 # CONFIG_IP_DCCP is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
 # CONFIG_IP_SCTP is not set
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DSA is not set
 # CONFIG_VLAN_8021Q is not set
 # CONFIG_DECNET is not set
 # CONFIG_LLC2 is not set
@@ -332,10 +376,6 @@ CONFIG_NETWORK_SECMARK=y
 # CONFIG_LAPB is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
 # CONFIG_NET_SCHED is not set
 
 #
@@ -343,15 +383,14 @@ CONFIG_NETWORK_SECMARK=y
 #
 # CONFIG_NET_PKTGEN is not set
 # CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
-CONFIG_IEEE80211=y
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=y
-CONFIG_IEEE80211_CRYPT_CCMP=y
-CONFIG_IEEE80211_SOFTMAC=y
-# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
-CONFIG_WIRELESS_EXT=y
+# CONFIG_AF_RXRPC is not set
+# CONFIG_PHONET is not set
+# CONFIG_WIRELESS is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
 
 #
 # Device Drivers
@@ -360,60 +399,40 @@ CONFIG_WIRELESS_EXT=y
 #
 # Generic Driver Options
 #
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
 # CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
 CONFIG_CONNECTOR=y
 CONFIG_PROC_EVENTS=y
-
-#
-# Memory Technology Devices (MTD)
-#
 # CONFIG_MTD is not set
-
-#
-# Parallel port support
-#
 # CONFIG_PARPORT is not set
-
-#
-# Plug and Play support
-#
-# CONFIG_PNPACPI is not set
-
-#
-# Block devices
-#
+CONFIG_BLK_DEV=y
 # CONFIG_BLK_CPQ_DA is not set
 # CONFIG_BLK_CPQ_CISS_DA is not set
 # CONFIG_BLK_DEV_DAC960 is not set
 # CONFIG_BLK_DEV_UMEM is not set
 # CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=y
-# CONFIG_BLK_DEV_CRYPTOLOOP is not set
-# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_LOOP=m
+CONFIG_BLK_DEV_CRYPTOLOOP=m
+CONFIG_BLK_DEV_NBD=m
 # CONFIG_BLK_DEV_SX8 is not set
 # CONFIG_BLK_DEV_RAM is not set
-# CONFIG_BLK_DEV_INITRD is not set
-CONFIG_CDROM_PKTCDVD=y
-CONFIG_CDROM_PKTCDVD_BUFFERS=8
-# CONFIG_CDROM_PKTCDVD_WCACHE is not set
-CONFIG_ATA_OVER_ETH=y
-
-#
-# Misc devices
-#
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_BLK_DEV_HD is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_PHANTOM is not set
+# CONFIG_EEPROM_93CX6 is not set
 CONFIG_SGI_IOC4=y
 # CONFIG_TIFM_CORE is not set
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_HP_ILO is not set
+# CONFIG_C2PORT is not set
+CONFIG_HAVE_IDE=y
 # CONFIG_IDE is not set
 
 #
@@ -421,19 +440,20 @@ CONFIG_SGI_IOC4=y
 #
 CONFIG_RAID_ATTRS=y
 CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
 CONFIG_SCSI_TGT=y
-CONFIG_SCSI_NETLINK=y
+# CONFIG_SCSI_NETLINK is not set
 CONFIG_SCSI_PROC_FS=y
 
 #
 # SCSI support type (disk, tape, CD-ROM)
 #
 CONFIG_BLK_DEV_SD=y
-CONFIG_CHR_DEV_ST=y
-CONFIG_CHR_DEV_OSST=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
 CONFIG_BLK_DEV_SR=y
 CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=y
+CONFIG_CHR_DEV_SG=m
 # CONFIG_CHR_DEV_SCH is not set
 
 #
@@ -443,35 +463,36 @@ CONFIG_SCSI_MULTI_LUN=y
 CONFIG_SCSI_CONSTANTS=y
 CONFIG_SCSI_LOGGING=y
 CONFIG_SCSI_SCAN_ASYNC=y
+CONFIG_SCSI_WAIT_SCAN=m
 
 #
 # SCSI Transports
 #
 CONFIG_SCSI_SPI_ATTRS=y
-CONFIG_SCSI_FC_ATTRS=y
+# CONFIG_SCSI_FC_ATTRS is not set
 # CONFIG_SCSI_ISCSI_ATTRS is not set
 CONFIG_SCSI_SAS_ATTRS=y
 CONFIG_SCSI_SAS_LIBSAS=y
+CONFIG_SCSI_SAS_HOST_SMP=y
 # CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
-
-#
-# SCSI low-level drivers
-#
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
 # CONFIG_ISCSI_TCP is not set
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
 # CONFIG_SCSI_3W_9XXX is not set
 # CONFIG_SCSI_ACARD is not set
 # CONFIG_SCSI_AACRAID is not set
 CONFIG_SCSI_AIC7XXX=y
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=8
+CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
 CONFIG_AIC7XXX_RESET_DELAY_MS=15000
 CONFIG_AIC7XXX_DEBUG_ENABLE=y
 CONFIG_AIC7XXX_DEBUG_MASK=0
 CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
 # CONFIG_SCSI_AIC7XXX_OLD is not set
 # CONFIG_SCSI_AIC79XX is not set
-CONFIG_SCSI_AIC94XX=y
-# CONFIG_AIC94XX_DEBUG is not set
+# CONFIG_SCSI_AIC94XX is not set
+# CONFIG_SCSI_DPT_I2O is not set
+# CONFIG_SCSI_ADVANSYS is not set
 # CONFIG_SCSI_ARCMSR is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
@@ -482,6 +503,7 @@ CONFIG_SCSI_AIC94XX=y
 # CONFIG_SCSI_IPS is not set
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_MVSAS is not set
 # CONFIG_SCSI_STEX is not set
 # CONFIG_SCSI_SYM53C8XX_2 is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
@@ -492,147 +514,81 @@ CONFIG_SCSI_AIC94XX=y
 # CONFIG_SCSI_DC390T is not set
 # CONFIG_SCSI_DEBUG is not set
 # CONFIG_SCSI_SRP is not set
-
-#
-# Serial ATA (prod) and Parallel ATA (experimental) drivers
-#
+# CONFIG_SCSI_DH is not set
 # CONFIG_ATA is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
 # CONFIG_MD is not set
-
-#
-# Fusion MPT device support
-#
 # CONFIG_FUSION is not set
-# CONFIG_FUSION_SPI is not set
-# CONFIG_FUSION_FC is not set
-# CONFIG_FUSION_SAS is not set
 
 #
 # IEEE 1394 (FireWire) support
 #
-# CONFIG_IEEE1394 is not set
 
 #
-# I2O device support
+# Enable only one of the two stacks, unless you know what you are doing
 #
+# CONFIG_FIREWIRE is not set
+# CONFIG_IEEE1394 is not set
 # CONFIG_I2O is not set
-
-#
-# Network device support
-#
 CONFIG_NETDEVICES=y
-# CONFIG_DUMMY is not set
-# CONFIG_BONDING is not set
+CONFIG_DUMMY=m
+CONFIG_BONDING=m
+# CONFIG_MACVLAN is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
-
-#
-# ARCnet devices
-#
+# CONFIG_VETH is not set
 # CONFIG_ARCNET is not set
-
-#
-# PHY device support
-#
-CONFIG_PHYLIB=y
-
-#
-# MII PHY device drivers
-#
-CONFIG_MARVELL_PHY=y
-CONFIG_DAVICOM_PHY=y
-CONFIG_QSEMI_PHY=y
-CONFIG_LXT_PHY=y
-CONFIG_CICADA_PHY=y
-CONFIG_VITESSE_PHY=y
-CONFIG_SMSC_PHY=y
-# CONFIG_BROADCOM_PHY is not set
-# CONFIG_FIXED_PHY is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
+# CONFIG_PHYLIB is not set
 CONFIG_NET_ETHERNET=y
-# CONFIG_MII is not set
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
 CONFIG_SGI_O2MACE_ETH=y
 # CONFIG_HAPPYMEAL is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_CASSINI is not set
 # CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_SMC91X is not set
 # CONFIG_DM9000 is not set
-
-#
-# Tulip family network device support
-#
-# CONFIG_NET_TULIP is not set
+CONFIG_NET_TULIP=y
+CONFIG_DE2104X=m
+CONFIG_TULIP=m
+# CONFIG_TULIP_MWI is not set
+CONFIG_TULIP_MMIO=y
+# CONFIG_TULIP_NAPI is not set
+# CONFIG_DE4X5 is not set
+# CONFIG_WINBOND_840 is not set
+# CONFIG_DM9102 is not set
+# CONFIG_ULI526X is not set
 # CONFIG_HP100 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_NET_PCI is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_E1000 is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_R8169 is not set
-# CONFIG_SIS190 is not set
-# CONFIG_SKGE is not set
-# CONFIG_SKY2 is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_TIGON3 is not set
-# CONFIG_BNX2 is not set
-CONFIG_QLA3XXX=y
-# CONFIG_ATL1 is not set
-
-#
-# Ethernet (10000 Mbit)
-#
-# CONFIG_CHELSIO_T1 is not set
-CONFIG_CHELSIO_T3=y
-# CONFIG_IXGB is not set
-# CONFIG_S2IO is not set
-# CONFIG_MYRI10GE is not set
-CONFIG_NETXEN_NIC=y
-
-#
-# Token Ring devices
-#
+# CONFIG_B44 is not set
+# CONFIG_ATL2 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
 # CONFIG_TR is not set
 
 #
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# Wan interfaces
+# Wireless LAN
 #
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+# CONFIG_IWLWIFI_LEDS is not set
 # CONFIG_WAN is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
 # CONFIG_NET_FC is not set
-# CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 # CONFIG_NETPOLL is not set
 # CONFIG_NET_POLL_CONTROLLER is not set
-
-#
-# ISDN subsystem
-#
 # CONFIG_ISDN is not set
-
-#
-# Telephony Support
-#
 # CONFIG_PHONE is not set
 
 #
@@ -640,6 +596,7 @@ CONFIG_NETXEN_NIC=y
 #
 CONFIG_INPUT=y
 # CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
 
 #
 # Userland interfaces
@@ -649,16 +606,32 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
-# CONFIG_INPUT_EVDEV is not set
+CONFIG_INPUT_EVDEV=m
 # CONFIG_INPUT_EVBUG is not set
 
 #
 # Input Device Drivers
 #
-# CONFIG_INPUT_KEYBOARD is not set
-# CONFIG_INPUT_MOUSE is not set
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+CONFIG_MOUSE_PS2_ALPS=y
+CONFIG_MOUSE_PS2_LOGIPS2PP=y
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_PS2_LIFEBOOK=y
+CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_VSXXXAA is not set
 # CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
 # CONFIG_INPUT_TOUCHSCREEN is not set
 # CONFIG_INPUT_MISC is not set
 
@@ -669,8 +642,8 @@ CONFIG_SERIO=y
 # CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_PCIPS2 is not set
-# CONFIG_SERIO_MACEPS2 is not set
-# CONFIG_SERIO_LIBPS2 is not set
+CONFIG_SERIO_MACEPS2=y
+CONFIG_SERIO_LIBPS2=y
 CONFIG_SERIO_RAW=y
 # CONFIG_GAMEPORT is not set
 
@@ -678,10 +651,13 @@ CONFIG_SERIO_RAW=y
 # Character devices
 #
 CONFIG_VT=y
+# CONFIG_CONSOLE_TRANSLATIONS is not set
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
-CONFIG_VT_HW_CONSOLE_BINDING=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
 # CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_NOZOMI is not set
 
 #
 # Serial drivers
@@ -702,192 +678,304 @@ CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
-
-#
-# IPMI
-#
 # CONFIG_IPMI_HANDLER is not set
-
-#
-# Watchdog Cards
-#
-# CONFIG_WATCHDOG is not set
-# CONFIG_HW_RANDOM is not set
-# CONFIG_RTC is not set
-# CONFIG_GEN_RTC is not set
-# CONFIG_DTLK is not set
+CONFIG_HW_RANDOM=y
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
-# CONFIG_DRM is not set
 # CONFIG_RAW_DRIVER is not set
-
-#
-# TPM devices
-#
 # CONFIG_TCG_TPM is not set
+CONFIG_DEVPORT=y
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_I5K_AMB is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_F71882FG is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_SIS5595 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_VIA686A is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_SENSORS_VT8231 is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
 
 #
-# I2C support
+# Watchdog Device Drivers
 #
-# CONFIG_I2C is not set
+# CONFIG_SOFT_WATCHDOG is not set
+# CONFIG_ALIM7101_WDT is not set
 
 #
-# SPI support
+# PCI-based Watchdog Cards
 #
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
+# CONFIG_PCIPCWATCHDOG is not set
+# CONFIG_WDTPCI is not set
+CONFIG_SSB_POSSIBLE=y
 
 #
-# Dallas's 1-wire bus
+# Sonics Silicon Backplane
 #
-# CONFIG_W1 is not set
+# CONFIG_SSB is not set
 
 #
-# Hardware Monitoring support
+# Multifunction device drivers
 #
-# CONFIG_HWMON is not set
-# CONFIG_HWMON_VID is not set
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_REGULATOR is not set
 
 #
 # Multimedia devices
 #
-# CONFIG_VIDEO_DEV is not set
 
 #
-# Digital Video Broadcasting Devices
+# Multimedia core support
 #
-# CONFIG_DVB is not set
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L2_COMMON=m
+CONFIG_VIDEO_ALLOW_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+# CONFIG_DVB_CORE is not set
+CONFIG_VIDEO_MEDIA=m
 
 #
-# Graphics support
+# Multimedia drivers
 #
-# CONFIG_FIRMWARE_EDID is not set
-# CONFIG_FB is not set
+# CONFIG_MEDIA_ATTACH is not set
+CONFIG_VIDEO_V4L2=m
+CONFIG_VIDEO_V4L1=m
+CONFIG_VIDEOBUF_GEN=m
+CONFIG_VIDEOBUF_VMALLOC=m
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+CONFIG_VIDEO_VIVI=m
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_STRADIS is not set
+# CONFIG_SOC_CAMERA is not set
+CONFIG_RADIO_ADAPTERS=y
+# CONFIG_RADIO_GEMTEK_PCI is not set
+# CONFIG_RADIO_MAXIRADIO is not set
+# CONFIG_RADIO_MAESTRO is not set
+CONFIG_DAB=y
 
 #
-# Console display driver support
+# Graphics support
 #
-# CONFIG_VGA_CONSOLE is not set
-CONFIG_DUMMY_CONSOLE=y
+# CONFIG_DRM is not set
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=y
+CONFIG_FB=y
+CONFIG_FIRMWARE_EDID=y
+# CONFIG_FB_DDC is not set
+# CONFIG_FB_BOOT_VESA_SUPPORT is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_CIRRUS is not set
+# CONFIG_FB_PM2 is not set
+# CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_ASILIANT is not set
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_UVESA is not set
+CONFIG_FB_GBE=y
+CONFIG_FB_GBE_MEM=4
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_NVIDIA is not set
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_RADEON is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_S3 is not set
+# CONFIG_FB_SAVAGE is not set
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_VIA is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_KYRO is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_VT8623 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_ARK is not set
+# CONFIG_FB_PM3 is not set
+# CONFIG_FB_CARMINE is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
+# CONFIG_FB_MB862XX is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
-# Sound
+# Display device support
 #
-# CONFIG_SOUND is not set
+# CONFIG_DISPLAY_SUPPORT is not set
 
 #
-# HID Devices
+# Console display driver support
 #
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_SGI_CLUT224=y
+# CONFIG_SOUND is not set
+CONFIG_HID_SUPPORT=y
 CONFIG_HID=y
 # CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+# CONFIG_HID_PID is not set
 
 #
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-# CONFIG_USB is not set
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
+# Special HID drivers
 #
+CONFIG_HID_COMPAT=y
+# CONFIG_USB_SUPPORT is not set
+# CONFIG_UWB is not set
 # CONFIG_MMC is not set
-
-#
-# LED devices
-#
+# CONFIG_MEMSTICK is not set
 # CONFIG_NEW_LEDS is not set
-
-#
-# LED drivers
-#
-
-#
-# LED Triggers
-#
-
-#
-# InfiniBand support
-#
+# CONFIG_ACCESSIBILITY is not set
 # CONFIG_INFINIBAND is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+# CONFIG_RTC_HCTOSYS is not set
+# CONFIG_RTC_DEBUG is not set
 
 #
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+# RTC interfaces
 #
+# CONFIG_RTC_INTF_SYSFS is not set
+# CONFIG_RTC_INTF_PROC is not set
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
 
 #
-# Real Time Clock
+# SPI RTC drivers
 #
-# CONFIG_RTC_CLASS is not set
 
 #
-# DMA Engine support
+# Platform RTC drivers
 #
-# CONFIG_DMA_ENGINE is not set
+CONFIG_RTC_DRV_CMOS=y
+# CONFIG_RTC_DRV_DS1286 is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
+# CONFIG_RTC_DRV_V3020 is not set
 
 #
-# DMA Clients
-#
-
-#
-# DMA Devices
-#
-
-#
-# Auxiliary Display support
-#
-
-#
-# Virtualization
+# on-CPU RTC drivers
 #
+# CONFIG_DMADEVICES is not set
+# CONFIG_UIO is not set
+# CONFIG_STAGING is not set
+CONFIG_STAGING_EXCLUDE_BUILD=y
 
 #
 # File systems
 #
 CONFIG_EXT2_FS=y
-# CONFIG_EXT2_FS_XATTR is not set
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
 # CONFIG_EXT2_FS_XIP is not set
-# CONFIG_EXT3_FS is not set
-# CONFIG_EXT4DEV_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+# CONFIG_EXT4_FS is not set
+CONFIG_JBD=y
+CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
+CONFIG_FILE_LOCKING=y
 # CONFIG_XFS_FS is not set
 # CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
+CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
-# CONFIG_QUOTA is not set
-CONFIG_DNOTIFY=y
-# CONFIG_AUTOFS_FS is not set
-# CONFIG_AUTOFS4_FS is not set
-CONFIG_FUSE_FS=y
+CONFIG_QUOTA=y
+# CONFIG_QUOTA_NETLINK_INTERFACE is not set
+CONFIG_PRINT_QUOTA_WARNING=y
+CONFIG_QFMT_V1=m
+CONFIG_QFMT_V2=m
+CONFIG_QUOTACTL=y
+CONFIG_AUTOFS_FS=m
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
 CONFIG_GENERIC_ACL=y
 
 #
 # CD-ROM/DVD Filesystems
 #
-# CONFIG_ISO9660_FS is not set
-# CONFIG_UDF_FS is not set
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
 
 #
 # DOS/FAT/NT Filesystems
 #
-# CONFIG_MSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 # CONFIG_NTFS_FS is not set
 
 #
@@ -896,11 +984,11 @@ CONFIG_GENERIC_ACL=y
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_SYSCTL=y
+CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
 CONFIG_TMPFS_POSIX_ACL=y
 # CONFIG_HUGETLB_PAGE is not set
-CONFIG_RAMFS=y
 CONFIG_CONFIGFS_FS=y
 
 #
@@ -916,33 +1004,42 @@ CONFIG_CONFIGFS_FS=y
 # CONFIG_EFS_FS is not set
 # CONFIG_CRAMFS is not set
 # CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
 # CONFIG_HPFS_FS is not set
 # CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
+CONFIG_NETWORK_FILESYSTEMS=y
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
 # CONFIG_NFS_V3_ACL is not set
 # CONFIG_NFS_V4 is not set
-# CONFIG_NFS_DIRECTIO is not set
-# CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+# CONFIG_NFSD_V4 is not set
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
-# CONFIG_CIFS is not set
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_UPCALL is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
 
 #
 # Partition Types
@@ -953,45 +1050,83 @@ CONFIG_PARTITION_ADVANCED=y
 # CONFIG_AMIGA_PARTITION is not set
 # CONFIG_ATARI_PARTITION is not set
 # CONFIG_MAC_PARTITION is not set
-# CONFIG_MSDOS_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
 # CONFIG_LDM_PARTITION is not set
 CONFIG_SGI_PARTITION=y
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
 # CONFIG_KARMA_PARTITION is not set
 # CONFIG_EFI_PARTITION is not set
-
-#
-# Native Language Support
-#
-# CONFIG_NLS is not set
-
-#
-# Distributed Lock Manager
-#
-CONFIG_DLM=y
-CONFIG_DLM_TCP=y
-# CONFIG_DLM_SCTP is not set
-# CONFIG_DLM_DEBUG is not set
-
-#
-# Profiling support
-#
-# CONFIG_PROFILING is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=m
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=m
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
+# CONFIG_DLM is not set
 
 #
 # Kernel hacking
 #
 CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
 CONFIG_ENABLE_MUST_CHECK=y
-# CONFIG_MAGIC_SYSRQ is not set
+CONFIG_FRAME_WARN=2048
+CONFIG_MAGIC_SYSRQ=y
 # CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_DEBUG_FS is not set
 # CONFIG_HEADERS_CHECK is not set
 # CONFIG_DEBUG_KERNEL is not set
-CONFIG_LOG_BUF_SHIFT=14
-CONFIG_CROSSCOMPILE=y
+# CONFIG_DEBUG_MEMORY_INIT is not set
+# CONFIG_RCU_CPU_STALL_DETECTOR is not set
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+
+#
+# Tracers
+#
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
 CONFIG_CMDLINE=""
 
 #
@@ -1000,51 +1135,99 @@ CONFIG_CMDLINE=""
 CONFIG_KEYS=y
 CONFIG_KEYS_DEBUG_PROC_KEYS=y
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITYFS is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
 
 #
-# Cryptographic options
+# Crypto core or helper
 #
-CONFIG_CRYPTO=y
+# CONFIG_CRYPTO_FIPS is not set
 CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_AEAD=y
 CONFIG_CRYPTO_BLKCIPHER=y
 CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_GF128MUL=y
+CONFIG_CRYPTO_NULL=y
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_AUTHENC=m
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_LRW=y
+CONFIG_CRYPTO_PCBC=y
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
 CONFIG_CRYPTO_HMAC=y
 CONFIG_CRYPTO_XCBC=y
-CONFIG_CRYPTO_NULL=y
+
+#
+# Digest
+#
+CONFIG_CRYPTO_CRC32C=y
 CONFIG_CRYPTO_MD4=y
 CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_MICHAEL_MIC=y
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
 CONFIG_CRYPTO_SHA1=y
 CONFIG_CRYPTO_SHA256=y
 CONFIG_CRYPTO_SHA512=y
-CONFIG_CRYPTO_WP512=y
 CONFIG_CRYPTO_TGR192=y
-CONFIG_CRYPTO_GF128MUL=y
-CONFIG_CRYPTO_ECB=y
-CONFIG_CRYPTO_CBC=y
-CONFIG_CRYPTO_PCBC=y
-CONFIG_CRYPTO_LRW=y
-CONFIG_CRYPTO_DES=y
-CONFIG_CRYPTO_FCRYPT=y
-CONFIG_CRYPTO_BLOWFISH=y
-CONFIG_CRYPTO_TWOFISH=y
-CONFIG_CRYPTO_TWOFISH_COMMON=y
-CONFIG_CRYPTO_SERPENT=y
+CONFIG_CRYPTO_WP512=y
+
+#
+# Ciphers
+#
 CONFIG_CRYPTO_AES=y
+CONFIG_CRYPTO_ANUBIS=y
+CONFIG_CRYPTO_ARC4=y
+CONFIG_CRYPTO_BLOWFISH=y
+CONFIG_CRYPTO_CAMELLIA=y
 CONFIG_CRYPTO_CAST5=y
 CONFIG_CRYPTO_CAST6=y
-CONFIG_CRYPTO_TEA=y
-CONFIG_CRYPTO_ARC4=y
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_FCRYPT=y
 CONFIG_CRYPTO_KHAZAD=y
-CONFIG_CRYPTO_ANUBIS=y
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_SERPENT=y
+CONFIG_CRYPTO_TEA=y
+CONFIG_CRYPTO_TWOFISH=y
+CONFIG_CRYPTO_TWOFISH_COMMON=y
+
+#
+# Compression
+#
 CONFIG_CRYPTO_DEFLATE=y
-CONFIG_CRYPTO_MICHAEL_MIC=y
-CONFIG_CRYPTO_CRC32C=y
-CONFIG_CRYPTO_CAMELLIA=y
+# CONFIG_CRYPTO_LZO is not set
 
 #
-# Hardware crypto devices
+# Random Number Generation
 #
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+CONFIG_CRYPTO_HW=y
+# CONFIG_CRYPTO_DEV_HIFN_795X is not set
 
 #
 # Library routines
@@ -1052,10 +1235,15 @@ CONFIG_CRYPTO_CAMELLIA=y
 CONFIG_BITREVERSE=y
 # CONFIG_CRC_CCITT is not set
 CONFIG_CRC16=y
+CONFIG_CRC_T10DIF=y
+CONFIG_CRC_ITU_T=m
 CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
 CONFIG_LIBCRC32C=y
+CONFIG_AUDIT_GENERIC=y
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
 CONFIG_PLIST=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
index 7a881755800f94a4be165b989a9f2f54fb6ffaa1..6c8342ae74db88cd3187d1964274aa03c6031165 100644 (file)
        mtc0    \reg, CP0_TCSTATUS
        _ehb
        .endm
+#elif defined(CONFIG_CPU_MIPSR2)
+       .macro  local_irq_enable reg=t0
+       ei
+       irq_enable_hazard
+       .endm
+
+       .macro  local_irq_disable reg=t0
+       di
+       irq_disable_hazard
+       .endm
 #else
        .macro  local_irq_enable reg=t0
        mfc0    \reg, CP0_STATUS
index 2988d29a0867f4c0ce187040e710e3c87344030d..33790b9e0cc0d46ee41f0ec8d3f3dbf181c8a9fc 100644 (file)
@@ -50,9 +50,8 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
 static inline __attribute_const__ __u64 __arch_swab64(__u64 x)
 {
        __asm__(
-       "       dsbh    %0, %1                  \n"
-       "       dshd    %0, %0                  \n"
-       "       drotr   %0, %0, 32              \n"
+       "       dsbh    %0, %1\n"
+       "       dshd    %0, %0"
        : "=r" (x)
        : "r" (x));
 
index a8eac1697b3ddcf05dccc71d42267c549cc40904..d58f128aa747be974ac10ffd5fb1749d3292f505 100644 (file)
@@ -232,7 +232,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
  */
 #ifdef __MIPSEB__
 #define ELF_DATA       ELFDATA2MSB
-#elif __MIPSEL__
+#elif defined(__MIPSEL__)
 #define ELF_DATA       ELFDATA2LSB
 #endif
 #define ELF_ARCH       EM_MIPS
index 5b98d0e731c2238ae0f8ff64d3a3d139aa4ef562..e6708b3ad343f478e15a7d1102a90df2c7f61841 100644 (file)
@@ -111,6 +111,7 @@ EXPORT_SYMBOL(dma_alloc_coherent);
 void dma_free_noncoherent(struct device *dev, size_t size, void *vaddr,
        dma_addr_t dma_handle)
 {
+       plat_unmap_dma_mem(dma_handle);
        free_pages((unsigned long) vaddr, get_order(size));
 }
 
@@ -121,6 +122,8 @@ void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
 {
        unsigned long addr = (unsigned long) vaddr;
 
+       plat_unmap_dma_mem(dma_handle);
+
        if (!plat_device_is_coherent(dev))
                addr = CAC_ADDR(addr);
 
index b72ec66db699e56f0985ebd6d88d82a7ceb14411..1f6fd4fc05b91b518f4f574b3ada13ddd24b285a 100644 (file)
@@ -44,9 +44,12 @@ static inline void flush_tlb_mm(struct mm_struct *mm)
 {
        BUG_ON(mm == &init_mm); /* Should never happen */
 
-#ifdef CONFIG_SMP
+#if 1 || defined(CONFIG_SMP)
        flush_tlb_all();
 #else
+       /* FIXME: currently broken, causing space id and protection ids
+        *  to go out of sync, resulting in faults on userspace accesses.
+        */
        if (mm) {
                if (mm->context != 0)
                        free_sid(mm->context);
index 8fc6d72849ae435c095ec75a94acb677f0815d5e..3d3daa674299038072e3d8e7f2d36f3181b5cb1f 100644 (file)
@@ -41,6 +41,7 @@ $(obj)/4xx.o: BOOTCFLAGS += -mcpu=405
 $(obj)/ebony.o: BOOTCFLAGS += -mcpu=405
 $(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=405
 $(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=405
+$(obj)/cuboot-acadia.o: BOOTCFLAGS += -mcpu=405
 $(obj)/treeboot-walnut.o: BOOTCFLAGS += -mcpu=405
 $(obj)/virtex405-head.o: BOOTAFLAGS += -mcpu=405
 
index bdc8b0e860e5e1b25cc3dafe23455ec1a738812b..5c33bc14bd9fe161a75d7c12bc6809e77cba5a93 100644 (file)
@@ -479,17 +479,20 @@ _GLOBAL(_tlbil_pid)
  * (no broadcast)
  */
 _GLOBAL(_tlbil_va)
+       mfmsr   r10
+       wrteei  0
        slwi    r4,r4,16
        mtspr   SPRN_MAS6,r4            /* assume AS=0 for now */
        tlbsx   0,r3
        mfspr   r4,SPRN_MAS1            /* check valid */
        andis.  r3,r4,MAS1_VALID@h
-       beqlr
+       beq     1f
        rlwinm  r4,r4,0,1,31
        mtspr   SPRN_MAS1,r4
        tlbwe
        msync
        isync
+1:     wrtee   r10
        blr
 #endif /* CONFIG_FSL_BOOKE */
 
index 29b2941cada0b67ac5be0248c2a1321179bf19a6..45907c1dae66da343344b5e1cfe9c682afc409ff 100644 (file)
@@ -556,6 +556,7 @@ unsigned long rh_alloc_fixed(rh_info_t * info, unsigned long start, int size, co
                be = blk->start + blk->size;
                if (s >= bs && e <= be)
                        break;
+               blk = NULL;
        }
 
        if (blk == NULL)
index 7bbf4e4ed4306b3a395906b6307808df326fb7cf..f0c3b88d50fa5a5f98847bd1914be1881885af9d 100644 (file)
@@ -507,6 +507,9 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
 {
        struct hstate *hstate = hstate_file(file);
        int mmu_psize = shift_to_mmu_psize(huge_page_shift(hstate));
+
+       if (!mmu_huge_psizes[mmu_psize])
+               return -EINVAL;
        return slice_get_unmapped_area(addr, len, flags, mmu_psize, 1, 0);
 }
 
index a8397bbad3d4d54a5cd50ae9ee201118c767d1d4..cf81049e1e51a0ce98d0ebdf9b7a74d5901de211 100644 (file)
@@ -901,10 +901,17 @@ static void mark_reserved_regions_for_nid(int nid)
                        if (end_pfn > node_ar.end_pfn)
                                reserve_size = (node_ar.end_pfn << PAGE_SHIFT)
                                        - (start_pfn << PAGE_SHIFT);
-                       dbg("reserve_bootmem %lx %lx nid=%d\n", physbase,
-                               reserve_size, node_ar.nid);
-                       reserve_bootmem_node(NODE_DATA(node_ar.nid), physbase,
-                                               reserve_size, BOOTMEM_DEFAULT);
+                       /*
+                        * Only worry about *this* node, others may not
+                        * yet have valid NODE_DATA().
+                        */
+                       if (node_ar.nid == nid) {
+                               dbg("reserve_bootmem %lx %lx nid=%d\n",
+                                       physbase, reserve_size, node_ar.nid);
+                               reserve_bootmem_node(NODE_DATA(node_ar.nid),
+                                               physbase, reserve_size,
+                                               BOOTMEM_DEFAULT);
+                       }
                        /*
                         * if reserved region is contained in the active region
                         * then done.
@@ -929,7 +936,6 @@ static void mark_reserved_regions_for_nid(int nid)
 void __init do_init_bootmem(void)
 {
        int nid;
-       unsigned int i;
 
        min_low_pfn = 0;
        max_low_pfn = lmb_end_of_DRAM() >> PAGE_SHIFT;
index 442cf36aa172920b355710e65a68624d43293d33..0ce45c2b42f8eb67a1ea5156fcf476bdb3f3924a 100644 (file)
@@ -413,6 +413,9 @@ static int axon_msi_probe(struct of_device *device,
                        MSIC_CTRL_IRQ_ENABLE | MSIC_CTRL_ENABLE |
                        MSIC_CTRL_FIFO_SIZE);
 
+       msic->read_offset = dcr_read(msic->dcr_host, MSIC_WRITE_OFFSET_REG)
+                               & MSIC_FIFO_SIZE_MASK;
+
        device->dev.platform_data = msic;
 
        ppc_md.setup_msi_irqs = axon_msi_setup_msi_irqs;
index f4e55be2eea948548837177f432e893175960391..afad9f5ac0ac2190d1cb4e6685ca479b42b542a0 100644 (file)
@@ -208,6 +208,7 @@ void pSeries_log_error(char *buf, unsigned int err_type, int fatal)
                break;
        case ERR_TYPE_KERNEL_PANIC:
        default:
+               WARN_ON_ONCE(!irqs_disabled()); /* @@@ DEBUG @@@ */
                spin_unlock_irqrestore(&rtasd_log_lock, s);
                return;
        }
@@ -227,6 +228,7 @@ void pSeries_log_error(char *buf, unsigned int err_type, int fatal)
        /* Check to see if we need to or have stopped logging */
        if (fatal || !logging_enabled) {
                logging_enabled = 0;
+               WARN_ON_ONCE(!irqs_disabled()); /* @@@ DEBUG @@@ */
                spin_unlock_irqrestore(&rtasd_log_lock, s);
                return;
        }
@@ -249,11 +251,13 @@ void pSeries_log_error(char *buf, unsigned int err_type, int fatal)
                else
                        rtas_log_start += 1;
 
+               WARN_ON_ONCE(!irqs_disabled()); /* @@@ DEBUG @@@ */
                spin_unlock_irqrestore(&rtasd_log_lock, s);
                wake_up_interruptible(&rtas_log_wait);
                break;
        case ERR_TYPE_KERNEL_PANIC:
        default:
+               WARN_ON_ONCE(!irqs_disabled()); /* @@@ DEBUG @@@ */
                spin_unlock_irqrestore(&rtasd_log_lock, s);
                return;
        }
index 80119b3398e7f2acb1f2a1091c247cb8193e947e..5c9cbfc14c4d5ad9ad06bf18f3a4b2f523eebd0b 100644 (file)
@@ -55,6 +55,8 @@ config GENERIC_HARDIRQS
 
 config GENERIC_HARDIRQS_NO__DO_IRQ
        def_bool y
+       depends on SUPERH32 && (!SH_DREAMCAST && !SH_SH4202_MICRODEV && \
+                               !SH_7751_SYSTEMH && !HD64461)
 
 config GENERIC_IRQ_PROBE
        def_bool y
index d409c4f21a5cdea420e75fef24a2ceec1cb0e834..4cef450167dd6ae697e7e429078979f2277f92fd 100644 (file)
@@ -62,6 +62,8 @@ struct sparc_stackf {
 
 #ifdef __KERNEL__
 
+#include <asm/system.h>
+
 static inline bool pt_regs_is_syscall(struct pt_regs *regs)
 {
        return (regs->psr & PSR_SYSCALL);
@@ -72,6 +74,14 @@ static inline bool pt_regs_clear_syscall(struct pt_regs *regs)
        return (regs->psr &= ~PSR_SYSCALL);
 }
 
+#define arch_ptrace_stop_needed(exit_code, info) \
+({     flush_user_windows(); \
+       current_thread_info()->w_saved != 0;    \
+})
+
+#define arch_ptrace_stop(exit_code, info) \
+       synchronize_user_stack()
+
 #define user_mode(regs) (!((regs)->psr & PSR_PS))
 #define instruction_pointer(regs) ((regs)->pc)
 #define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP])
index 84e969f06afe318d986a9890d130cbf26759b704..cd6fbfc2043533636dd16fec2918cf0a07124be1 100644 (file)
@@ -114,6 +114,7 @@ struct sparc_trapf {
 #ifdef __KERNEL__
 
 #include <linux/threads.h>
+#include <asm/system.h>
 
 static inline int pt_regs_trap_type(struct pt_regs *regs)
 {
@@ -130,6 +131,14 @@ static inline bool pt_regs_clear_syscall(struct pt_regs *regs)
        return (regs->tstate &= ~TSTATE_SYSCALL);
 }
 
+#define arch_ptrace_stop_needed(exit_code, info) \
+({     flush_user_windows(); \
+       get_thread_wsaved() != 0; \
+})
+
+#define arch_ptrace_stop(exit_code, info) \
+       synchronize_user_stack()
+
 struct global_reg_snapshot {
        unsigned long           tstate;
        unsigned long           tpc;
index 753346e2cdfd64d5d472f3388014952f5d0ca4ff..ae5f94d6317d584c051fbcea83533431e4b635d7 100644 (file)
@@ -11,21 +11,21 @@ extern int get_signals(void);
 extern void block_signals(void);
 extern void unblock_signals(void);
 
-#define local_save_flags(flags) do { typecheck(unsigned long, flags); \
+#define raw_local_save_flags(flags) do { typecheck(unsigned long, flags); \
                                     (flags) = get_signals(); } while(0)
-#define local_irq_restore(flags) do { typecheck(unsigned long, flags); \
+#define raw_local_irq_restore(flags) do { typecheck(unsigned long, flags); \
                                      set_signals(flags); } while(0)
 
-#define local_irq_save(flags) do { local_save_flags(flags); \
-                                   local_irq_disable(); } while(0)
+#define raw_local_irq_save(flags) do { raw_local_save_flags(flags); \
+                                   raw_local_irq_disable(); } while(0)
 
-#define local_irq_enable() unblock_signals()
-#define local_irq_disable() block_signals()
+#define raw_local_irq_enable() unblock_signals()
+#define raw_local_irq_disable() block_signals()
 
 #define irqs_disabled()                 \
 ({                                      \
         unsigned long flags;            \
-        local_save_flags(flags);        \
+        raw_local_save_flags(flags);        \
         (flags == 0);                   \
 })
 
index b815664fe3700b77aa031fab7711be4128c858d1..8e99073b9e0f2cad52d1346fd7a525c835681b1a 100644 (file)
@@ -520,6 +520,7 @@ config X86_PTRACE_BTS
        bool "Branch Trace Store"
        default y
        depends on X86_DEBUGCTLMSR
+       depends on BROKEN
        help
          This adds a ptrace interface to the hardware's branch trace store.
 
index 35c54921b2e434cdd95bbd223077f2b1155d0f1f..99192bb55a53bf68afc30efeae89b9b40b5f4b4d 100644 (file)
@@ -157,6 +157,7 @@ extern int __get_user_bad(void);
        int __ret_gu;                                                   \
        unsigned long __val_gu;                                         \
        __chk_user_ptr(ptr);                                            \
+       might_fault();                                                  \
        switch (sizeof(*(ptr))) {                                       \
        case 1:                                                         \
                __get_user_x(1, __ret_gu, __val_gu, ptr);               \
@@ -241,6 +242,7 @@ extern void __put_user_8(void);
        int __ret_pu;                                           \
        __typeof__(*(ptr)) __pu_val;                            \
        __chk_user_ptr(ptr);                                    \
+       might_fault();                                          \
        __pu_val = x;                                           \
        switch (sizeof(*(ptr))) {                               \
        case 1:                                                 \
index d095a3aeea1b44d3063f0165c956d0a156c6ca38..5e06259e90e5a736539948ae22e1de25444ba485 100644 (file)
@@ -82,8 +82,8 @@ __copy_to_user_inatomic(void __user *to, const void *from, unsigned long n)
 static __always_inline unsigned long __must_check
 __copy_to_user(void __user *to, const void *from, unsigned long n)
 {
-       might_sleep();
-       return __copy_to_user_inatomic(to, from, n);
+       might_fault();
+       return __copy_to_user_inatomic(to, from, n);
 }
 
 static __always_inline unsigned long
@@ -137,7 +137,7 @@ __copy_from_user_inatomic(void *to, const void __user *from, unsigned long n)
 static __always_inline unsigned long
 __copy_from_user(void *to, const void __user *from, unsigned long n)
 {
-       might_sleep();
+       might_fault();
        if (__builtin_constant_p(n)) {
                unsigned long ret;
 
@@ -159,7 +159,7 @@ __copy_from_user(void *to, const void __user *from, unsigned long n)
 static __always_inline unsigned long __copy_from_user_nocache(void *to,
                                const void __user *from, unsigned long n)
 {
-       might_sleep();
+       might_fault();
        if (__builtin_constant_p(n)) {
                unsigned long ret;
 
index f8cfd00db450f2e0f948ce7128a2d44867aebf59..84210c479fca83524c6cef4c6bc069bcff76e272 100644 (file)
@@ -29,6 +29,8 @@ static __always_inline __must_check
 int __copy_from_user(void *dst, const void __user *src, unsigned size)
 {
        int ret = 0;
+
+       might_fault();
        if (!__builtin_constant_p(size))
                return copy_user_generic(dst, (__force void *)src, size);
        switch (size) {
@@ -71,6 +73,8 @@ static __always_inline __must_check
 int __copy_to_user(void __user *dst, const void *src, unsigned size)
 {
        int ret = 0;
+
+       might_fault();
        if (!__builtin_constant_p(size))
                return copy_user_generic((__force void *)dst, src, size);
        switch (size) {
@@ -113,6 +117,8 @@ static __always_inline __must_check
 int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
 {
        int ret = 0;
+
+       might_fault();
        if (!__builtin_constant_p(size))
                return copy_user_generic((__force void *)dst,
                                         (__force void *)src, size);
index b7c0dea119fed8f8ea62e520ecf1e504e65e05f0..61e08c0a290785c5527d9faf607c0c2ab2e384e2 100644 (file)
@@ -223,9 +223,15 @@ struct pci_header {
 } __attribute__((packed));
 
 /* Function prototypes for bootstrapping */
+#ifdef CONFIG_VMI
 extern void vmi_init(void);
+extern void vmi_activate(void);
 extern void vmi_bringup(void);
-extern void vmi_apply_boot_page_allocations(void);
+#else
+static inline void vmi_init(void) {}
+static inline void vmi_activate(void) {}
+static inline void vmi_bringup(void) {}
+#endif
 
 /* State needed to start an application processor in an SMP system. */
 struct vmi_ap_state {
index a7b6dec6fc3f4afc72f57651b1523156d415431b..0a60d60ed036b264e6d4c05174dfc3b464574852 100644 (file)
@@ -235,8 +235,9 @@ static int iommu_completion_wait(struct amd_iommu *iommu)
        status &= ~MMIO_STATUS_COM_WAIT_INT_MASK;
        writel(status, iommu->mmio_base + MMIO_STATUS_OFFSET);
 
-       if (unlikely((i == EXIT_LOOP_COUNT) && printk_ratelimit()))
-               printk(KERN_WARNING "AMD IOMMU: Completion wait loop failed\n");
+       if (unlikely(i == EXIT_LOOP_COUNT))
+               panic("AMD IOMMU: Completion wait loop failed\n");
+
 out:
        spin_unlock_irqrestore(&iommu->lock, flags);
 
index 30ae2701b3df1b8976400d5996ed72a4a98baeea..c6cc22815d35f232dd21fae7d2718a3c161b373c 100644 (file)
@@ -427,6 +427,10 @@ static u8 * __init alloc_command_buffer(struct amd_iommu *iommu)
        memcpy_toio(iommu->mmio_base + MMIO_CMD_BUF_OFFSET,
                        &entry, sizeof(entry));
 
+       /* set head and tail to zero manually */
+       writel(0x00, iommu->mmio_base + MMIO_CMD_HEAD_OFFSET);
+       writel(0x00, iommu->mmio_base + MMIO_CMD_TAIL_OFFSET);
+
        iommu_feature_enable(iommu, CONTROL_CMDBUF_EN);
 
        return cmd_buf;
@@ -1074,7 +1078,8 @@ int __init amd_iommu_init(void)
                goto free;
 
        /* IOMMU rlookup table - find the IOMMU for a specific device */
-       amd_iommu_rlookup_table = (void *)__get_free_pages(GFP_KERNEL,
+       amd_iommu_rlookup_table = (void *)__get_free_pages(
+                       GFP_KERNEL | __GFP_ZERO,
                        get_order(rlookup_table_size));
        if (amd_iommu_rlookup_table == NULL)
                goto free;
index 4b031a4ac8562d3ed69f14f0d750dfe8519a057e..1c838032fd3732fde9bff776cbb63a2821115d60 100644 (file)
@@ -510,12 +510,9 @@ static void __cpuinit mce_cpu_features(struct cpuinfo_x86 *c)
  */
 void __cpuinit mcheck_init(struct cpuinfo_x86 *c)
 {
-       static cpumask_t mce_cpus = CPU_MASK_NONE;
-
        mce_cpu_quirks(c);
 
        if (mce_dont_init ||
-           cpu_test_and_set(smp_processor_id(), mce_cpus) ||
            !mce_available(c))
                return;
 
index 82fb2809ce32208eacd7231c38597938031d4036..c4b5b24e0217c585cbb8d0f8011a8b6c87229a6f 100644 (file)
@@ -272,13 +272,18 @@ static struct attribute_group mc_attr_group = {
        .name = "microcode",
 };
 
-static void microcode_fini_cpu(int cpu)
+static void __microcode_fini_cpu(int cpu)
 {
        struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
 
-       mutex_lock(&microcode_mutex);
        microcode_ops->microcode_fini_cpu(cpu);
        uci->valid = 0;
+}
+
+static void microcode_fini_cpu(int cpu)
+{
+       mutex_lock(&microcode_mutex);
+       __microcode_fini_cpu(cpu);
        mutex_unlock(&microcode_mutex);
 }
 
@@ -306,12 +311,16 @@ static int microcode_resume_cpu(int cpu)
         * to this cpu (a bit of paranoia):
         */
        if (microcode_ops->collect_cpu_info(cpu, &nsig)) {
-               microcode_fini_cpu(cpu);
+               __microcode_fini_cpu(cpu);
+               printk(KERN_ERR "failed to collect_cpu_info for resuming cpu #%d\n",
+                               cpu);
                return -1;
        }
 
-       if (memcmp(&nsig, &uci->cpu_sig, sizeof(nsig))) {
-               microcode_fini_cpu(cpu);
+       if ((nsig.sig != uci->cpu_sig.sig) || (nsig.pf != uci->cpu_sig.pf)) {
+               __microcode_fini_cpu(cpu);
+               printk(KERN_ERR "cached ucode doesn't match the resuming cpu #%d\n",
+                               cpu);
                /* Should we look for a new ucode here? */
                return 1;
        }
index 622dc4a217848d1c8d16941796a4f82f868fc967..a8e62792d171c6c63645582441b3d9482fffcbac 100644 (file)
@@ -155,6 +155,7 @@ static DEFINE_SPINLOCK(microcode_update_lock);
 static int collect_cpu_info(int cpu_num, struct cpu_signature *csig)
 {
        struct cpuinfo_x86 *c = &cpu_data(cpu_num);
+       unsigned long flags;
        unsigned int val[2];
 
        memset(csig, 0, sizeof(*csig));
@@ -174,11 +175,16 @@ static int collect_cpu_info(int cpu_num, struct cpu_signature *csig)
                csig->pf = 1 << ((val[1] >> 18) & 7);
        }
 
+       /* serialize access to the physical write to MSR 0x79 */
+       spin_lock_irqsave(&microcode_update_lock, flags);
+
        wrmsr(MSR_IA32_UCODE_REV, 0, 0);
        /* see notes above for revision 1.07.  Apparent chip bug */
        sync_core();
        /* get the current revision from MSR 0x8B */
        rdmsr(MSR_IA32_UCODE_REV, val[0], csig->rev);
+       spin_unlock_irqrestore(&microcode_update_lock, flags);
+
        pr_debug("microcode: collect_cpu_info : sig=0x%x, pf=0x%x, rev=0x%x\n",
                        csig->sig, csig->pf, csig->rev);
 
index ba7ad83e20a8f80d5b0ca7de95d6c1c0fbe6b27c..a35eaa379ff632fb142367df58a8fdeaaad81267 100644 (file)
@@ -745,10 +745,8 @@ void __init gart_iommu_init(void)
        unsigned long scratch;
        long i;
 
-       if (cache_k8_northbridges() < 0 || num_k8_northbridges == 0) {
-               printk(KERN_INFO "PCI-GART: No AMD GART found.\n");
+       if (cache_k8_northbridges() < 0 || num_k8_northbridges == 0)
                return;
-       }
 
 #ifndef CONFIG_AGP_AMD64
        no_agp = 1;
index 9d5674f7b6ccbfbdef7f5ad16901f9dc9dc08ad0..bdec76e5559433d77366b85535f0563451614501 100644 (file)
@@ -794,6 +794,9 @@ void __init setup_arch(char **cmdline_p)
        printk(KERN_INFO "Command line: %s\n", boot_command_line);
 #endif
 
+       /* VMI may relocate the fixmap; do this before touching ioremap area */
+       vmi_init();
+
        early_cpu_init();
        early_ioremap_init();
 
@@ -880,13 +883,8 @@ void __init setup_arch(char **cmdline_p)
        check_efer();
 #endif
 
-#if defined(CONFIG_VMI) && defined(CONFIG_X86_32)
-       /*
-        * Must be before kernel pagetables are setup
-        * or fixmap area is touched.
-        */
-       vmi_init();
-#endif
+       /* Must be before kernel pagetables are setup */
+       vmi_activate();
 
        /* after early param, so could get panic from serial */
        reserve_early_setup_data();
index 7b1093397319766b2e4848a5a883b0dc35f49804..f71f96fc9e62ea8e4f027a78cb3aafcd96fdbf99 100644 (file)
@@ -294,9 +294,7 @@ static void __cpuinit start_secondary(void *unused)
         * fragile that we want to limit the things done here to the
         * most necessary things.
         */
-#ifdef CONFIG_VMI
        vmi_bringup();
-#endif
        cpu_init();
        preempt_disable();
        smp_callin();
index 8b6c393ab9fd14f06b86d9deb656b3643d9006f3..22fd6577156a9ac81453792185e3cc0a317d96d2 100644 (file)
@@ -960,8 +960,6 @@ static inline int __init activate_vmi(void)
 
 void __init vmi_init(void)
 {
-       unsigned long flags;
-
        if (!vmi_rom)
                probe_vmi_rom();
        else
@@ -973,13 +971,21 @@ void __init vmi_init(void)
 
        reserve_top_address(-vmi_rom->virtual_top);
 
-       local_irq_save(flags);
-       activate_vmi();
-
 #ifdef CONFIG_X86_IO_APIC
        /* This is virtual hardware; timer routing is wired correctly */
        no_timer_check = 1;
 #endif
+}
+
+void vmi_activate(void)
+{
+       unsigned long flags;
+
+       if (!vmi_rom)
+               return;
+
+       local_irq_save(flags);
+       activate_vmi();
        local_irq_restore(flags & X86_EFLAGS_IF);
 }
 
index 9e68075544f6dbb5e9a6fbc002e3a2df3091dc6c..4a20b2f9a381a360b46246c2c21c941258c1367a 100644 (file)
@@ -39,7 +39,7 @@ static inline int __movsl_is_ok(unsigned long a1, unsigned long a2, unsigned lon
 #define __do_strncpy_from_user(dst, src, count, res)                      \
 do {                                                                      \
        int __d0, __d1, __d2;                                              \
-       might_sleep();                                                     \
+       might_fault();                                                     \
        __asm__ __volatile__(                                              \
                "       testl %1,%1\n"                                     \
                "       jz 2f\n"                                           \
@@ -126,7 +126,7 @@ EXPORT_SYMBOL(strncpy_from_user);
 #define __do_clear_user(addr,size)                                     \
 do {                                                                   \
        int __d0;                                                       \
-       might_sleep();                                                  \
+       might_fault();                                                  \
        __asm__ __volatile__(                                           \
                "0:     rep; stosl\n"                                   \
                "       movl %2,%0\n"                                   \
@@ -155,7 +155,7 @@ do {                                                                        \
 unsigned long
 clear_user(void __user *to, unsigned long n)
 {
-       might_sleep();
+       might_fault();
        if (access_ok(VERIFY_WRITE, to, n))
                __do_clear_user(to, n);
        return n;
@@ -197,7 +197,7 @@ long strnlen_user(const char __user *s, long n)
        unsigned long mask = -__addr_ok(s);
        unsigned long res, tmp;
 
-       might_sleep();
+       might_fault();
 
        __asm__ __volatile__(
                "       testl %0, %0\n"
index f4df6e7c718be506a59ef157bda9591dfb1790a6..64d6c84e6353e9d50ce3d7f7cda6ee7178ca3494 100644 (file)
@@ -15,7 +15,7 @@
 #define __do_strncpy_from_user(dst,src,count,res)                         \
 do {                                                                      \
        long __d0, __d1, __d2;                                             \
-       might_sleep();                                                     \
+       might_fault();                                                     \
        __asm__ __volatile__(                                              \
                "       testq %1,%1\n"                                     \
                "       jz 2f\n"                                           \
@@ -64,7 +64,7 @@ EXPORT_SYMBOL(strncpy_from_user);
 unsigned long __clear_user(void __user *addr, unsigned long size)
 {
        long __d0;
-       might_sleep();
+       might_fault();
        /* no memory constraint because it doesn't change any memory gcc knows
           about */
        asm volatile(
index c029d3eb9ef0a76ed248deb4a40e47511ba12afe..595b78672b36ad90e27cf50ed28126bb43970fb5 100644 (file)
@@ -53,10 +53,17 @@ do_async_xor(struct dma_chan *chan, struct page *dest, struct page **src_list,
        int xor_src_cnt;
        dma_addr_t dma_dest;
 
-       dma_dest = dma_map_page(dma->dev, dest, offset, len, DMA_FROM_DEVICE);
-       for (i = 0; i < src_cnt; i++)
+       /* map the dest bidrectional in case it is re-used as a source */
+       dma_dest = dma_map_page(dma->dev, dest, offset, len, DMA_BIDIRECTIONAL);
+       for (i = 0; i < src_cnt; i++) {
+               /* only map the dest once */
+               if (unlikely(src_list[i] == dest)) {
+                       dma_src[i] = dma_dest;
+                       continue;
+               }
                dma_src[i] = dma_map_page(dma->dev, src_list[i], offset,
                                          len, DMA_TO_DEVICE);
+       }
 
        while (src_cnt) {
                async_flags = flags;
index 7edf6d913c1318fded1fd4cf6a448b2f799a0849..765fd1c56cd66bc445ab5228f562177b9eb469e1 100644 (file)
@@ -688,14 +688,6 @@ void __init acpi_early_init(void)
        if (acpi_disabled)
                return;
 
-       /*
-        * ACPI CA initializes acpi_dbg_level to non-zero, which means
-        * we get debug output merely by turning on CONFIG_ACPI_DEBUG.
-        * Turn it off so we don't get output unless the user specifies
-        * acpi.debug_level.
-        */
-       acpi_dbg_level = 0;
-
        printk(KERN_INFO PREFIX "Core revision %08x\n", ACPI_CA_VERSION);
 
        /* enable workarounds, unless strict ACPI spec. compliance */
index 25f531d892deacbb5082b0696f0ba460c48a5494..40e60fc2e596daead5c656396aa84fca0587868b 100644 (file)
@@ -824,32 +824,36 @@ static int __init toshiba_acpi_init(void)
                        toshiba_acpi_exit();
                        return -ENOMEM;
                }
-       }
 
-       /* Register input device for kill switch */
-       toshiba_acpi.poll_dev = input_allocate_polled_device();
-       if (!toshiba_acpi.poll_dev) {
-               printk(MY_ERR "unable to allocate kill-switch input device\n");
-               toshiba_acpi_exit();
-               return -ENOMEM;
-       }
-       toshiba_acpi.poll_dev->private = &toshiba_acpi;
-       toshiba_acpi.poll_dev->poll = bt_poll_rfkill;
-       toshiba_acpi.poll_dev->poll_interval = 1000; /* msecs */
-
-       toshiba_acpi.poll_dev->input->name = toshiba_acpi.rfk_name;
-       toshiba_acpi.poll_dev->input->id.bustype = BUS_HOST;
-       toshiba_acpi.poll_dev->input->id.vendor = 0x0930; /* Toshiba USB ID */
-       set_bit(EV_SW, toshiba_acpi.poll_dev->input->evbit);
-       set_bit(SW_RFKILL_ALL, toshiba_acpi.poll_dev->input->swbit);
-       input_report_switch(toshiba_acpi.poll_dev->input, SW_RFKILL_ALL, TRUE);
-       input_sync(toshiba_acpi.poll_dev->input);
-
-       ret = input_register_polled_device(toshiba_acpi.poll_dev);
-       if (ret) {
-               printk(MY_ERR "unable to register kill-switch input device\n");
-               toshiba_acpi_exit();
-               return ret;
+               /* Register input device for kill switch */
+               toshiba_acpi.poll_dev = input_allocate_polled_device();
+               if (!toshiba_acpi.poll_dev) {
+                       printk(MY_ERR
+                              "unable to allocate kill-switch input device\n");
+                       toshiba_acpi_exit();
+                       return -ENOMEM;
+               }
+               toshiba_acpi.poll_dev->private = &toshiba_acpi;
+               toshiba_acpi.poll_dev->poll = bt_poll_rfkill;
+               toshiba_acpi.poll_dev->poll_interval = 1000; /* msecs */
+
+               toshiba_acpi.poll_dev->input->name = toshiba_acpi.rfk_name;
+               toshiba_acpi.poll_dev->input->id.bustype = BUS_HOST;
+               /* Toshiba USB ID */
+               toshiba_acpi.poll_dev->input->id.vendor = 0x0930;
+               set_bit(EV_SW, toshiba_acpi.poll_dev->input->evbit);
+               set_bit(SW_RFKILL_ALL, toshiba_acpi.poll_dev->input->swbit);
+               input_report_switch(toshiba_acpi.poll_dev->input,
+                                   SW_RFKILL_ALL, TRUE);
+               input_sync(toshiba_acpi.poll_dev->input);
+
+               ret = input_register_polled_device(toshiba_acpi.poll_dev);
+               if (ret) {
+                       printk(MY_ERR
+                              "unable to register kill-switch input device\n");
+                       toshiba_acpi_exit();
+                       return ret;
+               }
        }
 
        return 0;
index 670551b95e56e44fecfc075d9cbd5255a2aebc55..17ed5ac840f7be1d65c37acb967a29e4e9bc4965 100644 (file)
@@ -64,7 +64,7 @@ u32 acpi_dbg_level = ACPI_DEBUG_DEFAULT;
 
 /* Debug switch - layer (component) mask */
 
-u32 acpi_dbg_layer = ACPI_COMPONENT_DEFAULT | ACPI_ALL_DRIVERS;
+u32 acpi_dbg_layer = 0;
 u32 acpi_gbl_nesting_level = 0;
 
 /* Debugger globals */
index 5e2eb740df46cff3ddb41d434b4e41a3c67cbb8b..bc6695e3c8482927e5b6de7ae4017c9884bea4a8 100644 (file)
@@ -4050,17 +4050,70 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
        { "ST3160023AS",        "3.42",         ATA_HORKAGE_NONCQ },
 
        /* Seagate NCQ + FLUSH CACHE firmware bug */
-       { "ST31500341AS",       "9JU138",       ATA_HORKAGE_NONCQ |
+       { "ST31500341AS",       "SD15",         ATA_HORKAGE_NONCQ |
                                                ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST31000333AS",       "9FZ136",       ATA_HORKAGE_NONCQ |
+       { "ST31500341AS",       "SD16",         ATA_HORKAGE_NONCQ |
                                                ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST3640623AS",        "9FZ164",       ATA_HORKAGE_NONCQ |
+       { "ST31500341AS",       "SD17",         ATA_HORKAGE_NONCQ |
                                                ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST3640323AS",        "9FZ134",       ATA_HORKAGE_NONCQ |
+       { "ST31500341AS",       "SD18",         ATA_HORKAGE_NONCQ |
                                                ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST3320813AS",        "9FZ182",       ATA_HORKAGE_NONCQ |
+       { "ST31500341AS",       "SD19",         ATA_HORKAGE_NONCQ |
                                                ATA_HORKAGE_FIRMWARE_WARN },
-       { "ST3320613AS",        "9FZ162",       ATA_HORKAGE_NONCQ |
+
+       { "ST31000333AS",       "SD15",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST31000333AS",       "SD16",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST31000333AS",       "SD17",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST31000333AS",       "SD18",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST31000333AS",       "SD19",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+
+       { "ST3640623AS",        "SD15",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640623AS",        "SD16",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640623AS",        "SD17",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640623AS",        "SD18",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640623AS",        "SD19",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+
+       { "ST3640323AS",        "SD15",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640323AS",        "SD16",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640323AS",        "SD17",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640323AS",        "SD18",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3640323AS",        "SD19",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+
+       { "ST3320813AS",        "SD15",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320813AS",        "SD16",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320813AS",        "SD17",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320813AS",        "SD18",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320813AS",        "SD19",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+
+       { "ST3320613AS",        "SD15",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320613AS",        "SD16",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320613AS",        "SD17",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320613AS",        "SD18",         ATA_HORKAGE_NONCQ |
+                                               ATA_HORKAGE_FIRMWARE_WARN },
+       { "ST3320613AS",        "SD19",         ATA_HORKAGE_NONCQ |
                                                ATA_HORKAGE_FIRMWARE_WARN },
 
        /* Blacklist entries taken from Silicon Image 3124/3132
index a098ba8eaab6141ed52ec9e90666cbe0b8081cc3..e0c4f05d7d579a807becb30af2bf44b3a9ea7260 100644 (file)
@@ -183,7 +183,9 @@ static unsigned long hpt366_filter(struct ata_device *adev, unsigned long mask)
                        mask &= ~(0xF8 << ATA_SHIFT_UDMA);
                if (hpt_dma_blacklisted(adev, "UDMA4", bad_ata66_4))
                        mask &= ~(0xF0 << ATA_SHIFT_UDMA);
-       }
+       } else if (adev->class == ATA_DEV_ATAPI)
+               mask &= ~(ATA_MASK_MWDMA | ATA_MASK_UDMA);
+
        return ata_bmdma_mode_filter(adev, mask);
 }
 
@@ -211,11 +213,15 @@ static u32 hpt36x_find_mode(struct ata_port *ap, int speed)
 
 static int hpt36x_cable_detect(struct ata_port *ap)
 {
-       u8 ata66;
        struct pci_dev *pdev = to_pci_dev(ap->host->dev);
+       u8 ata66;
 
+       /*
+        * Each channel of pata_hpt366 occupies separate PCI function
+        * as the primary channel and bit1 indicates the cable type.
+        */
        pci_read_config_byte(pdev, 0x5A, &ata66);
-       if (ata66 & (1 << ap->port_no))
+       if (ata66 & 2)
                return ATA_CBL_PATA40;
        return ATA_CBL_PATA80;
 }
index 9364dc554257e5af44a3a4a2aff7fc3f6598fa27..9f7c543cc04b265344b0e37443c4349147e88574 100644 (file)
@@ -1693,6 +1693,11 @@ static int rebuild_lun_table(ctlr_info_t *h, int first_time)
        for (i = 0; i <= h->highest_lun; i++) {
                int j;
                drv_found = 0;
+
+               /* skip holes in the array from already deleted drives */
+               if (h->drv[i].raid_level == -1)
+                       continue;
+
                for (j = 0; j < num_luns; j++) {
                        memcpy(&lunid, &ld_buff->LUN[j][0], 4);
                        lunid = le32_to_cpu(lunid);
index d16b02423d6192f43ad8121776ca419f08cc01c2..7d2e91cccb13e99068a4499bc469ef9bc032c67b 100644 (file)
@@ -2081,10 +2081,6 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf,
        if (!q)
                return -ENXIO;
 
-       rq = blk_get_request(q, READ, GFP_KERNEL);
-       if (!rq)
-               return -ENOMEM;
-
        cdi->last_sense = 0;
 
        while (nframes) {
@@ -2096,9 +2092,17 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf,
 
                len = nr * CD_FRAMESIZE_RAW;
 
+               rq = blk_get_request(q, READ, GFP_KERNEL);
+               if (!rq) {
+                       ret = -ENOMEM;
+                       break;
+               }
+
                ret = blk_rq_map_user(q, rq, NULL, ubuf, len, GFP_KERNEL);
-               if (ret)
+               if (ret) {
+                       blk_put_request(rq);
                        break;
+               }
 
                rq->cmd[0] = GPCMD_READ_CD;
                rq->cmd[1] = 1 << 2;
@@ -2124,6 +2128,7 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf,
 
                if (blk_rq_unmap_user(bio))
                        ret = -EFAULT;
+               blk_put_request(rq);
 
                if (ret)
                        break;
@@ -2133,7 +2138,6 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf,
                ubuf += len;
        }
 
-       blk_put_request(rq);
        return ret;
 }
 
index 1f06889a96b97e033bdaa294dece945eb8310cc4..bc6163484f62573389fcdcc0388f62270e6bbf53 100644 (file)
@@ -27,7 +27,7 @@
 0x0c   U+2640
 0x0d   U+266a
 0x0e   U+266b
-0x0f   U+263c
+0x0f   U+263c U+00a4
 0x10   U+25b6 U+25ba
 0x11   U+25c0 U+25c4
 0x12   U+2195
@@ -55,7 +55,7 @@
 0x24   U+0024
 0x25   U+0025
 0x26   U+0026
-0x27   U+0027
+0x27   U+0027 U+00b4
 0x28   U+0028
 0x29   U+0029
 0x2a   U+002a
@@ -84,7 +84,7 @@
 0x41   U+0041 U+00c0 U+00c1 U+00c2 U+00c3
 0x42   U+0042
 0x43   U+0043 U+00a9
-0x44   U+0044
+0x44   U+0044 U+00d0
 0x45   U+0045 U+00c8 U+00ca U+00cb
 0x46   U+0046
 0x47   U+0047
 0x79   U+0079 U+00fd
 0x7a   U+007a
 0x7b   U+007b
-0x7c   U+007c U+00a5
+0x7c   U+007c U+00a6
 0x7d   U+007d
 0x7e   U+007e
 #
 0xe8   U+03a6 U+00d8
 0xe9   U+0398
 0xea   U+03a9 U+2126
-0xeb   U+03b4
+0xeb   U+03b4 U+00f0
 0xec   U+221e
 0xed   U+03c6 U+00f8
-0xee   U+03b5
+0xee   U+03b5 U+2208
 0xef   U+2229
 0xf0   U+2261
 0xf1   U+00b1
index a5af6072e2b34760ade3cf63b879dd16f4015957..008176edbd64511148ac5e1e40d21d3fbf1883d5 100644 (file)
@@ -2274,7 +2274,7 @@ rescan_last_byte:
                                    continue; /* nothing to display */
                                }
                                /* Glyph not found */
-                               if ((!(vc->vc_utf && !vc->vc_disp_ctrl) || c < 128) && !(c & ~charmask)) {
+                               if ((!(vc->vc_utf && !vc->vc_disp_ctrl) && c < 128) && !(c & ~charmask)) {
                                    /* In legacy mode use the glyph we get by a 1:1 mapping.
                                       This would make absolutely no sense with Unicode in mind,
                                       but do this for ASCII characters since a font may lack
index aa7f7962a9a0e678b0e3cdfdd9da1058c3798d14..05d897764f027489a346774cedc0ded600f28d2c 100644 (file)
@@ -21,9 +21,6 @@
  *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  *     FOR A PARTICULAR PURPOSE.
  *
- *     Xilinx products are not intended for use in life support appliances,
- *     devices, or systems. Use in such applications is expressly prohibited.
- *
  *     (c) Copyright 2003-2008 Xilinx Inc.
  *     All rights reserved.
  *
index 8b0252bf06e221ea89a0b9b6b3f89f0eda301722..d4f419ee87abbfc6fb0d41fd98ab8665524514cf 100644 (file)
@@ -21,9 +21,6 @@
  *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  *     FOR A PARTICULAR PURPOSE.
  *
- *     Xilinx products are not intended for use in life support appliances,
- *     devices, or systems. Use in such applications is expressly prohibited.
- *
  *     (c) Copyright 2003-2008 Xilinx Inc.
  *     All rights reserved.
  *
index 776b505284783cc0f128763a65925c9dbbd622e1..02225eb19cf6bd2e6d99085b6edea7aa4801c30b 100644 (file)
@@ -21,9 +21,6 @@
  *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  *     FOR A PARTICULAR PURPOSE.
  *
- *     Xilinx products are not intended for use in life support appliances,
- *     devices, or systems. Use in such applications is expressly prohibited.
- *
  *     (c) Copyright 2007-2008 Xilinx Inc.
  *     All rights reserved.
  *
index 62bda453c90b8a6101e91d11f00ec24406ab48b4..4c9dd9a3b62ac4b0266389141a4f66b9e2e34fd6 100644 (file)
@@ -21,9 +21,6 @@
  *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  *     FOR A PARTICULAR PURPOSE.
  *
- *     Xilinx products are not intended for use in life support appliances,
- *     devices, or systems. Use in such applications is expressly prohibited.
- *
  *     (c) Copyright 2007-2008 Xilinx Inc.
  *     All rights reserved.
  *
index d16131949097696cc8a72d2d07ae6a393094ebb7..f40ab699860f4645a693f76a239473812e767493 100644 (file)
@@ -21,9 +21,6 @@
  *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  *     FOR A PARTICULAR PURPOSE.
  *
- *     Xilinx products are not intended for use in life support appliances,
- *     devices, or systems. Use in such applications is expressly prohibited.
- *
  *     (c) Copyright 2002 Xilinx Inc., Systems Engineering Group
  *     (c) Copyright 2004 Xilinx Inc., Systems Engineering Group
  *     (c) Copyright 2007-2008 Xilinx Inc.
index 24d0d9b938fb39e485c56d9e74d1d9ff6effa5e6..8cca11981c5ff73036eaaeb915fbcf0a050a87c5 100644 (file)
@@ -21,9 +21,6 @@
  *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  *     FOR A PARTICULAR PURPOSE.
  *
- *     Xilinx products are not intended for use in life support appliances,
- *     devices, or systems. Use in such applications is expressly prohibited.
- *
  *     (c) Copyright 2003-2007 Xilinx Inc.
  *     All rights reserved.
  *
index 5317e08221ecb2a34e699c77bac4f72a505f59e6..657996517374f30f51f10257dd0ef0ee40ae66b9 100644 (file)
@@ -388,7 +388,10 @@ int dma_async_device_register(struct dma_device *device)
 
        init_completion(&device->done);
        kref_init(&device->refcount);
+
+       mutex_lock(&dma_list_mutex);
        device->dev_id = id++;
+       mutex_unlock(&dma_list_mutex);
 
        /* represent channels in sysfs. Probably want devs too */
        list_for_each_entry(chan, &device->channels, device_node) {
index ecd743f7cc617b9921b7d08e553da0264d8c401c..6607fdd00b1cd3a31655cc6b53fca580919f3354 100644 (file)
@@ -1341,10 +1341,12 @@ static void ioat_dma_start_null_desc(struct ioat_dma_chan *ioat_chan)
  */
 #define IOAT_TEST_SIZE 2000
 
+DECLARE_COMPLETION(test_completion);
 static void ioat_dma_test_callback(void *dma_async_param)
 {
        printk(KERN_ERR "ioatdma: ioat_dma_test_callback(%p)\n",
                dma_async_param);
+       complete(&test_completion);
 }
 
 /**
@@ -1410,7 +1412,8 @@ static int ioat_dma_self_test(struct ioatdma_device *device)
                goto free_resources;
        }
        device->common.device_issue_pending(dma_chan);
-       msleep(1);
+
+       wait_for_completion_timeout(&test_completion, msecs_to_jiffies(3000));
 
        if (device->common.device_is_tx_complete(dma_chan, cookie, NULL, NULL)
                                        != DMA_SUCCESS) {
index c7a9306d951d2c61f622c601ef2d49af422b679e..6be3172622009ff67ec502b049f167d6ccebe1cd 100644 (file)
@@ -85,18 +85,28 @@ iop_adma_run_tx_complete_actions(struct iop_adma_desc_slot *desc,
                        enum dma_ctrl_flags flags = desc->async_tx.flags;
                        u32 src_cnt;
                        dma_addr_t addr;
+                       dma_addr_t dest;
 
+                       src_cnt = unmap->unmap_src_cnt;
+                       dest = iop_desc_get_dest_addr(unmap, iop_chan);
                        if (!(flags & DMA_COMPL_SKIP_DEST_UNMAP)) {
-                               addr = iop_desc_get_dest_addr(unmap, iop_chan);
-                               dma_unmap_page(dev, addr, len, DMA_FROM_DEVICE);
+                               enum dma_data_direction dir;
+
+                               if (src_cnt > 1) /* is xor? */
+                                       dir = DMA_BIDIRECTIONAL;
+                               else
+                                       dir = DMA_FROM_DEVICE;
+
+                               dma_unmap_page(dev, dest, len, dir);
                        }
 
                        if (!(flags & DMA_COMPL_SKIP_SRC_UNMAP)) {
-                               src_cnt = unmap->unmap_src_cnt;
                                while (src_cnt--) {
                                        addr = iop_desc_get_src_addr(unmap,
                                                                     iop_chan,
                                                                     src_cnt);
+                                       if (addr == dest)
+                                               continue;
                                        dma_unmap_page(dev, addr, len,
                                                       DMA_TO_DEVICE);
                                }
index 0328da020a1084e6c7f0fcfd0e729a00e079702d..bcda17426411ea6f4c311aa5b077a1e91e906b63 100644 (file)
@@ -311,17 +311,26 @@ mv_xor_run_tx_complete_actions(struct mv_xor_desc_slot *desc,
                        enum dma_ctrl_flags flags = desc->async_tx.flags;
                        u32 src_cnt;
                        dma_addr_t addr;
+                       dma_addr_t dest;
 
+                       src_cnt = unmap->unmap_src_cnt;
+                       dest = mv_desc_get_dest_addr(unmap);
                        if (!(flags & DMA_COMPL_SKIP_DEST_UNMAP)) {
-                               addr = mv_desc_get_dest_addr(unmap);
-                               dma_unmap_page(dev, addr, len, DMA_FROM_DEVICE);
+                               enum dma_data_direction dir;
+
+                               if (src_cnt > 1) /* is xor ? */
+                                       dir = DMA_BIDIRECTIONAL;
+                               else
+                                       dir = DMA_FROM_DEVICE;
+                               dma_unmap_page(dev, dest, len, dir);
                        }
 
                        if (!(flags & DMA_COMPL_SKIP_SRC_UNMAP)) {
-                               src_cnt = unmap->unmap_src_cnt;
                                while (src_cnt--) {
                                        addr = mv_desc_get_src_addr(unmap,
                                                                    src_cnt);
+                                       if (addr == dest)
+                                               continue;
                                        dma_unmap_page(dev, addr, len,
                                                       DMA_TO_DEVICE);
                                }
index 5fcd3d89c75d91cda65acd42fe34be8d987e9c67..4041e91432837b2d2cc9b898e10f04f20cc778ce 100644 (file)
@@ -394,6 +394,12 @@ static void edac_device_workq_function(struct work_struct *work_req)
 
        mutex_lock(&device_ctls_mutex);
 
+       /* If we are being removed, bail out immediately */
+       if (edac_dev->op_state == OP_OFFLINE) {
+               mutex_unlock(&device_ctls_mutex);
+               return;
+       }
+
        /* Only poll controllers that are running polled and have a check */
        if ((edac_dev->op_state == OP_RUNNING_POLL) &&
                (edac_dev->edac_check != NULL)) {
@@ -585,14 +591,14 @@ struct edac_device_ctl_info *edac_device_del_device(struct device *dev)
        /* mark this instance as OFFLINE */
        edac_dev->op_state = OP_OFFLINE;
 
-       /* clear workq processing on this instance */
-       edac_device_workq_teardown(edac_dev);
-
        /* deregister from global list */
        del_edac_device_from_global_list(edac_dev);
 
        mutex_unlock(&device_ctls_mutex);
 
+       /* clear workq processing on this instance */
+       edac_device_workq_teardown(edac_dev);
+
        /* Tear down the sysfs entries for this instance */
        edac_device_remove_sysfs(edac_dev);
 
index 553dd4bc307547cc1ac4928209c7f8b3423ce8a3..afa8a12cd00902c1c34ea4f4ba83e55c3b7a74e2 100644 (file)
@@ -717,7 +717,7 @@ static int i915_getparam(struct drm_device *dev, void *data,
                value = dev->pci_device;
                break;
        case I915_PARAM_HAS_GEM:
-               value = 1;
+               value = dev_priv->has_gem;
                break;
        default:
                DRM_ERROR("Unknown parameter %d\n", param->param);
@@ -830,6 +830,14 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
 
        dev_priv->regs = ioremap(base, size);
 
+#ifdef CONFIG_HIGHMEM64G
+       /* don't enable GEM on PAE - needs agp + set_memory_* interface fixes */
+       dev_priv->has_gem = 0;
+#else
+       /* enable GEM by default */
+       dev_priv->has_gem = 1;
+#endif
+
        i915_gem_load(dev);
 
        /* Init HWS */
index adc972cc6bfc03a28038841b2f6a43ff578e0fb3..b3cc4731aa7c07b43d2d9825068f3e8a70ce34bd 100644 (file)
@@ -106,6 +106,8 @@ struct intel_opregion {
 typedef struct drm_i915_private {
        struct drm_device *dev;
 
+       int has_gem;
+
        void __iomem *regs;
        drm_local_map_t *sarea;
 
index ad672d8548289b8e7a934123d2ff4878f272b6e0..24fe8c10b4b22c6bac1cfa17d79d55f02dd59179 100644 (file)
@@ -2309,7 +2309,14 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data,
        }
 
        obj_priv = obj->driver_private;
-       args->busy = obj_priv->active;
+       /* Don't count being on the flushing list against the object being
+        * done.  Otherwise, a buffer left on the flushing list but not getting
+        * flushed (because nobody's flushing that domain) won't ever return
+        * unbusy and get reused by libdrm's bo cache.  The other expected
+        * consumer of this interface, OpenGL's occlusion queries, also specs
+        * that the objects get unbusy "eventually" without any interference.
+        */
+       args->busy = obj_priv->active && obj_priv->last_rendering_seqno != 0;
 
        drm_gem_object_unreference(obj);
        mutex_unlock(&dev->struct_mutex);
index 99be11418ac2dcecf8b3718ca5e8ba82478dc0b1..8289e16419a8d24566559223489037860809ec54 100644 (file)
@@ -44,7 +44,7 @@ void radeon_irq_set_state(struct drm_device *dev, u32 mask, int state)
        else
                dev_priv->irq_enable_reg &= ~mask;
 
-       if (!dev->irq_enabled)
+       if (dev->irq_enabled)
                RADEON_WRITE(RADEON_GEN_INT_CNTL, dev_priv->irq_enable_reg);
 }
 
@@ -57,7 +57,7 @@ static void r500_vbl_irq_set_state(struct drm_device *dev, u32 mask, int state)
        else
                dev_priv->r500_disp_irq_reg &= ~mask;
 
-       if (!dev->irq_enabled)
+       if (dev->irq_enabled)
                RADEON_WRITE(R500_DxMODE_INT_MASK, dev_priv->r500_disp_irq_reg);
 }
 
index 228f75723063968c4e77fbb374e5421e5c87e393..3fcf78e906db185187d10c87466786fb3c3280c2 100644 (file)
@@ -365,6 +365,7 @@ static int cpm_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
                pmsg = &msgs[tptr];
                if (pmsg->flags & I2C_M_RD)
                        ret = wait_event_interruptible_timeout(cpm->i2c_wait,
+                               (in_be16(&tbdf[tptr].cbd_sc) & BD_SC_NAK) ||
                                !(in_be16(&rbdf[rptr].cbd_sc) & BD_SC_EMPTY),
                                1 * HZ);
                else
index f4d22ae9d294a48fb69e1f53e4f46d5d496f7ce7..e5a8dae4a2890435f065e2b97017b83179647bcc 100644 (file)
@@ -92,7 +92,7 @@ static void highlander_i2c_setup(struct highlander_i2c_dev *dev)
 static void smbus_write_data(u8 *src, u16 *dst, int len)
 {
        for (; len > 1; len -= 2) {
-               *dst++ = be16_to_cpup((u16 *)src);
+               *dst++ = be16_to_cpup((__be16 *)src);
                src += 2;
        }
 
@@ -103,7 +103,7 @@ static void smbus_write_data(u8 *src, u16 *dst, int len)
 static void smbus_read_data(u16 *src, u8 *dst, int len)
 {
        for (; len > 1; len -= 2) {
-               *(u16 *)dst = cpu_to_be16p(src++);
+               *(__be16 *)dst = cpu_to_be16p(src++);
                dst += 2;
        }
 
index dcf2045b5222b44aac99b568f7170701ecf0ae78..0bdb2d7f0570bd465e59b4b87ef23dd33db04b1d 100644 (file)
@@ -486,7 +486,7 @@ static enum pmcmsptwi_xfer_result pmcmsptwi_xfer_cmd(
 
        if (cmd->type == MSP_TWI_CMD_WRITE ||
            cmd->type == MSP_TWI_CMD_WRITE_READ) {
-               __be64 tmp = cpu_to_be64p((u64 *)cmd->write_data);
+               u64 tmp = be64_to_cpup((__be64 *)cmd->write_data);
                tmp >>= (MSP_MAX_BYTES_PER_RW - cmd->write_len) * 8;
                dev_dbg(&pmcmsptwi_adapter.dev, "Writing 0x%016llx\n", tmp);
                pmcmsptwi_writel(tmp & 0x00000000ffffffffLL,
index 1fac4e233133879c8b06b07045c5318d87b91840..b7434d24904ebfa9750d655df8ab42f521ec2c40 100644 (file)
@@ -56,6 +56,7 @@ enum s3c24xx_i2c_state {
 struct s3c24xx_i2c {
        spinlock_t              lock;
        wait_queue_head_t       wait;
+       unsigned int            suspended:1;
 
        struct i2c_msg          *msg;
        unsigned int            msg_num;
@@ -507,7 +508,7 @@ static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c, struct i2c_msg *msgs, int
        unsigned long timeout;
        int ret;
 
-       if (!(readl(i2c->regs + S3C2410_IICCON) & S3C2410_IICCON_IRQEN))
+       if (i2c->suspended)
                return -EIO;
 
        ret = s3c24xx_i2c_set_master(i2c);
@@ -986,17 +987,26 @@ static int s3c24xx_i2c_remove(struct platform_device *pdev)
 }
 
 #ifdef CONFIG_PM
+static int s3c24xx_i2c_suspend_late(struct platform_device *dev,
+                                   pm_message_t msg)
+{
+       struct s3c24xx_i2c *i2c = platform_get_drvdata(dev);
+       i2c->suspended = 1;
+       return 0;
+}
+
 static int s3c24xx_i2c_resume(struct platform_device *dev)
 {
        struct s3c24xx_i2c *i2c = platform_get_drvdata(dev);
 
-       if (i2c != NULL)
-               s3c24xx_i2c_init(i2c);
+       i2c->suspended = 0;
+       s3c24xx_i2c_init(i2c);
 
        return 0;
 }
 
 #else
+#define s3c24xx_i2c_suspend_late NULL
 #define s3c24xx_i2c_resume NULL
 #endif
 
@@ -1005,6 +1015,7 @@ static int s3c24xx_i2c_resume(struct platform_device *dev)
 static struct platform_driver s3c2410_i2c_driver = {
        .probe          = s3c24xx_i2c_probe,
        .remove         = s3c24xx_i2c_remove,
+       .suspend_late   = s3c24xx_i2c_suspend_late,
        .resume         = s3c24xx_i2c_resume,
        .driver         = {
                .owner  = THIS_MODULE,
@@ -1015,6 +1026,7 @@ static struct platform_driver s3c2410_i2c_driver = {
 static struct platform_driver s3c2440_i2c_driver = {
        .probe          = s3c24xx_i2c_probe,
        .remove         = s3c24xx_i2c_remove,
+       .suspend_late   = s3c24xx_i2c_suspend_late,
        .resume         = s3c24xx_i2c_resume,
        .driver         = {
                .owner  = THIS_MODULE,
index 53f079cc00afc010f2cf62b643fe98432feceea8..d8ede85fe17f4428be6713394e678af59c1457b2 100644 (file)
@@ -81,11 +81,12 @@ static u8 cs5530_udma_filter(ide_drive_t *drive)
 {
        ide_hwif_t *hwif = drive->hwif;
        ide_drive_t *mate = ide_get_pair_dev(drive);
-       u16 *mateid = mate->id;
+       u16 *mateid;
        u8 mask = hwif->ultra_mask;
 
        if (mate == NULL)
                goto out;
+       mateid = mate->id;
 
        if (ata_id_has_dma(mateid) && __ide_dma_bad_drive(mate) == 0) {
                if ((mateid[ATA_ID_FIELD_VALID] & 4) &&
index f1a8758e3a99f7d8b6953782c4150c35fefb8097..ec7f766ef5e44ff6387e962592c5a985282de4c9 100644 (file)
@@ -104,11 +104,12 @@ static u8 sc1200_udma_filter(ide_drive_t *drive)
 {
        ide_hwif_t *hwif = drive->hwif;
        ide_drive_t *mate = ide_get_pair_dev(drive);
-       u16 *mateid = mate->id;
+       u16 *mateid;
        u8 mask = hwif->ultra_mask;
 
        if (mate == NULL)
                goto out;
+       mateid = mate->id;
 
        if (ata_id_has_dma(mateid) && __ide_dma_bad_drive(mate) == 0) {
                if ((mateid[ATA_ID_FIELD_VALID] & 4) &&
index d333ae22459c9d697c9d71ba7dd462f2af2f51d6..79ef5fd928ae42c0d8252f1d8bf07c479782be9c 100644 (file)
@@ -115,8 +115,14 @@ static int nodemgr_bus_read(struct csr1212_csr *csr, u64 addr, u16 length,
        return error;
 }
 
+#define OUI_FREECOM_TECHNOLOGIES_GMBH 0x0001db
+
 static int nodemgr_get_max_rom(quadlet_t *bus_info_data, void *__ci)
 {
+       /* Freecom FireWire Hard Drive firmware bug */
+       if (be32_to_cpu(bus_info_data[3]) >> 8 == OUI_FREECOM_TECHNOLOGIES_GMBH)
+               return 0;
+
        return (be32_to_cpu(bus_info_data[2]) >> 8) & 0x3;
 }
 
index ac89a5deaca2e12fa62ccb78f1d62b088039675c..ab7c8e4a61f943c516ae5a3534e8775c33180f6b 100644 (file)
@@ -208,15 +208,18 @@ static void bitmap_checkfree(struct bitmap *bitmap, unsigned long page)
  */
 
 /* IO operations when bitmap is stored near all superblocks */
-static struct page *read_sb_page(mddev_t *mddev, long offset, unsigned long index)
+static struct page *read_sb_page(mddev_t *mddev, long offset,
+                                struct page *page,
+                                unsigned long index, int size)
 {
        /* choose a good rdev and read the page from there */
 
        mdk_rdev_t *rdev;
        struct list_head *tmp;
-       struct page *page = alloc_page(GFP_KERNEL);
        sector_t target;
 
+       if (!page)
+               page = alloc_page(GFP_KERNEL);
        if (!page)
                return ERR_PTR(-ENOMEM);
 
@@ -227,7 +230,9 @@ static struct page *read_sb_page(mddev_t *mddev, long offset, unsigned long inde
 
                target = rdev->sb_start + offset + index * (PAGE_SIZE/512);
 
-               if (sync_page_io(rdev->bdev, target, PAGE_SIZE, page, READ)) {
+               if (sync_page_io(rdev->bdev, target,
+                                roundup(size, bdev_hardsect_size(rdev->bdev)),
+                                page, READ)) {
                        page->index = index;
                        attach_page_buffers(page, NULL); /* so that free_buffer will
                                                          * quietly no-op */
@@ -544,7 +549,9 @@ static int bitmap_read_sb(struct bitmap *bitmap)
 
                bitmap->sb_page = read_page(bitmap->file, 0, bitmap, bytes);
        } else {
-               bitmap->sb_page = read_sb_page(bitmap->mddev, bitmap->offset, 0);
+               bitmap->sb_page = read_sb_page(bitmap->mddev, bitmap->offset,
+                                              NULL,
+                                              0, sizeof(bitmap_super_t));
        }
        if (IS_ERR(bitmap->sb_page)) {
                err = PTR_ERR(bitmap->sb_page);
@@ -957,11 +964,16 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start)
                                 */
                                page = bitmap->sb_page;
                                offset = sizeof(bitmap_super_t);
+                               read_sb_page(bitmap->mddev, bitmap->offset,
+                                            page,
+                                            index, count);
                        } else if (file) {
                                page = read_page(file, index, bitmap, count);
                                offset = 0;
                        } else {
-                               page = read_sb_page(bitmap->mddev, bitmap->offset, index);
+                               page = read_sb_page(bitmap->mddev, bitmap->offset,
+                                                   NULL,
+                                                   index, count);
                                offset = 0;
                        }
                        if (IS_ERR(page)) { /* read error */
index 73dc2ee9b014021a5681d83be1badd96802010bc..b34301d56cd2859f7b248ee0df8c7899317d59d5 100644 (file)
@@ -9,11 +9,11 @@ config DVB_B2C2_FLEXCOP
        select DVB_STV0297 if !DVB_FE_CUSTOMISE
        select DVB_BCM3510 if !DVB_FE_CUSTOMISE
        select DVB_LGDT330X if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_SIMPLE if !DVB_FE_CUSTOMISE
        select DVB_S5H1420 if !DVB_FE_CUSTOMISE
        select DVB_TUNER_ITD1000 if !DVB_FE_CUSTOMISE
        select DVB_ISL6421 if !DVB_FE_CUSTOMISE
        select DVB_CX24123 if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_SIMPLE if !MEDIA_TUNER_CUSTOMIZE
        help
          Support for the digital TV receiver chip made by B2C2 Inc. included in
          Technisats PCI cards and USB boxes.
index a127a4175c402a45c1940d7dec586762557544b5..5cded370854167b2d3db6ffec80e7914ad7437f1 100644 (file)
@@ -628,12 +628,14 @@ int flexcop_frontend_init(struct flexcop_device *fc)
        }
 
        /* try the cable dvb (stv0297) */
+       fc->fc_i2c_adap[0].no_base_addr = 1;
        fc->fe = dvb_attach(stv0297_attach, &alps_tdee4_stv0297_config, i2c);
        if (fc->fe != NULL) {
                fc->dev_type = FC_CABLE;
                fc->fe->ops.tuner_ops.set_params = alps_tdee4_stv0297_tuner_set_params;
                goto fe_found;
        }
+       fc->fc_i2c_adap[0].no_base_addr = 0;
 
        /* try the sky v2.3 (vp310/Samsung tbdu18132(tsa5059)) */
        fc->fe = dvb_attach(mt312_attach,
index 43a112ec6d44f146b260c64cf12446d036e1283a..f13783f08f0f4e09bd054c38806792e1289af3a4 100644 (file)
@@ -47,8 +47,12 @@ static int flexcop_i2c_read4(struct flexcop_i2c_adapter *i2c,
        int len = r100.tw_sm_c_100.total_bytes, /* remember total_bytes is buflen-1 */
                ret;
 
-       r100.tw_sm_c_100.no_base_addr_ack_error = i2c->no_base_addr;
        ret = flexcop_i2c_operation(i2c->fc, &r100);
+       if (ret != 0) {
+               deb_i2c("Retrying operation\n");
+               r100.tw_sm_c_100.no_base_addr_ack_error = i2c->no_base_addr;
+               ret = flexcop_i2c_operation(i2c->fc, &r100);
+       }
        if (ret != 0) {
                deb_i2c("read failed. %d\n", ret);
                return ret;
index 7e9c090fc04ea9ae2e7273890fce6f5c04241db1..27edb0ece58752b0617f9bdb2bd26ef05500f510 100644 (file)
@@ -8,7 +8,7 @@ config DVB_BT8XX
        select DVB_OR51211 if !DVB_FE_CUSTOMISE
        select DVB_LGDT330X if !DVB_FE_CUSTOMISE
        select DVB_ZL10353 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_SIMPLE if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_SIMPLE if !MEDIA_TUNER_CUSTOMIZE
        help
          Support for PCI cards based on the Bt8xx PCI bridge. Examples are
          the Nebula cards, the Pinnacle PCTV cards, the Twinhan DST cards,
index 62b68c291d9968636ebe62a2a1605afc9a712d38..49f7b20c25d6f134f883d5c3c1e15cbebeb5a547 100644 (file)
@@ -24,8 +24,8 @@ config DVB_USB_A800
        tristate "AVerMedia AverTV DVB-T USB 2.0 (A800)"
        depends on DVB_USB
        select DVB_DIB3000MC
-       select MEDIA_TUNER_MT2060 if !DVB_FE_CUSTOMISE
        select DVB_PLL if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_MT2060 if !MEDIA_TUNER_CUSTOMIZE
        help
          Say Y here to support the AVerMedia AverTV DVB-T USB 2.0 (A800) receiver.
 
@@ -34,7 +34,7 @@ config DVB_USB_DIBUSB_MB
        depends on DVB_USB
        select DVB_PLL if !DVB_FE_CUSTOMISE
        select DVB_DIB3000MB
-       select MEDIA_TUNER_MT2060 if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_MT2060 if !MEDIA_TUNER_CUSTOMIZE
        help
          Support for USB 1.1 and 2.0 DVB-T receivers based on reference designs made by
          DiBcom (<http://www.dibcom.fr>) equipped with a DiB3000M-B demodulator.
@@ -55,7 +55,7 @@ config DVB_USB_DIBUSB_MC
        tristate "DiBcom USB DVB-T devices (based on the DiB3000M-C/P) (see help for device list)"
        depends on DVB_USB
        select DVB_DIB3000MC
-       select MEDIA_TUNER_MT2060 if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_MT2060 if !MEDIA_TUNER_CUSTOMIZE
        help
          Support for USB2.0 DVB-T receivers based on reference designs made by
          DiBcom (<http://www.dibcom.fr>) equipped with a DiB3000M-C/P demodulator.
@@ -73,11 +73,11 @@ config DVB_USB_DIB0700
        select DVB_DIB7000M
        select DVB_DIB3000MC
        select DVB_S5H1411 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_MT2060 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_MT2266 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_XC2028 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_XC5000 if !DVB_FE_CUSTOMIZE
        select DVB_TUNER_DIB0070
+       select MEDIA_TUNER_MT2060 if !MEDIA_TUNER_CUSTOMIZE
+       select MEDIA_TUNER_MT2266 if !MEDIA_TUNER_CUSTOMIZE
+       select MEDIA_TUNER_XC2028 if !MEDIA_TUNER_CUSTOMIZE
+       select MEDIA_TUNER_XC5000 if !MEDIA_TUNER_CUSTOMIZE
        help
          Support for USB2.0/1.1 DVB receivers based on the DiB0700 USB bridge. The
          USB bridge is also present in devices having the DiB7700 DVB-T-USB
@@ -95,7 +95,7 @@ config DVB_USB_UMT_010
        depends on DVB_USB
        select DVB_PLL if !DVB_FE_CUSTOMISE
        select DVB_DIB3000MC
-       select MEDIA_TUNER_MT2060 if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_MT2060 if !MEDIA_TUNER_CUSTOMIZE
        help
          Say Y here to support the HanfTek UMT-010 USB2.0 stick-sized DVB-T receiver.
 
@@ -107,11 +107,11 @@ config DVB_USB_CXUSB
        select DVB_LGDT330X if !DVB_FE_CUSTOMISE
        select DVB_MT352 if !DVB_FE_CUSTOMISE
        select DVB_ZL10353 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_SIMPLE if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_XC2028 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_MXL5005S if !DVB_FE_CUSTOMISE
        select DVB_DIB7000P if !DVB_FE_CUSTOMISE
        select DVB_TUNER_DIB0070 if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_SIMPLE if !MEDIA_TUNER_CUSTOMIZE
+       select MEDIA_TUNER_XC2028 if !MEDIA_TUNER_CUSTOMIZE
+       select MEDIA_TUNER_MXL5005S if !MEDIA_TUNER_CUSTOMIZE
        help
          Say Y here to support the Conexant USB2.0 hybrid reference design.
          Currently, only DVB and ATSC modes are supported, analog mode
@@ -124,9 +124,9 @@ config DVB_USB_M920X
        tristate "Uli m920x DVB-T USB2.0 support"
        depends on DVB_USB
        select DVB_MT352 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_QT1010 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_TDA827X if !DVB_FE_CUSTOMISE
        select DVB_TDA1004X if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_QT1010 if !MEDIA_TUNER_CUSTOMIZE
+       select MEDIA_TUNER_TDA827X if !MEDIA_TUNER_CUSTOMIZE
        help
          Say Y here to support the MSI Mega Sky 580 USB2.0 DVB-T receiver.
          Currently, only devices with a product id of
@@ -137,7 +137,7 @@ config DVB_USB_GL861
        tristate "Genesys Logic GL861 USB2.0 support"
        depends on DVB_USB
        select DVB_ZL10353 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_QT1010 if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_QT1010 if !MEDIA_TUNER_CUSTOMIZE
        help
          Say Y here to support the MSI Megasky 580 (55801) DVB-T USB2.0
          receiver with USB ID 0db0:5581.
@@ -146,7 +146,7 @@ config DVB_USB_AU6610
        tristate "Alcor Micro AU6610 USB2.0 support"
        depends on DVB_USB
        select DVB_ZL10353 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_QT1010 if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_QT1010 if !MEDIA_TUNER_CUSTOMIZE
        help
          Say Y here to support the Sigmatek DVB-110 DVB-T USB2.0 receiver.
 
@@ -198,8 +198,8 @@ config DVB_USB_NOVA_T_USB2
        tristate "Hauppauge WinTV-NOVA-T usb2 DVB-T USB2.0 support"
        depends on DVB_USB
        select DVB_DIB3000MC
-       select MEDIA_TUNER_MT2060 if !DVB_FE_CUSTOMISE
        select DVB_PLL if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_MT2060 if !MEDIA_TUNER_CUSTOMIZE
        help
          Say Y here to support the Hauppauge WinTV-NOVA-T usb2 DVB-T USB2.0 receiver.
 
@@ -235,8 +235,8 @@ config DVB_USB_OPERA1
 config DVB_USB_AF9005
        tristate "Afatech AF9005 DVB-T USB1.1 support"
        depends on DVB_USB && EXPERIMENTAL
-       select MEDIA_TUNER_MT2060 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_QT1010 if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_MT2060 if !MEDIA_TUNER_CUSTOMIZE
+       select MEDIA_TUNER_QT1010 if !MEDIA_TUNER_CUSTOMIZE
        help
          Say Y here to support the Afatech AF9005 based DVB-T USB1.1 receiver
          and the TerraTec Cinergy T USB XE (Rev.1)
@@ -284,7 +284,7 @@ config DVB_USB_DTV5100
        tristate "AME DTV-5100 USB2.0 DVB-T support"
        depends on DVB_USB
        select DVB_ZL10353 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_QT1010 if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_QT1010 if !MEDIA_TUNER_CUSTOMIZE
        help
          Say Y here to support the AME DTV-5100 USB2.0 DVB-T receiver.
 
@@ -293,9 +293,9 @@ config DVB_USB_AF9015
        depends on DVB_USB && EXPERIMENTAL
        select DVB_AF9013
        select DVB_PLL              if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_MT2060   if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_QT1010   if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_TDA18271 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_MXL5005S if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_MT2060   if !MEDIA_TUNER_CUSTOMIZE
+       select MEDIA_TUNER_QT1010   if !MEDIA_TUNER_CUSTOMIZE
+       select MEDIA_TUNER_TDA18271 if !MEDIA_TUNER_CUSTOMIZE
+       select MEDIA_TUNER_MXL5005S if !MEDIA_TUNER_CUSTOMIZE
        help
          Say Y here to support the Afatech AF9015 based DVB-T USB2.0 receiver
index f28d3ae59e046cd8e9d1d6c74565848ccb4a9833..3917327889117bcff8cf27f315c8a3d70fcb27c7 100644 (file)
@@ -446,13 +446,13 @@ static int stk7700ph_tuner_attach(struct dvb_usb_adapter *adap)
                == NULL ? -ENODEV : 0;
 }
 
-#define DEFAULT_RC_INTERVAL 150
+#define DEFAULT_RC_INTERVAL 50
 
 static u8 rc_request[] = { REQUEST_POLL_RC, 0 };
 
 /* Number of keypresses to ignore before start repeating */
-#define RC_REPEAT_DELAY 2
-#define RC_REPEAT_DELAY_V1_20 5
+#define RC_REPEAT_DELAY 6
+#define RC_REPEAT_DELAY_V1_20 10
 
 
 
index 867027ceab3e71d29ce43b3944104043670eeb99..401a04effc06817befbc4d6772565c430648d78a 100644 (file)
@@ -106,7 +106,7 @@ config DVB_BUDGET_CI
        select DVB_TDA1004X if !DVB_FE_CUSTOMISE
        select DVB_LNBP21 if !DVB_FE_CUSTOMISE
        select DVB_TDA10023 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_TDA827X if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_TDA827X if !MEDIA_TUNER_CUSTOMIZE
        select VIDEO_IR
        help
          Support for simple SAA7146 based DVB cards
index e6ca4012b5f0f78fab90212e546aa1b6f0cd4946..0ea85a05e5c0d86911d9a62fe3445e472cf1e877 100644 (file)
@@ -831,7 +831,7 @@ long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg)
 {
        int ret = -ENOIOCTLCMD;
 
-       if (!file->f_op->ioctl)
+       if (!file->f_op->ioctl && !file->f_op->unlocked_ioctl)
                return ret;
 
        switch (cmd) {
index ef48565de7f1b7c5fdcd61e69fdb6e78b9ca9f83..8940b5387decc4fda02d8f41a3a86189d2380803 100644 (file)
@@ -9,7 +9,7 @@ config VIDEO_CX18
        select VIDEO_CX2341X
        select VIDEO_CS5345
        select DVB_S5H1409 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_MXL5005S if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_MXL5005S if !MEDIA_TUNER_CUSTOMIZE
        ---help---
          This is a video4linux driver for Conexant cx23418 based
          PCI combo video recorder devices.
index 8c1b7fa47a41cc36f35d3f4c763ff65c190e792c..00f1e2e8889e7fe23431827e17ce9f8b862d2714 100644 (file)
@@ -11,16 +11,16 @@ config VIDEO_CX23885
        select VIDEO_CX25840
        select VIDEO_CX2341X
        select DVB_DIB7000P if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_MT2131 if !DVB_FE_CUSTOMISE
        select DVB_S5H1409 if !DVB_FE_CUSTOMISE
        select DVB_S5H1411 if !DVB_FE_CUSTOMISE
        select DVB_LGDT330X if !DVB_FE_CUSTOMISE
        select DVB_ZL10353 if !DVB_FE_CUSTOMISE
+       select DVB_TDA10048 if !DVB_FE_CUSTOMIZE
+       select MEDIA_TUNER_MT2131 if !MEDIA_TUNER_CUSTOMIZE
        select MEDIA_TUNER_XC2028 if !DVB_FE_CUSTOMIZE
        select MEDIA_TUNER_TDA8290 if !DVB_FE_CUSTOMIZE
        select MEDIA_TUNER_TDA18271 if !DVB_FE_CUSTOMIZE
        select MEDIA_TUNER_XC5000 if !DVB_FE_CUSTOMIZE
-       select DVB_TDA10048 if !DVB_FE_CUSTOMIZE
        ---help---
          This is a video4linux driver for Conexant 23885 based
          TV cards.
index 0b9e5fac6239f5783e0f42e24f8eb9d1c700dfed..b0f837588e01ee9bb5a8d4c14f7617958a33be19 100644 (file)
@@ -56,12 +56,12 @@ config VIDEO_CX88_DVB
        select DVB_NXT200X if !DVB_FE_CUSTOMISE
        select DVB_CX24123 if !DVB_FE_CUSTOMISE
        select DVB_ISL6421 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_SIMPLE if !DVB_FE_CUSTOMISE
        select DVB_S5H1411 if !DVB_FE_CUSTOMISE
        select DVB_CX24116 if !DVB_FE_CUSTOMISE
        select DVB_STV0299 if !DVB_FE_CUSTOMISE
        select DVB_STV0288 if !DVB_FE_CUSTOMISE
        select DVB_STB6000 if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_SIMPLE if !MEDIA_TUNER_CUSTOMIZE
        ---help---
          This adds support for DVB/ATSC cards based on the
          Conexant 2388x chip.
index 610f535a257cd3c47b40d80484ad952177aaec38..4ea1f1e048979e51859652d93e24846a7f39fd3e 100644 (file)
@@ -549,10 +549,11 @@ static int em28xx_config(struct em28xx *dev)
 static void em28xx_config_i2c(struct em28xx *dev)
 {
        struct v4l2_routing route;
+       int zero = 0;
 
        route.input = INPUT(dev->ctl_input)->vmux;
        route.output = 0;
-       em28xx_i2c_call_clients(dev, VIDIOC_INT_RESET, NULL);
+       em28xx_i2c_call_clients(dev, VIDIOC_INT_RESET, &zero);
        em28xx_i2c_call_clients(dev, VIDIOC_INT_S_VIDEO_ROUTING, &route);
        em28xx_i2c_call_clients(dev, VIDIOC_STREAMON, NULL);
 }
index 748a87e82e4423e2b9ecfb4c4ac621a339231e4a..02a6e9ef033740d7401b6bd1ccd5966552add823 100644 (file)
@@ -1264,10 +1264,10 @@ static int vidioc_s_jpegcomp(struct file *file, void *priv,
        struct gspca_dev *gspca_dev = priv;
        int ret;
 
-       if (mutex_lock_interruptible(&gspca_dev->usb_lock))
-               return -ERESTARTSYS;
        if (!gspca_dev->sd_desc->set_jcomp)
                return -EINVAL;
+       if (mutex_lock_interruptible(&gspca_dev->usb_lock))
+               return -ERESTARTSYS;
        ret = gspca_dev->sd_desc->set_jcomp(gspca_dev, jpegcomp);
        mutex_unlock(&gspca_dev->usb_lock);
        return ret;
index 19eb274c9cd09d2f361154ed764d152472df709f..854c2a88535880a3e2a6c2d560303c46faaa8f2f 100644 (file)
@@ -42,7 +42,7 @@ config VIDEO_PVRUSB2_DVB
        select DVB_S5H1411 if !DVB_FE_CUSTOMISE
        select DVB_TDA10048 if !DVB_FE_CUSTOMIZE
        select MEDIA_TUNER_TDA18271 if !DVB_FE_CUSTOMIZE
-       select MEDIA_TUNER_SIMPLE if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_SIMPLE if !MEDIA_TUNER_CUSTOMIZE
        select MEDIA_TUNER_TDA8290 if !DVB_FE_CUSTOMIZE
        ---help---
 
index 7021bbf5897b3ac6988fd5d42d28bc70a4231c9f..fc2164e28e76d11bbcb12fa60de4cb69d8acb7f3 100644 (file)
@@ -34,9 +34,9 @@ config VIDEO_SAA7134_DVB
        select DVB_NXT200X if !DVB_FE_CUSTOMISE
        select DVB_TDA10086 if !DVB_FE_CUSTOMISE
        select DVB_TDA826X if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_TDA827X if !DVB_FE_CUSTOMISE
        select DVB_ISL6421 if !DVB_FE_CUSTOMISE
-       select MEDIA_TUNER_SIMPLE if !DVB_FE_CUSTOMISE
+       select MEDIA_TUNER_TDA827X if !MEDIA_TUNER_CUSTOMIZE
+       select MEDIA_TUNER_SIMPLE if !MEDIA_TUNER_CUSTOMIZE
        ---help---
          This adds support for DVB cards based on the
          Philips saa7134 chip.
index d62fd4f6b52e054db684e2af1e30ac12fa3a9240..ee090413e598e4254cad01d211e465e46e081f48 100644 (file)
@@ -2008,6 +2008,9 @@ mptscsih_host_reset(struct scsi_cmnd *SCpnt)
                return FAILED;
        }
 
+       /* make sure we have no outstanding commands at this stage */
+       mptscsih_flush_running_cmds(hd);
+
        ioc = hd->ioc;
        printk(MYIOC_s_INFO_FMT "attempting host reset! (sc=%p)\n",
            ioc->name, SCpnt);
index a1a3d0e5d2b4ac6c30637ca3f8a308a7d56c5d3a..9e8222f9e90ee0f69416ffe985103d0f6b183df5 100644 (file)
@@ -543,9 +543,9 @@ bnx2_free_rx_mem(struct bnx2 *bp)
                for (j = 0; j < bp->rx_max_pg_ring; j++) {
                        if (rxr->rx_pg_desc_ring[j])
                                pci_free_consistent(bp->pdev, RXBD_RING_SIZE,
-                                                   rxr->rx_pg_desc_ring[i],
-                                                   rxr->rx_pg_desc_mapping[i]);
-                       rxr->rx_pg_desc_ring[i] = NULL;
+                                                   rxr->rx_pg_desc_ring[j],
+                                                   rxr->rx_pg_desc_mapping[j]);
+                       rxr->rx_pg_desc_ring[j] = NULL;
                }
                if (rxr->rx_pg_ring)
                        vfree(rxr->rx_pg_ring);
index 523b9716a543aec21d923b58a07cd5162b3edab3..d115a6d30f29c0b3acb81c8038c6215993980e8d 100644 (file)
@@ -1893,12 +1893,17 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw)
                ctrl |= E1000_CTRL_PHY_RST;
        }
        ret_val = e1000_acquire_swflag_ich8lan(hw);
+       /* Whether or not the swflag was acquired, we need to reset the part */
        hw_dbg(hw, "Issuing a global reset to ich8lan");
        ew32(CTRL, (ctrl | E1000_CTRL_RST));
        msleep(20);
 
-       /* release the swflag because it is not reset by hardware reset */
-       e1000_release_swflag_ich8lan(hw);
+       if (!ret_val) {
+               /* release the swflag because it is not reset by
+                * hardware reset
+                */
+               e1000_release_swflag_ich8lan(hw);
+       }
 
        ret_val = e1000e_get_auto_rd_done(hw);
        if (ret_val) {
index c414554ac3217f22845b8e71901117bc5fffaaad..36cb6e95b465c2545b822d30c14a675b6bd39e07 100644 (file)
@@ -959,7 +959,7 @@ static void enc28j60_hw_rx(struct net_device *ndev)
                        ndev->stats.rx_packets++;
                        ndev->stats.rx_bytes += len;
                        ndev->last_rx = jiffies;
-                       netif_rx(skb);
+                       netif_rx_ni(skb);
                }
        }
        /*
index f863aee6648b49b0db38d2cdc077640669a2a424..3f5d91543246c88936d8fc086abf37c2cd3f6686 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #ifndef __JME_H_INCLUDED__
-#define __JME_H_INCLUDEE__
+#define __JME_H_INCLUDED__
 
 #define DRV_NAME       "jme"
 #define DRV_VERSION    "1.0.3"
index 536bda1f428b6c09360be41448f7b0b7d4c16679..289fc267edf30eb5094d24f416ca644c9494d401 100644 (file)
@@ -105,8 +105,6 @@ int mdiobus_register(struct mii_bus *bus)
                return -EINVAL;
        }
 
-       bus->state = MDIOBUS_REGISTERED;
-
        mutex_init(&bus->mdio_lock);
 
        if (bus->reset)
@@ -123,6 +121,9 @@ int mdiobus_register(struct mii_bus *bus)
                }
        }
 
+       if (!err)
+               bus->state = MDIOBUS_REGISTERED;
+
        pr_info("%s: probed\n", bus->name);
 
        return err;
index 7e857e938adb582ae432b26d35114e8099d51eb2..714a23035de1980a968c19a835712d587c007c17 100644 (file)
@@ -116,6 +116,7 @@ struct ppp {
        unsigned long   last_xmit;      /* jiffies when last pkt sent 9c */
        unsigned long   last_recv;      /* jiffies when last pkt rcvd a0 */
        struct net_device *dev;         /* network interface device a4 */
+       int             closing;        /* is device closing down? a8 */
 #ifdef CONFIG_PPP_MULTILINK
        int             nxchan;         /* next channel to send something on */
        u32             nxseq;          /* next sequence number to send */
@@ -995,7 +996,7 @@ ppp_xmit_process(struct ppp *ppp)
        struct sk_buff *skb;
 
        ppp_xmit_lock(ppp);
-       if (ppp->dev) {
+       if (!ppp->closing) {
                ppp_push(ppp);
                while (!ppp->xmit_pending
                       && (skb = skb_dequeue(&ppp->file.xq)))
@@ -1463,8 +1464,7 @@ static inline void
 ppp_do_recv(struct ppp *ppp, struct sk_buff *skb, struct channel *pch)
 {
        ppp_recv_lock(ppp);
-       /* ppp->dev == 0 means interface is closing down */
-       if (ppp->dev)
+       if (!ppp->closing)
                ppp_receive_frame(ppp, skb, pch);
        else
                kfree_skb(skb);
@@ -2498,18 +2498,16 @@ init_ppp_file(struct ppp_file *pf, int kind)
  */
 static void ppp_shutdown_interface(struct ppp *ppp)
 {
-       struct net_device *dev;
-
        mutex_lock(&all_ppp_mutex);
-       ppp_lock(ppp);
-       dev = ppp->dev;
-       ppp->dev = NULL;
-       ppp_unlock(ppp);
        /* This will call dev_close() for us. */
-       if (dev) {
-               unregister_netdev(dev);
-               free_netdev(dev);
-       }
+       ppp_lock(ppp);
+       if (!ppp->closing) {
+               ppp->closing = 1;
+               ppp_unlock(ppp);
+               unregister_netdev(ppp->dev);
+       } else
+               ppp_unlock(ppp);
+
        cardmap_set(&all_ppp_units, ppp->file.index, NULL);
        ppp->file.dead = 1;
        ppp->owner = NULL;
@@ -2554,7 +2552,7 @@ static void ppp_destroy_interface(struct ppp *ppp)
        if (ppp->xmit_pending)
                kfree_skb(ppp->xmit_pending);
 
-       kfree(ppp);
+       free_netdev(ppp->dev);
 }
 
 /*
@@ -2616,7 +2614,7 @@ ppp_connect_channel(struct channel *pch, int unit)
        if (pch->file.hdrlen > ppp->file.hdrlen)
                ppp->file.hdrlen = pch->file.hdrlen;
        hdrlen = pch->file.hdrlen + 2;  /* for protocol bytes */
-       if (ppp->dev && hdrlen > ppp->dev->hard_header_len)
+       if (hdrlen > ppp->dev->hard_header_len)
                ppp->dev->hard_header_len = hdrlen;
        list_add_tail(&pch->clist, &ppp->channels);
        ++ppp->n_channels;
index 1d2ef8f47780904da79f621bf2ac09d284b50753..5a40f2d78beb1a9114478ac9e0385556c29d30bf 100644 (file)
@@ -1509,6 +1509,11 @@ static int __netdev_rx(struct net_device *dev, int *quota)
                desc->status = 0;
                np->rx_done = (np->rx_done + 1) % DONE_Q_SIZE;
        }
+
+       if (*quota == 0) {      /* out of rx quota */
+               retcode = 1;
+               goto out;
+       }
        writew(np->rx_done, np->base + CompletionQConsumerIdx);
 
  out:
index 1349e419673ca348dbe5aa22b3b5b27f1a1056dd..fed7eba65ead6268e292eddc66c73905d8e263c7 100644 (file)
@@ -1142,6 +1142,70 @@ static int gem_start_xmit(struct sk_buff *skb, struct net_device *dev)
        return NETDEV_TX_OK;
 }
 
+static void gem_pcs_reset(struct gem *gp)
+{
+       int limit;
+       u32 val;
+
+       /* Reset PCS unit. */
+       val = readl(gp->regs + PCS_MIICTRL);
+       val |= PCS_MIICTRL_RST;
+       writel(val, gp->regs + PCS_MIICTRL);
+
+       limit = 32;
+       while (readl(gp->regs + PCS_MIICTRL) & PCS_MIICTRL_RST) {
+               udelay(100);
+               if (limit-- <= 0)
+                       break;
+       }
+       if (limit <= 0)
+               printk(KERN_WARNING "%s: PCS reset bit would not clear.\n",
+                      gp->dev->name);
+}
+
+static void gem_pcs_reinit_adv(struct gem *gp)
+{
+       u32 val;
+
+       /* Make sure PCS is disabled while changing advertisement
+        * configuration.
+        */
+       val = readl(gp->regs + PCS_CFG);
+       val &= ~(PCS_CFG_ENABLE | PCS_CFG_TO);
+       writel(val, gp->regs + PCS_CFG);
+
+       /* Advertise all capabilities except assymetric
+        * pause.
+        */
+       val = readl(gp->regs + PCS_MIIADV);
+       val |= (PCS_MIIADV_FD | PCS_MIIADV_HD |
+               PCS_MIIADV_SP | PCS_MIIADV_AP);
+       writel(val, gp->regs + PCS_MIIADV);
+
+       /* Enable and restart auto-negotiation, disable wrapback/loopback,
+        * and re-enable PCS.
+        */
+       val = readl(gp->regs + PCS_MIICTRL);
+       val |= (PCS_MIICTRL_RAN | PCS_MIICTRL_ANE);
+       val &= ~PCS_MIICTRL_WB;
+       writel(val, gp->regs + PCS_MIICTRL);
+
+       val = readl(gp->regs + PCS_CFG);
+       val |= PCS_CFG_ENABLE;
+       writel(val, gp->regs + PCS_CFG);
+
+       /* Make sure serialink loopback is off.  The meaning
+        * of this bit is logically inverted based upon whether
+        * you are in Serialink or SERDES mode.
+        */
+       val = readl(gp->regs + PCS_SCTRL);
+       if (gp->phy_type == phy_serialink)
+               val &= ~PCS_SCTRL_LOOP;
+       else
+               val |= PCS_SCTRL_LOOP;
+       writel(val, gp->regs + PCS_SCTRL);
+}
+
 #define STOP_TRIES 32
 
 /* Must be invoked under gp->lock and gp->tx_lock. */
@@ -1168,6 +1232,9 @@ static void gem_reset(struct gem *gp)
 
        if (limit <= 0)
                printk(KERN_ERR "%s: SW reset is ghetto.\n", gp->dev->name);
+
+       if (gp->phy_type == phy_serialink || gp->phy_type == phy_serdes)
+               gem_pcs_reinit_adv(gp);
 }
 
 /* Must be invoked under gp->lock and gp->tx_lock. */
@@ -1324,7 +1391,7 @@ static int gem_set_link_modes(struct gem *gp)
                   gp->phy_type == phy_serdes) {
                u32 pcs_lpa = readl(gp->regs + PCS_MIILP);
 
-               if (pcs_lpa & PCS_MIIADV_FD)
+               if ((pcs_lpa & PCS_MIIADV_FD) || gp->phy_type == phy_serdes)
                        full_duplex = 1;
                speed = SPEED_1000;
        }
@@ -1488,6 +1555,9 @@ static void gem_link_timer(unsigned long data)
                        val = readl(gp->regs + PCS_MIISTAT);
 
                if ((val & PCS_MIISTAT_LS) != 0) {
+                       if (gp->lstate == link_up)
+                               goto restart;
+
                        gp->lstate = link_up;
                        netif_carrier_on(gp->dev);
                        (void)gem_set_link_modes(gp);
@@ -1708,61 +1778,8 @@ static void gem_init_phy(struct gem *gp)
                if (gp->phy_mii.def && gp->phy_mii.def->ops->init)
                        gp->phy_mii.def->ops->init(&gp->phy_mii);
        } else {
-               u32 val;
-               int limit;
-
-               /* Reset PCS unit. */
-               val = readl(gp->regs + PCS_MIICTRL);
-               val |= PCS_MIICTRL_RST;
-               writel(val, gp->regs + PCS_MIICTRL);
-
-               limit = 32;
-               while (readl(gp->regs + PCS_MIICTRL) & PCS_MIICTRL_RST) {
-                       udelay(100);
-                       if (limit-- <= 0)
-                               break;
-               }
-               if (limit <= 0)
-                       printk(KERN_WARNING "%s: PCS reset bit would not clear.\n",
-                              gp->dev->name);
-
-               /* Make sure PCS is disabled while changing advertisement
-                * configuration.
-                */
-               val = readl(gp->regs + PCS_CFG);
-               val &= ~(PCS_CFG_ENABLE | PCS_CFG_TO);
-               writel(val, gp->regs + PCS_CFG);
-
-               /* Advertise all capabilities except assymetric
-                * pause.
-                */
-               val = readl(gp->regs + PCS_MIIADV);
-               val |= (PCS_MIIADV_FD | PCS_MIIADV_HD |
-                       PCS_MIIADV_SP | PCS_MIIADV_AP);
-               writel(val, gp->regs + PCS_MIIADV);
-
-               /* Enable and restart auto-negotiation, disable wrapback/loopback,
-                * and re-enable PCS.
-                */
-               val = readl(gp->regs + PCS_MIICTRL);
-               val |= (PCS_MIICTRL_RAN | PCS_MIICTRL_ANE);
-               val &= ~PCS_MIICTRL_WB;
-               writel(val, gp->regs + PCS_MIICTRL);
-
-               val = readl(gp->regs + PCS_CFG);
-               val |= PCS_CFG_ENABLE;
-               writel(val, gp->regs + PCS_CFG);
-
-               /* Make sure serialink loopback is off.  The meaning
-                * of this bit is logically inverted based upon whether
-                * you are in Serialink or SERDES mode.
-                */
-               val = readl(gp->regs + PCS_SCTRL);
-               if (gp->phy_type == phy_serialink)
-                       val &= ~PCS_SCTRL_LOOP;
-               else
-                       val |= PCS_SCTRL_LOOP;
-               writel(val, gp->regs + PCS_SCTRL);
+               gem_pcs_reset(gp);
+               gem_pcs_reinit_adv(gp);
        }
 
        /* Default aneg parameters */
@@ -2680,6 +2697,21 @@ static int gem_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
                cmd->speed = 0;
                cmd->duplex = cmd->port = cmd->phy_address =
                        cmd->transceiver = cmd->autoneg = 0;
+
+               /* serdes means usually a Fibre connector, with most fixed */
+               if (gp->phy_type == phy_serdes) {
+                       cmd->port = PORT_FIBRE;
+                       cmd->supported = (SUPPORTED_1000baseT_Half |
+                               SUPPORTED_1000baseT_Full |
+                               SUPPORTED_FIBRE | SUPPORTED_Autoneg |
+                               SUPPORTED_Pause | SUPPORTED_Asym_Pause);
+                       cmd->advertising = cmd->supported;
+                       cmd->transceiver = XCVR_INTERNAL;
+                       if (gp->lstate == link_up)
+                               cmd->speed = SPEED_1000;
+                       cmd->duplex = DUPLEX_FULL;
+                       cmd->autoneg = 1;
+               }
        }
        cmd->maxtxpkt = cmd->maxrxpkt = 0;
 
index c41d68761364550ebe2d2d8376f2a8c293b5d799..e60498232b94f83dede6c6d4ae153d8d135d7b19 100644 (file)
@@ -1098,6 +1098,7 @@ static int TLan_StartTx( struct sk_buff *skb, struct net_device *dev )
        dma_addr_t      tail_list_phys;
        u8              *tail_buffer;
        unsigned long   flags;
+       unsigned int    txlen;
 
        if ( ! priv->phyOnline ) {
                TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT:  %s PHY is not ready\n",
@@ -1108,6 +1109,7 @@ static int TLan_StartTx( struct sk_buff *skb, struct net_device *dev )
 
        if (skb_padto(skb, TLAN_MIN_FRAME_SIZE))
                return 0;
+       txlen = max(skb->len, (unsigned int)TLAN_MIN_FRAME_SIZE);
 
        tail_list = priv->txList + priv->txTail;
        tail_list_phys = priv->txListDMA + sizeof(TLanList) * priv->txTail;
@@ -1125,16 +1127,16 @@ static int TLan_StartTx( struct sk_buff *skb, struct net_device *dev )
 
        if ( bbuf ) {
                tail_buffer = priv->txBuffer + ( priv->txTail * TLAN_MAX_FRAME_SIZE );
-               skb_copy_from_linear_data(skb, tail_buffer, skb->len);
+               skb_copy_from_linear_data(skb, tail_buffer, txlen);
        } else {
                tail_list->buffer[0].address = pci_map_single(priv->pciDev,
-                                                             skb->data, skb->len,
+                                                             skb->data, txlen,
                                                              PCI_DMA_TODEVICE);
                TLan_StoreSKB(tail_list, skb);
        }
 
-       tail_list->frameSize = (u16) skb->len;
-       tail_list->buffer[0].count = TLAN_LAST_BUFFER | (u32) skb->len;
+       tail_list->frameSize = (u16) txlen;
+       tail_list->buffer[0].count = TLAN_LAST_BUFFER | (u32) txlen;
        tail_list->buffer[1].count = 0;
        tail_list->buffer[1].address = 0;
 
@@ -1431,7 +1433,9 @@ static u32 TLan_HandleTxEOF( struct net_device *dev, u16 host_int )
                if ( ! bbuf ) {
                        struct sk_buff *skb = TLan_GetSKB(head_list);
                        pci_unmap_single(priv->pciDev, head_list->buffer[0].address,
-                                        skb->len, PCI_DMA_TODEVICE);
+                                        max(skb->len,
+                                            (unsigned int)TLAN_MIN_FRAME_SIZE),
+                                        PCI_DMA_TODEVICE);
                        dev_kfree_skb_any(skb);
                        head_list->buffer[8].address = 0;
                        head_list->buffer[9].address = 0;
@@ -2055,9 +2059,12 @@ static void TLan_FreeLists( struct net_device *dev )
                        list = priv->txList + i;
                        skb = TLan_GetSKB(list);
                        if ( skb ) {
-                               pci_unmap_single(priv->pciDev,
-                                                list->buffer[0].address, skb->len,
-                                                PCI_DMA_TODEVICE);
+                               pci_unmap_single(
+                                       priv->pciDev,
+                                       list->buffer[0].address,
+                                       max(skb->len,
+                                           (unsigned int)TLAN_MIN_FRAME_SIZE),
+                                       PCI_DMA_TODEVICE);
                                dev_kfree_skb_any( skb );
                                list->buffer[8].address = 0;
                                list->buffer[9].address = 0;
index f9e244da30aef9ea9e170c5cce58a524ab5f87a6..9bcb6cbd5aa93988e39bdf2b8c9285512d74df22 100644 (file)
@@ -113,7 +113,7 @@ struct acpiphp_slot {
 
        u8              device;         /* pci device# */
 
-       u32             sun;            /* ACPI _SUN (slot unique number) */
+       unsigned long long sun;         /* ACPI _SUN (slot unique number) */
        u32             flags;          /* see below */
 };
 
index 95b536a23d25d8d9f76d5aa757a411540017fef0..43c10bd261b48612b4ec2fa2620fa14207628805 100644 (file)
@@ -337,7 +337,7 @@ int acpiphp_register_hotplug_slot(struct acpiphp_slot *acpiphp_slot)
        slot->hotplug_slot->info->cur_bus_speed = PCI_SPEED_UNKNOWN;
 
        acpiphp_slot->slot = slot;
-       snprintf(name, SLOT_NAME_SIZE, "%u", slot->acpi_slot->sun);
+       snprintf(name, SLOT_NAME_SIZE, "%llu", slot->acpi_slot->sun);
 
        retval = pci_hp_register(slot->hotplug_slot,
                                        acpiphp_slot->bridge->pci_bus,
index 955aae4071f7a64eeb5cb716aaacf8ebb26c7a11..3affc6472e65253c94b77bcc8aa97061480b85d7 100644 (file)
@@ -255,13 +255,13 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv)
 
                bridge->nr_slots++;
 
-               dbg("found ACPI PCI Hotplug slot %d at PCI %04x:%02x:%02x\n",
+               dbg("found ACPI PCI Hotplug slot %llu at PCI %04x:%02x:%02x\n",
                                slot->sun, pci_domain_nr(bridge->pci_bus),
                                bridge->pci_bus->number, slot->device);
                retval = acpiphp_register_hotplug_slot(slot);
                if (retval) {
                        if (retval == -EBUSY)
-                               warn("Slot %d already registered by another "
+                               warn("Slot %llu already registered by another "
                                        "hotplug driver\n", slot->sun);
                        else
                                warn("acpiphp_register_hotplug_slot failed "
index c892daae74d6dc325a77dc9050c0f6cd8a5105c8..633e743442ac711d0b02d6b85a8252a1ee74dbb5 100644 (file)
@@ -1402,10 +1402,6 @@ static int __init ibmphp_init(void)
                goto error;
        }
 
-       /* lock ourselves into memory with a module 
-        * count of -1 so that no one can unload us. */
-       module_put(THIS_MODULE);
-
 exit:
        return rc;
 
@@ -1423,4 +1419,3 @@ static void __exit ibmphp_exit(void)
 }
 
 module_init(ibmphp_init);
-module_exit(ibmphp_exit);
index 4b23bc39b11e513be82a54df9f01db2b268b5bb4..39cf248d24e3cd0592b61dee392f748e441301c0 100644 (file)
@@ -432,18 +432,19 @@ static int pciehp_probe(struct pcie_device *dev, const struct pcie_port_service_
                goto err_out_release_ctlr;
        }
 
+       /* Check if slot is occupied */
        t_slot = pciehp_find_slot(ctrl, ctrl->slot_device_offset);
-
-       t_slot->hpc_ops->get_adapter_status(t_slot, &value); /* Check if slot is occupied */
-       if (value && pciehp_force) {
-               rc = pciehp_enable_slot(t_slot);
-               if (rc) /* -ENODEV: shouldn't happen, but deal with it */
-                       value = 0;
-       }
-       if ((POWER_CTRL(ctrl)) && !value) {
-               rc = t_slot->hpc_ops->power_off_slot(t_slot); /* Power off slot if not occupied*/
-               if (rc)
-                       goto err_out_free_ctrl_slot;
+       t_slot->hpc_ops->get_adapter_status(t_slot, &value);
+       if (value) {
+               if (pciehp_force)
+                       pciehp_enable_slot(t_slot);
+       } else {
+               /* Power off slot if not occupied */
+               if (POWER_CTRL(ctrl)) {
+                       rc = t_slot->hpc_ops->power_off_slot(t_slot);
+                       if (rc)
+                               goto err_out_free_ctrl_slot;
+               }
        }
 
        return 0;
index dfc63d01f20a0a7c072f9a65039f2776537b3e8e..aac7006949f15c9eb52b56968a4dca6ef812e3c2 100644 (file)
@@ -252,7 +252,7 @@ static void report_resume(struct pci_dev *dev, void *data)
 
        if (!dev->driver ||
                !dev->driver->err_handler ||
-               !dev->driver->err_handler->slot_reset)
+               !dev->driver->err_handler->resume)
                return;
 
        err_handler = dev->driver->err_handler;
index bb7338863fb9aabeedfbb941b59f026176919673..b59d4115d20f541e5176ba309cb694687c1c1d17 100644 (file)
@@ -334,6 +334,6 @@ static void __exit bfin_cf_exit(void)
 module_init(bfin_cf_init);
 module_exit(bfin_cf_exit);
 
-MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>")
+MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
 MODULE_DESCRIPTION("BFIN CF/PCMCIA Driver");
 MODULE_LICENSE("GPL");
index 2cd77ab8fc66b06e43d3b908884a9f4fe8603ca1..054e05294af8566e30d3834fc23c793b615239f9 100644 (file)
@@ -328,6 +328,13 @@ isl1208_i2c_set_time(struct i2c_client *client, struct rtc_time const *tm)
        int sr;
        u8 regs[ISL1208_RTC_SECTION_LEN] = { 0, };
 
+       /* The clock has an 8 bit wide bcd-coded register (they never learn)
+        * for the year. tm_year is an offset from 1900 and we are interested
+        * in the 2000-2099 range, so any value less than 100 is invalid.
+        */
+       if (tm->tm_year < 100)
+               return -EINVAL;
+
        regs[ISL1208_REG_SC] = bin2bcd(tm->tm_sec);
        regs[ISL1208_REG_MN] = bin2bcd(tm->tm_min);
        regs[ISL1208_REG_HR] = bin2bcd(tm->tm_hour) | ISL1208_REG_HR_MIL;
index 162cd927d94b8e975edb1438db13cd9d0bcc6f8f..94acbeed4e7cfe7bc59ebc8003fdd7ae96e66ec4 100644 (file)
@@ -175,8 +175,8 @@ static struct aac_driver_ident aac_drivers[] = {
        { aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* PERC 3/Di (Boxster/PERC3DiB) */
        { aac_rx_init, "aacraid",  "ADAPTEC ", "catapult        ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* catapult */
        { aac_rx_init, "aacraid",  "ADAPTEC ", "tomcat          ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* tomcat */
-       { aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2120S   ", 1, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Adaptec 2120S (Crusader) */
-       { aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2200S   ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Adaptec 2200S (Vulcan) */
+       { aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2120S   ", 1, AAC_QUIRK_31BIT | AAC_QUIRK_34SG },                     /* Adaptec 2120S (Crusader) */
+       { aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2200S   ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG },                     /* Adaptec 2200S (Vulcan) */
        { aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2200S   ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Adaptec 2200S (Vulcan-2m) */
        { aac_rx_init, "aacraid",  "Legend  ", "Legend S220     ", 1, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Legend S220 (Legend Crusader) */
        { aac_rx_init, "aacraid",  "Legend  ", "Legend S230     ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Legend S230 (Legend Vulcan) */
index 9aec4ca64e56cf3f06f102b4860691ce94c12c94..f7da7530875e732a0b8155aa6887f8626ed8decf 100644 (file)
@@ -107,6 +107,7 @@ static int hp_sw_tur(struct scsi_device *sdev, struct hp_sw_dh_data *h)
        struct request *req;
        int ret;
 
+retry:
        req = blk_get_request(sdev->request_queue, WRITE, GFP_NOIO);
        if (!req)
                return SCSI_DH_RES_TEMP_UNAVAIL;
@@ -121,7 +122,6 @@ static int hp_sw_tur(struct scsi_device *sdev, struct hp_sw_dh_data *h)
        memset(req->sense, 0, SCSI_SENSE_BUFFERSIZE);
        req->sense_len = 0;
 
-retry:
        ret = blk_execute_rq(req->q, NULL, req, 1);
        if (ret == -EIO) {
                if (req->sense_len > 0) {
@@ -136,8 +136,10 @@ retry:
                h->path_state = HP_SW_PATH_ACTIVE;
                ret = SCSI_DH_OK;
        }
-       if (ret == SCSI_DH_IMM_RETRY)
+       if (ret == SCSI_DH_IMM_RETRY) {
+               blk_put_request(req);
                goto retry;
+       }
        if (ret == SCSI_DH_DEV_OFFLINED) {
                h->path_state = HP_SW_PATH_PASSIVE;
                ret = SCSI_DH_OK;
@@ -200,6 +202,7 @@ static int hp_sw_start_stop(struct scsi_device *sdev, struct hp_sw_dh_data *h)
        struct request *req;
        int ret, retry;
 
+retry:
        req = blk_get_request(sdev->request_queue, WRITE, GFP_NOIO);
        if (!req)
                return SCSI_DH_RES_TEMP_UNAVAIL;
@@ -216,7 +219,6 @@ static int hp_sw_start_stop(struct scsi_device *sdev, struct hp_sw_dh_data *h)
        req->sense_len = 0;
        retry = h->retries;
 
-retry:
        ret = blk_execute_rq(req->q, NULL, req, 1);
        if (ret == -EIO) {
                if (req->sense_len > 0) {
@@ -231,8 +233,10 @@ retry:
                ret = SCSI_DH_OK;
 
        if (ret == SCSI_DH_RETRY) {
-               if (--retry)
+               if (--retry) {
+                       blk_put_request(req);
                        goto retry;
+               }
                ret = SCSI_DH_IO;
        }
 
index 2a5b29d12172e4a72bb774453d2662b7d29192ee..e2dd6a45924a5f598f6dafa05eff545b2aa5292b 100644 (file)
@@ -864,21 +864,23 @@ static int ibmvstgt_probe(struct vio_dev *dev, const struct vio_device_id *id)
 
        INIT_WORK(&vport->crq_work, handle_crq);
 
-       err = crq_queue_create(&vport->crq_queue, target);
+       err = scsi_add_host(shost, target->dev);
        if (err)
                goto free_srp_target;
 
-       err = scsi_add_host(shost, target->dev);
+       err = scsi_tgt_alloc_queue(shost);
        if (err)
-               goto destroy_queue;
+               goto remove_host;
 
-       err = scsi_tgt_alloc_queue(shost);
+       err = crq_queue_create(&vport->crq_queue, target);
        if (err)
-               goto destroy_queue;
+               goto free_queue;
 
        return 0;
-destroy_queue:
-       crq_queue_destroy(target);
+free_queue:
+       scsi_tgt_free_queue(shost);
+remove_host:
+       scsi_remove_host(shost);
 free_srp_target:
        srp_target_free(target);
 put_host:
index 801c7cf54d2ebb29b209fbd692eb7c807514fdc6..3fdee7370cccd235d9ad37aa8482c29cac715b7a 100644 (file)
@@ -489,12 +489,6 @@ __iscsi_conn_send_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
                if (!__kfifo_get(session->cmdpool.queue,
                                 (void*)&task, sizeof(void*)))
                        return NULL;
-
-               if ((hdr->opcode == (ISCSI_OP_NOOP_OUT | ISCSI_OP_IMMEDIATE)) &&
-                    hdr->ttt == RESERVED_ITT) {
-                       conn->ping_task = task;
-                       conn->last_ping = jiffies;
-               }
        }
        /*
         * released in complete pdu for task we expect a response for, and
@@ -703,6 +697,11 @@ static void iscsi_send_nopout(struct iscsi_conn *conn, struct iscsi_nopin *rhdr)
        task = __iscsi_conn_send_pdu(conn, (struct iscsi_hdr *)&hdr, NULL, 0);
        if (!task)
                iscsi_conn_printk(KERN_ERR, conn, "Could not send nopout\n");
+       else if (!rhdr) {
+               /* only track our nops */
+               conn->ping_task = task;
+               conn->last_ping = jiffies;
+       }
 }
 
 static int iscsi_handle_reject(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
index fa45a1a668676c667dbe2bc1749ad44227061d6b..148d3af92aefad04fa42c48780ba4138e8033e59 100644 (file)
@@ -648,8 +648,8 @@ static void scsi_requeue_command(struct request_queue *q, struct scsi_cmnd *cmd)
        struct request *req = cmd->request;
        unsigned long flags;
 
-       scsi_unprep_request(req);
        spin_lock_irqsave(q->queue_lock, flags);
+       scsi_unprep_request(req);
        blk_requeue_request(q, req);
        spin_unlock_irqrestore(q->queue_lock, flags);
 
index d1812d32f47d40c4c5e3c028aae8727c755f451f..63f0de29aa14eeb508645dd0b917e7c4163950c1 100644 (file)
@@ -827,7 +827,7 @@ static int __init maple_bus_init(void)
 
        maple_queue_cache =
            kmem_cache_create("maple_queue_cache", 0x400, 0,
-                             SLAB_POISON|SLAB_HWCACHE_ALIGN, NULL);
+                             SLAB_HWCACHE_ALIGN, NULL);
 
        if (!maple_queue_cache)
                goto cleanup_bothirqs;
index c95b286a1239e8a6cbdb4da4a292e5d85c9079f1..5d457c96bd7ed596bdaab11852fc9ad45acaa635 100644 (file)
@@ -22,6 +22,8 @@ menuconfig STAGING
          If in doubt, say N here.
 
 
+if STAGING
+
 config STAGING_EXCLUDE_BUILD
        bool "Exclude Staging drivers from being built" if STAGING
        default y
@@ -62,3 +64,4 @@ source "drivers/staging/at76_usb/Kconfig"
 source "drivers/staging/poch/Kconfig"
 
 endif # !STAGING_EXCLUDE_BUILD
+endif # STAGING
index 8e74657f106c01d152c8e5244e75100bdd94f682..43a863c5cc430367ad045625eb4c3faecbfba7f9 100644 (file)
@@ -51,6 +51,7 @@ static struct usb_device_id usbtmc_devices[] = {
        { USB_INTERFACE_INFO(USB_CLASS_APP_SPEC, 3, 0), },
        { 0, } /* terminating entry */
 };
+MODULE_DEVICE_TABLE(usb, usbtmc_devices);
 
 /*
  * This structure is the capabilities for the device
index 3d7793d93031525400d3ed746a60639ebed1d52f..8c081308b0e2d8bf2349d6b9e9703de0548213ac 100644 (file)
@@ -279,7 +279,9 @@ static int usb_unbind_interface(struct device *dev)
         * altsetting means creating new endpoint device entries).
         * When either of these happens, defer the Set-Interface.
         */
-       if (!error && intf->dev.power.status == DPM_ON)
+       if (intf->cur_altsetting->desc.bAlternateSetting == 0)
+               ;       /* Already in altsetting 0 so skip Set-Interface */
+       else if (!error && intf->dev.power.status == DPM_ON)
                usb_set_interface(udev, intf->altsetting[0].
                                desc.bInterfaceNumber, 0);
        else
index 428b5993575a9126104da3ec32ea695e7881c9e8..3a8bb53fc473269e31366d0c11069490a30cb7bf 100644 (file)
@@ -651,6 +651,8 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f)
                                fs_in_desc.bEndpointAddress;
                hs_out_desc.bEndpointAddress =
                                fs_out_desc.bEndpointAddress;
+               hs_notify_desc.bEndpointAddress =
+                               fs_notify_desc.bEndpointAddress;
 
                /* copy descriptors, and track endpoint copies */
                f->hs_descriptors = usb_copy_descriptors(eth_hs_function);
@@ -662,6 +664,8 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f)
                                f->hs_descriptors, &hs_in_desc);
                rndis->hs.out = usb_find_endpoint(eth_hs_function,
                                f->hs_descriptors, &hs_out_desc);
+               rndis->hs.notify = usb_find_endpoint(eth_hs_function,
+                               f->hs_descriptors, &hs_notify_desc);
        }
 
        rndis->port.open = rndis_open;
index aad1359a3eb18719c30dff180f70482b131ae886..fb6f2933b01badb0075c285078fb6067fc7b6827 100644 (file)
@@ -143,6 +143,7 @@ static struct ftdi_sio_quirk ftdi_HE_TIRA1_quirk = {
 static struct usb_device_id id_table_combined [] = {
        { USB_DEVICE(FTDI_VID, FTDI_AMC232_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_CANUSB_PID) },
+       { USB_DEVICE(FTDI_VID, FTDI_CANDAPTER_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_0_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_1_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_2_PID) },
@@ -166,6 +167,7 @@ static struct usb_device_id id_table_combined [] = {
        { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_PID) },
        { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) },
        { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) },
+       { USB_DEVICE(FTDI_VID, FTDI_SPROG_II) },
        { USB_DEVICE(FTDI_VID, FTDI_XF_632_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_XF_634_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_XF_547_PID) },
index 07a3992abad2b546095e35d247a3d7e68aec1eec..373ee09975bbd8c80b2a158aa32b9c6595a3bfbe 100644 (file)
@@ -40,6 +40,9 @@
 /* AlphaMicro Components AMC-232USB01 device */
 #define FTDI_AMC232_PID 0xFF00 /* Product Id */
 
+/* www.candapter.com Ewert Energy Systems CANdapter device */
+#define FTDI_CANDAPTER_PID 0x9F80 /* Product Id */
+
 /* SCS HF Radio Modems PID's (http://www.scs-ptc.com) */
 /* the VID is the standard ftdi vid (FTDI_VID) */
 #define FTDI_SCS_DEVICE_0_PID 0xD010    /* SCS PTC-IIusb */
@@ -75,6 +78,9 @@
 /* OpenDCC (www.opendcc.de) product id */
 #define FTDI_OPENDCC_PID       0xBFD8
 
+/* Sprog II (Andrew Crosland's SprogII DCC interface) */
+#define FTDI_SPROG_II          0xF0C8
+
 /* www.crystalfontz.com devices - thanx for providing free devices for evaluation ! */
 /* they use the ftdi chipset for the USB interface and the vendor id is the same */
 #define FTDI_XF_632_PID 0xFC08 /* 632: 16x2 Character Display */
index 491c8857b6448277a5cd49c51e88f6ac496233ad..1aed584be5eb9a528d904b3b3209afef29f40383 100644 (file)
@@ -91,6 +91,8 @@ static struct usb_device_id id_table [] = {
        { USB_DEVICE(WS002IN_VENDOR_ID, WS002IN_PRODUCT_ID) },
        { USB_DEVICE(COREGA_VENDOR_ID, COREGA_PRODUCT_ID) },
        { USB_DEVICE(YCCABLE_VENDOR_ID, YCCABLE_PRODUCT_ID) },
+       { USB_DEVICE(SUPERIAL_VENDOR_ID, SUPERIAL_PRODUCT_ID) },
+       { USB_DEVICE(HP_VENDOR_ID, HP_LD220_PRODUCT_ID) },
        { }                                     /* Terminating entry */
 };
 
index a3bd039c78e96769beeff504e4da6c32f63daa14..54974f446a8c2f51f213d293d3a2f53bcaf6479d 100644 (file)
 /* Y.C. Cable U.S.A., Inc - USB to RS-232 */
 #define YCCABLE_VENDOR_ID      0x05ad
 #define YCCABLE_PRODUCT_ID     0x0fba
+
+/* "Superial" USB - Serial */
+#define SUPERIAL_VENDOR_ID     0x5372
+#define SUPERIAL_PRODUCT_ID    0x2303
+
+/* Hewlett-Packard LD220-HP POS Pole Display */
+#define HP_VENDOR_ID           0x03f0
+#define HP_LD220_PRODUCT_ID    0x3524
index 31c42d1cae13cf746e49cce12c9f588247da2c5c..01d0c70d60e9b41129b44e76893958990f780b10 100644 (file)
  * For questions or problems with this driver, contact Texas Instruments
  * technical support, or Al Borchers <alborchers@steinerpoint.com>, or
  * Peter Berger <pberger@brimson.com>.
- *
- * This driver needs this hotplug script in /etc/hotplug/usb/ti_usb_3410_5052
- * or in /etc/hotplug.d/usb/ti_usb_3410_5052.hotplug to set the device
- * configuration.
- *
- * #!/bin/bash
- *
- * BOOT_CONFIG=1
- * ACTIVE_CONFIG=2
- *
- * if [[ "$ACTION" != "add" ]]
- * then
- *     exit
- * fi
- *
- * CONFIG_PATH=/sys${DEVPATH%/?*}/bConfigurationValue
- *
- * if [[ 0`cat $CONFIG_PATH` -ne $BOOT_CONFIG ]]
- * then
- *     exit
- * fi
- *
- * PRODUCT=${PRODUCT%/?*}              # delete version
- * VENDOR_ID=`printf "%d" 0x${PRODUCT%/?*}`
- * PRODUCT_ID=`printf "%d" 0x${PRODUCT#*?/}`
- *
- * PARAM_PATH=/sys/module/ti_usb_3410_5052/parameters
- *
- * function scan() {
- *     s=$1
- *     shift
- *     for i
- *     do
- *             if [[ $s -eq $i ]]
- *             then
- *                     return 0
- *             fi
- *     done
- *     return 1
- * }
- *
- * IFS=$IFS,
- *
- * if (scan $VENDOR_ID 1105 `cat $PARAM_PATH/vendor_3410` &&
- * scan $PRODUCT_ID 13328 `cat $PARAM_PATH/product_3410`) ||
- * (scan $VENDOR_ID 1105 `cat $PARAM_PATH/vendor_5052` &&
- * scan $PRODUCT_ID 20562 20818 20570 20575 `cat $PARAM_PATH/product_5052`)
- * then
- *     echo $ACTIVE_CONFIG > $CONFIG_PATH
- * fi
  */
 
 #include <linux/kernel.h>
@@ -457,9 +407,10 @@ static int ti_startup(struct usb_serial *serial)
                goto free_tdev;
        }
 
-       /* the second configuration must be set (in sysfs by hotplug script) */
+       /* the second configuration must be set */
        if (dev->actconfig->desc.bConfigurationValue == TI_BOOT_CONFIG) {
-               status = -ENODEV;
+               status = usb_driver_set_configuration(dev, TI_ACTIVE_CONFIG);
+               status = status ? status : -ENODEV;
                goto free_tdev;
        }
 
index e61f2bfc64add77ab938367c45c08db542c589e0..bfcc1fe82518d0e5739b1e936cf43d1b1430390c 100644 (file)
@@ -167,8 +167,22 @@ UNUSUAL_DEV(  0x0421, 0x005d, 0x0001, 0x0600,
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_FIX_CAPACITY ),
 
+/* Reported by Ozan Sener <themgzzy@gmail.com> */
+UNUSUAL_DEV(  0x0421, 0x0060, 0x0551, 0x0551,
+               "Nokia",
+               "3500c",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_FIX_CAPACITY ),
+
+/* Reported by CSECSY Laszlo <boobaa@frugalware.org> */
+UNUSUAL_DEV(  0x0421, 0x0063, 0x0001, 0x0601,
+               "Nokia",
+               "Nokia 3109c",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_FIX_CAPACITY ),
+
 /* Patch for Nokia 5310 capacity */
-UNUSUAL_DEV(  0x0421, 0x006a, 0x0000, 0x0591,
+UNUSUAL_DEV(  0x0421, 0x006a, 0x0000, 0x0701,
                "Nokia",
                "5310",
                US_SC_DEVICE, US_PR_DEVICE, NULL,
index 8da5e5ab8547edcc955e1c22658aa096ac0f8bc3..a469a3d6edcbd49abb9897b524f6c25f25b46931 100644 (file)
@@ -5,61 +5,61 @@
  * --dte
  */
 
-#define FLUSH_CACHE_WORKAROUND 1
-
-void radeon_fifo_update_and_wait(struct radeonfb_info *rinfo, int entries)
+static void radeon_fixup_offset(struct radeonfb_info *rinfo)
 {
-       int i;
+       u32 local_base;
+
+       /* *** Ugly workaround *** */
+       /*
+        * On some platforms, the video memory is mapped at 0 in radeon chip space
+        * (like PPCs) by the firmware. X will always move it up so that it's seen
+        * by the chip to be at the same address as the PCI BAR.
+        * That means that when switching back from X, there is a mismatch between
+        * the offsets programmed into the engine. This means that potentially,
+        * accel operations done before radeonfb has a chance to re-init the engine
+        * will have incorrect offsets, and potentially trash system memory !
+        *
+        * The correct fix is for fbcon to never call any accel op before the engine
+        * has properly been re-initialized (by a call to set_var), but this is a
+        * complex fix. This workaround in the meantime, called before every accel
+        * operation, makes sure the offsets are in sync.
+        */
 
-       for (i=0; i<2000000; i++) {
-               rinfo->fifo_free = INREG(RBBM_STATUS) & 0x7f;
-               if (rinfo->fifo_free >= entries)
-                       return;
-               udelay(10);
-       }
-       printk(KERN_ERR "radeonfb: FIFO Timeout !\n");
-       /* XXX Todo: attempt to reset the engine */
-}
+       radeon_fifo_wait (1);
+       local_base = INREG(MC_FB_LOCATION) << 16;
+       if (local_base == rinfo->fb_local_base)
+               return;
 
-static inline void radeon_fifo_wait(struct radeonfb_info *rinfo, int entries)
-{
-       if (entries <= rinfo->fifo_free)
-               rinfo->fifo_free -= entries;
-       else
-               radeon_fifo_update_and_wait(rinfo, entries);
-}
+       rinfo->fb_local_base = local_base;
 
-static inline void radeonfb_set_creg(struct radeonfb_info *rinfo, u32 reg,
-                                    u32 *cache, u32 new_val)
-{
-       if (new_val == *cache)
-               return;
-       *cache = new_val;
-       radeon_fifo_wait(rinfo, 1);
-       OUTREG(reg, new_val);
+       radeon_fifo_wait (3);
+       OUTREG(DEFAULT_PITCH_OFFSET, (rinfo->pitch << 0x16) |
+                                    (rinfo->fb_local_base >> 10));
+       OUTREG(DST_PITCH_OFFSET, (rinfo->pitch << 0x16) | (rinfo->fb_local_base >> 10));
+       OUTREG(SRC_PITCH_OFFSET, (rinfo->pitch << 0x16) | (rinfo->fb_local_base >> 10));
 }
 
 static void radeonfb_prim_fillrect(struct radeonfb_info *rinfo, 
                                   const struct fb_fillrect *region)
 {
-       radeonfb_set_creg(rinfo, DP_GUI_MASTER_CNTL, &rinfo->dp_gui_mc_cache,
-                         rinfo->dp_gui_mc_base | GMC_BRUSH_SOLID_COLOR | ROP3_P);
-       radeonfb_set_creg(rinfo, DP_CNTL, &rinfo->dp_cntl_cache,
-                         DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM);
-       radeonfb_set_creg(rinfo, DP_BRUSH_FRGD_CLR, &rinfo->dp_brush_fg_cache,
-                         region->color);
-
-       /* Ensure the dst cache is flushed and the engine idle before
-        * issuing the operation.
-        *
-        * This works around engine lockups on some cards
-        */
-#if FLUSH_CACHE_WORKAROUND
-       radeon_fifo_wait(rinfo, 2);
+       radeon_fifo_wait(4);  
+  
+       OUTREG(DP_GUI_MASTER_CNTL,  
+               rinfo->dp_gui_master_cntl  /* contains, like GMC_DST_32BPP */
+                | GMC_BRUSH_SOLID_COLOR
+                | ROP3_P);
+       if (radeon_get_dstbpp(rinfo->depth) != DST_8BPP)
+               OUTREG(DP_BRUSH_FRGD_CLR, rinfo->pseudo_palette[region->color]);
+       else
+               OUTREG(DP_BRUSH_FRGD_CLR, region->color);
+       OUTREG(DP_WRITE_MSK, 0xffffffff);
+       OUTREG(DP_CNTL, (DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM));
+
+       radeon_fifo_wait(2);
        OUTREG(DSTCACHE_CTLSTAT, RB2D_DC_FLUSH_ALL);
        OUTREG(WAIT_UNTIL, (WAIT_2D_IDLECLEAN | WAIT_DMA_GUI_IDLE));
-#endif
-       radeon_fifo_wait(rinfo, 2);
+
+       radeon_fifo_wait(2);  
        OUTREG(DST_Y_X, (region->dy << 16) | region->dx);
        OUTREG(DST_WIDTH_HEIGHT, (region->width << 16) | region->height);
 }
@@ -70,14 +70,15 @@ void radeonfb_fillrect(struct fb_info *info, const struct fb_fillrect *region)
        struct fb_fillrect modded;
        int vxres, vyres;
   
-       WARN_ON(rinfo->gfx_mode);
-       if (info->state != FBINFO_STATE_RUNNING || rinfo->gfx_mode)
+       if (info->state != FBINFO_STATE_RUNNING)
                return;
        if (info->flags & FBINFO_HWACCEL_DISABLED) {
                cfb_fillrect(info, region);
                return;
        }
 
+       radeon_fixup_offset(rinfo);
+
        vxres = info->var.xres_virtual;
        vyres = info->var.yres_virtual;
 
@@ -90,10 +91,6 @@ void radeonfb_fillrect(struct fb_info *info, const struct fb_fillrect *region)
        if(modded.dx + modded.width  > vxres) modded.width  = vxres - modded.dx;
        if(modded.dy + modded.height > vyres) modded.height = vyres - modded.dy;
 
-       if (info->fix.visual == FB_VISUAL_TRUECOLOR ||
-           info->fix.visual == FB_VISUAL_DIRECTCOLOR )
-               modded.color = ((u32 *) (info->pseudo_palette))[region->color];
-
        radeonfb_prim_fillrect(rinfo, &modded);
 }
 
@@ -112,22 +109,22 @@ static void radeonfb_prim_copyarea(struct radeonfb_info *rinfo,
        if ( xdir < 0 ) { sx += w-1; dx += w-1; }
        if ( ydir < 0 ) { sy += h-1; dy += h-1; }
 
-       radeonfb_set_creg(rinfo, DP_GUI_MASTER_CNTL, &rinfo->dp_gui_mc_cache,
-                         rinfo->dp_gui_mc_base |
-                         GMC_BRUSH_NONE |
-                         GMC_SRC_DATATYPE_COLOR |
-                         ROP3_S |
-                         DP_SRC_SOURCE_MEMORY);
-       radeonfb_set_creg(rinfo, DP_CNTL, &rinfo->dp_cntl_cache,
-                         (xdir>=0 ? DST_X_LEFT_TO_RIGHT : 0) |
-                         (ydir>=0 ? DST_Y_TOP_TO_BOTTOM : 0));
-
-#if FLUSH_CACHE_WORKAROUND
-       radeon_fifo_wait(rinfo, 2);
+       radeon_fifo_wait(3);
+       OUTREG(DP_GUI_MASTER_CNTL,
+               rinfo->dp_gui_master_cntl /* i.e. GMC_DST_32BPP */
+               | GMC_BRUSH_NONE
+               | GMC_SRC_DSTCOLOR
+               | ROP3_S 
+               | DP_SRC_SOURCE_MEMORY );
+       OUTREG(DP_WRITE_MSK, 0xffffffff);
+       OUTREG(DP_CNTL, (xdir>=0 ? DST_X_LEFT_TO_RIGHT : 0)
+                       | (ydir>=0 ? DST_Y_TOP_TO_BOTTOM : 0));
+
+       radeon_fifo_wait(2);
        OUTREG(DSTCACHE_CTLSTAT, RB2D_DC_FLUSH_ALL);
        OUTREG(WAIT_UNTIL, (WAIT_2D_IDLECLEAN | WAIT_DMA_GUI_IDLE));
-#endif
-       radeon_fifo_wait(rinfo, 3);
+
+       radeon_fifo_wait(3);
        OUTREG(SRC_Y_X, (sy << 16) | sx);
        OUTREG(DST_Y_X, (dy << 16) | dx);
        OUTREG(DST_HEIGHT_WIDTH, (h << 16) | w);
@@ -146,14 +143,15 @@ void radeonfb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
        modded.width  = area->width;
        modded.height = area->height;
   
-       WARN_ON(rinfo->gfx_mode);
-       if (info->state != FBINFO_STATE_RUNNING || rinfo->gfx_mode)
+       if (info->state != FBINFO_STATE_RUNNING)
                return;
        if (info->flags & FBINFO_HWACCEL_DISABLED) {
                cfb_copyarea(info, area);
                return;
        }
 
+       radeon_fixup_offset(rinfo);
+
        vxres = info->var.xres_virtual;
        vyres = info->var.yres_virtual;
 
@@ -170,116 +168,13 @@ void radeonfb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
        radeonfb_prim_copyarea(rinfo, &modded);
 }
 
-static void radeonfb_prim_imageblit(struct radeonfb_info *rinfo,
-                                   const struct fb_image *image,
-                                   u32 fg, u32 bg)
-{
-       unsigned int dwords;
-       u32 *bits;
-
-       radeonfb_set_creg(rinfo, DP_GUI_MASTER_CNTL, &rinfo->dp_gui_mc_cache,
-                         rinfo->dp_gui_mc_base |
-                         GMC_BRUSH_NONE | GMC_DST_CLIP_LEAVE |
-                         GMC_SRC_DATATYPE_MONO_FG_BG |
-                         ROP3_S |
-                         GMC_BYTE_ORDER_MSB_TO_LSB |
-                         DP_SRC_SOURCE_HOST_DATA);
-       radeonfb_set_creg(rinfo, DP_CNTL, &rinfo->dp_cntl_cache,
-                         DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM);
-       radeonfb_set_creg(rinfo, DP_SRC_FRGD_CLR, &rinfo->dp_src_fg_cache, fg);
-       radeonfb_set_creg(rinfo, DP_SRC_BKGD_CLR, &rinfo->dp_src_bg_cache, bg);
-
-       /* Ensure the dst cache is flushed and the engine idle before
-        * issuing the operation.
-        *
-        * This works around engine lockups on some cards
-        */
-#if FLUSH_CACHE_WORKAROUND
-       radeon_fifo_wait(rinfo, 2);
-       OUTREG(DSTCACHE_CTLSTAT, RB2D_DC_FLUSH_ALL);
-       OUTREG(WAIT_UNTIL, (WAIT_2D_IDLECLEAN | WAIT_DMA_GUI_IDLE));
-#endif
-
-       /* X here pads width to a multiple of 32 and uses the clipper to
-        * adjust the result. Is that really necessary ? Things seem to
-        * work ok for me without that and the doco doesn't seem to imply]
-        * there is such a restriction.
-        */
-       radeon_fifo_wait(rinfo, 4);
-       OUTREG(SC_TOP_LEFT, (image->dy << 16) | image->dx);
-       OUTREG(SC_BOTTOM_RIGHT, ((image->dy + image->height) << 16) |
-              (image->dx + image->width));
-       OUTREG(DST_Y_X, (image->dy << 16) | image->dx);
-
-       OUTREG(DST_HEIGHT_WIDTH, (image->height << 16) | ((image->width + 31) & ~31));
-
-       dwords = (image->width + 31) >> 5;
-       dwords *= image->height;
-       bits = (u32*)(image->data);
-
-       while(dwords >= 8) {
-               radeon_fifo_wait(rinfo, 8);
-#if BITS_PER_LONG == 64
-               __raw_writeq(*((u64 *)(bits)), rinfo->mmio_base + HOST_DATA0);
-               __raw_writeq(*((u64 *)(bits+2)), rinfo->mmio_base + HOST_DATA2);
-               __raw_writeq(*((u64 *)(bits+4)), rinfo->mmio_base + HOST_DATA4);
-               __raw_writeq(*((u64 *)(bits+6)), rinfo->mmio_base + HOST_DATA6);
-               bits += 8;
-#else
-               __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA0);
-               __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA1);
-               __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA2);
-               __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA3);
-               __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA4);
-               __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA5);
-               __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA6);
-               __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA7);
-#endif
-               dwords -= 8;
-       }
-       while(dwords--) {
-               radeon_fifo_wait(rinfo, 1);
-               __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA0);
-       }
-}
-
 void radeonfb_imageblit(struct fb_info *info, const struct fb_image *image)
 {
        struct radeonfb_info *rinfo = info->par;
-       u32 fg, bg;
 
-       WARN_ON(rinfo->gfx_mode);
-       if (info->state != FBINFO_STATE_RUNNING || rinfo->gfx_mode)
-               return;
-
-       if (!image->width || !image->height)
+       if (info->state != FBINFO_STATE_RUNNING)
                return;
-
-       /* We only do 1 bpp color expansion for now */
-       if (!accel_cexp ||
-           (info->flags & FBINFO_HWACCEL_DISABLED) || image->depth != 1)
-               goto fallback;
-
-       /* Fallback if running out of the screen. We may do clipping
-        * in the future */
-       if ((image->dx + image->width) > info->var.xres_virtual ||
-           (image->dy + image->height) > info->var.yres_virtual)
-               goto fallback;
-
-       if (info->fix.visual == FB_VISUAL_TRUECOLOR ||
-           info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
-               fg = ((u32*)(info->pseudo_palette))[image->fg_color];
-               bg = ((u32*)(info->pseudo_palette))[image->bg_color];
-       } else {
-               fg = image->fg_color;
-               bg = image->bg_color;
-       }
-
-       radeonfb_prim_imageblit(rinfo, image, fg, bg);
-       return;
-
- fallback:
-       radeon_engine_idle(rinfo);
+       radeon_engine_idle();
 
        cfb_imageblit(info, image);
 }
@@ -290,8 +185,7 @@ int radeonfb_sync(struct fb_info *info)
 
        if (info->state != FBINFO_STATE_RUNNING)
                return 0;
-
-       radeon_engine_idle(rinfo);
+       radeon_engine_idle();
 
        return 0;
 }
@@ -367,10 +261,9 @@ void radeonfb_engine_init (struct radeonfb_info *rinfo)
        /* disable 3D engine */
        OUTREG(RB3D_CNTL, 0);
 
-       rinfo->fifo_free = 0;
        radeonfb_engine_reset(rinfo);
 
-       radeon_fifo_wait(rinfo, 1);
+       radeon_fifo_wait (1);
        if (IS_R300_VARIANT(rinfo)) {
                OUTREG(RB2D_DSTCACHE_MODE, INREG(RB2D_DSTCACHE_MODE) |
                       RB2D_DC_AUTOFLUSH_ENABLE |
@@ -384,7 +277,7 @@ void radeonfb_engine_init (struct radeonfb_info *rinfo)
                OUTREG(RB2D_DSTCACHE_MODE, 0);
        }
 
-       radeon_fifo_wait(rinfo, 3);
+       radeon_fifo_wait (3);
        /* We re-read MC_FB_LOCATION from card as it can have been
         * modified by XFree drivers (ouch !)
         */
@@ -395,57 +288,41 @@ void radeonfb_engine_init (struct radeonfb_info *rinfo)
        OUTREG(DST_PITCH_OFFSET, (rinfo->pitch << 0x16) | (rinfo->fb_local_base >> 10));
        OUTREG(SRC_PITCH_OFFSET, (rinfo->pitch << 0x16) | (rinfo->fb_local_base >> 10));
 
-       radeon_fifo_wait(rinfo, 1);
-#ifdef __BIG_ENDIAN
+       radeon_fifo_wait (1);
+#if defined(__BIG_ENDIAN)
        OUTREGP(DP_DATATYPE, HOST_BIG_ENDIAN_EN, ~HOST_BIG_ENDIAN_EN);
 #else
        OUTREGP(DP_DATATYPE, 0, ~HOST_BIG_ENDIAN_EN);
 #endif
-       radeon_fifo_wait(rinfo, 2);
+       radeon_fifo_wait (2);
        OUTREG(DEFAULT_SC_TOP_LEFT, 0);
        OUTREG(DEFAULT_SC_BOTTOM_RIGHT, (DEFAULT_SC_RIGHT_MAX |
                                         DEFAULT_SC_BOTTOM_MAX));
 
-       /* set default DP_GUI_MASTER_CNTL */
        temp = radeon_get_dstbpp(rinfo->depth);
-       rinfo->dp_gui_mc_base = ((temp << 8) | GMC_CLR_CMP_CNTL_DIS);
+       rinfo->dp_gui_master_cntl = ((temp << 8) | GMC_CLR_CMP_CNTL_DIS);
 
-       rinfo->dp_gui_mc_cache = rinfo->dp_gui_mc_base |
-               GMC_BRUSH_SOLID_COLOR |
-               GMC_SRC_DATATYPE_COLOR;
-       radeon_fifo_wait(rinfo, 1);
-       OUTREG(DP_GUI_MASTER_CNTL, rinfo->dp_gui_mc_cache);
+       radeon_fifo_wait (1);
+       OUTREG(DP_GUI_MASTER_CNTL, (rinfo->dp_gui_master_cntl |
+                                   GMC_BRUSH_SOLID_COLOR |
+                                   GMC_SRC_DATATYPE_COLOR));
 
+       radeon_fifo_wait (7);
 
        /* clear line drawing regs */
-       radeon_fifo_wait(rinfo, 2);
        OUTREG(DST_LINE_START, 0);
        OUTREG(DST_LINE_END, 0);
 
-       /* set brush and source color regs */
-       rinfo->dp_brush_fg_cache = 0xffffffff;
-       rinfo->dp_brush_bg_cache = 0x00000000;
-       rinfo->dp_src_fg_cache = 0xffffffff;
-       rinfo->dp_src_bg_cache = 0x00000000;
-       radeon_fifo_wait(rinfo, 4);
-       OUTREG(DP_BRUSH_FRGD_CLR, rinfo->dp_brush_fg_cache);
-       OUTREG(DP_BRUSH_BKGD_CLR, rinfo->dp_brush_bg_cache);
-       OUTREG(DP_SRC_FRGD_CLR, rinfo->dp_src_fg_cache);
-       OUTREG(DP_SRC_BKGD_CLR, rinfo->dp_src_bg_cache);
-
-       /* Default direction */
-       rinfo->dp_cntl_cache = DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM;
-       radeon_fifo_wait(rinfo, 1);
-       OUTREG(DP_CNTL, rinfo->dp_cntl_cache);
+       /* set brush color regs */
+       OUTREG(DP_BRUSH_FRGD_CLR, 0xffffffff);
+       OUTREG(DP_BRUSH_BKGD_CLR, 0x00000000);
+
+       /* set source color regs */
+       OUTREG(DP_SRC_FRGD_CLR, 0xffffffff);
+       OUTREG(DP_SRC_BKGD_CLR, 0x00000000);
 
        /* default write mask */
-       radeon_fifo_wait(rinfo, 1);
        OUTREG(DP_WRITE_MSK, 0xffffffff);
 
-       /* Default to no swapping of host data */
-       radeon_fifo_wait(rinfo, 1);
-       OUTREG(RBBM_GUICNTL, RBBM_GUICNTL_HOST_DATA_SWAP_NONE);
-
-       /* Make sure it's settled */
-       radeon_engine_idle(rinfo);
+       radeon_engine_idle ();
 }
index f343ba83f0ae0dbb6e50d25aa8ea95239598b1fd..1a056adb61c836784fce99d1c0314e710f4948e8 100644 (file)
@@ -66,7 +66,7 @@ static int radeon_bl_update_status(struct backlight_device *bd)
                level = bd->props.brightness;
 
        del_timer_sync(&rinfo->lvds_timer);
-       radeon_engine_idle(rinfo);
+       radeon_engine_idle();
 
        lvds_gen_cntl = INREG(LVDS_GEN_CNTL);
        if (level > 0) {
index d5b27f9d374d0f23f72dd18c67be2e2e8d22c579..d0f1a7fc2c9df7da492102db83247624c94dac9f 100644 (file)
@@ -282,8 +282,6 @@ static int backlight = 1;
 static int backlight = 0;
 #endif
 
-int accel_cexp = 0;
-
 /*
  * prototypes
  */
@@ -854,6 +852,7 @@ static int radeonfb_pan_display (struct fb_var_screeninfo *var,
         if (rinfo->asleep)
                return 0;
 
+       radeon_fifo_wait(2);
         OUTREG(CRTC_OFFSET, ((var->yoffset * var->xres_virtual + var->xoffset)
                             * var->bits_per_pixel / 8) & ~7);
         return 0;
@@ -883,6 +882,7 @@ static int radeonfb_ioctl (struct fb_info *info, unsigned int cmd,
                        if (rc)
                                return rc;
 
+                       radeon_fifo_wait(2);
                        if (value & 0x01) {
                                tmp = INREG(LVDS_GEN_CNTL);
 
@@ -940,7 +940,7 @@ int radeon_screen_blank(struct radeonfb_info *rinfo, int blank, int mode_switch)
        if (rinfo->lock_blank)
                return 0;
 
-       radeon_engine_idle(rinfo);
+       radeon_engine_idle();
 
        val = INREG(CRTC_EXT_CNTL);
         val &= ~(CRTC_DISPLAY_DIS | CRTC_HSYNC_DIS |
@@ -1048,7 +1048,7 @@ static int radeonfb_blank (int blank, struct fb_info *info)
 
        if (rinfo->asleep)
                return 0;
-
+               
        return radeon_screen_blank(rinfo, blank, 0);
 }
 
@@ -1074,6 +1074,8 @@ static int radeon_setcolreg (unsigned regno, unsigned red, unsigned green,
         pindex = regno;
 
         if (!rinfo->asleep) {
+               radeon_fifo_wait(9);
+
                if (rinfo->bpp == 16) {
                        pindex = regno * 8;
 
@@ -1242,6 +1244,8 @@ static void radeon_write_pll_regs(struct radeonfb_info *rinfo, struct radeon_reg
 {
        int i;
 
+       radeon_fifo_wait(20);
+
        /* Workaround from XFree */
        if (rinfo->is_mobility) {
                /* A temporal workaround for the occational blanking on certain laptop
@@ -1337,7 +1341,7 @@ static void radeon_lvds_timer_func(unsigned long data)
 {
        struct radeonfb_info *rinfo = (struct radeonfb_info *)data;
 
-       radeon_engine_idle(rinfo);
+       radeon_engine_idle();
 
        OUTREG(LVDS_GEN_CNTL, rinfo->pending_lvds_gen_cntl);
 }
@@ -1355,11 +1359,10 @@ void radeon_write_mode (struct radeonfb_info *rinfo, struct radeon_regs *mode,
        if (nomodeset)
                return;
 
-       radeon_engine_idle(rinfo);
-
        if (!regs_only)
                radeon_screen_blank(rinfo, FB_BLANK_NORMAL, 0);
 
+       radeon_fifo_wait(31);
        for (i=0; i<10; i++)
                OUTREG(common_regs[i].reg, common_regs[i].val);
 
@@ -1387,6 +1390,7 @@ void radeon_write_mode (struct radeonfb_info *rinfo, struct radeon_regs *mode,
        radeon_write_pll_regs(rinfo, mode);
 
        if ((primary_mon == MT_DFP) || (primary_mon == MT_LCD)) {
+               radeon_fifo_wait(10);
                OUTREG(FP_CRTC_H_TOTAL_DISP, mode->fp_crtc_h_total_disp);
                OUTREG(FP_CRTC_V_TOTAL_DISP, mode->fp_crtc_v_total_disp);
                OUTREG(FP_H_SYNC_STRT_WID, mode->fp_h_sync_strt_wid);
@@ -1401,6 +1405,7 @@ void radeon_write_mode (struct radeonfb_info *rinfo, struct radeon_regs *mode,
        if (!regs_only)
                radeon_screen_blank(rinfo, FB_BLANK_UNBLANK, 0);
 
+       radeon_fifo_wait(2);
        OUTPLL(VCLK_ECP_CNTL, mode->vclk_ecp_cntl);
        
        return;
@@ -1551,7 +1556,7 @@ static int radeonfb_set_par(struct fb_info *info)
        /* We always want engine to be idle on a mode switch, even
         * if we won't actually change the mode
         */
-       radeon_engine_idle(rinfo);
+       radeon_engine_idle();
 
        hSyncStart = mode->xres + mode->right_margin;
        hSyncEnd = hSyncStart + mode->hsync_len;
@@ -1846,6 +1851,7 @@ static int radeonfb_set_par(struct fb_info *info)
        return 0;
 }
 
+
 static struct fb_ops radeonfb_ops = {
        .owner                  = THIS_MODULE,
        .fb_check_var           = radeonfb_check_var,
@@ -1869,7 +1875,6 @@ static int __devinit radeon_set_fbinfo (struct radeonfb_info *rinfo)
        info->par = rinfo;
        info->pseudo_palette = rinfo->pseudo_palette;
        info->flags = FBINFO_DEFAULT
-                   | FBINFO_HWACCEL_IMAGEBLIT
                    | FBINFO_HWACCEL_COPYAREA
                    | FBINFO_HWACCEL_FILLRECT
                    | FBINFO_HWACCEL_XPAN
@@ -1877,7 +1882,6 @@ static int __devinit radeon_set_fbinfo (struct radeonfb_info *rinfo)
        info->fbops = &radeonfb_ops;
        info->screen_base = rinfo->fb_base;
        info->screen_size = rinfo->mapped_vram;
-
        /* Fill fix common fields */
        strlcpy(info->fix.id, rinfo->name, sizeof(info->fix.id));
         info->fix.smem_start = rinfo->fb_base_phys;
@@ -1892,25 +1896,8 @@ static int __devinit radeon_set_fbinfo (struct radeonfb_info *rinfo)
         info->fix.mmio_len = RADEON_REGSIZE;
        info->fix.accel = FB_ACCEL_ATI_RADEON;
 
-       /* Allocate colormap */
        fb_alloc_cmap(&info->cmap, 256, 0);
 
-       /* Setup pixmap used for acceleration */
-#define PIXMAP_SIZE    (2048 * 4)
-
-       info->pixmap.addr = kmalloc(PIXMAP_SIZE, GFP_KERNEL);
-       if (!info->pixmap.addr) {
-               printk(KERN_ERR "radeonfb: Failed to allocate pixmap !\n");
-               noaccel = 1;
-               goto bail;
-       }
-       info->pixmap.size = PIXMAP_SIZE;
-       info->pixmap.flags = FB_PIXMAP_SYSTEM;
-       info->pixmap.scan_align = 4;
-       info->pixmap.buf_align = 4;
-       info->pixmap.access_align = 32;
-
-bail:
        if (noaccel)
                info->flags |= FBINFO_HWACCEL_DISABLED;
 
@@ -2019,6 +2006,7 @@ static void radeon_identify_vram(struct radeonfb_info *rinfo)
           u32 tom = INREG(NB_TOM);
           tmp = ((((tom >> 16) - (tom & 0xffff) + 1) << 6) * 1024);
 
+               radeon_fifo_wait(6);
           OUTREG(MC_FB_LOCATION, tom);
           OUTREG(DISPLAY_BASE_ADDR, (tom & 0xffff) << 16);
           OUTREG(CRTC2_DISPLAY_BASE_ADDR, (tom & 0xffff) << 16);
@@ -2522,8 +2510,6 @@ static int __init radeonfb_setup (char *options)
                } else if (!strncmp(this_opt, "ignore_devlist", 14)) {
                        ignore_devlist = 1;
 #endif
-               } else if (!strncmp(this_opt, "accel_cexp", 12)) {
-                       accel_cexp = 1;
                } else
                        mode_option = this_opt;
        }
@@ -2571,8 +2557,6 @@ module_param(monitor_layout, charp, 0);
 MODULE_PARM_DESC(monitor_layout, "Specify monitor mapping (like XFree86)");
 module_param(force_measure_pll, bool, 0);
 MODULE_PARM_DESC(force_measure_pll, "Force measurement of PLL (debug)");
-module_param(accel_cexp, bool, 0);
-MODULE_PARM_DESC(accel_cexp, "Use acceleration engine for color expansion");
 #ifdef CONFIG_MTRR
 module_param(nomtrr, bool, 0);
 MODULE_PARM_DESC(nomtrr, "bool: disable use of MTRR registers");
index 3df5015f1d13f540a6bc9b5cbfdd663663604eac..675abdafc2d8d047741ed3b8fdf2c0291343440c 100644 (file)
@@ -2653,9 +2653,9 @@ int radeonfb_pci_suspend(struct pci_dev *pdev, pm_message_t mesg)
 
        if (!(info->flags & FBINFO_HWACCEL_DISABLED)) {
                /* Make sure engine is reset */
-               radeon_engine_idle(rinfo);
+               radeon_engine_idle();
                radeonfb_engine_reset(rinfo);
-               radeon_engine_idle(rinfo);
+               radeon_engine_idle();
        }
 
        /* Blank display and LCD */
@@ -2767,7 +2767,7 @@ int radeonfb_pci_resume(struct pci_dev *pdev)
 
                rinfo->asleep = 0;
        } else
-               radeon_engine_idle(rinfo);
+               radeon_engine_idle();
 
        /* Restore display & engine */
        radeon_write_mode (rinfo, &rinfo->state, 1);
index 974ca6d865405a7140fa67244bcfab0bcf13d7c0..3ea1b00fdd22ae66e882fc764359920ab8a609c5 100644 (file)
@@ -336,15 +336,7 @@ struct radeonfb_info {
        int                     mon2_type;
        u8                      *mon2_EDID;
 
-       /* accel bits */
-       u32                     dp_gui_mc_base;
-       u32                     dp_gui_mc_cache;
-       u32                     dp_cntl_cache;
-       u32                     dp_brush_fg_cache;
-       u32                     dp_brush_bg_cache;
-       u32                     dp_src_fg_cache;
-       u32                     dp_src_bg_cache;
-       u32                     fifo_free;
+       u32                     dp_gui_master_cntl;
 
        struct pll_info         pll;
 
@@ -356,7 +348,6 @@ struct radeonfb_info {
        int                     lock_blank;
        int                     dynclk;
        int                     no_schedule;
-       int                     gfx_mode;
        enum radeon_pm_mode     pm_mode;
        reinit_function_ptr     reinit_func;
 
@@ -401,14 +392,8 @@ static inline void _radeon_msleep(struct radeonfb_info *rinfo, unsigned long ms)
 #define OUTREG8(addr,val)      writeb(val, (rinfo->mmio_base)+addr)
 #define INREG16(addr)          readw((rinfo->mmio_base)+addr)
 #define OUTREG16(addr,val)     writew(val, (rinfo->mmio_base)+addr)
-
-#ifdef CONFIG_PPC
-#define INREG(addr)            ({ eieio(); ld_le32(rinfo->mmio_base+(addr)); })
-#define OUTREG(addr,val)       do { eieio(); st_le32(rinfo->mmio_base+(addr),(val)); } while(0)
-#else
 #define INREG(addr)            readl((rinfo->mmio_base)+addr)
 #define OUTREG(addr,val)       writel(val, (rinfo->mmio_base)+addr)
-#endif
 
 static inline void _OUTREGP(struct radeonfb_info *rinfo, u32 addr,
                       u32 val, u32 mask)
@@ -550,7 +535,17 @@ static inline u32 radeon_get_dstbpp(u16 depth)
  * 2D Engine helper routines
  */
 
-extern void radeon_fifo_update_and_wait(struct radeonfb_info *rinfo, int entries);
+static inline void _radeon_fifo_wait(struct radeonfb_info *rinfo, int entries)
+{
+       int i;
+
+       for (i=0; i<2000000; i++) {
+               if ((INREG(RBBM_STATUS) & 0x7f) >= entries)
+                       return;
+               udelay(1);
+       }
+       printk(KERN_ERR "radeonfb: FIFO Timeout !\n");
+}
 
 static inline void radeon_engine_flush (struct radeonfb_info *rinfo)
 {
@@ -563,7 +558,7 @@ static inline void radeon_engine_flush (struct radeonfb_info *rinfo)
        /* Ensure FIFO is empty, ie, make sure the flush commands
         * has reached the cache
         */
-       radeon_fifo_update_and_wait(rinfo, 64);
+       _radeon_fifo_wait (rinfo, 64);
 
        /* Wait for the flush to complete */
        for (i=0; i < 2000000; i++) {
@@ -575,12 +570,12 @@ static inline void radeon_engine_flush (struct radeonfb_info *rinfo)
 }
 
 
-static inline void radeon_engine_idle(struct radeonfb_info *rinfo)
+static inline void _radeon_engine_idle(struct radeonfb_info *rinfo)
 {
        int i;
 
        /* ensure FIFO is empty before waiting for idle */
-       radeon_fifo_update_and_wait (rinfo, 64);
+       _radeon_fifo_wait (rinfo, 64);
 
        for (i=0; i<2000000; i++) {
                if (((INREG(RBBM_STATUS) & GUI_ACTIVE)) == 0) {
@@ -593,6 +588,8 @@ static inline void radeon_engine_idle(struct radeonfb_info *rinfo)
 }
 
 
+#define radeon_engine_idle()           _radeon_engine_idle(rinfo)
+#define radeon_fifo_wait(entries)      _radeon_fifo_wait(rinfo,entries)
 #define radeon_msleep(ms)              _radeon_msleep(rinfo,ms)
 
 
@@ -622,7 +619,6 @@ extern void radeonfb_imageblit(struct fb_info *p, const struct fb_image *image);
 extern int radeonfb_sync(struct fb_info *info);
 extern void radeonfb_engine_init (struct radeonfb_info *rinfo);
 extern void radeonfb_engine_reset(struct radeonfb_info *rinfo);
-extern void radeon_fixup_mem_offset(struct radeonfb_info *rinfo);
 
 /* Other functions */
 extern int radeon_screen_blank(struct radeonfb_info *rinfo, int blank, int mode_switch);
@@ -638,6 +634,4 @@ static inline void radeonfb_bl_init(struct radeonfb_info *rinfo) {}
 static inline void radeonfb_bl_exit(struct radeonfb_info *rinfo) {}
 #endif
 
-extern int accel_cexp;
-
 #endif /* __RADEONFB_H__ */
index 0d15b0eaf79a7b5a56eb50bb00efc1a9571280e6..5139c25ca96288474cf976cf5577be12c6d6d30b 100644 (file)
@@ -356,7 +356,9 @@ int w1_reset_select_slave(struct w1_slave *sl)
                w1_write_8(sl->master, W1_SKIP_ROM);
        else {
                u8 match[9] = {W1_MATCH_ROM, };
-               memcpy(&match[1], (u8 *)&sl->reg_num, 8);
+               u64 rn = le64_to_cpu(*((u64*)&sl->reg_num));
+
+               memcpy(&match[1], &rn, 8);
                w1_write_block(sl->master, match, 9);
        }
        return 0;
index 3031e3233dd625302715ff10c3e49ddc4b1aa7f7..2a983d49d19cba78984b5ae317ded774605121c1 100644 (file)
@@ -45,7 +45,7 @@ int v9fs_fid_add(struct dentry *dentry, struct p9_fid *fid)
        struct v9fs_dentry *dent;
 
        P9_DPRINTK(P9_DEBUG_VFS, "fid %d dentry %s\n",
-                                       fid->fid, dentry->d_iname);
+                                       fid->fid, dentry->d_name.name);
 
        dent = dentry->d_fsdata;
        if (!dent) {
@@ -79,7 +79,7 @@ static struct p9_fid *v9fs_fid_find(struct dentry *dentry, u32 uid, int any)
        struct p9_fid *fid, *ret;
 
        P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p) uid %d any %d\n",
-               dentry->d_iname, dentry, uid, any);
+               dentry->d_name.name, dentry, uid, any);
        dent = (struct v9fs_dentry *) dentry->d_fsdata;
        ret = NULL;
        if (dent) {
index 24eb01087b6d63313404dff82b4f192177189342..332b5ff02fec11b8e8e43645c93ae09679ac9a61 100644 (file)
@@ -160,7 +160,7 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses)
                                v9ses->flags |= V9FS_ACCESS_ANY;
                        else {
                                v9ses->flags |= V9FS_ACCESS_SINGLE;
-                               v9ses->uid = simple_strtol(s, &e, 10);
+                               v9ses->uid = simple_strtoul(s, &e, 10);
                                if (*e != '\0')
                                        v9ses->uid = ~0;
                        }
index f9534f18df0a1a2bafdf70cd1b00466b8c5fb6b7..06dcc7c4f2343ebb9cced85a8da46c880849794f 100644 (file)
@@ -52,7 +52,8 @@
 
 static int v9fs_dentry_delete(struct dentry *dentry)
 {
-       P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry);
+       P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_name.name,
+                                                                       dentry);
 
        return 1;
 }
@@ -69,7 +70,8 @@ static int v9fs_dentry_delete(struct dentry *dentry)
 static int v9fs_cached_dentry_delete(struct dentry *dentry)
 {
        struct inode *inode = dentry->d_inode;
-       P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry);
+       P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_name.name,
+                                                                       dentry);
 
        if(!inode)
                return 1;
@@ -88,7 +90,8 @@ void v9fs_dentry_release(struct dentry *dentry)
        struct v9fs_dentry *dent;
        struct p9_fid *temp, *current_fid;
 
-       P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry);
+       P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_name.name,
+                                                                       dentry);
        dent = dentry->d_fsdata;
        if (dent) {
                list_for_each_entry_safe(current_fid, temp, &dent->fidlist,
index 8314d3f43b716f41560e4517d42eaade5cfc1459..2dfcf5487efebff886a9f42c23733875d4264608 100644 (file)
@@ -963,7 +963,8 @@ static int v9fs_vfs_readlink(struct dentry *dentry, char __user * buffer,
        if (buflen > PATH_MAX)
                buflen = PATH_MAX;
 
-       P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry);
+       P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_name.name,
+                                                                       dentry);
 
        retval = v9fs_readlink(dentry, link, buflen);
 
@@ -1022,7 +1023,8 @@ v9fs_vfs_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
 {
        char *s = nd_get_link(nd);
 
-       P9_DPRINTK(P9_DEBUG_VFS, " %s %s\n", dentry->d_name.name, s);
+       P9_DPRINTK(P9_DEBUG_VFS, " %s %s\n", dentry->d_name.name,
+               IS_ERR(s) ? "<error>" : s);
        if (!IS_ERR(s))
                __putname(s);
 }
index 2af8626ced435c10bea3654e38570f7decaa8a7d..6d51696dc762d3b6656ed027fe2d7ed40d549409 100644 (file)
@@ -3983,7 +3983,8 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
 
                node->flags = le16_to_cpu(pSMBr->DFSFlags);
                if (is_unicode) {
-                       __le16 *tmp = kmalloc(strlen(searchName)*2, GFP_KERNEL);
+                       __le16 *tmp = kmalloc(strlen(searchName)*2 + 2,
+                                               GFP_KERNEL);
                        cifsConvertToUCS((__le16 *) tmp, searchName,
                                        PATH_MAX, nls_codepage, remap);
                        node->path_consumed = hostlen_fromUCS(tmp,
index 5f180cf7abbd6f4e21dc1a662932f06ad56a6407..5e0c0d0aef7dcbcf1c9baae7b108cc47bce1f9cf 100644 (file)
@@ -86,7 +86,8 @@
 #define OCFS2_CLEAR_INCOMPAT_FEATURE(sb,mask)                  \
        OCFS2_SB(sb)->s_feature_incompat &= ~(mask)
 
-#define OCFS2_FEATURE_COMPAT_SUPP      OCFS2_FEATURE_COMPAT_BACKUP_SB
+#define OCFS2_FEATURE_COMPAT_SUPP      (OCFS2_FEATURE_COMPAT_BACKUP_SB \
+                                        | OCFS2_FEATURE_COMPAT_JBD2_SB)
 #define OCFS2_FEATURE_INCOMPAT_SUPP    (OCFS2_FEATURE_INCOMPAT_LOCAL_MOUNT \
                                         | OCFS2_FEATURE_INCOMPAT_SPARSE_ALLOC \
                                         | OCFS2_FEATURE_INCOMPAT_INLINE_DATA \
  */
 #define OCFS2_FEATURE_COMPAT_BACKUP_SB         0x0001
 
+/*
+ * The filesystem will correctly handle journal feature bits.
+ */
+#define OCFS2_FEATURE_COMPAT_JBD2_SB           0x0002
+
 /*
  * Unwritten extents support.
  */
index 054e2efb0b7e71f196025c777d61f2cc5954e0f9..74d7367ade13e1e36cb74a13327ca65573fabf86 100644 (file)
@@ -2645,9 +2645,9 @@ static int ocfs2_xattr_update_xattr_search(struct inode *inode,
                                return ret;
                        }
 
-                       i = xs->here - old_xh->xh_entries;
-                       xs->here = &xs->header->xh_entries[i];
                }
+               i = xs->here - old_xh->xh_entries;
+               xs->here = &xs->header->xh_entries[i];
        }
 
        return ret;
index 09d33c7740f0bfbf48f195c57bb209a03297baf4..db8852d8bcf7a41c515ef2ec7c19db097026971e 100644 (file)
 
 /* Defaults for debug_level, debug and normal */
 
-#define ACPI_DEBUG_DEFAULT          (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT)
+#define ACPI_DEBUG_DEFAULT          (ACPI_LV_INFO)
 #define ACPI_NORMAL_DEFAULT         (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT)
 #define ACPI_DEBUG_ALL              (ACPI_LV_AML_DISASSEMBLE | ACPI_LV_ALL_EXCEPTIONS | ACPI_LV_ALL)
 
index 029c8c06c151ab4f7153d4aeb143bb51ed4d258c..0515e754449d13bd8d10fddb3f6b92ad6f6e5fd0 100644 (file)
@@ -141,6 +141,10 @@ static inline void *acpi_os_acquire_object(acpi_cache_t * cache)
 /*
  * We need to show where it is safe to preempt execution of ACPICA
  */
-#define ACPI_PREEMPTION_POINT()        cond_resched()
+#define ACPI_PREEMPTION_POINT()                \
+       do {                            \
+               if (!irqs_disabled())   \
+                       cond_resched(); \
+       } while (0)
 
 #endif                         /* __ACLINUX_H__ */
index 12c07c1866b2072f9c2529829c27dac5077c96a3..b8ba6941f587c7d12ac850f621826efd00107c35 100644 (file)
@@ -33,15 +33,14 @@ struct bug_entry {
 
 #ifndef __WARN
 #ifndef __ASSEMBLY__
-extern void warn_on_slowpath(const char *file, const int line);
 extern void warn_slowpath(const char *file, const int line,
                const char *fmt, ...) __attribute__((format(printf, 3, 4)));
 #define WANT_WARN_ON_SLOWPATH
 #endif
-#define __WARN() warn_on_slowpath(__FILE__, __LINE__)
-#define __WARN_printf(arg...) warn_slowpath(__FILE__, __LINE__, arg)
+#define __WARN()               warn_slowpath(__FILE__, __LINE__, NULL)
+#define __WARN_printf(arg...)  warn_slowpath(__FILE__, __LINE__, arg)
 #else
-#define __WARN_printf(arg...) do { printk(arg); __WARN(); } while (0)
+#define __WARN_printf(arg...)  do { printk(arg); __WARN(); } while (0)
 #endif
 
 #ifndef WARN_ON
index 777dbf695d449e4b0d03346a8b5c39877ee34d97..27b1bcffe40853e8e1f6c1f629525c94ec2a343e 100644 (file)
@@ -2,7 +2,6 @@
 #define _LINUX_BH_H
 
 extern void local_bh_disable(void);
-extern void __local_bh_enable(void);
 extern void _local_bh_enable(void);
 extern void local_bh_enable(void);
 extern void local_bh_enable_ip(unsigned long ip);
index 4aaa4afb1cb99f849bb345a8189153e65e94cbcd..096476f1fb356a2c17ab5d267be9a2295f55295a 100644 (file)
@@ -17,7 +17,7 @@ extern int debug_locks_off(void);
 ({                                                                     \
        int __ret = 0;                                                  \
                                                                        \
-       if (unlikely(c)) {                                              \
+       if (!oops_in_progress && unlikely(c)) {                         \
                if (debug_locks_off() && !debug_locks_silent)           \
                        WARN_ON(1);                                     \
                __ret = 1;                                              \
index 586ab56a3ec3500e601e786e0e858f1980fbc8e5..3bf5bb5a34f9fba43b9248caf434eb6059e6329e 100644 (file)
@@ -25,7 +25,8 @@ union ktime;
 #define FUTEX_WAKE_BITSET      10
 
 #define FUTEX_PRIVATE_FLAG     128
-#define FUTEX_CMD_MASK         ~FUTEX_PRIVATE_FLAG
+#define FUTEX_CLOCK_REALTIME   256
+#define FUTEX_CMD_MASK         ~(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME)
 
 #define FUTEX_WAIT_PRIVATE     (FUTEX_WAIT | FUTEX_PRIVATE_FLAG)
 #define FUTEX_WAKE_PRIVATE     (FUTEX_WAKE | FUTEX_PRIVATE_FLAG)
@@ -164,6 +165,8 @@ union futex_key {
        } both;
 };
 
+#define FUTEX_KEY_INIT (union futex_key) { .both = { .ptr = NULL } }
+
 #ifdef CONFIG_FUTEX
 extern void exit_robust_list(struct task_struct *curr);
 extern void exit_pi_state_list(struct task_struct *curr);
index 181006cc94a03ecd29630d80d91762589fc1c316..9b70b9231693fc07a446f892220d2c91a6300672 100644 (file)
@@ -118,13 +118,17 @@ static inline void account_system_vtime(struct task_struct *tsk)
 }
 #endif
 
-#if defined(CONFIG_PREEMPT_RCU) && defined(CONFIG_NO_HZ)
+#if defined(CONFIG_NO_HZ) && !defined(CONFIG_CLASSIC_RCU)
 extern void rcu_irq_enter(void);
 extern void rcu_irq_exit(void);
+extern void rcu_nmi_enter(void);
+extern void rcu_nmi_exit(void);
 #else
 # define rcu_irq_enter() do { } while (0)
 # define rcu_irq_exit() do { } while (0)
-#endif /* CONFIG_PREEMPT_RCU */
+# define rcu_nmi_enter() do { } while (0)
+# define rcu_nmi_exit() do { } while (0)
+#endif /* #if defined(CONFIG_NO_HZ) && !defined(CONFIG_CLASSIC_RCU) */
 
 /*
  * It is safe to do non-atomic ops on ->hardirq_context,
@@ -134,7 +138,6 @@ extern void rcu_irq_exit(void);
  */
 #define __irq_enter()                                  \
        do {                                            \
-               rcu_irq_enter();                        \
                account_system_vtime(current);          \
                add_preempt_count(HARDIRQ_OFFSET);      \
                trace_hardirq_enter();                  \
@@ -153,7 +156,6 @@ extern void irq_enter(void);
                trace_hardirq_exit();                   \
                account_system_vtime(current);          \
                sub_preempt_count(HARDIRQ_OFFSET);      \
-               rcu_irq_exit();                         \
        } while (0)
 
 /*
@@ -161,7 +163,7 @@ extern void irq_enter(void);
  */
 extern void irq_exit(void);
 
-#define nmi_enter()            do { lockdep_off(); __irq_enter(); } while (0)
-#define nmi_exit()             do { __irq_exit(); lockdep_on(); } while (0)
+#define nmi_enter()            do { lockdep_off(); rcu_nmi_enter(); __irq_enter(); } while (0)
+#define nmi_exit()             do { __irq_exit(); rcu_nmi_exit(); lockdep_on(); } while (0)
 
 #endif /* LINUX_HARDIRQ_H */
index dc7e0d0a6474448aba71b4c32d2045afc44e240e..269df5a17b30af1b7349c131da05abec8aa95046 100644 (file)
@@ -141,6 +141,15 @@ extern int _cond_resched(void);
                (__x < 0) ? -__x : __x;         \
        })
 
+#ifdef CONFIG_PROVE_LOCKING
+void might_fault(void);
+#else
+static inline void might_fault(void)
+{
+       might_sleep();
+}
+#endif
+
 extern struct atomic_notifier_head panic_notifier_list;
 extern long (*panic_blink)(long time);
 NORET_TYPE void panic(const char * fmt, ...)
@@ -188,6 +197,8 @@ extern unsigned long long memparse(const char *ptr, char **retptr);
 extern int core_kernel_text(unsigned long addr);
 extern int __kernel_text_address(unsigned long addr);
 extern int kernel_text_address(unsigned long addr);
+extern int func_ptr_is_kernel_text(void *ptr);
+
 struct pid;
 extern struct pid *session_of_pgrp(struct pid *pgrp);
 
index 29aec6e100203da5e8b0f40ab726360ca08b8e72..37a0361f46853633dd9ea830b7e495efa7b0d00c 100644 (file)
@@ -73,6 +73,8 @@ struct lock_class_key {
        struct lockdep_subclass_key     subkeys[MAX_LOCKDEP_SUBCLASSES];
 };
 
+#define LOCKSTAT_POINTS                4
+
 /*
  * The lock-class itself:
  */
@@ -119,7 +121,8 @@ struct lock_class {
        int                             name_version;
 
 #ifdef CONFIG_LOCK_STAT
-       unsigned long                   contention_point[4];
+       unsigned long                   contention_point[LOCKSTAT_POINTS];
+       unsigned long                   contending_point[LOCKSTAT_POINTS];
 #endif
 };
 
@@ -144,6 +147,7 @@ enum bounce_type {
 
 struct lock_class_stats {
        unsigned long                   contention_point[4];
+       unsigned long                   contending_point[4];
        struct lock_time                read_waittime;
        struct lock_time                write_waittime;
        struct lock_time                read_holdtime;
@@ -165,6 +169,7 @@ struct lockdep_map {
        const char                      *name;
 #ifdef CONFIG_LOCK_STAT
        int                             cpu;
+       unsigned long                   ip;
 #endif
 };
 
@@ -309,8 +314,15 @@ extern void lock_acquire(struct lockdep_map *lock, unsigned int subclass,
 extern void lock_release(struct lockdep_map *lock, int nested,
                         unsigned long ip);
 
-extern void lock_set_subclass(struct lockdep_map *lock, unsigned int subclass,
-                             unsigned long ip);
+extern void lock_set_class(struct lockdep_map *lock, const char *name,
+                          struct lock_class_key *key, unsigned int subclass,
+                          unsigned long ip);
+
+static inline void lock_set_subclass(struct lockdep_map *lock,
+               unsigned int subclass, unsigned long ip)
+{
+       lock_set_class(lock, lock->name, lock->key, subclass, ip);
+}
 
 # define INIT_LOCKDEP                          .lockdep_recursion = 0,
 
@@ -328,6 +340,7 @@ static inline void lockdep_on(void)
 
 # define lock_acquire(l, s, t, r, c, n, i)     do { } while (0)
 # define lock_release(l, n, i)                 do { } while (0)
+# define lock_set_class(l, n, k, s, i)         do { } while (0)
 # define lock_set_subclass(l, s, i)            do { } while (0)
 # define lockdep_init()                                do { } while (0)
 # define lockdep_info()                                do { } while (0)
@@ -356,7 +369,7 @@ struct lock_class_key { };
 #ifdef CONFIG_LOCK_STAT
 
 extern void lock_contended(struct lockdep_map *lock, unsigned long ip);
-extern void lock_acquired(struct lockdep_map *lock);
+extern void lock_acquired(struct lockdep_map *lock, unsigned long ip);
 
 #define LOCK_CONTENDED(_lock, try, lock)                       \
 do {                                                           \
@@ -364,13 +377,13 @@ do {                                                              \
                lock_contended(&(_lock)->dep_map, _RET_IP_);    \
                lock(_lock);                                    \
        }                                                       \
-       lock_acquired(&(_lock)->dep_map);                       \
+       lock_acquired(&(_lock)->dep_map, _RET_IP_);                     \
 } while (0)
 
 #else /* CONFIG_LOCK_STAT */
 
 #define lock_contended(lockdep_map, ip) do {} while (0)
-#define lock_acquired(lockdep_map) do {} while (0)
+#define lock_acquired(lockdep_map, ip) do {} while (0)
 
 #define LOCK_CONTENDED(_lock, try, lock) \
        lock(_lock)
@@ -481,4 +494,22 @@ static inline void print_irqtrace_events(struct task_struct *curr)
 # define lock_map_release(l)                   do { } while (0)
 #endif
 
+#ifdef CONFIG_PROVE_LOCKING
+# define might_lock(lock)                                              \
+do {                                                                   \
+       typecheck(struct lockdep_map *, &(lock)->dep_map);              \
+       lock_acquire(&(lock)->dep_map, 0, 0, 0, 2, NULL, _THIS_IP_);    \
+       lock_release(&(lock)->dep_map, 0, _THIS_IP_);                   \
+} while (0)
+# define might_lock_read(lock)                                                 \
+do {                                                                   \
+       typecheck(struct lockdep_map *, &(lock)->dep_map);              \
+       lock_acquire(&(lock)->dep_map, 0, 0, 1, 2, NULL, _THIS_IP_);    \
+       lock_release(&(lock)->dep_map, 0, _THIS_IP_);                   \
+} while (0)
+#else
+# define might_lock(lock) do { } while (0)
+# define might_lock_read(lock) do { } while (0)
+#endif
+
 #endif /* __LINUX_LOCKDEP_H */
index bc6da10ceee002ef14850e8025839e67d0d87c48..7a0e5c4f8072c53f4b0d6a7dfa681355324e065f 100644 (file)
@@ -144,6 +144,8 @@ extern int __must_check mutex_lock_killable(struct mutex *lock);
 /*
  * NOTE: mutex_trylock() follows the spin_trylock() convention,
  *       not the down_trylock() convention!
+ *
+ * Returns 1 if the mutex has been acquired successfully, and 0 on contention.
  */
 extern int mutex_trylock(struct mutex *lock);
 extern void mutex_unlock(struct mutex *lock);
index 9d77b1d7dca806e540838d27bbc632961a340f0e..e26f54952892e9c46be142344e36ceb37f19f6f0 100644 (file)
@@ -319,6 +319,7 @@ enum
 {
        NAPI_STATE_SCHED,       /* Poll is scheduled */
        NAPI_STATE_DISABLE,     /* Disable pending */
+       NAPI_STATE_NPSVC,       /* Netpoll - don't dequeue from poll_list */
 };
 
 extern void __napi_schedule(struct napi_struct *n);
@@ -1497,6 +1498,12 @@ static inline void netif_rx_complete(struct net_device *dev,
 {
        unsigned long flags;
 
+       /*
+        * don't let napi dequeue from the cpu poll list
+        * just in case its running on a different cpu
+        */
+       if (unlikely(test_bit(NAPI_STATE_NPSVC, &napi->state)))
+               return;
        local_irq_save(flags);
        __netif_rx_complete(dev, napi);
        local_irq_restore(flags);
index c19595c8930491d8e0f64a2795d36cb127ee3b60..29fe9ea1d3463a5964ee158eeb1a39211b1c756f 100644 (file)
@@ -141,6 +141,7 @@ enum ctattr_protonat {
 #define CTA_PROTONAT_MAX (__CTA_PROTONAT_MAX - 1)
 
 enum ctattr_natseq {
+       CTA_NAT_SEQ_UNSPEC,
        CTA_NAT_SEQ_CORRECTION_POS,
        CTA_NAT_SEQ_OFFSET_BEFORE,
        CTA_NAT_SEQ_OFFSET_AFTER,
index 5f89b62e6983192befd7cc827df50fb53cd0a173..301dda829e37499f5cdaa0950e3a11f0c4ed3b74 100644 (file)
@@ -41,7 +41,7 @@
 #include <linux/seqlock.h>
 
 #ifdef CONFIG_RCU_CPU_STALL_DETECTOR
-#define RCU_SECONDS_TILL_STALL_CHECK   ( 3 * HZ) /* for rcp->jiffies_stall */
+#define RCU_SECONDS_TILL_STALL_CHECK   (10 * HZ) /* for rcp->jiffies_stall */
 #define RCU_SECONDS_TILL_STALL_RECHECK (30 * HZ) /* for rcp->jiffies_stall */
 #endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
 
index 86f1f5e43e333766ec6a9fe5276875046c2f2526..bfd289aff5766bdd2921314fdbea014a7bf84a7f 100644 (file)
@@ -52,11 +52,15 @@ struct rcu_head {
        void (*func)(struct rcu_head *head);
 };
 
-#ifdef CONFIG_CLASSIC_RCU
+#if defined(CONFIG_CLASSIC_RCU)
 #include <linux/rcuclassic.h>
-#else /* #ifdef CONFIG_CLASSIC_RCU */
+#elif defined(CONFIG_TREE_RCU)
+#include <linux/rcutree.h>
+#elif defined(CONFIG_PREEMPT_RCU)
 #include <linux/rcupreempt.h>
-#endif /* #else #ifdef CONFIG_CLASSIC_RCU */
+#else
+#error "Unknown RCU implementation specified to kernel configuration"
+#endif /* #else #if defined(CONFIG_CLASSIC_RCU) */
 
 #define RCU_HEAD_INIT  { .next = NULL, .func = NULL }
 #define RCU_HEAD(head) struct rcu_head head = RCU_HEAD_INIT
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
new file mode 100644 (file)
index 0000000..d4368b7
--- /dev/null
@@ -0,0 +1,329 @@
+/*
+ * Read-Copy Update mechanism for mutual exclusion (tree-based version)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Copyright IBM Corporation, 2008
+ *
+ * Author: Dipankar Sarma <dipankar@in.ibm.com>
+ *        Paul E. McKenney <paulmck@linux.vnet.ibm.com> Hierarchical algorithm
+ *
+ * Based on the original work by Paul McKenney <paulmck@us.ibm.com>
+ * and inputs from Rusty Russell, Andrea Arcangeli and Andi Kleen.
+ *
+ * For detailed explanation of Read-Copy Update mechanism see -
+ *     Documentation/RCU
+ */
+
+#ifndef __LINUX_RCUTREE_H
+#define __LINUX_RCUTREE_H
+
+#include <linux/cache.h>
+#include <linux/spinlock.h>
+#include <linux/threads.h>
+#include <linux/percpu.h>
+#include <linux/cpumask.h>
+#include <linux/seqlock.h>
+
+/*
+ * Define shape of hierarchy based on NR_CPUS and CONFIG_RCU_FANOUT.
+ * In theory, it should be possible to add more levels straightforwardly.
+ * In practice, this has not been tested, so there is probably some
+ * bug somewhere.
+ */
+#define MAX_RCU_LVLS 3
+#define RCU_FANOUT           (CONFIG_RCU_FANOUT)
+#define RCU_FANOUT_SQ        (RCU_FANOUT * RCU_FANOUT)
+#define RCU_FANOUT_CUBE              (RCU_FANOUT_SQ * RCU_FANOUT)
+
+#if NR_CPUS <= RCU_FANOUT
+#  define NUM_RCU_LVLS       1
+#  define NUM_RCU_LVL_0              1
+#  define NUM_RCU_LVL_1              (NR_CPUS)
+#  define NUM_RCU_LVL_2              0
+#  define NUM_RCU_LVL_3              0
+#elif NR_CPUS <= RCU_FANOUT_SQ
+#  define NUM_RCU_LVLS       2
+#  define NUM_RCU_LVL_0              1
+#  define NUM_RCU_LVL_1              (((NR_CPUS) + RCU_FANOUT - 1) / RCU_FANOUT)
+#  define NUM_RCU_LVL_2              (NR_CPUS)
+#  define NUM_RCU_LVL_3              0
+#elif NR_CPUS <= RCU_FANOUT_CUBE
+#  define NUM_RCU_LVLS       3
+#  define NUM_RCU_LVL_0              1
+#  define NUM_RCU_LVL_1              (((NR_CPUS) + RCU_FANOUT_SQ - 1) / RCU_FANOUT_SQ)
+#  define NUM_RCU_LVL_2              (((NR_CPUS) + (RCU_FANOUT) - 1) / (RCU_FANOUT))
+#  define NUM_RCU_LVL_3              NR_CPUS
+#else
+# error "CONFIG_RCU_FANOUT insufficient for NR_CPUS"
+#endif /* #if (NR_CPUS) <= RCU_FANOUT */
+
+#define RCU_SUM (NUM_RCU_LVL_0 + NUM_RCU_LVL_1 + NUM_RCU_LVL_2 + NUM_RCU_LVL_3)
+#define NUM_RCU_NODES (RCU_SUM - NR_CPUS)
+
+/*
+ * Dynticks per-CPU state.
+ */
+struct rcu_dynticks {
+       int dynticks_nesting;   /* Track nesting level, sort of. */
+       int dynticks;           /* Even value for dynticks-idle, else odd. */
+       int dynticks_nmi;       /* Even value for either dynticks-idle or */
+                               /*  not in nmi handler, else odd.  So this */
+                               /*  remains even for nmi from irq handler. */
+};
+
+/*
+ * Definition for node within the RCU grace-period-detection hierarchy.
+ */
+struct rcu_node {
+       spinlock_t lock;
+       unsigned long qsmask;   /* CPUs or groups that need to switch in */
+                               /*  order for current grace period to proceed.*/
+       unsigned long qsmaskinit;
+                               /* Per-GP initialization for qsmask. */
+       unsigned long grpmask;  /* Mask to apply to parent qsmask. */
+       int     grplo;          /* lowest-numbered CPU or group here. */
+       int     grphi;          /* highest-numbered CPU or group here. */
+       u8      grpnum;         /* CPU/group number for next level up. */
+       u8      level;          /* root is at level 0. */
+       struct rcu_node *parent;
+} ____cacheline_internodealigned_in_smp;
+
+/* Index values for nxttail array in struct rcu_data. */
+#define RCU_DONE_TAIL          0       /* Also RCU_WAIT head. */
+#define RCU_WAIT_TAIL          1       /* Also RCU_NEXT_READY head. */
+#define RCU_NEXT_READY_TAIL    2       /* Also RCU_NEXT head. */
+#define RCU_NEXT_TAIL          3
+#define RCU_NEXT_SIZE          4
+
+/* Per-CPU data for read-copy update. */
+struct rcu_data {
+       /* 1) quiescent-state and grace-period handling : */
+       long            completed;      /* Track rsp->completed gp number */
+                                       /*  in order to detect GP end. */
+       long            gpnum;          /* Highest gp number that this CPU */
+                                       /*  is aware of having started. */
+       long            passed_quiesc_completed;
+                                       /* Value of completed at time of qs. */
+       bool            passed_quiesc;  /* User-mode/idle loop etc. */
+       bool            qs_pending;     /* Core waits for quiesc state. */
+       bool            beenonline;     /* CPU online at least once. */
+       struct rcu_node *mynode;        /* This CPU's leaf of hierarchy */
+       unsigned long grpmask;          /* Mask to apply to leaf qsmask. */
+
+       /* 2) batch handling */
+       /*
+        * If nxtlist is not NULL, it is partitioned as follows.
+        * Any of the partitions might be empty, in which case the
+        * pointer to that partition will be equal to the pointer for
+        * the following partition.  When the list is empty, all of
+        * the nxttail elements point to nxtlist, which is NULL.
+        *
+        * [*nxttail[RCU_NEXT_READY_TAIL], NULL = *nxttail[RCU_NEXT_TAIL]):
+        *      Entries that might have arrived after current GP ended
+        * [*nxttail[RCU_WAIT_TAIL], *nxttail[RCU_NEXT_READY_TAIL]):
+        *      Entries known to have arrived before current GP ended
+        * [*nxttail[RCU_DONE_TAIL], *nxttail[RCU_WAIT_TAIL]):
+        *      Entries that batch # <= ->completed - 1: waiting for current GP
+        * [nxtlist, *nxttail[RCU_DONE_TAIL]):
+        *      Entries that batch # <= ->completed
+        *      The grace period for these entries has completed, and
+        *      the other grace-period-completed entries may be moved
+        *      here temporarily in rcu_process_callbacks().
+        */
+       struct rcu_head *nxtlist;
+       struct rcu_head **nxttail[RCU_NEXT_SIZE];
+       long            qlen;           /* # of queued callbacks */
+       long            blimit;         /* Upper limit on a processed batch */
+
+#ifdef CONFIG_NO_HZ
+       /* 3) dynticks interface. */
+       struct rcu_dynticks *dynticks;  /* Shared per-CPU dynticks state. */
+       int dynticks_snap;              /* Per-GP tracking for dynticks. */
+       int dynticks_nmi_snap;          /* Per-GP tracking for dynticks_nmi. */
+#endif /* #ifdef CONFIG_NO_HZ */
+
+       /* 4) reasons this CPU needed to be kicked by force_quiescent_state */
+#ifdef CONFIG_NO_HZ
+       unsigned long dynticks_fqs;     /* Kicked due to dynticks idle. */
+#endif /* #ifdef CONFIG_NO_HZ */
+       unsigned long offline_fqs;      /* Kicked due to being offline. */
+       unsigned long resched_ipi;      /* Sent a resched IPI. */
+
+       /* 5) state to allow this CPU to force_quiescent_state on others */
+       long n_rcu_pending;             /* rcu_pending() calls since boot. */
+       long n_rcu_pending_force_qs;    /* when to force quiescent states. */
+
+       int cpu;
+};
+
+/* Values for signaled field in struct rcu_state. */
+#define RCU_GP_INIT            0       /* Grace period being initialized. */
+#define RCU_SAVE_DYNTICK       1       /* Need to scan dyntick state. */
+#define RCU_FORCE_QS           2       /* Need to force quiescent state. */
+#ifdef CONFIG_NO_HZ
+#define RCU_SIGNAL_INIT                RCU_SAVE_DYNTICK
+#else /* #ifdef CONFIG_NO_HZ */
+#define RCU_SIGNAL_INIT                RCU_FORCE_QS
+#endif /* #else #ifdef CONFIG_NO_HZ */
+
+#define RCU_JIFFIES_TILL_FORCE_QS       3      /* for rsp->jiffies_force_qs */
+#ifdef CONFIG_RCU_CPU_STALL_DETECTOR
+#define RCU_SECONDS_TILL_STALL_CHECK   (10 * HZ)  /* for rsp->jiffies_stall */
+#define RCU_SECONDS_TILL_STALL_RECHECK (30 * HZ)  /* for rsp->jiffies_stall */
+#define RCU_STALL_RAT_DELAY            2         /* Allow other CPUs time */
+                                                 /*  to take at least one */
+                                                 /*  scheduling clock irq */
+                                                 /*  before ratting on them. */
+
+#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
+
+/*
+ * RCU global state, including node hierarchy.  This hierarchy is
+ * represented in "heap" form in a dense array.  The root (first level)
+ * of the hierarchy is in ->node[0] (referenced by ->level[0]), the second
+ * level in ->node[1] through ->node[m] (->node[1] referenced by ->level[1]),
+ * and the third level in ->node[m+1] and following (->node[m+1] referenced
+ * by ->level[2]).  The number of levels is determined by the number of
+ * CPUs and by CONFIG_RCU_FANOUT.  Small systems will have a "hierarchy"
+ * consisting of a single rcu_node.
+ */
+struct rcu_state {
+       struct rcu_node node[NUM_RCU_NODES];    /* Hierarchy. */
+       struct rcu_node *level[NUM_RCU_LVLS];   /* Hierarchy levels. */
+       u32 levelcnt[MAX_RCU_LVLS + 1];         /* # nodes in each level. */
+       u8 levelspread[NUM_RCU_LVLS];           /* kids/node in each level. */
+       struct rcu_data *rda[NR_CPUS];          /* array of rdp pointers. */
+
+       /* The following fields are guarded by the root rcu_node's lock. */
+
+       u8      signaled ____cacheline_internodealigned_in_smp;
+                                               /* Force QS state. */
+       long    gpnum;                          /* Current gp number. */
+       long    completed;                      /* # of last completed gp. */
+       spinlock_t onofflock;                   /* exclude on/offline and */
+                                               /*  starting new GP. */
+       spinlock_t fqslock;                     /* Only one task forcing */
+                                               /*  quiescent states. */
+       unsigned long jiffies_force_qs;         /* Time at which to invoke */
+                                               /*  force_quiescent_state(). */
+       unsigned long n_force_qs;               /* Number of calls to */
+                                               /*  force_quiescent_state(). */
+       unsigned long n_force_qs_lh;            /* ~Number of calls leaving */
+                                               /*  due to lock unavailable. */
+       unsigned long n_force_qs_ngp;           /* Number of calls leaving */
+                                               /*  due to no GP active. */
+#ifdef CONFIG_RCU_CPU_STALL_DETECTOR
+       unsigned long gp_start;                 /* Time at which GP started, */
+                                               /*  but in jiffies. */
+       unsigned long jiffies_stall;            /* Time at which to check */
+                                               /*  for CPU stalls. */
+#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
+#ifdef CONFIG_NO_HZ
+       long dynticks_completed;                /* Value of completed @ snap. */
+#endif /* #ifdef CONFIG_NO_HZ */
+};
+
+extern struct rcu_state rcu_state;
+DECLARE_PER_CPU(struct rcu_data, rcu_data);
+
+extern struct rcu_state rcu_bh_state;
+DECLARE_PER_CPU(struct rcu_data, rcu_bh_data);
+
+/*
+ * Increment the quiescent state counter.
+ * The counter is a bit degenerated: We do not need to know
+ * how many quiescent states passed, just if there was at least
+ * one since the start of the grace period. Thus just a flag.
+ */
+static inline void rcu_qsctr_inc(int cpu)
+{
+       struct rcu_data *rdp = &per_cpu(rcu_data, cpu);
+       rdp->passed_quiesc = 1;
+       rdp->passed_quiesc_completed = rdp->completed;
+}
+static inline void rcu_bh_qsctr_inc(int cpu)
+{
+       struct rcu_data *rdp = &per_cpu(rcu_bh_data, cpu);
+       rdp->passed_quiesc = 1;
+       rdp->passed_quiesc_completed = rdp->completed;
+}
+
+extern int rcu_pending(int cpu);
+extern int rcu_needs_cpu(int cpu);
+
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+extern struct lockdep_map rcu_lock_map;
+# define rcu_read_acquire()    \
+                       lock_acquire(&rcu_lock_map, 0, 0, 2, 1, NULL, _THIS_IP_)
+# define rcu_read_release()    lock_release(&rcu_lock_map, 1, _THIS_IP_)
+#else
+# define rcu_read_acquire()    do { } while (0)
+# define rcu_read_release()    do { } while (0)
+#endif
+
+static inline void __rcu_read_lock(void)
+{
+       preempt_disable();
+       __acquire(RCU);
+       rcu_read_acquire();
+}
+static inline void __rcu_read_unlock(void)
+{
+       rcu_read_release();
+       __release(RCU);
+       preempt_enable();
+}
+static inline void __rcu_read_lock_bh(void)
+{
+       local_bh_disable();
+       __acquire(RCU_BH);
+       rcu_read_acquire();
+}
+static inline void __rcu_read_unlock_bh(void)
+{
+       rcu_read_release();
+       __release(RCU_BH);
+       local_bh_enable();
+}
+
+#define __synchronize_sched() synchronize_rcu()
+
+#define call_rcu_sched(head, func) call_rcu(head, func)
+
+static inline void rcu_init_sched(void)
+{
+}
+
+extern void __rcu_init(void);
+extern void rcu_check_callbacks(int cpu, int user);
+extern void rcu_restart_cpu(int cpu);
+
+extern long rcu_batches_completed(void);
+extern long rcu_batches_completed_bh(void);
+
+#ifdef CONFIG_NO_HZ
+void rcu_enter_nohz(void);
+void rcu_exit_nohz(void);
+#else /* CONFIG_NO_HZ */
+static inline void rcu_enter_nohz(void)
+{
+}
+static inline void rcu_exit_nohz(void)
+{
+}
+#endif /* CONFIG_NO_HZ */
+
+#endif /* __LINUX_RCUTREE_H */
index 3f9a60043a975617a3b8217f8e69b24751c13e01..6e7ba16ff454f878d28315c02f66572b9734bd09 100644 (file)
@@ -146,6 +146,8 @@ static inline void smp_send_reschedule(int cpu) { }
 })
 #define smp_call_function_mask(mask, func, info, wait) \
                        (up_smp_call_function(func, info))
+#define smp_call_function_many(mask, func, info, wait) \
+                       (up_smp_call_function(func, info))
 static inline void init_call_single_data(void)
 {
 }
index fec6decfb983503ec8ae24bafa793f09b5f902b2..6b58367d145e8735eaebbf16bfec0733406389fb 100644 (file)
@@ -78,7 +78,7 @@ static inline unsigned long __copy_from_user_nocache(void *to,
                                                        \
                set_fs(KERNEL_DS);                      \
                pagefault_disable();                    \
-               ret = __get_user(retval, (__force typeof(retval) __user *)(addr));              \
+               ret = __copy_from_user_inatomic(&(retval), (__force typeof(retval) __user *)(addr), sizeof(retval));            \
                pagefault_enable();                     \
                set_fs(old_fs);                         \
                ret;                                    \
index 73a2f4eb1f7ae1a6f9c23131a56f5d1d6d631d58..9b42baed39009c75c8e3932a8c9be3cfbb0984f0 100644 (file)
@@ -158,8 +158,12 @@ struct usb_ctrlrequest {
  * (rarely) accepted by SET_DESCRIPTOR.
  *
  * Note that all multi-byte values here are encoded in little endian
- * byte order "on the wire".  But when exposed through Linux-USB APIs,
- * they've been converted to cpu byte order.
+ * byte order "on the wire".  Within the kernel and when exposed
+ * through the Linux-USB APIs, they are not converted to cpu byte
+ * order; it is the responsibility of the client code to do this.
+ * The single exception is when device and configuration descriptors (but
+ * not other descriptors) are read from usbfs (i.e. /proc/bus/usb/BBB/DDD);
+ * in this case the fields are converted to host endianness by the kernel.
  */
 
 /*
index 3025ae17ddbeb46207ca71e88b3d31d6aaad44a8..94c852d47d0f8d5c7d033279bf2f67ca3fd861dd 100644 (file)
@@ -135,9 +135,11 @@ struct dongle_reg {
 
 /* 
  * Per-packet information we need to hide inside sk_buff 
- * (must not exceed 48 bytes, check with struct sk_buff) 
+ * (must not exceed 48 bytes, check with struct sk_buff)
+ * The default_qdisc_pad field is a temporary hack.
  */
 struct irda_skb_cb {
+       unsigned int default_qdisc_pad;
        magic_t magic;       /* Be sure that we can trust the information */
        __u32   next_speed;  /* The Speed to be set *after* this frame */
        __u16   mtt;         /* Minimum turn around time */
index d5dcaf154ba4092412cb45e59bebebe5c6d23c5f..1cd09cc5b169460609ca91f7d71edaba6a32f284 100644 (file)
 #define CRTC_DISPLAY_DIS                          (1 << 10)
 #define CRTC_CRT_ON                               (1 << 15)
 
-/* DSTCACHE_MODE bits constants */
-#define RB2D_DC_AUTOFLUSH_ENABLE                   (1 << 8)
-#define RB2D_DC_DC_DISABLE_IGNORE_PE               (1 << 17)
 
 /* DSTCACHE_CTLSTAT bit constants */
 #define RB2D_DC_FLUSH_2D                          (1 << 0)
 #define GMC_DST_16BPP_YVYU422                      0x00000c00
 #define GMC_DST_32BPP_AYUV444                      0x00000e00
 #define GMC_DST_16BPP_ARGB4444                     0x00000f00
+#define GMC_SRC_MONO                               0x00000000
+#define GMC_SRC_MONO_LBKGD                         0x00001000
+#define GMC_SRC_DSTCOLOR                           0x00003000
 #define GMC_BYTE_ORDER_MSB_TO_LSB                  0x00000000
 #define GMC_BYTE_ORDER_LSB_TO_MSB                  0x00004000
 #define GMC_DP_CONVERSION_TEMP_9300                0x00008000
 #define GMC_DP_CONVERSION_TEMP_6500                0x00000000
+#define GMC_DP_SRC_RECT                            0x02000000
+#define GMC_DP_SRC_HOST                            0x03000000
 #define GMC_DP_SRC_HOST_BYTEALIGN                  0x04000000
 #define GMC_3D_FCN_EN_CLR                          0x00000000
 #define GMC_3D_FCN_EN_SET                          0x08000000
 #define GMC_WRITE_MASK_LEAVE                       0x00000000
 #define GMC_WRITE_MASK_SET                         0x40000000
 #define GMC_CLR_CMP_CNTL_DIS                      (1 << 28)
-#define GMC_SRC_DATATYPE_MASK                     (3 << 12)
-#define GMC_SRC_DATATYPE_MONO_FG_BG               (0 << 12)
-#define GMC_SRC_DATATYPE_MONO_FG_LA               (1 << 12)
 #define GMC_SRC_DATATYPE_COLOR                    (3 << 12)
 #define ROP3_S                                    0x00cc0000
 #define ROP3_SRCCOPY                              0x00cc0000
 #define DP_SRC_SOURCE_MASK                        (7    << 24)
 #define GMC_BRUSH_NONE                            (15   <<  4)
 #define DP_SRC_SOURCE_MEMORY                      (2    << 24)
-#define DP_SRC_SOURCE_HOST_DATA                           (3    << 24)
 #define GMC_BRUSH_SOLIDCOLOR                      0x000000d0
 
 /* DP_MIX bit constants */
 #define DISP_PWR_MAN_TV_ENABLE_RST                 (1 << 25)
 #define DISP_PWR_MAN_AUTO_PWRUP_EN                 (1 << 26)
 
-/* RBBM_GUICNTL constants */
-#define RBBM_GUICNTL_HOST_DATA_SWAP_NONE          (0 << 0)
-#define RBBM_GUICNTL_HOST_DATA_SWAP_16BIT          (1 << 0)
-#define RBBM_GUICNTL_HOST_DATA_SWAP_32BIT         (2 << 0)
-#define RBBM_GUICNTL_HOST_DATA_SWAP_HDW                   (3 << 0)
-
 /* masks */
 
 #define CONFIG_MEMSIZE_MASK            0x1f000000
index f763762d544a135a0a06f67f36701b9f0d331140..6b0fdedf3596a44aabe5015af2afffc6b3c6e7ab 100644 (file)
@@ -928,10 +928,90 @@ source "block/Kconfig"
 config PREEMPT_NOTIFIERS
        bool
 
+choice
+       prompt "RCU Implementation"
+       default CLASSIC_RCU
+
 config CLASSIC_RCU
-       def_bool !PREEMPT_RCU
+       bool "Classic RCU"
        help
          This option selects the classic RCU implementation that is
          designed for best read-side performance on non-realtime
-         systems.  Classic RCU is the default.  Note that the
-         PREEMPT_RCU symbol is used to select/deselect this option.
+         systems.
+
+         Select this option if you are unsure.
+
+config TREE_RCU
+       bool "Tree-based hierarchical RCU"
+       help
+         This option selects the RCU implementation that is
+         designed for very large SMP system with hundreds or
+         thousands of CPUs.
+
+config PREEMPT_RCU
+       bool "Preemptible RCU"
+       depends on PREEMPT
+       help
+         This option reduces the latency of the kernel by making certain
+         RCU sections preemptible. Normally RCU code is non-preemptible, if
+         this option is selected then read-only RCU sections become
+         preemptible. This helps latency, but may expose bugs due to
+         now-naive assumptions about each RCU read-side critical section
+         remaining on a given CPU through its execution.
+
+endchoice
+
+config RCU_TRACE
+       bool "Enable tracing for RCU"
+       depends on TREE_RCU || PREEMPT_RCU
+       help
+         This option provides tracing in RCU which presents stats
+         in debugfs for debugging RCU implementation.
+
+         Say Y here if you want to enable RCU tracing
+         Say N if you are unsure.
+
+config RCU_FANOUT
+       int "Tree-based hierarchical RCU fanout value"
+       range 2 64 if 64BIT
+       range 2 32 if !64BIT
+       depends on TREE_RCU
+       default 64 if 64BIT
+       default 32 if !64BIT
+       help
+         This option controls the fanout of hierarchical implementations
+         of RCU, allowing RCU to work efficiently on machines with
+         large numbers of CPUs.  This value must be at least the cube
+         root of NR_CPUS, which allows NR_CPUS up to 32,768 for 32-bit
+         systems and up to 262,144 for 64-bit systems.
+
+         Select a specific number if testing RCU itself.
+         Take the default if unsure.
+
+config RCU_FANOUT_EXACT
+       bool "Disable tree-based hierarchical RCU auto-balancing"
+       depends on TREE_RCU
+       default n
+       help
+         This option forces use of the exact RCU_FANOUT value specified,
+         regardless of imbalances in the hierarchy.  This is useful for
+         testing RCU itself, and might one day be useful on systems with
+         strong NUMA behavior.
+
+         Without RCU_FANOUT_EXACT, the code will balance the hierarchy.
+
+         Say N if unsure.
+
+config TREE_RCU_TRACE
+       def_bool RCU_TRACE && TREE_RCU
+       select DEBUG_FS
+       help
+         This option provides tracing for the TREE_RCU implementation,
+         permitting Makefile to trivially select kernel/rcutree_trace.c.
+
+config PREEMPT_RCU_TRACE
+       def_bool RCU_TRACE && PREEMPT_RCU
+       select DEBUG_FS
+       help
+         This option provides tracing for the PREEMPT_RCU implementation,
+         permitting Makefile to trivially select kernel/rcupreempt_trace.c.
index 9fdba03dc1fcd119c31274fb3590480aa1db9f05..bf987b95b3560fbd0a7d8a820335100a55e1d105 100644 (file)
@@ -52,28 +52,3 @@ config PREEMPT
 
 endchoice
 
-config PREEMPT_RCU
-       bool "Preemptible RCU"
-       depends on PREEMPT
-       default n
-       help
-         This option reduces the latency of the kernel by making certain
-         RCU sections preemptible. Normally RCU code is non-preemptible, if
-         this option is selected then read-only RCU sections become
-         preemptible. This helps latency, but may expose bugs due to
-         now-naive assumptions about each RCU read-side critical section
-         remaining on a given CPU through its execution.
-
-         Say N if you are unsure.
-
-config RCU_TRACE
-       bool "Enable tracing for RCU - currently stats in debugfs"
-       depends on PREEMPT_RCU
-       select DEBUG_FS
-       default y
-       help
-         This option provides tracing in RCU which presents stats
-         in debugfs for debugging RCU implementation.
-
-         Say Y here if you want to enable RCU tracing
-         Say N if you are unsure.
index 19fad003b19d6ac0752597f5a23e18341d1d579a..b4fdbbff5ec069feeaa21250c1ebd2f6cc28464b 100644 (file)
@@ -74,10 +74,10 @@ obj-$(CONFIG_GENERIC_HARDIRQS) += irq/
 obj-$(CONFIG_SECCOMP) += seccomp.o
 obj-$(CONFIG_RCU_TORTURE_TEST) += rcutorture.o
 obj-$(CONFIG_CLASSIC_RCU) += rcuclassic.o
+obj-$(CONFIG_TREE_RCU) += rcutree.o
 obj-$(CONFIG_PREEMPT_RCU) += rcupreempt.o
-ifeq ($(CONFIG_PREEMPT_RCU),y)
-obj-$(CONFIG_RCU_TRACE) += rcupreempt_trace.o
-endif
+obj-$(CONFIG_TREE_RCU_TRACE) += rcutree_trace.o
+obj-$(CONFIG_PREEMPT_RCU_TRACE) += rcupreempt_trace.o
 obj-$(CONFIG_RELAY) += relay.o
 obj-$(CONFIG_SYSCTL) += utsname_sysctl.o
 obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o
index fe00b3b983a86387332234703217abb1d28ca202..2606d0fb4e54e8f120618328c7b72c01634dc35d 100644 (file)
@@ -702,7 +702,7 @@ static int rebind_subsystems(struct cgroupfs_root *root,
         * any child cgroups exist. This is theoretically supportable
         * but involves complex error handling, so it's being left until
         * later */
-       if (!list_empty(&cgrp->children))
+       if (root->number_of_cgroups > 1)
                return -EBUSY;
 
        /* Process each subsystem */
@@ -1024,7 +1024,7 @@ static int cgroup_get_sb(struct file_system_type *fs_type,
                if (ret == -EBUSY) {
                        mutex_unlock(&cgroup_mutex);
                        mutex_unlock(&inode->i_mutex);
-                       goto drop_new_super;
+                       goto free_cg_links;
                }
 
                /* EBUSY should be the only error here */
@@ -1073,10 +1073,11 @@ static int cgroup_get_sb(struct file_system_type *fs_type,
 
        return simple_set_mnt(mnt, sb);
 
+ free_cg_links:
+       free_cg_links(&tmp_cg_links);
  drop_new_super:
        up_write(&sb->s_umount);
        deactivate_super(sb);
-       free_cg_links(&tmp_cg_links);
        return ret;
 }
 
@@ -2934,9 +2935,6 @@ int cgroup_clone(struct task_struct *tsk, struct cgroup_subsys *subsys,
  again:
        root = subsys->root;
        if (root == &rootnode) {
-               printk(KERN_INFO
-                      "Not cloning cgroup for unused subsystem %s\n",
-                      subsys->name);
                mutex_unlock(&cgroup_mutex);
                return 0;
        }
index 2d8be7ebb0f73499f894a1828fd827f0217290f1..30fcdf16737a2bb013a78b62bc6b7f1eb6eb165b 100644 (file)
@@ -1321,10 +1321,10 @@ static int wait_task_zombie(struct task_struct *p, int options,
                 * group, which consolidates times for all threads in the
                 * group including the group leader.
                 */
+               thread_group_cputime(p, &cputime);
                spin_lock_irq(&p->parent->sighand->siglock);
                psig = p->parent->signal;
                sig = p->signal;
-               thread_group_cputime(p, &cputime);
                psig->cutime =
                        cputime_add(psig->cutime,
                        cputime_add(cputime.utime,
index a26cb2e170237d849c9f87038a6def48ee948dd6..adf0cc9c02d6873d50c48edf4c34b44a32bf48b9 100644 (file)
@@ -66,3 +66,19 @@ int kernel_text_address(unsigned long addr)
                return 1;
        return module_text_address(addr) != NULL;
 }
+
+/*
+ * On some architectures (PPC64, IA64) function pointers
+ * are actually only tokens to some data that then holds the
+ * real function address. As a result, to find if a function
+ * pointer is part of the kernel text, we need to do some
+ * special dereferencing first.
+ */
+int func_ptr_is_kernel_text(void *ptr)
+{
+       unsigned long addr;
+       addr = (unsigned long) dereference_function_descriptor(ptr);
+       if (core_kernel_text(addr))
+               return 1;
+       return module_text_address(addr) != NULL;
+}
index 8af10027514bb1cc9cb2702051330e52bf43a533..b4f87bac91c1afb824404fe8fb6ce90d43669d41 100644 (file)
@@ -92,11 +92,12 @@ struct futex_pi_state {
  * A futex_q has a woken state, just like tasks have TASK_RUNNING.
  * It is considered woken when plist_node_empty(&q->list) || q->lock_ptr == 0.
  * The order of wakup is always to make the first condition true, then
- * wake up q->waiters, then make the second condition true.
+ * wake up q->waiter, then make the second condition true.
  */
 struct futex_q {
        struct plist_node list;
-       wait_queue_head_t waiters;
+       /* There can only be a single waiter */
+       wait_queue_head_t waiter;
 
        /* Which hash list lock to use: */
        spinlock_t *lock_ptr;
@@ -122,24 +123,6 @@ struct futex_hash_bucket {
 
 static struct futex_hash_bucket futex_queues[1<<FUTEX_HASHBITS];
 
-/*
- * Take mm->mmap_sem, when futex is shared
- */
-static inline void futex_lock_mm(struct rw_semaphore *fshared)
-{
-       if (fshared)
-               down_read(fshared);
-}
-
-/*
- * Release mm->mmap_sem, when the futex is shared
- */
-static inline void futex_unlock_mm(struct rw_semaphore *fshared)
-{
-       if (fshared)
-               up_read(fshared);
-}
-
 /*
  * We hash on the keys returned from get_futex_key (see below).
  */
@@ -161,6 +144,45 @@ static inline int match_futex(union futex_key *key1, union futex_key *key2)
                && key1->both.offset == key2->both.offset);
 }
 
+/*
+ * Take a reference to the resource addressed by a key.
+ * Can be called while holding spinlocks.
+ *
+ */
+static void get_futex_key_refs(union futex_key *key)
+{
+       if (!key->both.ptr)
+               return;
+
+       switch (key->both.offset & (FUT_OFF_INODE|FUT_OFF_MMSHARED)) {
+       case FUT_OFF_INODE:
+               atomic_inc(&key->shared.inode->i_count);
+               break;
+       case FUT_OFF_MMSHARED:
+               atomic_inc(&key->private.mm->mm_count);
+               break;
+       }
+}
+
+/*
+ * Drop a reference to the resource addressed by a key.
+ * The hash bucket spinlock must not be held.
+ */
+static void drop_futex_key_refs(union futex_key *key)
+{
+       if (!key->both.ptr)
+               return;
+
+       switch (key->both.offset & (FUT_OFF_INODE|FUT_OFF_MMSHARED)) {
+       case FUT_OFF_INODE:
+               iput(key->shared.inode);
+               break;
+       case FUT_OFF_MMSHARED:
+               mmdrop(key->private.mm);
+               break;
+       }
+}
+
 /**
  * get_futex_key - Get parameters which are the keys for a futex.
  * @uaddr: virtual address of the futex
@@ -179,12 +201,10 @@ static inline int match_futex(union futex_key *key1, union futex_key *key2)
  * For other futexes, it points to &current->mm->mmap_sem and
  * caller must have taken the reader lock. but NOT any spinlocks.
  */
-static int get_futex_key(u32 __user *uaddr, struct rw_semaphore *fshared,
-                        union futex_key *key)
+static int get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key)
 {
        unsigned long address = (unsigned long)uaddr;
        struct mm_struct *mm = current->mm;
-       struct vm_area_struct *vma;
        struct page *page;
        int err;
 
@@ -208,100 +228,50 @@ static int get_futex_key(u32 __user *uaddr, struct rw_semaphore *fshared,
                        return -EFAULT;
                key->private.mm = mm;
                key->private.address = address;
+               get_futex_key_refs(key);
                return 0;
        }
-       /*
-        * The futex is hashed differently depending on whether
-        * it's in a shared or private mapping.  So check vma first.
-        */
-       vma = find_extend_vma(mm, address);
-       if (unlikely(!vma))
-               return -EFAULT;
 
-       /*
-        * Permissions.
-        */
-       if (unlikely((vma->vm_flags & (VM_IO|VM_READ)) != VM_READ))
-               return (vma->vm_flags & VM_IO) ? -EPERM : -EACCES;
+again:
+       err = get_user_pages_fast(address, 1, 0, &page);
+       if (err < 0)
+               return err;
+
+       lock_page(page);
+       if (!page->mapping) {
+               unlock_page(page);
+               put_page(page);
+               goto again;
+       }
 
        /*
         * Private mappings are handled in a simple way.
         *
         * NOTE: When userspace waits on a MAP_SHARED mapping, even if
         * it's a read-only handle, it's expected that futexes attach to
-        * the object not the particular process.  Therefore we use
-        * VM_MAYSHARE here, not VM_SHARED which is restricted to shared
-        * mappings of _writable_ handles.
+        * the object not the particular process.
         */
-       if (likely(!(vma->vm_flags & VM_MAYSHARE))) {
-               key->both.offset |= FUT_OFF_MMSHARED; /* reference taken on mm */
+       if (PageAnon(page)) {
+               key->both.offset |= FUT_OFF_MMSHARED; /* ref taken on mm */
                key->private.mm = mm;
                key->private.address = address;
-               return 0;
+       } else {
+               key->both.offset |= FUT_OFF_INODE; /* inode-based key */
+               key->shared.inode = page->mapping->host;
+               key->shared.pgoff = page->index;
        }
 
-       /*
-        * Linear file mappings are also simple.
-        */
-       key->shared.inode = vma->vm_file->f_path.dentry->d_inode;
-       key->both.offset |= FUT_OFF_INODE; /* inode-based key. */
-       if (likely(!(vma->vm_flags & VM_NONLINEAR))) {
-               key->shared.pgoff = (((address - vma->vm_start) >> PAGE_SHIFT)
-                                    + vma->vm_pgoff);
-               return 0;
-       }
+       get_futex_key_refs(key);
 
-       /*
-        * We could walk the page table to read the non-linear
-        * pte, and get the page index without fetching the page
-        * from swap.  But that's a lot of code to duplicate here
-        * for a rare case, so we simply fetch the page.
-        */
-       err = get_user_pages(current, mm, address, 1, 0, 0, &page, NULL);
-       if (err >= 0) {
-               key->shared.pgoff =
-                       page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT);
-               put_page(page);
-               return 0;
-       }
-       return err;
-}
-
-/*
- * Take a reference to the resource addressed by a key.
- * Can be called while holding spinlocks.
- *
- */
-static void get_futex_key_refs(union futex_key *key)
-{
-       if (key->both.ptr == NULL)
-               return;
-       switch (key->both.offset & (FUT_OFF_INODE|FUT_OFF_MMSHARED)) {
-               case FUT_OFF_INODE:
-                       atomic_inc(&key->shared.inode->i_count);
-                       break;
-               case FUT_OFF_MMSHARED:
-                       atomic_inc(&key->private.mm->mm_count);
-                       break;
-       }
+       unlock_page(page);
+       put_page(page);
+       return 0;
 }
 
-/*
- * Drop a reference to the resource addressed by a key.
- * The hash bucket spinlock must not be held.
- */
-static void drop_futex_key_refs(union futex_key *key)
+static inline
+void put_futex_key(int fshared, union futex_key *key)
 {
-       if (!key->both.ptr)
-               return;
-       switch (key->both.offset & (FUT_OFF_INODE|FUT_OFF_MMSHARED)) {
-               case FUT_OFF_INODE:
-                       iput(key->shared.inode);
-                       break;
-               case FUT_OFF_MMSHARED:
-                       mmdrop(key->private.mm);
-                       break;
-       }
+       drop_futex_key_refs(key);
 }
 
 static u32 cmpxchg_futex_value_locked(u32 __user *uaddr, u32 uval, u32 newval)
@@ -328,10 +298,8 @@ static int get_futex_value_locked(u32 *dest, u32 __user *from)
 
 /*
  * Fault handling.
- * if fshared is non NULL, current->mm->mmap_sem is already held
  */
-static int futex_handle_fault(unsigned long address,
-                             struct rw_semaphore *fshared, int attempt)
+static int futex_handle_fault(unsigned long address, int attempt)
 {
        struct vm_area_struct * vma;
        struct mm_struct *mm = current->mm;
@@ -340,8 +308,7 @@ static int futex_handle_fault(unsigned long address,
        if (attempt > 2)
                return ret;
 
-       if (!fshared)
-               down_read(&mm->mmap_sem);
+       down_read(&mm->mmap_sem);
        vma = find_vma(mm, address);
        if (vma && address >= vma->vm_start &&
            (vma->vm_flags & VM_WRITE)) {
@@ -361,8 +328,7 @@ static int futex_handle_fault(unsigned long address,
                                current->min_flt++;
                }
        }
-       if (!fshared)
-               up_read(&mm->mmap_sem);
+       up_read(&mm->mmap_sem);
        return ret;
 }
 
@@ -385,6 +351,7 @@ static int refill_pi_state_cache(void)
        /* pi_mutex gets initialized later */
        pi_state->owner = NULL;
        atomic_set(&pi_state->refcount, 1);
+       pi_state->key = FUTEX_KEY_INIT;
 
        current->pi_state_cache = pi_state;
 
@@ -462,7 +429,7 @@ void exit_pi_state_list(struct task_struct *curr)
        struct list_head *next, *head = &curr->pi_state_list;
        struct futex_pi_state *pi_state;
        struct futex_hash_bucket *hb;
-       union futex_key key;
+       union futex_key key = FUTEX_KEY_INIT;
 
        if (!futex_cmpxchg_enabled)
                return;
@@ -607,7 +574,7 @@ static void wake_futex(struct futex_q *q)
         * The lock in wake_up_all() is a crucial memory barrier after the
         * plist_del() and also before assigning to q->lock_ptr.
         */
-       wake_up_all(&q->waiters);
+       wake_up(&q->waiter);
        /*
         * The waiting task can free the futex_q as soon as this is written,
         * without taking any locks.  This must come last.
@@ -719,20 +686,17 @@ double_lock_hb(struct futex_hash_bucket *hb1, struct futex_hash_bucket *hb2)
  * Wake up all waiters hashed on the physical page that is mapped
  * to this virtual address:
  */
-static int futex_wake(u32 __user *uaddr, struct rw_semaphore *fshared,
-                     int nr_wake, u32 bitset)
+static int futex_wake(u32 __user *uaddr, int fshared, int nr_wake, u32 bitset)
 {
        struct futex_hash_bucket *hb;
        struct futex_q *this, *next;
        struct plist_head *head;
-       union futex_key key;
+       union futex_key key = FUTEX_KEY_INIT;
        int ret;
 
        if (!bitset)
                return -EINVAL;
 
-       futex_lock_mm(fshared);
-
        ret = get_futex_key(uaddr, fshared, &key);
        if (unlikely(ret != 0))
                goto out;
@@ -760,7 +724,7 @@ static int futex_wake(u32 __user *uaddr, struct rw_semaphore *fshared,
 
        spin_unlock(&hb->lock);
 out:
-       futex_unlock_mm(fshared);
+       put_futex_key(fshared, &key);
        return ret;
 }
 
@@ -769,19 +733,16 @@ out:
  * to this virtual address:
  */
 static int
-futex_wake_op(u32 __user *uaddr1, struct rw_semaphore *fshared,
-             u32 __user *uaddr2,
+futex_wake_op(u32 __user *uaddr1, int fshared, u32 __user *uaddr2,
              int nr_wake, int nr_wake2, int op)
 {
-       union futex_key key1, key2;
+       union futex_key key1 = FUTEX_KEY_INIT, key2 = FUTEX_KEY_INIT;
        struct futex_hash_bucket *hb1, *hb2;
        struct plist_head *head;
        struct futex_q *this, *next;
        int ret, op_ret, attempt = 0;
 
 retryfull:
-       futex_lock_mm(fshared);
-
        ret = get_futex_key(uaddr1, fshared, &key1);
        if (unlikely(ret != 0))
                goto out;
@@ -826,18 +787,12 @@ retry:
                 */
                if (attempt++) {
                        ret = futex_handle_fault((unsigned long)uaddr2,
-                                                fshared, attempt);
+                                                attempt);
                        if (ret)
                                goto out;
                        goto retry;
                }
 
-               /*
-                * If we would have faulted, release mmap_sem,
-                * fault it in and start all over again.
-                */
-               futex_unlock_mm(fshared);
-
                ret = get_user(dummy, uaddr2);
                if (ret)
                        return ret;
@@ -873,7 +828,8 @@ retry:
        if (hb1 != hb2)
                spin_unlock(&hb2->lock);
 out:
-       futex_unlock_mm(fshared);
+       put_futex_key(fshared, &key2);
+       put_futex_key(fshared, &key1);
 
        return ret;
 }
@@ -882,19 +838,16 @@ out:
  * Requeue all waiters hashed on one physical page to another
  * physical page.
  */
-static int futex_requeue(u32 __user *uaddr1, struct rw_semaphore *fshared,
-                        u32 __user *uaddr2,
+static int futex_requeue(u32 __user *uaddr1, int fshared, u32 __user *uaddr2,
                         int nr_wake, int nr_requeue, u32 *cmpval)
 {
-       union futex_key key1, key2;
+       union futex_key key1 = FUTEX_KEY_INIT, key2 = FUTEX_KEY_INIT;
        struct futex_hash_bucket *hb1, *hb2;
        struct plist_head *head1;
        struct futex_q *this, *next;
        int ret, drop_count = 0;
 
  retry:
-       futex_lock_mm(fshared);
-
        ret = get_futex_key(uaddr1, fshared, &key1);
        if (unlikely(ret != 0))
                goto out;
@@ -917,12 +870,6 @@ static int futex_requeue(u32 __user *uaddr1, struct rw_semaphore *fshared,
                        if (hb1 != hb2)
                                spin_unlock(&hb2->lock);
 
-                       /*
-                        * If we would have faulted, release mmap_sem, fault
-                        * it in and start all over again.
-                        */
-                       futex_unlock_mm(fshared);
-
                        ret = get_user(curval, uaddr1);
 
                        if (!ret)
@@ -974,7 +921,8 @@ out_unlock:
                drop_futex_key_refs(&key1);
 
 out:
-       futex_unlock_mm(fshared);
+       put_futex_key(fshared, &key2);
+       put_futex_key(fshared, &key1);
        return ret;
 }
 
@@ -983,7 +931,7 @@ static inline struct futex_hash_bucket *queue_lock(struct futex_q *q)
 {
        struct futex_hash_bucket *hb;
 
-       init_waitqueue_head(&q->waiters);
+       init_waitqueue_head(&q->waiter);
 
        get_futex_key_refs(&q->key);
        hb = hash_futex(&q->key);
@@ -1096,8 +1044,7 @@ static void unqueue_me_pi(struct futex_q *q)
  * private futexes.
  */
 static int fixup_pi_state_owner(u32 __user *uaddr, struct futex_q *q,
-                               struct task_struct *newowner,
-                               struct rw_semaphore *fshared)
+                               struct task_struct *newowner, int fshared)
 {
        u32 newtid = task_pid_vnr(newowner) | FUTEX_WAITERS;
        struct futex_pi_state *pi_state = q->pi_state;
@@ -1176,7 +1123,7 @@ retry:
 handle_fault:
        spin_unlock(q->lock_ptr);
 
-       ret = futex_handle_fault((unsigned long)uaddr, fshared, attempt++);
+       ret = futex_handle_fault((unsigned long)uaddr, attempt++);
 
        spin_lock(q->lock_ptr);
 
@@ -1196,12 +1143,13 @@ handle_fault:
  * In case we must use restart_block to restart a futex_wait,
  * we encode in the 'flags' shared capability
  */
-#define FLAGS_SHARED  1
+#define FLAGS_SHARED           0x01
+#define FLAGS_CLOCKRT          0x02
 
 static long futex_wait_restart(struct restart_block *restart);
 
-static int futex_wait(u32 __user *uaddr, struct rw_semaphore *fshared,
-                     u32 val, ktime_t *abs_time, u32 bitset)
+static int futex_wait(u32 __user *uaddr, int fshared,
+                     u32 val, ktime_t *abs_time, u32 bitset, int clockrt)
 {
        struct task_struct *curr = current;
        DECLARE_WAITQUEUE(wait, curr);
@@ -1218,8 +1166,7 @@ static int futex_wait(u32 __user *uaddr, struct rw_semaphore *fshared,
        q.pi_state = NULL;
        q.bitset = bitset;
  retry:
-       futex_lock_mm(fshared);
-
+       q.key = FUTEX_KEY_INIT;
        ret = get_futex_key(uaddr, fshared, &q.key);
        if (unlikely(ret != 0))
                goto out_release_sem;
@@ -1251,12 +1198,6 @@ static int futex_wait(u32 __user *uaddr, struct rw_semaphore *fshared,
        if (unlikely(ret)) {
                queue_unlock(&q, hb);
 
-               /*
-                * If we would have faulted, release mmap_sem, fault it in and
-                * start all over again.
-                */
-               futex_unlock_mm(fshared);
-
                ret = get_user(uval, uaddr);
 
                if (!ret)
@@ -1270,12 +1211,6 @@ static int futex_wait(u32 __user *uaddr, struct rw_semaphore *fshared,
        /* Only actually queue if *uaddr contained val.  */
        queue_me(&q, hb);
 
-       /*
-        * Now the futex is queued and we have checked the data, we
-        * don't want to hold mmap_sem while we sleep.
-        */
-       futex_unlock_mm(fshared);
-
        /*
         * There might have been scheduling since the queue_me(), as we
         * cannot hold a spinlock across the get_user() in case it
@@ -1287,7 +1222,7 @@ static int futex_wait(u32 __user *uaddr, struct rw_semaphore *fshared,
 
        /* add_wait_queue is the barrier after __set_current_state. */
        __set_current_state(TASK_INTERRUPTIBLE);
-       add_wait_queue(&q.waiters, &wait);
+       add_wait_queue(&q.waiter, &wait);
        /*
         * !plist_node_empty() is safe here without any lock.
         * q.lock_ptr != 0 is not safe, because of ordering against wakeup.
@@ -1300,8 +1235,10 @@ static int futex_wait(u32 __user *uaddr, struct rw_semaphore *fshared,
                        slack = current->timer_slack_ns;
                        if (rt_task(current))
                                slack = 0;
-                       hrtimer_init_on_stack(&t.timer, CLOCK_MONOTONIC,
-                                               HRTIMER_MODE_ABS);
+                       hrtimer_init_on_stack(&t.timer,
+                                             clockrt ? CLOCK_REALTIME :
+                                             CLOCK_MONOTONIC,
+                                             HRTIMER_MODE_ABS);
                        hrtimer_init_sleeper(&t, current);
                        hrtimer_set_expires_range_ns(&t.timer, *abs_time, slack);
 
@@ -1356,6 +1293,8 @@ static int futex_wait(u32 __user *uaddr, struct rw_semaphore *fshared,
 
                if (fshared)
                        restart->futex.flags |= FLAGS_SHARED;
+               if (clockrt)
+                       restart->futex.flags |= FLAGS_CLOCKRT;
                return -ERESTART_RESTARTBLOCK;
        }
 
@@ -1363,7 +1302,7 @@ static int futex_wait(u32 __user *uaddr, struct rw_semaphore *fshared,
        queue_unlock(&q, hb);
 
  out_release_sem:
-       futex_unlock_mm(fshared);
+       put_futex_key(fshared, &q.key);
        return ret;
 }
 
@@ -1371,15 +1310,16 @@ static int futex_wait(u32 __user *uaddr, struct rw_semaphore *fshared,
 static long futex_wait_restart(struct restart_block *restart)
 {
        u32 __user *uaddr = (u32 __user *)restart->futex.uaddr;
-       struct rw_semaphore *fshared = NULL;
+       int fshared = 0;
        ktime_t t;
 
        t.tv64 = restart->futex.time;
        restart->fn = do_no_restart_syscall;
        if (restart->futex.flags & FLAGS_SHARED)
-               fshared = &current->mm->mmap_sem;
+               fshared = 1;
        return (long)futex_wait(uaddr, fshared, restart->futex.val, &t,
-                               restart->futex.bitset);
+                               restart->futex.bitset,
+                               restart->futex.flags & FLAGS_CLOCKRT);
 }
 
 
@@ -1389,7 +1329,7 @@ static long futex_wait_restart(struct restart_block *restart)
  * if there are waiters then it will block, it does PI, etc. (Due to
  * races the kernel might see a 0 value of the futex too.)
  */
-static int futex_lock_pi(u32 __user *uaddr, struct rw_semaphore *fshared,
+static int futex_lock_pi(u32 __user *uaddr, int fshared,
                         int detect, ktime_t *time, int trylock)
 {
        struct hrtimer_sleeper timeout, *to = NULL;
@@ -1412,8 +1352,7 @@ static int futex_lock_pi(u32 __user *uaddr, struct rw_semaphore *fshared,
 
        q.pi_state = NULL;
  retry:
-       futex_lock_mm(fshared);
-
+       q.key = FUTEX_KEY_INIT;
        ret = get_futex_key(uaddr, fshared, &q.key);
        if (unlikely(ret != 0))
                goto out_release_sem;
@@ -1502,7 +1441,6 @@ static int futex_lock_pi(u32 __user *uaddr, struct rw_semaphore *fshared,
                         * exit to complete.
                         */
                        queue_unlock(&q, hb);
-                       futex_unlock_mm(fshared);
                        cond_resched();
                        goto retry;
 
@@ -1534,12 +1472,6 @@ static int futex_lock_pi(u32 __user *uaddr, struct rw_semaphore *fshared,
         */
        queue_me(&q, hb);
 
-       /*
-        * Now the futex is queued and we have checked the data, we
-        * don't want to hold mmap_sem while we sleep.
-        */
-       futex_unlock_mm(fshared);
-
        WARN_ON(!q.pi_state);
        /*
         * Block on the PI mutex:
@@ -1552,7 +1484,6 @@ static int futex_lock_pi(u32 __user *uaddr, struct rw_semaphore *fshared,
                ret = ret ? 0 : -EWOULDBLOCK;
        }
 
-       futex_lock_mm(fshared);
        spin_lock(q.lock_ptr);
 
        if (!ret) {
@@ -1618,7 +1549,6 @@ static int futex_lock_pi(u32 __user *uaddr, struct rw_semaphore *fshared,
 
        /* Unqueue and drop the lock */
        unqueue_me_pi(&q);
-       futex_unlock_mm(fshared);
 
        if (to)
                destroy_hrtimer_on_stack(&to->timer);
@@ -1628,34 +1558,30 @@ static int futex_lock_pi(u32 __user *uaddr, struct rw_semaphore *fshared,
        queue_unlock(&q, hb);
 
  out_release_sem:
-       futex_unlock_mm(fshared);
+       put_futex_key(fshared, &q.key);
        if (to)
                destroy_hrtimer_on_stack(&to->timer);
        return ret;
 
  uaddr_faulted:
        /*
-        * We have to r/w  *(int __user *)uaddr, but we can't modify it
-        * non-atomically.  Therefore, if get_user below is not
-        * enough, we need to handle the fault ourselves, while
-        * still holding the mmap_sem.
-        *
-        * ... and hb->lock. :-) --ANK
+        * We have to r/w  *(int __user *)uaddr, and we have to modify it
+        * atomically.  Therefore, if we continue to fault after get_user()
+        * below, we need to handle the fault ourselves, while still holding
+        * the mmap_sem.  This can occur if the uaddr is under contention as
+        * we have to drop the mmap_sem in order to call get_user().
         */
        queue_unlock(&q, hb);
 
        if (attempt++) {
-               ret = futex_handle_fault((unsigned long)uaddr, fshared,
-                                        attempt);
+               ret = futex_handle_fault((unsigned long)uaddr, attempt);
                if (ret)
                        goto out_release_sem;
                goto retry_unlocked;
        }
 
-       futex_unlock_mm(fshared);
-
        ret = get_user(uval, uaddr);
-       if (!ret && (uval != -EFAULT))
+       if (!ret)
                goto retry;
 
        if (to)
@@ -1668,13 +1594,13 @@ static int futex_lock_pi(u32 __user *uaddr, struct rw_semaphore *fshared,
  * This is the in-kernel slowpath: we look up the PI state (if any),
  * and do the rt-mutex unlock.
  */
-static int futex_unlock_pi(u32 __user *uaddr, struct rw_semaphore *fshared)
+static int futex_unlock_pi(u32 __user *uaddr, int fshared)
 {
        struct futex_hash_bucket *hb;
        struct futex_q *this, *next;
        u32 uval;
        struct plist_head *head;
-       union futex_key key;
+       union futex_key key = FUTEX_KEY_INIT;
        int ret, attempt = 0;
 
 retry:
@@ -1685,10 +1611,6 @@ retry:
         */
        if ((uval & FUTEX_TID_MASK) != task_pid_vnr(current))
                return -EPERM;
-       /*
-        * First take all the futex related locks:
-        */
-       futex_lock_mm(fshared);
 
        ret = get_futex_key(uaddr, fshared, &key);
        if (unlikely(ret != 0))
@@ -1747,34 +1669,30 @@ retry_unlocked:
 out_unlock:
        spin_unlock(&hb->lock);
 out:
-       futex_unlock_mm(fshared);
+       put_futex_key(fshared, &key);
 
        return ret;
 
 pi_faulted:
        /*
-        * We have to r/w  *(int __user *)uaddr, but we can't modify it
-        * non-atomically.  Therefore, if get_user below is not
-        * enough, we need to handle the fault ourselves, while
-        * still holding the mmap_sem.
-        *
-        * ... and hb->lock. --ANK
+        * We have to r/w  *(int __user *)uaddr, and we have to modify it
+        * atomically.  Therefore, if we continue to fault after get_user()
+        * below, we need to handle the fault ourselves, while still holding
+        * the mmap_sem.  This can occur if the uaddr is under contention as
+        * we have to drop the mmap_sem in order to call get_user().
         */
        spin_unlock(&hb->lock);
 
        if (attempt++) {
-               ret = futex_handle_fault((unsigned long)uaddr, fshared,
-                                        attempt);
+               ret = futex_handle_fault((unsigned long)uaddr, attempt);
                if (ret)
                        goto out;
                uval = 0;
                goto retry_unlocked;
        }
 
-       futex_unlock_mm(fshared);
-
        ret = get_user(uval, uaddr);
-       if (!ret && (uval != -EFAULT))
+       if (!ret)
                goto retry;
 
        return ret;
@@ -1898,8 +1816,7 @@ retry:
                 * PI futexes happens in exit_pi_state():
                 */
                if (!pi && (uval & FUTEX_WAITERS))
-                       futex_wake(uaddr, &curr->mm->mmap_sem, 1,
-                                  FUTEX_BITSET_MATCH_ANY);
+                       futex_wake(uaddr, 1, 1, FUTEX_BITSET_MATCH_ANY);
        }
        return 0;
 }
@@ -1993,18 +1910,22 @@ void exit_robust_list(struct task_struct *curr)
 long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout,
                u32 __user *uaddr2, u32 val2, u32 val3)
 {
-       int ret = -ENOSYS;
+       int clockrt, ret = -ENOSYS;
        int cmd = op & FUTEX_CMD_MASK;
-       struct rw_semaphore *fshared = NULL;
+       int fshared = 0;
 
        if (!(op & FUTEX_PRIVATE_FLAG))
-               fshared = &current->mm->mmap_sem;
+               fshared = 1;
+
+       clockrt = op & FUTEX_CLOCK_REALTIME;
+       if (clockrt && cmd != FUTEX_WAIT_BITSET)
+               return -ENOSYS;
 
        switch (cmd) {
        case FUTEX_WAIT:
                val3 = FUTEX_BITSET_MATCH_ANY;
        case FUTEX_WAIT_BITSET:
-               ret = futex_wait(uaddr, fshared, val, timeout, val3);
+               ret = futex_wait(uaddr, fshared, val, timeout, val3, clockrt);
                break;
        case FUTEX_WAKE:
                val3 = FUTEX_BITSET_MATCH_ANY;
index 801addda3c43d4a7a767b27468fee05232cb6f89..e9d1c8205a3b0998d6e0a4c37b407a196bdcdab1 100644 (file)
@@ -673,6 +673,18 @@ int request_irq(unsigned int irq, irq_handler_t handler,
        struct irq_desc *desc;
        int retval;
 
+       /*
+        * handle_IRQ_event() always ignores IRQF_DISABLED except for
+        * the _first_ irqaction (sigh).  That can cause oopsing, but
+        * the behavior is classified as "will not fix" so we need to
+        * start nudging drivers away from using that idiom.
+        */
+       if ((irqflags & (IRQF_SHARED|IRQF_DISABLED))
+                       == (IRQF_SHARED|IRQF_DISABLED))
+               pr_warning("IRQ %d/%s: IRQF_DISABLED is not "
+                               "guaranteed on shared IRQs\n",
+                               irq, devname);
+
 #ifdef CONFIG_LOCKDEP
        /*
         * Lockdep wants atomic interrupt handlers:
index 46a404173db231a982baf3941c72e96911003906..4fa6eeb4e8a7f0c6111a0cb5d67fa6f9671bad5b 100644 (file)
@@ -136,16 +136,16 @@ static inline struct lock_class *hlock_class(struct held_lock *hlock)
 #ifdef CONFIG_LOCK_STAT
 static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS], lock_stats);
 
-static int lock_contention_point(struct lock_class *class, unsigned long ip)
+static int lock_point(unsigned long points[], unsigned long ip)
 {
        int i;
 
-       for (i = 0; i < ARRAY_SIZE(class->contention_point); i++) {
-               if (class->contention_point[i] == 0) {
-                       class->contention_point[i] = ip;
+       for (i = 0; i < LOCKSTAT_POINTS; i++) {
+               if (points[i] == 0) {
+                       points[i] = ip;
                        break;
                }
-               if (class->contention_point[i] == ip)
+               if (points[i] == ip)
                        break;
        }
 
@@ -185,6 +185,9 @@ struct lock_class_stats lock_stats(struct lock_class *class)
                for (i = 0; i < ARRAY_SIZE(stats.contention_point); i++)
                        stats.contention_point[i] += pcs->contention_point[i];
 
+               for (i = 0; i < ARRAY_SIZE(stats.contending_point); i++)
+                       stats.contending_point[i] += pcs->contending_point[i];
+
                lock_time_add(&pcs->read_waittime, &stats.read_waittime);
                lock_time_add(&pcs->write_waittime, &stats.write_waittime);
 
@@ -209,6 +212,7 @@ void clear_lock_stats(struct lock_class *class)
                memset(cpu_stats, 0, sizeof(struct lock_class_stats));
        }
        memset(class->contention_point, 0, sizeof(class->contention_point));
+       memset(class->contending_point, 0, sizeof(class->contending_point));
 }
 
 static struct lock_class_stats *get_lock_stats(struct lock_class *class)
@@ -287,14 +291,12 @@ void lockdep_off(void)
 {
        current->lockdep_recursion++;
 }
-
 EXPORT_SYMBOL(lockdep_off);
 
 void lockdep_on(void)
 {
        current->lockdep_recursion--;
 }
-
 EXPORT_SYMBOL(lockdep_on);
 
 /*
@@ -576,7 +578,8 @@ static void print_lock_class_header(struct lock_class *class, int depth)
 /*
  * printk all lock dependencies starting at <entry>:
  */
-static void print_lock_dependencies(struct lock_class *class, int depth)
+static void __used
+print_lock_dependencies(struct lock_class *class, int depth)
 {
        struct lock_list *entry;
 
@@ -2508,7 +2511,6 @@ void lockdep_init_map(struct lockdep_map *lock, const char *name,
        if (subclass)
                register_lock_class(lock, subclass, 1);
 }
-
 EXPORT_SYMBOL_GPL(lockdep_init_map);
 
 /*
@@ -2689,8 +2691,9 @@ static int check_unlock(struct task_struct *curr, struct lockdep_map *lock,
 }
 
 static int
-__lock_set_subclass(struct lockdep_map *lock,
-                   unsigned int subclass, unsigned long ip)
+__lock_set_class(struct lockdep_map *lock, const char *name,
+                struct lock_class_key *key, unsigned int subclass,
+                unsigned long ip)
 {
        struct task_struct *curr = current;
        struct held_lock *hlock, *prev_hlock;
@@ -2717,6 +2720,7 @@ __lock_set_subclass(struct lockdep_map *lock,
        return print_unlock_inbalance_bug(curr, lock, ip);
 
 found_it:
+       lockdep_init_map(lock, name, key, 0);
        class = register_lock_class(lock, subclass, 0);
        hlock->class_idx = class - lock_classes + 1;
 
@@ -2901,9 +2905,9 @@ static void check_flags(unsigned long flags)
 #endif
 }
 
-void
-lock_set_subclass(struct lockdep_map *lock,
-                 unsigned int subclass, unsigned long ip)
+void lock_set_class(struct lockdep_map *lock, const char *name,
+                   struct lock_class_key *key, unsigned int subclass,
+                   unsigned long ip)
 {
        unsigned long flags;
 
@@ -2913,13 +2917,12 @@ lock_set_subclass(struct lockdep_map *lock,
        raw_local_irq_save(flags);
        current->lockdep_recursion = 1;
        check_flags(flags);
-       if (__lock_set_subclass(lock, subclass, ip))
+       if (__lock_set_class(lock, name, key, subclass, ip))
                check_chain_key(current);
        current->lockdep_recursion = 0;
        raw_local_irq_restore(flags);
 }
-
-EXPORT_SYMBOL_GPL(lock_set_subclass);
+EXPORT_SYMBOL_GPL(lock_set_class);
 
 /*
  * We are not always called with irqs disabled - do that here,
@@ -2943,7 +2946,6 @@ void lock_acquire(struct lockdep_map *lock, unsigned int subclass,
        current->lockdep_recursion = 0;
        raw_local_irq_restore(flags);
 }
-
 EXPORT_SYMBOL_GPL(lock_acquire);
 
 void lock_release(struct lockdep_map *lock, int nested,
@@ -2961,7 +2963,6 @@ void lock_release(struct lockdep_map *lock, int nested,
        current->lockdep_recursion = 0;
        raw_local_irq_restore(flags);
 }
-
 EXPORT_SYMBOL_GPL(lock_release);
 
 #ifdef CONFIG_LOCK_STAT
@@ -2999,7 +3000,7 @@ __lock_contended(struct lockdep_map *lock, unsigned long ip)
        struct held_lock *hlock, *prev_hlock;
        struct lock_class_stats *stats;
        unsigned int depth;
-       int i, point;
+       int i, contention_point, contending_point;
 
        depth = curr->lockdep_depth;
        if (DEBUG_LOCKS_WARN_ON(!depth))
@@ -3023,18 +3024,22 @@ __lock_contended(struct lockdep_map *lock, unsigned long ip)
 found_it:
        hlock->waittime_stamp = sched_clock();
 
-       point = lock_contention_point(hlock_class(hlock), ip);
+       contention_point = lock_point(hlock_class(hlock)->contention_point, ip);
+       contending_point = lock_point(hlock_class(hlock)->contending_point,
+                                     lock->ip);
 
        stats = get_lock_stats(hlock_class(hlock));
-       if (point < ARRAY_SIZE(stats->contention_point))
-               stats->contention_point[point]++;
+       if (contention_point < LOCKSTAT_POINTS)
+               stats->contention_point[contention_point]++;
+       if (contending_point < LOCKSTAT_POINTS)
+               stats->contending_point[contending_point]++;
        if (lock->cpu != smp_processor_id())
                stats->bounces[bounce_contended + !!hlock->read]++;
        put_lock_stats(stats);
 }
 
 static void
-__lock_acquired(struct lockdep_map *lock)
+__lock_acquired(struct lockdep_map *lock, unsigned long ip)
 {
        struct task_struct *curr = current;
        struct held_lock *hlock, *prev_hlock;
@@ -3083,6 +3088,7 @@ found_it:
        put_lock_stats(stats);
 
        lock->cpu = cpu;
+       lock->ip = ip;
 }
 
 void lock_contended(struct lockdep_map *lock, unsigned long ip)
@@ -3104,7 +3110,7 @@ void lock_contended(struct lockdep_map *lock, unsigned long ip)
 }
 EXPORT_SYMBOL_GPL(lock_contended);
 
-void lock_acquired(struct lockdep_map *lock)
+void lock_acquired(struct lockdep_map *lock, unsigned long ip)
 {
        unsigned long flags;
 
@@ -3117,7 +3123,7 @@ void lock_acquired(struct lockdep_map *lock)
        raw_local_irq_save(flags);
        check_flags(flags);
        current->lockdep_recursion = 1;
-       __lock_acquired(lock);
+       __lock_acquired(lock, ip);
        current->lockdep_recursion = 0;
        raw_local_irq_restore(flags);
 }
@@ -3441,7 +3447,6 @@ retry:
        if (unlock)
                read_unlock(&tasklist_lock);
 }
-
 EXPORT_SYMBOL_GPL(debug_show_all_locks);
 
 /*
@@ -3462,7 +3467,6 @@ void debug_show_held_locks(struct task_struct *task)
 {
                __debug_show_held_locks(task);
 }
-
 EXPORT_SYMBOL_GPL(debug_show_held_locks);
 
 void lockdep_sys_exit(void)
index 20dbcbf9c7dd2cf34486f3e9f307f1e3cf8a97bc..13716b8138961ee9f5feffe23ad9115fc27766e3 100644 (file)
@@ -470,11 +470,12 @@ static void seq_line(struct seq_file *m, char c, int offset, int length)
 
 static void snprint_time(char *buf, size_t bufsiz, s64 nr)
 {
-       unsigned long rem;
+       s64 div;
+       s32 rem;
 
        nr += 5; /* for display rounding */
-       rem = do_div(nr, 1000); /* XXX: do_div_signed */
-       snprintf(buf, bufsiz, "%lld.%02d", (long long)nr, (int)rem/10);
+       div = div_s64_rem(nr, 1000, &rem);
+       snprintf(buf, bufsiz, "%lld.%02d", (long long)div, (int)rem/10);
 }
 
 static void seq_time(struct seq_file *m, s64 time)
@@ -556,7 +557,7 @@ static void seq_stats(struct seq_file *m, struct lock_stat_data *data)
        if (stats->read_holdtime.nr)
                namelen += 2;
 
-       for (i = 0; i < ARRAY_SIZE(class->contention_point); i++) {
+       for (i = 0; i < LOCKSTAT_POINTS; i++) {
                char sym[KSYM_SYMBOL_LEN];
                char ip[32];
 
@@ -573,6 +574,23 @@ static void seq_stats(struct seq_file *m, struct lock_stat_data *data)
                                stats->contention_point[i],
                                ip, sym);
        }
+       for (i = 0; i < LOCKSTAT_POINTS; i++) {
+               char sym[KSYM_SYMBOL_LEN];
+               char ip[32];
+
+               if (class->contending_point[i] == 0)
+                       break;
+
+               if (!i)
+                       seq_line(m, '-', 40-namelen, namelen);
+
+               sprint_symbol(sym, class->contending_point[i]);
+               snprintf(ip, sizeof(ip), "[<%p>]",
+                               (void *)class->contending_point[i]);
+               seq_printf(m, "%40s %14lu %29s %s\n", name,
+                               stats->contending_point[i],
+                               ip, sym);
+       }
        if (i) {
                seq_puts(m, "\n");
                seq_line(m, '.', 0, 40 + 1 + 10 * (14 + 1));
@@ -582,7 +600,7 @@ static void seq_stats(struct seq_file *m, struct lock_stat_data *data)
 
 static void seq_header(struct seq_file *m)
 {
-       seq_printf(m, "lock_stat version 0.2\n");
+       seq_printf(m, "lock_stat version 0.3\n");
        seq_line(m, '-', 0, 40 + 1 + 10 * (14 + 1));
        seq_printf(m, "%40s %14s %14s %14s %14s %14s %14s %14s %14s "
                        "%14s %14s\n",
index 12c779dc65d48a56f1941cc41d73f9593828cf0a..4f45d4b658ef6ab1fda9357725b01361a6768a76 100644 (file)
@@ -59,7 +59,7 @@ EXPORT_SYMBOL(__mutex_init);
  * We also put the fastpath first in the kernel image, to make sure the
  * branch is predicted by the CPU as default-untaken.
  */
-static void noinline __sched
+static __used noinline void __sched
 __mutex_lock_slowpath(atomic_t *lock_count);
 
 /***
@@ -96,7 +96,7 @@ void inline __sched mutex_lock(struct mutex *lock)
 EXPORT_SYMBOL(mutex_lock);
 #endif
 
-static noinline void __sched __mutex_unlock_slowpath(atomic_t *lock_count);
+static __used noinline void __sched __mutex_unlock_slowpath(atomic_t *lock_count);
 
 /***
  * mutex_unlock - release the mutex
@@ -184,7 +184,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
        }
 
 done:
-       lock_acquired(&lock->dep_map);
+       lock_acquired(&lock->dep_map, ip);
        /* got the lock - rejoice! */
        mutex_remove_waiter(lock, &waiter, task_thread_info(task));
        debug_mutex_set_owner(lock, task_thread_info(task));
@@ -268,7 +268,7 @@ __mutex_unlock_common_slowpath(atomic_t *lock_count, int nested)
 /*
  * Release the lock, slowpath:
  */
-static noinline void
+static __used noinline void
 __mutex_unlock_slowpath(atomic_t *lock_count)
 {
        __mutex_unlock_common_slowpath(lock_count, 1);
@@ -313,7 +313,7 @@ int __sched mutex_lock_killable(struct mutex *lock)
 }
 EXPORT_SYMBOL(mutex_lock_killable);
 
-static noinline void __sched
+static __used noinline void __sched
 __mutex_lock_slowpath(atomic_t *lock_count)
 {
        struct mutex *lock = container_of(lock_count, struct mutex, count);
index 4282c0a40a57ada651b86c7dcce2389abf489448..61d5aa5eced3466393582e4f566b63c468ea7cc3 100644 (file)
@@ -82,6 +82,14 @@ static int __kprobes notifier_call_chain(struct notifier_block **nl,
 
        while (nb && nr_to_call) {
                next_nb = rcu_dereference(nb->next);
+
+#ifdef CONFIG_DEBUG_NOTIFIERS
+               if (unlikely(!func_ptr_is_kernel_text(nb->notifier_call))) {
+                       WARN(1, "Invalid notifier called!");
+                       nb = next_nb;
+                       continue;
+               }
+#endif
                ret = nb->notifier_call(nb, val, v);
 
                if (nr_calls)
index 4d5088355bfefba8956ff5c91cbc4b932d23eff6..13f06349a7868aa2ad79635266b94050eb932545 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/debug_locks.h>
 #include <linux/random.h>
 #include <linux/kallsyms.h>
+#include <linux/dmi.h>
 
 int panic_on_oops;
 static unsigned long tainted_mask;
@@ -321,36 +322,27 @@ void oops_exit(void)
 }
 
 #ifdef WANT_WARN_ON_SLOWPATH
-void warn_on_slowpath(const char *file, int line)
-{
-       char function[KSYM_SYMBOL_LEN];
-       unsigned long caller = (unsigned long) __builtin_return_address(0);
-       sprint_symbol(function, caller);
-
-       printk(KERN_WARNING "------------[ cut here ]------------\n");
-       printk(KERN_WARNING "WARNING: at %s:%d %s()\n", file,
-               line, function);
-       print_modules();
-       dump_stack();
-       print_oops_end_marker();
-       add_taint(TAINT_WARN);
-}
-EXPORT_SYMBOL(warn_on_slowpath);
-
-
 void warn_slowpath(const char *file, int line, const char *fmt, ...)
 {
        va_list args;
        char function[KSYM_SYMBOL_LEN];
        unsigned long caller = (unsigned long)__builtin_return_address(0);
+       const char *board;
+
        sprint_symbol(function, caller);
 
        printk(KERN_WARNING "------------[ cut here ]------------\n");
        printk(KERN_WARNING "WARNING: at %s:%d %s()\n", file,
                line, function);
-       va_start(args, fmt);
-       vprintk(fmt, args);
-       va_end(args);
+       board = dmi_get_system_info(DMI_PRODUCT_NAME);
+       if (board)
+               printk(KERN_WARNING "Hardware name: %s\n", board);
+
+       if (fmt) {
+               va_start(args, fmt);
+               vprintk(fmt, args);
+               va_end(args);
+       }
 
        print_modules();
        dump_stack();
index 4e5288a831de2e696260c12f97d60fdbcfc551a3..157de3a478321ab80c8c05cee5ffd07da68bab39 100644 (file)
@@ -58,21 +58,21 @@ void thread_group_cputime(
        struct task_struct *tsk,
        struct task_cputime *times)
 {
-       struct signal_struct *sig;
+       struct task_cputime *totals, *tot;
        int i;
-       struct task_cputime *tot;
 
-       sig = tsk->signal;
-       if (unlikely(!sig) || !sig->cputime.totals) {
+       totals = tsk->signal->cputime.totals;
+       if (!totals) {
                times->utime = tsk->utime;
                times->stime = tsk->stime;
                times->sum_exec_runtime = tsk->se.sum_exec_runtime;
                return;
        }
+
        times->stime = times->utime = cputime_zero;
        times->sum_exec_runtime = 0;
        for_each_possible_cpu(i) {
-               tot = per_cpu_ptr(tsk->signal->cputime.totals, i);
+               tot = per_cpu_ptr(totals, i);
                times->utime = cputime_add(times->utime, tot->utime);
                times->stime = cputime_add(times->stime, tot->stime);
                times->sum_exec_runtime += tot->sum_exec_runtime;
index 5e79c662294bf542750af232be67a1e92bed858d..a140e44eebbacbe88b989e98b1bbdc744a99c94f 100644 (file)
@@ -197,6 +197,11 @@ static int common_timer_create(struct k_itimer *new_timer)
        return 0;
 }
 
+static int no_timer_create(struct k_itimer *new_timer)
+{
+       return -EOPNOTSUPP;
+}
+
 /*
  * Return nonzero if we know a priori this clockid_t value is bogus.
  */
@@ -248,6 +253,7 @@ static __init int init_posix_timers(void)
                .clock_getres = hrtimer_get_res,
                .clock_get = posix_get_monotonic_raw,
                .clock_set = do_posix_clock_nosettime,
+               .timer_create = no_timer_create,
        };
 
        register_posix_clock(CLOCK_REALTIME, &clock_realtime);
index f492f1583d77f7bcb5cedad94352a18a9d5f9919..e651ab05655f9f92b0bc9e9230ff59990eabb17a 100644 (file)
@@ -662,7 +662,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
        if (recursion_bug) {
                recursion_bug = 0;
                strcpy(printk_buf, recursion_bug_msg);
-               printed_len = sizeof(recursion_bug_msg);
+               printed_len = strlen(recursion_bug_msg);
        }
        /* Emit the output into the temporary buffer */
        printed_len += vscnprintf(printk_buf + printed_len,
index 37f72e551542234d2d7d905741e8a5f6fb7532ec..e503a002f330fb1f7ed74ef996384e74ae294d44 100644 (file)
@@ -191,7 +191,7 @@ static void print_other_cpu_stall(struct rcu_ctrlblk *rcp)
 
        /* OK, time to rat on our buddy... */
 
-       printk(KERN_ERR "RCU detected CPU stalls:");
+       printk(KERN_ERR "INFO: RCU detected CPU stalls:");
        for_each_possible_cpu(cpu) {
                if (cpu_isset(cpu, rcp->cpumask))
                        printk(" %d", cpu);
@@ -204,7 +204,7 @@ static void print_cpu_stall(struct rcu_ctrlblk *rcp)
 {
        unsigned long flags;
 
-       printk(KERN_ERR "RCU detected CPU %d stall (t=%lu/%lu jiffies)\n",
+       printk(KERN_ERR "INFO: RCU detected CPU %d stall (t=%lu/%lu jiffies)\n",
                        smp_processor_id(), jiffies,
                        jiffies - rcp->gp_start);
        dump_stack();
index 59236e8b9daa38e1e92a709e769fa75d857bb41e..04982659875a0fe67b4483874674ad862e3a6640 100644 (file)
@@ -551,6 +551,16 @@ void rcu_irq_exit(void)
        }
 }
 
+void rcu_nmi_enter(void)
+{
+       rcu_irq_enter();
+}
+
+void rcu_nmi_exit(void)
+{
+       rcu_irq_exit();
+}
+
 static void dyntick_save_progress_counter(int cpu)
 {
        struct rcu_dyntick_sched *rdssp = &per_cpu(rcu_dyntick_sched, cpu);
index 35c2d3360ecf750be63922a89101f6cfac249107..7c2665cac17220698caa5009b56ec863653083d3 100644 (file)
@@ -149,12 +149,12 @@ static void rcupreempt_trace_sum(struct rcupreempt_trace *sp)
                sp->done_length += cp->done_length;
                sp->done_add += cp->done_add;
                sp->done_remove += cp->done_remove;
-               atomic_set(&sp->done_invoked, atomic_read(&cp->done_invoked));
+               atomic_add(atomic_read(&cp->done_invoked), &sp->done_invoked);
                sp->rcu_check_callbacks += cp->rcu_check_callbacks;
-               atomic_set(&sp->rcu_try_flip_1,
-                          atomic_read(&cp->rcu_try_flip_1));
-               atomic_set(&sp->rcu_try_flip_e1,
-                          atomic_read(&cp->rcu_try_flip_e1));
+               atomic_add(atomic_read(&cp->rcu_try_flip_1),
+                          &sp->rcu_try_flip_1);
+               atomic_add(atomic_read(&cp->rcu_try_flip_e1),
+                          &sp->rcu_try_flip_e1);
                sp->rcu_try_flip_i1 += cp->rcu_try_flip_i1;
                sp->rcu_try_flip_ie1 += cp->rcu_try_flip_ie1;
                sp->rcu_try_flip_g1 += cp->rcu_try_flip_g1;
index 85cb90588a55ca54348f00a46cdd9199c6bba2bf..b31065522104f1a324404ea721489909d9a845f7 100644 (file)
@@ -39,6 +39,7 @@
 #include <linux/moduleparam.h>
 #include <linux/percpu.h>
 #include <linux/notifier.h>
+#include <linux/reboot.h>
 #include <linux/freezer.h>
 #include <linux/cpu.h>
 #include <linux/delay.h>
@@ -108,7 +109,6 @@ struct rcu_torture {
        int rtort_mbtest;
 };
 
-static int fullstop = 0;       /* stop generating callbacks at test end. */
 static LIST_HEAD(rcu_torture_freelist);
 static struct rcu_torture *rcu_torture_current = NULL;
 static long rcu_torture_current_version = 0;
@@ -136,6 +136,30 @@ static int stutter_pause_test = 0;
 #endif
 int rcutorture_runnable = RCUTORTURE_RUNNABLE_INIT;
 
+#define FULLSTOP_SIGNALED 1    /* Bail due to signal. */
+#define FULLSTOP_CLEANUP  2    /* Orderly shutdown. */
+static int fullstop;           /* stop generating callbacks at test end. */
+DEFINE_MUTEX(fullstop_mutex);  /* protect fullstop transitions and */
+                               /*  spawning of kthreads. */
+
+/*
+ * Detect and respond to a signal-based shutdown.
+ */
+static int
+rcutorture_shutdown_notify(struct notifier_block *unused1,
+                          unsigned long unused2, void *unused3)
+{
+       if (fullstop)
+               return NOTIFY_DONE;
+       if (signal_pending(current)) {
+               mutex_lock(&fullstop_mutex);
+               if (!ACCESS_ONCE(fullstop))
+                       fullstop = FULLSTOP_SIGNALED;
+               mutex_unlock(&fullstop_mutex);
+       }
+       return NOTIFY_DONE;
+}
+
 /*
  * Allocate an element from the rcu_tortures pool.
  */
@@ -199,11 +223,12 @@ rcu_random(struct rcu_random_state *rrsp)
 static void
 rcu_stutter_wait(void)
 {
-       while (stutter_pause_test || !rcutorture_runnable)
+       while ((stutter_pause_test || !rcutorture_runnable) && !fullstop) {
                if (rcutorture_runnable)
                        schedule_timeout_interruptible(1);
                else
                        schedule_timeout_interruptible(round_jiffies_relative(HZ));
+       }
 }
 
 /*
@@ -599,7 +624,7 @@ rcu_torture_writer(void *arg)
                rcu_stutter_wait();
        } while (!kthread_should_stop() && !fullstop);
        VERBOSE_PRINTK_STRING("rcu_torture_writer task stopping");
-       while (!kthread_should_stop())
+       while (!kthread_should_stop() && fullstop != FULLSTOP_SIGNALED)
                schedule_timeout_uninterruptible(1);
        return 0;
 }
@@ -624,7 +649,7 @@ rcu_torture_fakewriter(void *arg)
        } while (!kthread_should_stop() && !fullstop);
 
        VERBOSE_PRINTK_STRING("rcu_torture_fakewriter task stopping");
-       while (!kthread_should_stop())
+       while (!kthread_should_stop() && fullstop != FULLSTOP_SIGNALED)
                schedule_timeout_uninterruptible(1);
        return 0;
 }
@@ -734,7 +759,7 @@ rcu_torture_reader(void *arg)
        VERBOSE_PRINTK_STRING("rcu_torture_reader task stopping");
        if (irqreader && cur_ops->irqcapable)
                del_timer_sync(&t);
-       while (!kthread_should_stop())
+       while (!kthread_should_stop() && fullstop != FULLSTOP_SIGNALED)
                schedule_timeout_uninterruptible(1);
        return 0;
 }
@@ -831,7 +856,7 @@ rcu_torture_stats(void *arg)
        do {
                schedule_timeout_interruptible(stat_interval * HZ);
                rcu_torture_stats_print();
-       } while (!kthread_should_stop());
+       } while (!kthread_should_stop() && !fullstop);
        VERBOSE_PRINTK_STRING("rcu_torture_stats task stopping");
        return 0;
 }
@@ -899,7 +924,7 @@ rcu_torture_shuffle(void *arg)
        do {
                schedule_timeout_interruptible(shuffle_interval * HZ);
                rcu_torture_shuffle_tasks();
-       } while (!kthread_should_stop());
+       } while (!kthread_should_stop() && !fullstop);
        VERBOSE_PRINTK_STRING("rcu_torture_shuffle task stopping");
        return 0;
 }
@@ -914,10 +939,10 @@ rcu_torture_stutter(void *arg)
        do {
                schedule_timeout_interruptible(stutter * HZ);
                stutter_pause_test = 1;
-               if (!kthread_should_stop())
+               if (!kthread_should_stop() && !fullstop)
                        schedule_timeout_interruptible(stutter * HZ);
                stutter_pause_test = 0;
-       } while (!kthread_should_stop());
+       } while (!kthread_should_stop() && !fullstop);
        VERBOSE_PRINTK_STRING("rcu_torture_stutter task stopping");
        return 0;
 }
@@ -934,12 +959,27 @@ rcu_torture_print_module_parms(char *tag)
                stutter, irqreader);
 }
 
+static struct notifier_block rcutorture_nb = {
+       .notifier_call = rcutorture_shutdown_notify,
+};
+
 static void
 rcu_torture_cleanup(void)
 {
        int i;
 
-       fullstop = 1;
+       mutex_lock(&fullstop_mutex);
+       if (!fullstop) {
+               /* If being signaled, let it happen, then exit. */
+               mutex_unlock(&fullstop_mutex);
+               schedule_timeout_interruptible(10 * HZ);
+               if (cur_ops->cb_barrier != NULL)
+                       cur_ops->cb_barrier();
+               return;
+       }
+       fullstop = FULLSTOP_CLEANUP;
+       mutex_unlock(&fullstop_mutex);
+       unregister_reboot_notifier(&rcutorture_nb);
        if (stutter_task) {
                VERBOSE_PRINTK_STRING("Stopping rcu_torture_stutter task");
                kthread_stop(stutter_task);
@@ -1015,6 +1055,8 @@ rcu_torture_init(void)
                { &rcu_ops, &rcu_sync_ops, &rcu_bh_ops, &rcu_bh_sync_ops,
                  &srcu_ops, &sched_ops, &sched_ops_sync, };
 
+       mutex_lock(&fullstop_mutex);
+
        /* Process args and tell the world that the torturer is on the job. */
        for (i = 0; i < ARRAY_SIZE(torture_ops); i++) {
                cur_ops = torture_ops[i];
@@ -1024,6 +1066,7 @@ rcu_torture_init(void)
        if (i == ARRAY_SIZE(torture_ops)) {
                printk(KERN_ALERT "rcutorture: invalid torture type: \"%s\"\n",
                       torture_type);
+               mutex_unlock(&fullstop_mutex);
                return (-EINVAL);
        }
        if (cur_ops->init)
@@ -1146,9 +1189,12 @@ rcu_torture_init(void)
                        goto unwind;
                }
        }
+       register_reboot_notifier(&rcutorture_nb);
+       mutex_unlock(&fullstop_mutex);
        return 0;
 
 unwind:
+       mutex_unlock(&fullstop_mutex);
        rcu_torture_cleanup();
        return firsterr;
 }
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
new file mode 100644 (file)
index 0000000..a342b03
--- /dev/null
@@ -0,0 +1,1535 @@
+/*
+ * Read-Copy Update mechanism for mutual exclusion
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Copyright IBM Corporation, 2008
+ *
+ * Authors: Dipankar Sarma <dipankar@in.ibm.com>
+ *         Manfred Spraul <manfred@colorfullife.com>
+ *         Paul E. McKenney <paulmck@linux.vnet.ibm.com> Hierarchical version
+ *
+ * Based on the original work by Paul McKenney <paulmck@us.ibm.com>
+ * and inputs from Rusty Russell, Andrea Arcangeli and Andi Kleen.
+ *
+ * For detailed explanation of Read-Copy Update mechanism see -
+ *     Documentation/RCU
+ */
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/spinlock.h>
+#include <linux/smp.h>
+#include <linux/rcupdate.h>
+#include <linux/interrupt.h>
+#include <linux/sched.h>
+#include <asm/atomic.h>
+#include <linux/bitops.h>
+#include <linux/module.h>
+#include <linux/completion.h>
+#include <linux/moduleparam.h>
+#include <linux/percpu.h>
+#include <linux/notifier.h>
+#include <linux/cpu.h>
+#include <linux/mutex.h>
+#include <linux/time.h>
+
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+static struct lock_class_key rcu_lock_key;
+struct lockdep_map rcu_lock_map =
+       STATIC_LOCKDEP_MAP_INIT("rcu_read_lock", &rcu_lock_key);
+EXPORT_SYMBOL_GPL(rcu_lock_map);
+#endif
+
+/* Data structures. */
+
+#define RCU_STATE_INITIALIZER(name) { \
+       .level = { &name.node[0] }, \
+       .levelcnt = { \
+               NUM_RCU_LVL_0,  /* root of hierarchy. */ \
+               NUM_RCU_LVL_1, \
+               NUM_RCU_LVL_2, \
+               NUM_RCU_LVL_3, /* == MAX_RCU_LVLS */ \
+       }, \
+       .signaled = RCU_SIGNAL_INIT, \
+       .gpnum = -300, \
+       .completed = -300, \
+       .onofflock = __SPIN_LOCK_UNLOCKED(&name.onofflock), \
+       .fqslock = __SPIN_LOCK_UNLOCKED(&name.fqslock), \
+       .n_force_qs = 0, \
+       .n_force_qs_ngp = 0, \
+}
+
+struct rcu_state rcu_state = RCU_STATE_INITIALIZER(rcu_state);
+DEFINE_PER_CPU(struct rcu_data, rcu_data);
+
+struct rcu_state rcu_bh_state = RCU_STATE_INITIALIZER(rcu_bh_state);
+DEFINE_PER_CPU(struct rcu_data, rcu_bh_data);
+
+#ifdef CONFIG_NO_HZ
+DEFINE_PER_CPU(struct rcu_dynticks, rcu_dynticks);
+#endif /* #ifdef CONFIG_NO_HZ */
+
+static int blimit = 10;                /* Maximum callbacks per softirq. */
+static int qhimark = 10000;    /* If this many pending, ignore blimit. */
+static int qlowmark = 100;     /* Once only this many pending, use blimit. */
+
+static void force_quiescent_state(struct rcu_state *rsp, int relaxed);
+
+/*
+ * Return the number of RCU batches processed thus far for debug & stats.
+ */
+long rcu_batches_completed(void)
+{
+       return rcu_state.completed;
+}
+EXPORT_SYMBOL_GPL(rcu_batches_completed);
+
+/*
+ * Return the number of RCU BH batches processed thus far for debug & stats.
+ */
+long rcu_batches_completed_bh(void)
+{
+       return rcu_bh_state.completed;
+}
+EXPORT_SYMBOL_GPL(rcu_batches_completed_bh);
+
+/*
+ * Does the CPU have callbacks ready to be invoked?
+ */
+static int
+cpu_has_callbacks_ready_to_invoke(struct rcu_data *rdp)
+{
+       return &rdp->nxtlist != rdp->nxttail[RCU_DONE_TAIL];
+}
+
+/*
+ * Does the current CPU require a yet-as-unscheduled grace period?
+ */
+static int
+cpu_needs_another_gp(struct rcu_state *rsp, struct rcu_data *rdp)
+{
+       /* ACCESS_ONCE() because we are accessing outside of lock. */
+       return *rdp->nxttail[RCU_DONE_TAIL] &&
+              ACCESS_ONCE(rsp->completed) == ACCESS_ONCE(rsp->gpnum);
+}
+
+/*
+ * Return the root node of the specified rcu_state structure.
+ */
+static struct rcu_node *rcu_get_root(struct rcu_state *rsp)
+{
+       return &rsp->node[0];
+}
+
+#ifdef CONFIG_SMP
+
+/*
+ * If the specified CPU is offline, tell the caller that it is in
+ * a quiescent state.  Otherwise, whack it with a reschedule IPI.
+ * Grace periods can end up waiting on an offline CPU when that
+ * CPU is in the process of coming online -- it will be added to the
+ * rcu_node bitmasks before it actually makes it online.  The same thing
+ * can happen while a CPU is in the process of coming online.  Because this
+ * race is quite rare, we check for it after detecting that the grace
+ * period has been delayed rather than checking each and every CPU
+ * each and every time we start a new grace period.
+ */
+static int rcu_implicit_offline_qs(struct rcu_data *rdp)
+{
+       /*
+        * If the CPU is offline, it is in a quiescent state.  We can
+        * trust its state not to change because interrupts are disabled.
+        */
+       if (cpu_is_offline(rdp->cpu)) {
+               rdp->offline_fqs++;
+               return 1;
+       }
+
+       /* The CPU is online, so send it a reschedule IPI. */
+       if (rdp->cpu != smp_processor_id())
+               smp_send_reschedule(rdp->cpu);
+       else
+               set_need_resched();
+       rdp->resched_ipi++;
+       return 0;
+}
+
+#endif /* #ifdef CONFIG_SMP */
+
+#ifdef CONFIG_NO_HZ
+static DEFINE_RATELIMIT_STATE(rcu_rs, 10 * HZ, 5);
+
+/**
+ * rcu_enter_nohz - inform RCU that current CPU is entering nohz
+ *
+ * Enter nohz mode, in other words, -leave- the mode in which RCU
+ * read-side critical sections can occur.  (Though RCU read-side
+ * critical sections can occur in irq handlers in nohz mode, a possibility
+ * handled by rcu_irq_enter() and rcu_irq_exit()).
+ */
+void rcu_enter_nohz(void)
+{
+       unsigned long flags;
+       struct rcu_dynticks *rdtp;
+
+       smp_mb(); /* CPUs seeing ++ must see prior RCU read-side crit sects */
+       local_irq_save(flags);
+       rdtp = &__get_cpu_var(rcu_dynticks);
+       rdtp->dynticks++;
+       rdtp->dynticks_nesting--;
+       WARN_ON_RATELIMIT(rdtp->dynticks & 0x1, &rcu_rs);
+       local_irq_restore(flags);
+}
+
+/*
+ * rcu_exit_nohz - inform RCU that current CPU is leaving nohz
+ *
+ * Exit nohz mode, in other words, -enter- the mode in which RCU
+ * read-side critical sections normally occur.
+ */
+void rcu_exit_nohz(void)
+{
+       unsigned long flags;
+       struct rcu_dynticks *rdtp;
+
+       local_irq_save(flags);
+       rdtp = &__get_cpu_var(rcu_dynticks);
+       rdtp->dynticks++;
+       rdtp->dynticks_nesting++;
+       WARN_ON_RATELIMIT(!(rdtp->dynticks & 0x1), &rcu_rs);
+       local_irq_restore(flags);
+       smp_mb(); /* CPUs seeing ++ must see later RCU read-side crit sects */
+}
+
+/**
+ * rcu_nmi_enter - inform RCU of entry to NMI context
+ *
+ * If the CPU was idle with dynamic ticks active, and there is no
+ * irq handler running, this updates rdtp->dynticks_nmi to let the
+ * RCU grace-period handling know that the CPU is active.
+ */
+void rcu_nmi_enter(void)
+{
+       struct rcu_dynticks *rdtp = &__get_cpu_var(rcu_dynticks);
+
+       if (rdtp->dynticks & 0x1)
+               return;
+       rdtp->dynticks_nmi++;
+       WARN_ON_RATELIMIT(!(rdtp->dynticks_nmi & 0x1), &rcu_rs);
+       smp_mb(); /* CPUs seeing ++ must see later RCU read-side crit sects */
+}
+
+/**
+ * rcu_nmi_exit - inform RCU of exit from NMI context
+ *
+ * If the CPU was idle with dynamic ticks active, and there is no
+ * irq handler running, this updates rdtp->dynticks_nmi to let the
+ * RCU grace-period handling know that the CPU is no longer active.
+ */
+void rcu_nmi_exit(void)
+{
+       struct rcu_dynticks *rdtp = &__get_cpu_var(rcu_dynticks);
+
+       if (rdtp->dynticks & 0x1)
+               return;
+       smp_mb(); /* CPUs seeing ++ must see prior RCU read-side crit sects */
+       rdtp->dynticks_nmi++;
+       WARN_ON_RATELIMIT(rdtp->dynticks_nmi & 0x1, &rcu_rs);
+}
+
+/**
+ * rcu_irq_enter - inform RCU of entry to hard irq context
+ *
+ * If the CPU was idle with dynamic ticks active, this updates the
+ * rdtp->dynticks to let the RCU handling know that the CPU is active.
+ */
+void rcu_irq_enter(void)
+{
+       struct rcu_dynticks *rdtp = &__get_cpu_var(rcu_dynticks);
+
+       if (rdtp->dynticks_nesting++)
+               return;
+       rdtp->dynticks++;
+       WARN_ON_RATELIMIT(!(rdtp->dynticks & 0x1), &rcu_rs);
+       smp_mb(); /* CPUs seeing ++ must see later RCU read-side crit sects */
+}
+
+/**
+ * rcu_irq_exit - inform RCU of exit from hard irq context
+ *
+ * If the CPU was idle with dynamic ticks active, update the rdp->dynticks
+ * to put let the RCU handling be aware that the CPU is going back to idle
+ * with no ticks.
+ */
+void rcu_irq_exit(void)
+{
+       struct rcu_dynticks *rdtp = &__get_cpu_var(rcu_dynticks);
+
+       if (--rdtp->dynticks_nesting)
+               return;
+       smp_mb(); /* CPUs seeing ++ must see prior RCU read-side crit sects */
+       rdtp->dynticks++;
+       WARN_ON_RATELIMIT(rdtp->dynticks & 0x1, &rcu_rs);
+
+       /* If the interrupt queued a callback, get out of dyntick mode. */
+       if (__get_cpu_var(rcu_data).nxtlist ||
+           __get_cpu_var(rcu_bh_data).nxtlist)
+               set_need_resched();
+}
+
+/*
+ * Record the specified "completed" value, which is later used to validate
+ * dynticks counter manipulations.  Specify "rsp->completed - 1" to
+ * unconditionally invalidate any future dynticks manipulations (which is
+ * useful at the beginning of a grace period).
+ */
+static void dyntick_record_completed(struct rcu_state *rsp, long comp)
+{
+       rsp->dynticks_completed = comp;
+}
+
+#ifdef CONFIG_SMP
+
+/*
+ * Recall the previously recorded value of the completion for dynticks.
+ */
+static long dyntick_recall_completed(struct rcu_state *rsp)
+{
+       return rsp->dynticks_completed;
+}
+
+/*
+ * Snapshot the specified CPU's dynticks counter so that we can later
+ * credit them with an implicit quiescent state.  Return 1 if this CPU
+ * is already in a quiescent state courtesy of dynticks idle mode.
+ */
+static int dyntick_save_progress_counter(struct rcu_data *rdp)
+{
+       int ret;
+       int snap;
+       int snap_nmi;
+
+       snap = rdp->dynticks->dynticks;
+       snap_nmi = rdp->dynticks->dynticks_nmi;
+       smp_mb();       /* Order sampling of snap with end of grace period. */
+       rdp->dynticks_snap = snap;
+       rdp->dynticks_nmi_snap = snap_nmi;
+       ret = ((snap & 0x1) == 0) && ((snap_nmi & 0x1) == 0);
+       if (ret)
+               rdp->dynticks_fqs++;
+       return ret;
+}
+
+/*
+ * Return true if the specified CPU has passed through a quiescent
+ * state by virtue of being in or having passed through an dynticks
+ * idle state since the last call to dyntick_save_progress_counter()
+ * for this same CPU.
+ */
+static int rcu_implicit_dynticks_qs(struct rcu_data *rdp)
+{
+       long curr;
+       long curr_nmi;
+       long snap;
+       long snap_nmi;
+
+       curr = rdp->dynticks->dynticks;
+       snap = rdp->dynticks_snap;
+       curr_nmi = rdp->dynticks->dynticks_nmi;
+       snap_nmi = rdp->dynticks_nmi_snap;
+       smp_mb(); /* force ordering with cpu entering/leaving dynticks. */
+
+       /*
+        * If the CPU passed through or entered a dynticks idle phase with
+        * no active irq/NMI handlers, then we can safely pretend that the CPU
+        * already acknowledged the request to pass through a quiescent
+        * state.  Either way, that CPU cannot possibly be in an RCU
+        * read-side critical section that started before the beginning
+        * of the current RCU grace period.
+        */
+       if ((curr != snap || (curr & 0x1) == 0) &&
+           (curr_nmi != snap_nmi || (curr_nmi & 0x1) == 0)) {
+               rdp->dynticks_fqs++;
+               return 1;
+       }
+
+       /* Go check for the CPU being offline. */
+       return rcu_implicit_offline_qs(rdp);
+}
+
+#endif /* #ifdef CONFIG_SMP */
+
+#else /* #ifdef CONFIG_NO_HZ */
+
+static void dyntick_record_completed(struct rcu_state *rsp, long comp)
+{
+}
+
+#ifdef CONFIG_SMP
+
+/*
+ * If there are no dynticks, then the only way that a CPU can passively
+ * be in a quiescent state is to be offline.  Unlike dynticks idle, which
+ * is a point in time during the prior (already finished) grace period,
+ * an offline CPU is always in a quiescent state, and thus can be
+ * unconditionally applied.  So just return the current value of completed.
+ */
+static long dyntick_recall_completed(struct rcu_state *rsp)
+{
+       return rsp->completed;
+}
+
+static int dyntick_save_progress_counter(struct rcu_data *rdp)
+{
+       return 0;
+}
+
+static int rcu_implicit_dynticks_qs(struct rcu_data *rdp)
+{
+       return rcu_implicit_offline_qs(rdp);
+}
+
+#endif /* #ifdef CONFIG_SMP */
+
+#endif /* #else #ifdef CONFIG_NO_HZ */
+
+#ifdef CONFIG_RCU_CPU_STALL_DETECTOR
+
+static void record_gp_stall_check_time(struct rcu_state *rsp)
+{
+       rsp->gp_start = jiffies;
+       rsp->jiffies_stall = jiffies + RCU_SECONDS_TILL_STALL_CHECK;
+}
+
+static void print_other_cpu_stall(struct rcu_state *rsp)
+{
+       int cpu;
+       long delta;
+       unsigned long flags;
+       struct rcu_node *rnp = rcu_get_root(rsp);
+       struct rcu_node *rnp_cur = rsp->level[NUM_RCU_LVLS - 1];
+       struct rcu_node *rnp_end = &rsp->node[NUM_RCU_NODES];
+
+       /* Only let one CPU complain about others per time interval. */
+
+       spin_lock_irqsave(&rnp->lock, flags);
+       delta = jiffies - rsp->jiffies_stall;
+       if (delta < RCU_STALL_RAT_DELAY || rsp->gpnum == rsp->completed) {
+               spin_unlock_irqrestore(&rnp->lock, flags);
+               return;
+       }
+       rsp->jiffies_stall = jiffies + RCU_SECONDS_TILL_STALL_RECHECK;
+       spin_unlock_irqrestore(&rnp->lock, flags);
+
+       /* OK, time to rat on our buddy... */
+
+       printk(KERN_ERR "INFO: RCU detected CPU stalls:");
+       for (; rnp_cur < rnp_end; rnp_cur++) {
+               if (rnp_cur->qsmask == 0)
+                       continue;
+               for (cpu = 0; cpu <= rnp_cur->grphi - rnp_cur->grplo; cpu++)
+                       if (rnp_cur->qsmask & (1UL << cpu))
+                               printk(" %d", rnp_cur->grplo + cpu);
+       }
+       printk(" (detected by %d, t=%ld jiffies)\n",
+              smp_processor_id(), (long)(jiffies - rsp->gp_start));
+       force_quiescent_state(rsp, 0);  /* Kick them all. */
+}
+
+static void print_cpu_stall(struct rcu_state *rsp)
+{
+       unsigned long flags;
+       struct rcu_node *rnp = rcu_get_root(rsp);
+
+       printk(KERN_ERR "INFO: RCU detected CPU %d stall (t=%lu jiffies)\n",
+                       smp_processor_id(), jiffies - rsp->gp_start);
+       dump_stack();
+       spin_lock_irqsave(&rnp->lock, flags);
+       if ((long)(jiffies - rsp->jiffies_stall) >= 0)
+               rsp->jiffies_stall =
+                       jiffies + RCU_SECONDS_TILL_STALL_RECHECK;
+       spin_unlock_irqrestore(&rnp->lock, flags);
+       set_need_resched();  /* kick ourselves to get things going. */
+}
+
+static void check_cpu_stall(struct rcu_state *rsp, struct rcu_data *rdp)
+{
+       long delta;
+       struct rcu_node *rnp;
+
+       delta = jiffies - rsp->jiffies_stall;
+       rnp = rdp->mynode;
+       if ((rnp->qsmask & rdp->grpmask) && delta >= 0) {
+
+               /* We haven't checked in, so go dump stack. */
+               print_cpu_stall(rsp);
+
+       } else if (rsp->gpnum != rsp->completed &&
+                  delta >= RCU_STALL_RAT_DELAY) {
+
+               /* They had two time units to dump stack, so complain. */
+               print_other_cpu_stall(rsp);
+       }
+}
+
+#else /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
+
+static void record_gp_stall_check_time(struct rcu_state *rsp)
+{
+}
+
+static void check_cpu_stall(struct rcu_state *rsp, struct rcu_data *rdp)
+{
+}
+
+#endif /* #else #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
+
+/*
+ * Update CPU-local rcu_data state to record the newly noticed grace period.
+ * This is used both when we started the grace period and when we notice
+ * that someone else started the grace period.
+ */
+static void note_new_gpnum(struct rcu_state *rsp, struct rcu_data *rdp)
+{
+       rdp->qs_pending = 1;
+       rdp->passed_quiesc = 0;
+       rdp->gpnum = rsp->gpnum;
+       rdp->n_rcu_pending_force_qs = rdp->n_rcu_pending +
+                                     RCU_JIFFIES_TILL_FORCE_QS;
+}
+
+/*
+ * Did someone else start a new RCU grace period start since we last
+ * checked?  Update local state appropriately if so.  Must be called
+ * on the CPU corresponding to rdp.
+ */
+static int
+check_for_new_grace_period(struct rcu_state *rsp, struct rcu_data *rdp)
+{
+       unsigned long flags;
+       int ret = 0;
+
+       local_irq_save(flags);
+       if (rdp->gpnum != rsp->gpnum) {
+               note_new_gpnum(rsp, rdp);
+               ret = 1;
+       }
+       local_irq_restore(flags);
+       return ret;
+}
+
+/*
+ * Start a new RCU grace period if warranted, re-initializing the hierarchy
+ * in preparation for detecting the next grace period.  The caller must hold
+ * the root node's ->lock, which is released before return.  Hard irqs must
+ * be disabled.
+ */
+static void
+rcu_start_gp(struct rcu_state *rsp, unsigned long flags)
+       __releases(rcu_get_root(rsp)->lock)
+{
+       struct rcu_data *rdp = rsp->rda[smp_processor_id()];
+       struct rcu_node *rnp = rcu_get_root(rsp);
+       struct rcu_node *rnp_cur;
+       struct rcu_node *rnp_end;
+
+       if (!cpu_needs_another_gp(rsp, rdp)) {
+               spin_unlock_irqrestore(&rnp->lock, flags);
+               return;
+       }
+
+       /* Advance to a new grace period and initialize state. */
+       rsp->gpnum++;
+       rsp->signaled = RCU_GP_INIT; /* Hold off force_quiescent_state. */
+       rsp->jiffies_force_qs = jiffies + RCU_JIFFIES_TILL_FORCE_QS;
+       rdp->n_rcu_pending_force_qs = rdp->n_rcu_pending +
+                                     RCU_JIFFIES_TILL_FORCE_QS;
+       record_gp_stall_check_time(rsp);
+       dyntick_record_completed(rsp, rsp->completed - 1);
+       note_new_gpnum(rsp, rdp);
+
+       /*
+        * Because we are first, we know that all our callbacks will
+        * be covered by this upcoming grace period, even the ones
+        * that were registered arbitrarily recently.
+        */
+       rdp->nxttail[RCU_NEXT_READY_TAIL] = rdp->nxttail[RCU_NEXT_TAIL];
+       rdp->nxttail[RCU_WAIT_TAIL] = rdp->nxttail[RCU_NEXT_TAIL];
+
+       /* Special-case the common single-level case. */
+       if (NUM_RCU_NODES == 1) {
+               rnp->qsmask = rnp->qsmaskinit;
+               spin_unlock_irqrestore(&rnp->lock, flags);
+               return;
+       }
+
+       spin_unlock(&rnp->lock);  /* leave irqs disabled. */
+
+
+       /* Exclude any concurrent CPU-hotplug operations. */
+       spin_lock(&rsp->onofflock);  /* irqs already disabled. */
+
+       /*
+        * Set the quiescent-state-needed bits in all the non-leaf RCU
+        * nodes for all currently online CPUs.  This operation relies
+        * on the layout of the hierarchy within the rsp->node[] array.
+        * Note that other CPUs will access only the leaves of the
+        * hierarchy, which still indicate that no grace period is in
+        * progress.  In addition, we have excluded CPU-hotplug operations.
+        *
+        * We therefore do not need to hold any locks.  Any required
+        * memory barriers will be supplied by the locks guarding the
+        * leaf rcu_nodes in the hierarchy.
+        */
+
+       rnp_end = rsp->level[NUM_RCU_LVLS - 1];
+       for (rnp_cur = &rsp->node[0]; rnp_cur < rnp_end; rnp_cur++)
+               rnp_cur->qsmask = rnp_cur->qsmaskinit;
+
+       /*
+        * Now set up the leaf nodes.  Here we must be careful.  First,
+        * we need to hold the lock in order to exclude other CPUs, which
+        * might be contending for the leaf nodes' locks.  Second, as
+        * soon as we initialize a given leaf node, its CPUs might run
+        * up the rest of the hierarchy.  We must therefore acquire locks
+        * for each node that we touch during this stage.  (But we still
+        * are excluding CPU-hotplug operations.)
+        *
+        * Note that the grace period cannot complete until we finish
+        * the initialization process, as there will be at least one
+        * qsmask bit set in the root node until that time, namely the
+        * one corresponding to this CPU.
+        */
+       rnp_end = &rsp->node[NUM_RCU_NODES];
+       rnp_cur = rsp->level[NUM_RCU_LVLS - 1];
+       for (; rnp_cur < rnp_end; rnp_cur++) {
+               spin_lock(&rnp_cur->lock);      /* irqs already disabled. */
+               rnp_cur->qsmask = rnp_cur->qsmaskinit;
+               spin_unlock(&rnp_cur->lock);    /* irqs already disabled. */
+       }
+
+       rsp->signaled = RCU_SIGNAL_INIT; /* force_quiescent_state now OK. */
+       spin_unlock_irqrestore(&rsp->onofflock, flags);
+}
+
+/*
+ * Advance this CPU's callbacks, but only if the current grace period
+ * has ended.  This may be called only from the CPU to whom the rdp
+ * belongs.
+ */
+static void
+rcu_process_gp_end(struct rcu_state *rsp, struct rcu_data *rdp)
+{
+       long completed_snap;
+       unsigned long flags;
+
+       local_irq_save(flags);
+       completed_snap = ACCESS_ONCE(rsp->completed);  /* outside of lock. */
+
+       /* Did another grace period end? */
+       if (rdp->completed != completed_snap) {
+
+               /* Advance callbacks.  No harm if list empty. */
+               rdp->nxttail[RCU_DONE_TAIL] = rdp->nxttail[RCU_WAIT_TAIL];
+               rdp->nxttail[RCU_WAIT_TAIL] = rdp->nxttail[RCU_NEXT_READY_TAIL];
+               rdp->nxttail[RCU_NEXT_READY_TAIL] = rdp->nxttail[RCU_NEXT_TAIL];
+
+               /* Remember that we saw this grace-period completion. */
+               rdp->completed = completed_snap;
+       }
+       local_irq_restore(flags);
+}
+
+/*
+ * Similar to cpu_quiet(), for which it is a helper function.  Allows
+ * a group of CPUs to be quieted at one go, though all the CPUs in the
+ * group must be represented by the same leaf rcu_node structure.
+ * That structure's lock must be held upon entry, and it is released
+ * before return.
+ */
+static void
+cpu_quiet_msk(unsigned long mask, struct rcu_state *rsp, struct rcu_node *rnp,
+             unsigned long flags)
+       __releases(rnp->lock)
+{
+       /* Walk up the rcu_node hierarchy. */
+       for (;;) {
+               if (!(rnp->qsmask & mask)) {
+
+                       /* Our bit has already been cleared, so done. */
+                       spin_unlock_irqrestore(&rnp->lock, flags);
+                       return;
+               }
+               rnp->qsmask &= ~mask;
+               if (rnp->qsmask != 0) {
+
+                       /* Other bits still set at this level, so done. */
+                       spin_unlock_irqrestore(&rnp->lock, flags);
+                       return;
+               }
+               mask = rnp->grpmask;
+               if (rnp->parent == NULL) {
+
+                       /* No more levels.  Exit loop holding root lock. */
+
+                       break;
+               }
+               spin_unlock_irqrestore(&rnp->lock, flags);
+               rnp = rnp->parent;
+               spin_lock_irqsave(&rnp->lock, flags);
+       }
+
+       /*
+        * Get here if we are the last CPU to pass through a quiescent
+        * state for this grace period.  Clean up and let rcu_start_gp()
+        * start up the next grace period if one is needed.  Note that
+        * we still hold rnp->lock, as required by rcu_start_gp(), which
+        * will release it.
+        */
+       rsp->completed = rsp->gpnum;
+       rcu_process_gp_end(rsp, rsp->rda[smp_processor_id()]);
+       rcu_start_gp(rsp, flags);  /* releases rnp->lock. */
+}
+
+/*
+ * Record a quiescent state for the specified CPU, which must either be
+ * the current CPU or an offline CPU.  The lastcomp argument is used to
+ * make sure we are still in the grace period of interest.  We don't want
+ * to end the current grace period based on quiescent states detected in
+ * an earlier grace period!
+ */
+static void
+cpu_quiet(int cpu, struct rcu_state *rsp, struct rcu_data *rdp, long lastcomp)
+{
+       unsigned long flags;
+       unsigned long mask;
+       struct rcu_node *rnp;
+
+       rnp = rdp->mynode;
+       spin_lock_irqsave(&rnp->lock, flags);
+       if (lastcomp != ACCESS_ONCE(rsp->completed)) {
+
+               /*
+                * Someone beat us to it for this grace period, so leave.
+                * The race with GP start is resolved by the fact that we
+                * hold the leaf rcu_node lock, so that the per-CPU bits
+                * cannot yet be initialized -- so we would simply find our
+                * CPU's bit already cleared in cpu_quiet_msk() if this race
+                * occurred.
+                */
+               rdp->passed_quiesc = 0; /* try again later! */
+               spin_unlock_irqrestore(&rnp->lock, flags);
+               return;
+       }
+       mask = rdp->grpmask;
+       if ((rnp->qsmask & mask) == 0) {
+               spin_unlock_irqrestore(&rnp->lock, flags);
+       } else {
+               rdp->qs_pending = 0;
+
+               /*
+                * This GP can't end until cpu checks in, so all of our
+                * callbacks can be processed during the next GP.
+                */
+               rdp = rsp->rda[smp_processor_id()];
+               rdp->nxttail[RCU_NEXT_READY_TAIL] = rdp->nxttail[RCU_NEXT_TAIL];
+
+               cpu_quiet_msk(mask, rsp, rnp, flags); /* releases rnp->lock */
+       }
+}
+
+/*
+ * Check to see if there is a new grace period of which this CPU
+ * is not yet aware, and if so, set up local rcu_data state for it.
+ * Otherwise, see if this CPU has just passed through its first
+ * quiescent state for this grace period, and record that fact if so.
+ */
+static void
+rcu_check_quiescent_state(struct rcu_state *rsp, struct rcu_data *rdp)
+{
+       /* If there is now a new grace period, record and return. */
+       if (check_for_new_grace_period(rsp, rdp))
+               return;
+
+       /*
+        * Does this CPU still need to do its part for current grace period?
+        * If no, return and let the other CPUs do their part as well.
+        */
+       if (!rdp->qs_pending)
+               return;
+
+       /*
+        * Was there a quiescent state since the beginning of the grace
+        * period? If no, then exit and wait for the next call.
+        */
+       if (!rdp->passed_quiesc)
+               return;
+
+       /* Tell RCU we are done (but cpu_quiet() will be the judge of that). */
+       cpu_quiet(rdp->cpu, rsp, rdp, rdp->passed_quiesc_completed);
+}
+
+#ifdef CONFIG_HOTPLUG_CPU
+
+/*
+ * Remove the outgoing CPU from the bitmasks in the rcu_node hierarchy
+ * and move all callbacks from the outgoing CPU to the current one.
+ */
+static void __rcu_offline_cpu(int cpu, struct rcu_state *rsp)
+{
+       int i;
+       unsigned long flags;
+       long lastcomp;
+       unsigned long mask;
+       struct rcu_data *rdp = rsp->rda[cpu];
+       struct rcu_data *rdp_me;
+       struct rcu_node *rnp;
+
+       /* Exclude any attempts to start a new grace period. */
+       spin_lock_irqsave(&rsp->onofflock, flags);
+
+       /* Remove the outgoing CPU from the masks in the rcu_node hierarchy. */
+       rnp = rdp->mynode;
+       mask = rdp->grpmask;    /* rnp->grplo is constant. */
+       do {
+               spin_lock(&rnp->lock);          /* irqs already disabled. */
+               rnp->qsmaskinit &= ~mask;
+               if (rnp->qsmaskinit != 0) {
+                       spin_unlock(&rnp->lock); /* irqs already disabled. */
+                       break;
+               }
+               mask = rnp->grpmask;
+               spin_unlock(&rnp->lock);        /* irqs already disabled. */
+               rnp = rnp->parent;
+       } while (rnp != NULL);
+       lastcomp = rsp->completed;
+
+       spin_unlock(&rsp->onofflock);           /* irqs remain disabled. */
+
+       /* Being offline is a quiescent state, so go record it. */
+       cpu_quiet(cpu, rsp, rdp, lastcomp);
+
+       /*
+        * Move callbacks from the outgoing CPU to the running CPU.
+        * Note that the outgoing CPU is now quiscent, so it is now
+        * (uncharacteristically) safe to access it rcu_data structure.
+        * Note also that we must carefully retain the order of the
+        * outgoing CPU's callbacks in order for rcu_barrier() to work
+        * correctly.  Finally, note that we start all the callbacks
+        * afresh, even those that have passed through a grace period
+        * and are therefore ready to invoke.  The theory is that hotplug
+        * events are rare, and that if they are frequent enough to
+        * indefinitely delay callbacks, you have far worse things to
+        * be worrying about.
+        */
+       rdp_me = rsp->rda[smp_processor_id()];
+       if (rdp->nxtlist != NULL) {
+               *rdp_me->nxttail[RCU_NEXT_TAIL] = rdp->nxtlist;
+               rdp_me->nxttail[RCU_NEXT_TAIL] = rdp->nxttail[RCU_NEXT_TAIL];
+               rdp->nxtlist = NULL;
+               for (i = 0; i < RCU_NEXT_SIZE; i++)
+                       rdp->nxttail[i] = &rdp->nxtlist;
+               rdp_me->qlen += rdp->qlen;
+               rdp->qlen = 0;
+       }
+       local_irq_restore(flags);
+}
+
+/*
+ * Remove the specified CPU from the RCU hierarchy and move any pending
+ * callbacks that it might have to the current CPU.  This code assumes
+ * that at least one CPU in the system will remain running at all times.
+ * Any attempt to offline -all- CPUs is likely to strand RCU callbacks.
+ */
+static void rcu_offline_cpu(int cpu)
+{
+       __rcu_offline_cpu(cpu, &rcu_state);
+       __rcu_offline_cpu(cpu, &rcu_bh_state);
+}
+
+#else /* #ifdef CONFIG_HOTPLUG_CPU */
+
+static void rcu_offline_cpu(int cpu)
+{
+}
+
+#endif /* #else #ifdef CONFIG_HOTPLUG_CPU */
+
+/*
+ * Invoke any RCU callbacks that have made it to the end of their grace
+ * period.  Thottle as specified by rdp->blimit.
+ */
+static void rcu_do_batch(struct rcu_data *rdp)
+{
+       unsigned long flags;
+       struct rcu_head *next, *list, **tail;
+       int count;
+
+       /* If no callbacks are ready, just return.*/
+       if (!cpu_has_callbacks_ready_to_invoke(rdp))
+               return;
+
+       /*
+        * Extract the list of ready callbacks, disabling to prevent
+        * races with call_rcu() from interrupt handlers.
+        */
+       local_irq_save(flags);
+       list = rdp->nxtlist;
+       rdp->nxtlist = *rdp->nxttail[RCU_DONE_TAIL];
+       *rdp->nxttail[RCU_DONE_TAIL] = NULL;
+       tail = rdp->nxttail[RCU_DONE_TAIL];
+       for (count = RCU_NEXT_SIZE - 1; count >= 0; count--)
+               if (rdp->nxttail[count] == rdp->nxttail[RCU_DONE_TAIL])
+                       rdp->nxttail[count] = &rdp->nxtlist;
+       local_irq_restore(flags);
+
+       /* Invoke callbacks. */
+       count = 0;
+       while (list) {
+               next = list->next;
+               prefetch(next);
+               list->func(list);
+               list = next;
+               if (++count >= rdp->blimit)
+                       break;
+       }
+
+       local_irq_save(flags);
+
+       /* Update count, and requeue any remaining callbacks. */
+       rdp->qlen -= count;
+       if (list != NULL) {
+               *tail = rdp->nxtlist;
+               rdp->nxtlist = list;
+               for (count = 0; count < RCU_NEXT_SIZE; count++)
+                       if (&rdp->nxtlist == rdp->nxttail[count])
+                               rdp->nxttail[count] = tail;
+                       else
+                               break;
+       }
+
+       /* Reinstate batch limit if we have worked down the excess. */
+       if (rdp->blimit == LONG_MAX && rdp->qlen <= qlowmark)
+               rdp->blimit = blimit;
+
+       local_irq_restore(flags);
+
+       /* Re-raise the RCU softirq if there are callbacks remaining. */
+       if (cpu_has_callbacks_ready_to_invoke(rdp))
+               raise_softirq(RCU_SOFTIRQ);
+}
+
+/*
+ * Check to see if this CPU is in a non-context-switch quiescent state
+ * (user mode or idle loop for rcu, non-softirq execution for rcu_bh).
+ * Also schedule the RCU softirq handler.
+ *
+ * This function must be called with hardirqs disabled.  It is normally
+ * invoked from the scheduling-clock interrupt.  If rcu_pending returns
+ * false, there is no point in invoking rcu_check_callbacks().
+ */
+void rcu_check_callbacks(int cpu, int user)
+{
+       if (user ||
+           (idle_cpu(cpu) && !in_softirq() &&
+                               hardirq_count() <= (1 << HARDIRQ_SHIFT))) {
+
+               /*
+                * Get here if this CPU took its interrupt from user
+                * mode or from the idle loop, and if this is not a
+                * nested interrupt.  In this case, the CPU is in
+                * a quiescent state, so count it.
+                *
+                * No memory barrier is required here because both
+                * rcu_qsctr_inc() and rcu_bh_qsctr_inc() reference
+                * only CPU-local variables that other CPUs neither
+                * access nor modify, at least not while the corresponding
+                * CPU is online.
+                */
+
+               rcu_qsctr_inc(cpu);
+               rcu_bh_qsctr_inc(cpu);
+
+       } else if (!in_softirq()) {
+
+               /*
+                * Get here if this CPU did not take its interrupt from
+                * softirq, in other words, if it is not interrupting
+                * a rcu_bh read-side critical section.  This is an _bh
+                * critical section, so count it.
+                */
+
+               rcu_bh_qsctr_inc(cpu);
+       }
+       raise_softirq(RCU_SOFTIRQ);
+}
+
+#ifdef CONFIG_SMP
+
+/*
+ * Scan the leaf rcu_node structures, processing dyntick state for any that
+ * have not yet encountered a quiescent state, using the function specified.
+ * Returns 1 if the current grace period ends while scanning (possibly
+ * because we made it end).
+ */
+static int rcu_process_dyntick(struct rcu_state *rsp, long lastcomp,
+                              int (*f)(struct rcu_data *))
+{
+       unsigned long bit;
+       int cpu;
+       unsigned long flags;
+       unsigned long mask;
+       struct rcu_node *rnp_cur = rsp->level[NUM_RCU_LVLS - 1];
+       struct rcu_node *rnp_end = &rsp->node[NUM_RCU_NODES];
+
+       for (; rnp_cur < rnp_end; rnp_cur++) {
+               mask = 0;
+               spin_lock_irqsave(&rnp_cur->lock, flags);
+               if (rsp->completed != lastcomp) {
+                       spin_unlock_irqrestore(&rnp_cur->lock, flags);
+                       return 1;
+               }
+               if (rnp_cur->qsmask == 0) {
+                       spin_unlock_irqrestore(&rnp_cur->lock, flags);
+                       continue;
+               }
+               cpu = rnp_cur->grplo;
+               bit = 1;
+               for (; cpu <= rnp_cur->grphi; cpu++, bit <<= 1) {
+                       if ((rnp_cur->qsmask & bit) != 0 && f(rsp->rda[cpu]))
+                               mask |= bit;
+               }
+               if (mask != 0 && rsp->completed == lastcomp) {
+
+                       /* cpu_quiet_msk() releases rnp_cur->lock. */
+                       cpu_quiet_msk(mask, rsp, rnp_cur, flags);
+                       continue;
+               }
+               spin_unlock_irqrestore(&rnp_cur->lock, flags);
+       }
+       return 0;
+}
+
+/*
+ * Force quiescent states on reluctant CPUs, and also detect which
+ * CPUs are in dyntick-idle mode.
+ */
+static void force_quiescent_state(struct rcu_state *rsp, int relaxed)
+{
+       unsigned long flags;
+       long lastcomp;
+       struct rcu_data *rdp = rsp->rda[smp_processor_id()];
+       struct rcu_node *rnp = rcu_get_root(rsp);
+       u8 signaled;
+
+       if (ACCESS_ONCE(rsp->completed) == ACCESS_ONCE(rsp->gpnum))
+               return;  /* No grace period in progress, nothing to force. */
+       if (!spin_trylock_irqsave(&rsp->fqslock, flags)) {
+               rsp->n_force_qs_lh++; /* Inexact, can lose counts.  Tough! */
+               return; /* Someone else is already on the job. */
+       }
+       if (relaxed &&
+           (long)(rsp->jiffies_force_qs - jiffies) >= 0 &&
+           (rdp->n_rcu_pending_force_qs - rdp->n_rcu_pending) >= 0)
+               goto unlock_ret; /* no emergency and done recently. */
+       rsp->n_force_qs++;
+       spin_lock(&rnp->lock);
+       lastcomp = rsp->completed;
+       signaled = rsp->signaled;
+       rsp->jiffies_force_qs = jiffies + RCU_JIFFIES_TILL_FORCE_QS;
+       rdp->n_rcu_pending_force_qs = rdp->n_rcu_pending +
+                                     RCU_JIFFIES_TILL_FORCE_QS;
+       if (lastcomp == rsp->gpnum) {
+               rsp->n_force_qs_ngp++;
+               spin_unlock(&rnp->lock);
+               goto unlock_ret;  /* no GP in progress, time updated. */
+       }
+       spin_unlock(&rnp->lock);
+       switch (signaled) {
+       case RCU_GP_INIT:
+
+               break; /* grace period still initializing, ignore. */
+
+       case RCU_SAVE_DYNTICK:
+
+               if (RCU_SIGNAL_INIT != RCU_SAVE_DYNTICK)
+                       break; /* So gcc recognizes the dead code. */
+
+               /* Record dyntick-idle state. */
+               if (rcu_process_dyntick(rsp, lastcomp,
+                                       dyntick_save_progress_counter))
+                       goto unlock_ret;
+
+               /* Update state, record completion counter. */
+               spin_lock(&rnp->lock);
+               if (lastcomp == rsp->completed) {
+                       rsp->signaled = RCU_FORCE_QS;
+                       dyntick_record_completed(rsp, lastcomp);
+               }
+               spin_unlock(&rnp->lock);
+               break;
+
+       case RCU_FORCE_QS:
+
+               /* Check dyntick-idle state, send IPI to laggarts. */
+               if (rcu_process_dyntick(rsp, dyntick_recall_completed(rsp),
+                                       rcu_implicit_dynticks_qs))
+                       goto unlock_ret;
+
+               /* Leave state in case more forcing is required. */
+
+               break;
+       }
+unlock_ret:
+       spin_unlock_irqrestore(&rsp->fqslock, flags);
+}
+
+#else /* #ifdef CONFIG_SMP */
+
+static void force_quiescent_state(struct rcu_state *rsp, int relaxed)
+{
+       set_need_resched();
+}
+
+#endif /* #else #ifdef CONFIG_SMP */
+
+/*
+ * This does the RCU processing work from softirq context for the
+ * specified rcu_state and rcu_data structures.  This may be called
+ * only from the CPU to whom the rdp belongs.
+ */
+static void
+__rcu_process_callbacks(struct rcu_state *rsp, struct rcu_data *rdp)
+{
+       unsigned long flags;
+
+       /*
+        * If an RCU GP has gone long enough, go check for dyntick
+        * idle CPUs and, if needed, send resched IPIs.
+        */
+       if ((long)(ACCESS_ONCE(rsp->jiffies_force_qs) - jiffies) < 0 ||
+           (rdp->n_rcu_pending_force_qs - rdp->n_rcu_pending) < 0)
+               force_quiescent_state(rsp, 1);
+
+       /*
+        * Advance callbacks in response to end of earlier grace
+        * period that some other CPU ended.
+        */
+       rcu_process_gp_end(rsp, rdp);
+
+       /* Update RCU state based on any recent quiescent states. */
+       rcu_check_quiescent_state(rsp, rdp);
+
+       /* Does this CPU require a not-yet-started grace period? */
+       if (cpu_needs_another_gp(rsp, rdp)) {
+               spin_lock_irqsave(&rcu_get_root(rsp)->lock, flags);
+               rcu_start_gp(rsp, flags);  /* releases above lock */
+       }
+
+       /* If there are callbacks ready, invoke them. */
+       rcu_do_batch(rdp);
+}
+
+/*
+ * Do softirq processing for the current CPU.
+ */
+static void rcu_process_callbacks(struct softirq_action *unused)
+{
+       /*
+        * Memory references from any prior RCU read-side critical sections
+        * executed by the interrupted code must be seen before any RCU
+        * grace-period manipulations below.
+        */
+       smp_mb(); /* See above block comment. */
+
+       __rcu_process_callbacks(&rcu_state, &__get_cpu_var(rcu_data));
+       __rcu_process_callbacks(&rcu_bh_state, &__get_cpu_var(rcu_bh_data));
+
+       /*
+        * Memory references from any later RCU read-side critical sections
+        * executed by the interrupted code must be seen after any RCU
+        * grace-period manipulations above.
+        */
+       smp_mb(); /* See above block comment. */
+}
+
+static void
+__call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu),
+          struct rcu_state *rsp)
+{
+       unsigned long flags;
+       struct rcu_data *rdp;
+
+       head->func = func;
+       head->next = NULL;
+
+       smp_mb(); /* Ensure RCU update seen before callback registry. */
+
+       /*
+        * Opportunistically note grace-period endings and beginnings.
+        * Note that we might see a beginning right after we see an
+        * end, but never vice versa, since this CPU has to pass through
+        * a quiescent state betweentimes.
+        */
+       local_irq_save(flags);
+       rdp = rsp->rda[smp_processor_id()];
+       rcu_process_gp_end(rsp, rdp);
+       check_for_new_grace_period(rsp, rdp);
+
+       /* Add the callback to our list. */
+       *rdp->nxttail[RCU_NEXT_TAIL] = head;
+       rdp->nxttail[RCU_NEXT_TAIL] = &head->next;
+
+       /* Start a new grace period if one not already started. */
+       if (ACCESS_ONCE(rsp->completed) == ACCESS_ONCE(rsp->gpnum)) {
+               unsigned long nestflag;
+               struct rcu_node *rnp_root = rcu_get_root(rsp);
+
+               spin_lock_irqsave(&rnp_root->lock, nestflag);
+               rcu_start_gp(rsp, nestflag);  /* releases rnp_root->lock. */
+       }
+
+       /* Force the grace period if too many callbacks or too long waiting. */
+       if (unlikely(++rdp->qlen > qhimark)) {
+               rdp->blimit = LONG_MAX;
+               force_quiescent_state(rsp, 0);
+       } else if ((long)(ACCESS_ONCE(rsp->jiffies_force_qs) - jiffies) < 0 ||
+                  (rdp->n_rcu_pending_force_qs - rdp->n_rcu_pending) < 0)
+               force_quiescent_state(rsp, 1);
+       local_irq_restore(flags);
+}
+
+/*
+ * Queue an RCU callback for invocation after a grace period.
+ */
+void call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu))
+{
+       __call_rcu(head, func, &rcu_state);
+}
+EXPORT_SYMBOL_GPL(call_rcu);
+
+/*
+ * Queue an RCU for invocation after a quicker grace period.
+ */
+void call_rcu_bh(struct rcu_head *head, void (*func)(struct rcu_head *rcu))
+{
+       __call_rcu(head, func, &rcu_bh_state);
+}
+EXPORT_SYMBOL_GPL(call_rcu_bh);
+
+/*
+ * Check to see if there is any immediate RCU-related work to be done
+ * by the current CPU, for the specified type of RCU, returning 1 if so.
+ * The checks are in order of increasing expense: checks that can be
+ * carried out against CPU-local state are performed first.  However,
+ * we must check for CPU stalls first, else we might not get a chance.
+ */
+static int __rcu_pending(struct rcu_state *rsp, struct rcu_data *rdp)
+{
+       rdp->n_rcu_pending++;
+
+       /* Check for CPU stalls, if enabled. */
+       check_cpu_stall(rsp, rdp);
+
+       /* Is the RCU core waiting for a quiescent state from this CPU? */
+       if (rdp->qs_pending)
+               return 1;
+
+       /* Does this CPU have callbacks ready to invoke? */
+       if (cpu_has_callbacks_ready_to_invoke(rdp))
+               return 1;
+
+       /* Has RCU gone idle with this CPU needing another grace period? */
+       if (cpu_needs_another_gp(rsp, rdp))
+               return 1;
+
+       /* Has another RCU grace period completed?  */
+       if (ACCESS_ONCE(rsp->completed) != rdp->completed) /* outside of lock */
+               return 1;
+
+       /* Has a new RCU grace period started? */
+       if (ACCESS_ONCE(rsp->gpnum) != rdp->gpnum) /* outside of lock */
+               return 1;
+
+       /* Has an RCU GP gone long enough to send resched IPIs &c? */
+       if (ACCESS_ONCE(rsp->completed) != ACCESS_ONCE(rsp->gpnum) &&
+           ((long)(ACCESS_ONCE(rsp->jiffies_force_qs) - jiffies) < 0 ||
+            (rdp->n_rcu_pending_force_qs - rdp->n_rcu_pending) < 0))
+               return 1;
+
+       /* nothing to do */
+       return 0;
+}
+
+/*
+ * Check to see if there is any immediate RCU-related work to be done
+ * by the current CPU, returning 1 if so.  This function is part of the
+ * RCU implementation; it is -not- an exported member of the RCU API.
+ */
+int rcu_pending(int cpu)
+{
+       return __rcu_pending(&rcu_state, &per_cpu(rcu_data, cpu)) ||
+              __rcu_pending(&rcu_bh_state, &per_cpu(rcu_bh_data, cpu));
+}
+
+/*
+ * Check to see if any future RCU-related work will need to be done
+ * by the current CPU, even if none need be done immediately, returning
+ * 1 if so.  This function is part of the RCU implementation; it is -not-
+ * an exported member of the RCU API.
+ */
+int rcu_needs_cpu(int cpu)
+{
+       /* RCU callbacks either ready or pending? */
+       return per_cpu(rcu_data, cpu).nxtlist ||
+              per_cpu(rcu_bh_data, cpu).nxtlist;
+}
+
+/*
+ * Initialize a CPU's per-CPU RCU data.  We take this "scorched earth"
+ * approach so that we don't have to worry about how long the CPU has
+ * been gone, or whether it ever was online previously.  We do trust the
+ * ->mynode field, as it is constant for a given struct rcu_data and
+ * initialized during early boot.
+ *
+ * Note that only one online or offline event can be happening at a given
+ * time.  Note also that we can accept some slop in the rsp->completed
+ * access due to the fact that this CPU cannot possibly have any RCU
+ * callbacks in flight yet.
+ */
+static void
+rcu_init_percpu_data(int cpu, struct rcu_state *rsp)
+{
+       unsigned long flags;
+       int i;
+       long lastcomp;
+       unsigned long mask;
+       struct rcu_data *rdp = rsp->rda[cpu];
+       struct rcu_node *rnp = rcu_get_root(rsp);
+
+       /* Set up local state, ensuring consistent view of global state. */
+       spin_lock_irqsave(&rnp->lock, flags);
+       lastcomp = rsp->completed;
+       rdp->completed = lastcomp;
+       rdp->gpnum = lastcomp;
+       rdp->passed_quiesc = 0;  /* We could be racing with new GP, */
+       rdp->qs_pending = 1;     /*  so set up to respond to current GP. */
+       rdp->beenonline = 1;     /* We have now been online. */
+       rdp->passed_quiesc_completed = lastcomp - 1;
+       rdp->grpmask = 1UL << (cpu - rdp->mynode->grplo);
+       rdp->nxtlist = NULL;
+       for (i = 0; i < RCU_NEXT_SIZE; i++)
+               rdp->nxttail[i] = &rdp->nxtlist;
+       rdp->qlen = 0;
+       rdp->blimit = blimit;
+#ifdef CONFIG_NO_HZ
+       rdp->dynticks = &per_cpu(rcu_dynticks, cpu);
+#endif /* #ifdef CONFIG_NO_HZ */
+       rdp->cpu = cpu;
+       spin_unlock(&rnp->lock);                /* irqs remain disabled. */
+
+       /*
+        * A new grace period might start here.  If so, we won't be part
+        * of it, but that is OK, as we are currently in a quiescent state.
+        */
+
+       /* Exclude any attempts to start a new GP on large systems. */
+       spin_lock(&rsp->onofflock);             /* irqs already disabled. */
+
+       /* Add CPU to rcu_node bitmasks. */
+       rnp = rdp->mynode;
+       mask = rdp->grpmask;
+       do {
+               /* Exclude any attempts to start a new GP on small systems. */
+               spin_lock(&rnp->lock);  /* irqs already disabled. */
+               rnp->qsmaskinit |= mask;
+               mask = rnp->grpmask;
+               spin_unlock(&rnp->lock); /* irqs already disabled. */
+               rnp = rnp->parent;
+       } while (rnp != NULL && !(rnp->qsmaskinit & mask));
+
+       spin_unlock(&rsp->onofflock);           /* irqs remain disabled. */
+
+       /*
+        * A new grace period might start here.  If so, we will be part of
+        * it, and its gpnum will be greater than ours, so we will
+        * participate.  It is also possible for the gpnum to have been
+        * incremented before this function was called, and the bitmasks
+        * to not be filled out until now, in which case we will also
+        * participate due to our gpnum being behind.
+        */
+
+       /* Since it is coming online, the CPU is in a quiescent state. */
+       cpu_quiet(cpu, rsp, rdp, lastcomp);
+       local_irq_restore(flags);
+}
+
+static void __cpuinit rcu_online_cpu(int cpu)
+{
+#ifdef CONFIG_NO_HZ
+       struct rcu_dynticks *rdtp = &per_cpu(rcu_dynticks, cpu);
+
+       rdtp->dynticks_nesting = 1;
+       rdtp->dynticks |= 1;    /* need consecutive #s even for hotplug. */
+       rdtp->dynticks_nmi = (rdtp->dynticks_nmi + 1) & ~0x1;
+#endif /* #ifdef CONFIG_NO_HZ */
+       rcu_init_percpu_data(cpu, &rcu_state);
+       rcu_init_percpu_data(cpu, &rcu_bh_state);
+       open_softirq(RCU_SOFTIRQ, rcu_process_callbacks);
+}
+
+/*
+ * Handle CPU online/offline notifcation events.
+ */
+static int __cpuinit rcu_cpu_notify(struct notifier_block *self,
+                               unsigned long action, void *hcpu)
+{
+       long cpu = (long)hcpu;
+
+       switch (action) {
+       case CPU_UP_PREPARE:
+       case CPU_UP_PREPARE_FROZEN:
+               rcu_online_cpu(cpu);
+               break;
+       case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
+       case CPU_UP_CANCELED:
+       case CPU_UP_CANCELED_FROZEN:
+               rcu_offline_cpu(cpu);
+               break;
+       default:
+               break;
+       }
+       return NOTIFY_OK;
+}
+
+/*
+ * Compute the per-level fanout, either using the exact fanout specified
+ * or balancing the tree, depending on CONFIG_RCU_FANOUT_EXACT.
+ */
+#ifdef CONFIG_RCU_FANOUT_EXACT
+static void __init rcu_init_levelspread(struct rcu_state *rsp)
+{
+       int i;
+
+       for (i = NUM_RCU_LVLS - 1; i >= 0; i--)
+               rsp->levelspread[i] = CONFIG_RCU_FANOUT;
+}
+#else /* #ifdef CONFIG_RCU_FANOUT_EXACT */
+static void __init rcu_init_levelspread(struct rcu_state *rsp)
+{
+       int ccur;
+       int cprv;
+       int i;
+
+       cprv = NR_CPUS;
+       for (i = NUM_RCU_LVLS - 1; i >= 0; i--) {
+               ccur = rsp->levelcnt[i];
+               rsp->levelspread[i] = (cprv + ccur - 1) / ccur;
+               cprv = ccur;
+       }
+}
+#endif /* #else #ifdef CONFIG_RCU_FANOUT_EXACT */
+
+/*
+ * Helper function for rcu_init() that initializes one rcu_state structure.
+ */
+static void __init rcu_init_one(struct rcu_state *rsp)
+{
+       int cpustride = 1;
+       int i;
+       int j;
+       struct rcu_node *rnp;
+
+       /* Initialize the level-tracking arrays. */
+
+       for (i = 1; i < NUM_RCU_LVLS; i++)
+               rsp->level[i] = rsp->level[i - 1] + rsp->levelcnt[i - 1];
+       rcu_init_levelspread(rsp);
+
+       /* Initialize the elements themselves, starting from the leaves. */
+
+       for (i = NUM_RCU_LVLS - 1; i >= 0; i--) {
+               cpustride *= rsp->levelspread[i];
+               rnp = rsp->level[i];
+               for (j = 0; j < rsp->levelcnt[i]; j++, rnp++) {
+                       spin_lock_init(&rnp->lock);
+                       rnp->qsmask = 0;
+                       rnp->qsmaskinit = 0;
+                       rnp->grplo = j * cpustride;
+                       rnp->grphi = (j + 1) * cpustride - 1;
+                       if (rnp->grphi >= NR_CPUS)
+                               rnp->grphi = NR_CPUS - 1;
+                       if (i == 0) {
+                               rnp->grpnum = 0;
+                               rnp->grpmask = 0;
+                               rnp->parent = NULL;
+                       } else {
+                               rnp->grpnum = j % rsp->levelspread[i - 1];
+                               rnp->grpmask = 1UL << rnp->grpnum;
+                               rnp->parent = rsp->level[i - 1] +
+                                             j / rsp->levelspread[i - 1];
+                       }
+                       rnp->level = i;
+               }
+       }
+}
+
+/*
+ * Helper macro for __rcu_init().  To be used nowhere else!
+ * Assigns leaf node pointers into each CPU's rcu_data structure.
+ */
+#define RCU_DATA_PTR_INIT(rsp, rcu_data) \
+do { \
+       rnp = (rsp)->level[NUM_RCU_LVLS - 1]; \
+       j = 0; \
+       for_each_possible_cpu(i) { \
+               if (i > rnp[j].grphi) \
+                       j++; \
+               per_cpu(rcu_data, i).mynode = &rnp[j]; \
+               (rsp)->rda[i] = &per_cpu(rcu_data, i); \
+       } \
+} while (0)
+
+static struct notifier_block __cpuinitdata rcu_nb = {
+       .notifier_call  = rcu_cpu_notify,
+};
+
+void __init __rcu_init(void)
+{
+       int i;                  /* All used by RCU_DATA_PTR_INIT(). */
+       int j;
+       struct rcu_node *rnp;
+
+       printk(KERN_WARNING "Experimental hierarchical RCU implementation.\n");
+#ifdef CONFIG_RCU_CPU_STALL_DETECTOR
+       printk(KERN_INFO "RCU-based detection of stalled CPUs is enabled.\n");
+#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
+       rcu_init_one(&rcu_state);
+       RCU_DATA_PTR_INIT(&rcu_state, rcu_data);
+       rcu_init_one(&rcu_bh_state);
+       RCU_DATA_PTR_INIT(&rcu_bh_state, rcu_bh_data);
+
+       for_each_online_cpu(i)
+               rcu_cpu_notify(&rcu_nb, CPU_UP_PREPARE, (void *)(long)i);
+       /* Register notifier for non-boot CPUs */
+       register_cpu_notifier(&rcu_nb);
+       printk(KERN_WARNING "Experimental hierarchical RCU init done.\n");
+}
+
+module_param(blimit, int, 0);
+module_param(qhimark, int, 0);
+module_param(qlowmark, int, 0);
diff --git a/kernel/rcutree_trace.c b/kernel/rcutree_trace.c
new file mode 100644 (file)
index 0000000..d6db3e8
--- /dev/null
@@ -0,0 +1,271 @@
+/*
+ * Read-Copy Update tracing for classic implementation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Copyright IBM Corporation, 2008
+ *
+ * Papers:  http://www.rdrop.com/users/paulmck/RCU
+ *
+ * For detailed explanation of Read-Copy Update mechanism see -
+ *             Documentation/RCU
+ *
+ */
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/spinlock.h>
+#include <linux/smp.h>
+#include <linux/rcupdate.h>
+#include <linux/interrupt.h>
+#include <linux/sched.h>
+#include <asm/atomic.h>
+#include <linux/bitops.h>
+#include <linux/module.h>
+#include <linux/completion.h>
+#include <linux/moduleparam.h>
+#include <linux/percpu.h>
+#include <linux/notifier.h>
+#include <linux/cpu.h>
+#include <linux/mutex.h>
+#include <linux/debugfs.h>
+#include <linux/seq_file.h>
+
+static void print_one_rcu_data(struct seq_file *m, struct rcu_data *rdp)
+{
+       if (!rdp->beenonline)
+               return;
+       seq_printf(m, "%3d%cc=%ld g=%ld pq=%d pqc=%ld qp=%d rpfq=%ld rp=%x",
+                  rdp->cpu,
+                  cpu_is_offline(rdp->cpu) ? '!' : ' ',
+                  rdp->completed, rdp->gpnum,
+                  rdp->passed_quiesc, rdp->passed_quiesc_completed,
+                  rdp->qs_pending,
+                  rdp->n_rcu_pending_force_qs - rdp->n_rcu_pending,
+                  (int)(rdp->n_rcu_pending & 0xffff));
+#ifdef CONFIG_NO_HZ
+       seq_printf(m, " dt=%d/%d dn=%d df=%lu",
+                  rdp->dynticks->dynticks,
+                  rdp->dynticks->dynticks_nesting,
+                  rdp->dynticks->dynticks_nmi,
+                  rdp->dynticks_fqs);
+#endif /* #ifdef CONFIG_NO_HZ */
+       seq_printf(m, " of=%lu ri=%lu", rdp->offline_fqs, rdp->resched_ipi);
+       seq_printf(m, " ql=%ld b=%ld\n", rdp->qlen, rdp->blimit);
+}
+
+#define PRINT_RCU_DATA(name, func, m) \
+       do { \
+               int _p_r_d_i; \
+               \
+               for_each_possible_cpu(_p_r_d_i) \
+                       func(m, &per_cpu(name, _p_r_d_i)); \
+       } while (0)
+
+static int show_rcudata(struct seq_file *m, void *unused)
+{
+       seq_puts(m, "rcu:\n");
+       PRINT_RCU_DATA(rcu_data, print_one_rcu_data, m);
+       seq_puts(m, "rcu_bh:\n");
+       PRINT_RCU_DATA(rcu_bh_data, print_one_rcu_data, m);
+       return 0;
+}
+
+static int rcudata_open(struct inode *inode, struct file *file)
+{
+       return single_open(file, show_rcudata, NULL);
+}
+
+static struct file_operations rcudata_fops = {
+       .owner = THIS_MODULE,
+       .open = rcudata_open,
+       .read = seq_read,
+       .llseek = seq_lseek,
+       .release = single_release,
+};
+
+static void print_one_rcu_data_csv(struct seq_file *m, struct rcu_data *rdp)
+{
+       if (!rdp->beenonline)
+               return;
+       seq_printf(m, "%d,%s,%ld,%ld,%d,%ld,%d,%ld,%ld",
+                  rdp->cpu,
+                  cpu_is_offline(rdp->cpu) ? "\"Y\"" : "\"N\"",
+                  rdp->completed, rdp->gpnum,
+                  rdp->passed_quiesc, rdp->passed_quiesc_completed,
+                  rdp->qs_pending,
+                  rdp->n_rcu_pending_force_qs - rdp->n_rcu_pending,
+                  rdp->n_rcu_pending);
+#ifdef CONFIG_NO_HZ
+       seq_printf(m, ",%d,%d,%d,%lu",
+                  rdp->dynticks->dynticks,
+                  rdp->dynticks->dynticks_nesting,
+                  rdp->dynticks->dynticks_nmi,
+                  rdp->dynticks_fqs);
+#endif /* #ifdef CONFIG_NO_HZ */
+       seq_printf(m, ",%lu,%lu", rdp->offline_fqs, rdp->resched_ipi);
+       seq_printf(m, ",%ld,%ld\n", rdp->qlen, rdp->blimit);
+}
+
+static int show_rcudata_csv(struct seq_file *m, void *unused)
+{
+       seq_puts(m, "\"CPU\",\"Online?\",\"c\",\"g\",\"pq\",\"pqc\",\"pq\",\"rpfq\",\"rp\",");
+#ifdef CONFIG_NO_HZ
+       seq_puts(m, "\"dt\",\"dt nesting\",\"dn\",\"df\",");
+#endif /* #ifdef CONFIG_NO_HZ */
+       seq_puts(m, "\"of\",\"ri\",\"ql\",\"b\"\n");
+       seq_puts(m, "\"rcu:\"\n");
+       PRINT_RCU_DATA(rcu_data, print_one_rcu_data_csv, m);
+       seq_puts(m, "\"rcu_bh:\"\n");
+       PRINT_RCU_DATA(rcu_bh_data, print_one_rcu_data_csv, m);
+       return 0;
+}
+
+static int rcudata_csv_open(struct inode *inode, struct file *file)
+{
+       return single_open(file, show_rcudata_csv, NULL);
+}
+
+static struct file_operations rcudata_csv_fops = {
+       .owner = THIS_MODULE,
+       .open = rcudata_csv_open,
+       .read = seq_read,
+       .llseek = seq_lseek,
+       .release = single_release,
+};
+
+static void print_one_rcu_state(struct seq_file *m, struct rcu_state *rsp)
+{
+       int level = 0;
+       struct rcu_node *rnp;
+
+       seq_printf(m, "c=%ld g=%ld s=%d jfq=%ld j=%x "
+                     "nfqs=%lu/nfqsng=%lu(%lu) fqlh=%lu\n",
+                  rsp->completed, rsp->gpnum, rsp->signaled,
+                  (long)(rsp->jiffies_force_qs - jiffies),
+                  (int)(jiffies & 0xffff),
+                  rsp->n_force_qs, rsp->n_force_qs_ngp,
+                  rsp->n_force_qs - rsp->n_force_qs_ngp,
+                  rsp->n_force_qs_lh);
+       for (rnp = &rsp->node[0]; rnp - &rsp->node[0] < NUM_RCU_NODES; rnp++) {
+               if (rnp->level != level) {
+                       seq_puts(m, "\n");
+                       level = rnp->level;
+               }
+               seq_printf(m, "%lx/%lx %d:%d ^%d    ",
+                          rnp->qsmask, rnp->qsmaskinit,
+                          rnp->grplo, rnp->grphi, rnp->grpnum);
+       }
+       seq_puts(m, "\n");
+}
+
+static int show_rcuhier(struct seq_file *m, void *unused)
+{
+       seq_puts(m, "rcu:\n");
+       print_one_rcu_state(m, &rcu_state);
+       seq_puts(m, "rcu_bh:\n");
+       print_one_rcu_state(m, &rcu_bh_state);
+       return 0;
+}
+
+static int rcuhier_open(struct inode *inode, struct file *file)
+{
+       return single_open(file, show_rcuhier, NULL);
+}
+
+static struct file_operations rcuhier_fops = {
+       .owner = THIS_MODULE,
+       .open = rcuhier_open,
+       .read = seq_read,
+       .llseek = seq_lseek,
+       .release = single_release,
+};
+
+static int show_rcugp(struct seq_file *m, void *unused)
+{
+       seq_printf(m, "rcu: completed=%ld  gpnum=%ld\n",
+                  rcu_state.completed, rcu_state.gpnum);
+       seq_printf(m, "rcu_bh: completed=%ld  gpnum=%ld\n",
+                  rcu_bh_state.completed, rcu_bh_state.gpnum);
+       return 0;
+}
+
+static int rcugp_open(struct inode *inode, struct file *file)
+{
+       return single_open(file, show_rcugp, NULL);
+}
+
+static struct file_operations rcugp_fops = {
+       .owner = THIS_MODULE,
+       .open = rcugp_open,
+       .read = seq_read,
+       .llseek = seq_lseek,
+       .release = single_release,
+};
+
+static struct dentry *rcudir, *datadir, *datadir_csv, *hierdir, *gpdir;
+static int __init rcuclassic_trace_init(void)
+{
+       rcudir = debugfs_create_dir("rcu", NULL);
+       if (!rcudir)
+               goto out;
+
+       datadir = debugfs_create_file("rcudata", 0444, rcudir,
+                                               NULL, &rcudata_fops);
+       if (!datadir)
+               goto free_out;
+
+       datadir_csv = debugfs_create_file("rcudata.csv", 0444, rcudir,
+                                               NULL, &rcudata_csv_fops);
+       if (!datadir_csv)
+               goto free_out;
+
+       gpdir = debugfs_create_file("rcugp", 0444, rcudir, NULL, &rcugp_fops);
+       if (!gpdir)
+               goto free_out;
+
+       hierdir = debugfs_create_file("rcuhier", 0444, rcudir,
+                                               NULL, &rcuhier_fops);
+       if (!hierdir)
+               goto free_out;
+       return 0;
+free_out:
+       if (datadir)
+               debugfs_remove(datadir);
+       if (datadir_csv)
+               debugfs_remove(datadir_csv);
+       if (gpdir)
+               debugfs_remove(gpdir);
+       debugfs_remove(rcudir);
+out:
+       return 1;
+}
+
+static void __exit rcuclassic_trace_cleanup(void)
+{
+       debugfs_remove(datadir);
+       debugfs_remove(datadir_csv);
+       debugfs_remove(gpdir);
+       debugfs_remove(hierdir);
+       debugfs_remove(rcudir);
+}
+
+
+module_init(rcuclassic_trace_init);
+module_exit(rcuclassic_trace_cleanup);
+
+MODULE_AUTHOR("Paul E. McKenney");
+MODULE_DESCRIPTION("Read-Copy Update tracing for hierarchical implementation");
+MODULE_LICENSE("GPL");
index 4337063663efe39f8de666d16c591c84f66db0f7..e633106b12f6ffe7f8da4fa48c6105582052e411 100644 (file)
@@ -853,6 +853,15 @@ int iomem_map_sanity_check(resource_size_t addr, unsigned long size)
                if (PFN_DOWN(p->start) <= PFN_DOWN(addr) &&
                    PFN_DOWN(p->end) >= PFN_DOWN(addr + size - 1))
                        continue;
+               /*
+                * if a resource is "BUSY", it's not a hardware resource
+                * but a driver mapping of such a resource; we don't want
+                * to warn for those; some drivers legitimately map only
+                * partial hardware resources. (example: vesafb)
+                */
+               if (p->flags & IORESOURCE_BUSY)
+                       continue;
+
                printk(KERN_WARNING "resource map sanity check conflict: "
                       "0x%llx 0x%llx 0x%llx 0x%llx %s\n",
                       (unsigned long long)addr,
index e4bb1dd7b308fce6f47e736b70425f4bc3482c0a..3e70963120a0c9e57daf482f9363fe751f90eacc 100644 (file)
@@ -4203,7 +4203,6 @@ void account_steal_time(struct task_struct *p, cputime_t steal)
 
        if (p == rq->idle) {
                p->stime = cputime_add(p->stime, steal);
-               account_group_system_time(p, steal);
                if (atomic_read(&rq->nr_iowait) > 0)
                        cpustat->iowait = cputime64_add(cpustat->iowait, tmp);
                else
@@ -4339,7 +4338,7 @@ void __kprobes sub_preempt_count(int val)
        /*
         * Underflow?
         */
-       if (DEBUG_LOCKS_WARN_ON(val > preempt_count()))
+       if (DEBUG_LOCKS_WARN_ON(val > preempt_count() - (!!kernel_locked())))
                return;
        /*
         * Is the spinlock portion underflowing?
index 81787248b60fda5bc58b6231be84a6a54a763cb0..e8ab096ddfe399dc3007e32b169b46d02ed9cb48 100644 (file)
@@ -118,13 +118,13 @@ static u64 __update_sched_clock(struct sched_clock_data *scd, u64 now)
 
        /*
         * scd->clock = clamp(scd->tick_gtod + delta,
-        *                    max(scd->tick_gtod, scd->clock),
-        *                    max(scd->clock, scd->tick_gtod + TICK_NSEC));
+        *                    max(scd->tick_gtod, scd->clock),
+        *                    scd->tick_gtod + TICK_NSEC);
         */
 
        clock = scd->tick_gtod + delta;
        min_clock = wrap_max(scd->tick_gtod, scd->clock);
-       max_clock = wrap_max(scd->clock, scd->tick_gtod + TICK_NSEC);
+       max_clock = scd->tick_gtod + TICK_NSEC;
 
        clock = wrap_max(clock, min_clock);
        clock = wrap_min(clock, max_clock);
index e7c69a720d69a0a7d9166c21883e05d2521cb26a..466e75ce271aa0795ac50266d9d3bc2acdde7261 100644 (file)
@@ -102,20 +102,6 @@ void local_bh_disable(void)
 
 EXPORT_SYMBOL(local_bh_disable);
 
-void __local_bh_enable(void)
-{
-       WARN_ON_ONCE(in_irq());
-
-       /*
-        * softirqs should never be enabled by __local_bh_enable(),
-        * it always nests inside local_bh_enable() sections:
-        */
-       WARN_ON_ONCE(softirq_count() == SOFTIRQ_OFFSET);
-
-       sub_preempt_count(SOFTIRQ_OFFSET);
-}
-EXPORT_SYMBOL_GPL(__local_bh_enable);
-
 /*
  * Special-case - softirqs can safely be enabled in
  * cond_resched_softirq(), or by __do_softirq(),
@@ -269,6 +255,7 @@ void irq_enter(void)
 {
        int cpu = smp_processor_id();
 
+       rcu_irq_enter();
        if (idle_cpu(cpu) && !in_interrupt()) {
                __irq_enter();
                tick_check_idle(cpu);
@@ -295,9 +282,9 @@ void irq_exit(void)
 
 #ifdef CONFIG_NO_HZ
        /* Make sure that timer wheel updates are propagated */
-       if (!in_interrupt() && idle_cpu(smp_processor_id()) && !need_resched())
-               tick_nohz_stop_sched_tick(0);
        rcu_irq_exit();
+       if (idle_cpu(smp_processor_id()) && !in_interrupt() && !need_resched())
+               tick_nohz_stop_sched_tick(0);
 #endif
        preempt_enable_no_resched();
 }
index dc0b3be6b7d52cb98bd84d599bfbb7e7d85b1e85..1ab790c67b174592401712b093bdc56a8aa3d537 100644 (file)
@@ -164,7 +164,7 @@ unsigned long __read_mostly sysctl_hung_task_check_count = 1024;
 /*
  * Zero means infinite timeout - no checking done:
  */
-unsigned long __read_mostly sysctl_hung_task_timeout_secs = 120;
+unsigned long __read_mostly sysctl_hung_task_timeout_secs = 480;
 
 unsigned long __read_mostly sysctl_hung_task_warnings = 10;
 
index 94b527ef1d1e37fe060ab812f13ef7276910549f..eb212f8f8bc801dab1ee7622936ba8caaec4369f 100644 (file)
@@ -6,6 +6,7 @@
  *  Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
  */
 #include <linux/sched.h>
+#include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/kallsyms.h>
 #include <linux/stacktrace.h>
@@ -24,3 +25,13 @@ void print_stack_trace(struct stack_trace *trace, int spaces)
 }
 EXPORT_SYMBOL_GPL(print_stack_trace);
 
+/*
+ * Architectures that do not implement save_stack_trace_tsk get this
+ * weak alias and a once-per-bootup warning (whenever this facility
+ * is utilized - for example by procfs):
+ */
+__weak void
+save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
+{
+       WARN_ONCE(1, KERN_INFO "save_stack_trace_tsk() not implemented yet.\n");
+}
index 31deba8f7d160c19bf262b1be13272e2ede1050d..5fc3a0cfb9946e01efc3907f06523964f39d59c1 100644 (file)
@@ -858,8 +858,8 @@ void do_sys_times(struct tms *tms)
        struct task_cputime cputime;
        cputime_t cutime, cstime;
 
-       spin_lock_irq(&current->sighand->siglock);
        thread_group_cputime(current, &cputime);
+       spin_lock_irq(&current->sighand->siglock);
        cutime = current->signal->cutime;
        cstime = current->signal->cstime;
        spin_unlock_irq(&current->sighand->siglock);
index b0f239e443bc0fbb11a27ee98dbaf4e641d21971..eae594cb6ea98d896286565331efce62836fdc8f 100644 (file)
@@ -252,6 +252,14 @@ config DEBUG_OBJECTS_TIMERS
          timer routines to track the life time of timer objects and
          validate the timer operations.
 
+config DEBUG_OBJECTS_ENABLE_DEFAULT
+       int "debug_objects bootup default value (0-1)"
+        range 0 1
+        default "1"
+        depends on DEBUG_OBJECTS
+        help
+          Debug objects boot parameter default value
+
 config DEBUG_SLAB
        bool "Debug slab memory allocations"
        depends on DEBUG_KERNEL && SLAB
@@ -545,6 +553,16 @@ config DEBUG_SG
 
          If unsure, say N.
 
+config DEBUG_NOTIFIERS
+       bool "Debug notifier call chains"
+       depends on DEBUG_KERNEL
+       help
+         Enable this to turn on sanity checking for notifier call chains.
+         This is most useful for kernel developers to make sure that
+         modules properly unregister themselves from notifier chains.
+         This is a relatively cheap check but if you care about maximum
+         performance, say N.
+
 config FRAME_POINTER
        bool "Compile the kernel with frame pointers"
        depends on DEBUG_KERNEL && \
@@ -619,6 +637,19 @@ config RCU_CPU_STALL_DETECTOR
 
          Say N if you are unsure.
 
+config RCU_CPU_STALL_DETECTOR
+       bool "Check for stalled CPUs delaying RCU grace periods"
+       depends on CLASSIC_RCU || TREE_RCU
+       default n
+       help
+         This option causes RCU to printk information on which
+         CPUs are delaying the current grace period, but only when
+         the grace period extends for excessive time periods.
+
+         Say Y if you want RCU to perform such checks.
+
+         Say N if you are unsure.
+
 config KPROBES_SANITY_TEST
        bool "Kprobes sanity tests"
        depends on DEBUG_KERNEL
index e3ab374e1334ab80fc172c3d256d2eb4fddd665e..5d99be1fd988bbd3df0f73f07fbee5e079d4cb53 100644 (file)
@@ -45,7 +45,9 @@ static struct kmem_cache      *obj_cache;
 static int                     debug_objects_maxchain __read_mostly;
 static int                     debug_objects_fixups __read_mostly;
 static int                     debug_objects_warnings __read_mostly;
-static int                     debug_objects_enabled __read_mostly;
+static int                     debug_objects_enabled __read_mostly
+                               = CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT;
+
 static struct debug_obj_descr  *descr_test  __read_mostly;
 
 static int __init enable_object_debug(char *str)
index d83660fd6fdde53617121f3f72e38b58158126b9..8e30295e8566579515ca8126a694150e290107aa 100644 (file)
@@ -135,7 +135,7 @@ int unregister_dynamic_debug_module(char *mod_name)
        nr_entries--;
 out:
        up(&debug_list_mutex);
-       return 0;
+       return ret;
 }
 EXPORT_SYMBOL_GPL(unregister_dynamic_debug_module);
 
@@ -289,7 +289,7 @@ static ssize_t pr_debug_write(struct file *file, const char __user *buf,
                                        dynamic_enabled = DYNAMIC_ENABLED_SOME;
                                        err = 0;
                                        printk(KERN_DEBUG
-                                              "debugging enabled for module %s",
+                                              "debugging enabled for module %s\n",
                                               elem->name);
                                } else if (!value && (elem->enable == 1)) {
                                        elem->enable = 0;
@@ -309,7 +309,7 @@ static ssize_t pr_debug_write(struct file *file, const char __user *buf,
                                        err = 0;
                                        printk(KERN_DEBUG
                                               "debugging disabled for module "
-                                              "%s", elem->name);
+                                              "%s\n", elem->name);
                                }
                        }
                }
index 164951c473058a25c081d5e47260d872068cdbb7..fc031d68327e5fad33130b15d50a020b7b9b31a8 100644 (file)
@@ -3049,3 +3049,18 @@ void print_vma_addr(char *prefix, unsigned long ip)
        }
        up_read(&current->mm->mmap_sem);
 }
+
+#ifdef CONFIG_PROVE_LOCKING
+void might_fault(void)
+{
+       might_sleep();
+       /*
+        * it would be nicer only to annotate paths which are not under
+        * pagefault_disable, however that requires a larger audit and
+        * providing helpers like get_user_atomic.
+        */
+       if (!in_atomic() && current->mm)
+               might_lock_read(&current->mm->mmap_sem);
+}
+EXPORT_SYMBOL(might_fault);
+#endif
index d8f07667fc8045e6690ab74a6e58806c7093ed7c..037b0967c1e3b40cda18e57a775d61867bafb95f 100644 (file)
@@ -998,7 +998,7 @@ static void do_pages_stat_array(struct mm_struct *mm, unsigned long nr_pages,
                unsigned long addr = (unsigned long)(*pages);
                struct vm_area_struct *vma;
                struct page *page;
-               int err;
+               int err = -EFAULT;
 
                vma = find_vma(mm, addr);
                if (!vma)
index cb675d1267914dc263100b9c4a9ea5eb20fefa48..bf7e8fc3aed806542e44cc7b1d222d9e2b56dc3a 100644 (file)
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -535,7 +535,7 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size,
        struct kmem_cache *c;
 
        c = slob_alloc(sizeof(struct kmem_cache),
-               flags, ARCH_KMALLOC_MINALIGN, -1);
+               GFP_KERNEL, ARCH_KMALLOC_MINALIGN, -1);
 
        if (c) {
                c->name = name;
index ba537fae0a4ca653b4a7eedb7b941deb8aef613b..ce68e046d963840e4a3822972ed33f2a30a86244 100644 (file)
@@ -1786,8 +1786,6 @@ static inline void rfcomm_accept_connection(struct rfcomm_session *s)
        if (err < 0)
                return;
 
-       __module_get(nsock->ops->owner);
-
        /* Set our callbacks */
        nsock->sk->sk_data_ready   = rfcomm_l2data_ready;
        nsock->sk->sk_state_change = rfcomm_l2state_change;
index 6c7af390be0a515cfb1d09d2db79f16776e0dbe4..dadac6281f20392d0431d80a9001a6169ab94ca7 100644 (file)
@@ -133,9 +133,11 @@ static int poll_one_napi(struct netpoll_info *npinfo,
 
        npinfo->rx_flags |= NETPOLL_RX_DROP;
        atomic_inc(&trapped);
+       set_bit(NAPI_STATE_NPSVC, &napi->state);
 
        work = napi->poll(napi, budget);
 
+       clear_bit(NAPI_STATE_NPSVC, &napi->state);
        atomic_dec(&trapped);
        npinfo->rx_flags &= ~NETPOLL_RX_DROP;
 
index bea54a685109ed3b6fa1fe3f621fb7522ceb2de8..8d489e746b21cb513d0d1b49b3984b514f6e634c 100644 (file)
@@ -61,7 +61,7 @@ static struct
 static struct xt_table nat_table = {
        .name           = "nat",
        .valid_hooks    = NAT_VALID_HOOKS,
-       .lock           = __RW_LOCK_UNLOCKED(__nat_table.lock),
+       .lock           = __RW_LOCK_UNLOCKED(nat_table.lock),
        .me             = THIS_MODULE,
        .af             = AF_INET,
 };
index 7cd22262de3af3fa0f2917eefaea885c068855ac..a453aac91bd3b740ef44363ef10e5be5390bf6dc 100644 (file)
 
 #include "tcp_vegas.h"
 
-/* Default values of the Vegas variables, in fixed-point representation
- * with V_PARAM_SHIFT bits to the right of the binary point.
- */
-#define V_PARAM_SHIFT 1
-static int alpha = 2<<V_PARAM_SHIFT;
-static int beta  = 4<<V_PARAM_SHIFT;
-static int gamma = 1<<V_PARAM_SHIFT;
+static int alpha = 2;
+static int beta  = 4;
+static int gamma = 1;
 
 module_param(alpha, int, 0644);
-MODULE_PARM_DESC(alpha, "lower bound of packets in network (scale by 2)");
+MODULE_PARM_DESC(alpha, "lower bound of packets in network");
 module_param(beta, int, 0644);
-MODULE_PARM_DESC(beta, "upper bound of packets in network (scale by 2)");
+MODULE_PARM_DESC(beta, "upper bound of packets in network");
 module_param(gamma, int, 0644);
 MODULE_PARM_DESC(gamma, "limit on increase (scale by 2)");
 
@@ -172,49 +168,13 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 in_flight)
                return;
        }
 
-       /* The key players are v_beg_snd_una and v_beg_snd_nxt.
-        *
-        * These are so named because they represent the approximate values
-        * of snd_una and snd_nxt at the beginning of the current RTT. More
-        * precisely, they represent the amount of data sent during the RTT.
-        * At the end of the RTT, when we receive an ACK for v_beg_snd_nxt,
-        * we will calculate that (v_beg_snd_nxt - v_beg_snd_una) outstanding
-        * bytes of data have been ACKed during the course of the RTT, giving
-        * an "actual" rate of:
-        *
-        *     (v_beg_snd_nxt - v_beg_snd_una) / (rtt duration)
-        *
-        * Unfortunately, v_beg_snd_una is not exactly equal to snd_una,
-        * because delayed ACKs can cover more than one segment, so they
-        * don't line up nicely with the boundaries of RTTs.
-        *
-        * Another unfortunate fact of life is that delayed ACKs delay the
-        * advance of the left edge of our send window, so that the number
-        * of bytes we send in an RTT is often less than our cwnd will allow.
-        * So we keep track of our cwnd separately, in v_beg_snd_cwnd.
-        */
-
        if (after(ack, vegas->beg_snd_nxt)) {
                /* Do the Vegas once-per-RTT cwnd adjustment. */
-               u32 old_wnd, old_snd_cwnd;
-
-
-               /* Here old_wnd is essentially the window of data that was
-                * sent during the previous RTT, and has all
-                * been acknowledged in the course of the RTT that ended
-                * with the ACK we just received. Likewise, old_snd_cwnd
-                * is the cwnd during the previous RTT.
-                */
-               old_wnd = (vegas->beg_snd_nxt - vegas->beg_snd_una) /
-                       tp->mss_cache;
-               old_snd_cwnd = vegas->beg_snd_cwnd;
 
                /* Save the extent of the current window so we can use this
                 * at the end of the next RTT.
                 */
-               vegas->beg_snd_una  = vegas->beg_snd_nxt;
                vegas->beg_snd_nxt  = tp->snd_nxt;
-               vegas->beg_snd_cwnd = tp->snd_cwnd;
 
                /* We do the Vegas calculations only if we got enough RTT
                 * samples that we can be reasonably sure that we got
@@ -252,22 +212,14 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 in_flight)
                         *
                         * This is:
                         *     (actual rate in segments) * baseRTT
-                        * We keep it as a fixed point number with
-                        * V_PARAM_SHIFT bits to the right of the binary point.
                         */
-                       target_cwnd = ((u64)old_wnd * vegas->baseRTT);
-                       target_cwnd <<= V_PARAM_SHIFT;
-                       do_div(target_cwnd, rtt);
+                       target_cwnd = tp->snd_cwnd * vegas->baseRTT / rtt;
 
                        /* Calculate the difference between the window we had,
                         * and the window we would like to have. This quantity
                         * is the "Diff" from the Arizona Vegas papers.
-                        *
-                        * Again, this is a fixed point number with
-                        * V_PARAM_SHIFT bits to the right of the binary
-                        * point.
                         */
-                       diff = (old_wnd << V_PARAM_SHIFT) - target_cwnd;
+                       diff = tp->snd_cwnd * (rtt-vegas->baseRTT) / vegas->baseRTT;
 
                        if (diff > gamma && tp->snd_ssthresh > 2 ) {
                                /* Going too fast. Time to slow down
@@ -282,16 +234,13 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 in_flight)
                                 * truncation robs us of full link
                                 * utilization.
                                 */
-                               tp->snd_cwnd = min(tp->snd_cwnd,
-                                                  ((u32)target_cwnd >>
-                                                   V_PARAM_SHIFT)+1);
+                               tp->snd_cwnd = min(tp->snd_cwnd, (u32)target_cwnd+1);
 
                        } else if (tp->snd_cwnd <= tp->snd_ssthresh) {
                                /* Slow start.  */
                                tcp_slow_start(tp);
                        } else {
                                /* Congestion avoidance. */
-                               u32 next_snd_cwnd;
 
                                /* Figure out where we would like cwnd
                                 * to be.
@@ -300,26 +249,17 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 in_flight)
                                        /* The old window was too fast, so
                                         * we slow down.
                                         */
-                                       next_snd_cwnd = old_snd_cwnd - 1;
+                                       tp->snd_cwnd--;
                                } else if (diff < alpha) {
                                        /* We don't have enough extra packets
                                         * in the network, so speed up.
                                         */
-                                       next_snd_cwnd = old_snd_cwnd + 1;
+                                       tp->snd_cwnd++;
                                } else {
                                        /* Sending just as fast as we
                                         * should be.
                                         */
-                                       next_snd_cwnd = old_snd_cwnd;
                                }
-
-                               /* Adjust cwnd upward or downward, toward the
-                                * desired value.
-                                */
-                               if (next_snd_cwnd > tp->snd_cwnd)
-                                       tp->snd_cwnd++;
-                               else if (next_snd_cwnd < tp->snd_cwnd)
-                                       tp->snd_cwnd--;
                        }
 
                        if (tp->snd_cwnd < 2)
index 172438320eec74287b045cd6b784bb3de0b38b0f..d0f54d18e19b92de1407eb9a36fed5344363d01d 100644 (file)
@@ -912,8 +912,13 @@ static void ndisc_recv_na(struct sk_buff *skb)
                   is invalid, but ndisc specs say nothing
                   about it. It could be misconfiguration, or
                   an smart proxy agent tries to help us :-)
+
+                  We should not print the error if NA has been
+                  received from loopback - it is just our own
+                  unsolicited advertisement.
                 */
-               ND_PRINTK1(KERN_WARNING
+               if (skb->pkt_type != PACKET_LOOPBACK)
+                       ND_PRINTK1(KERN_WARNING
                           "ICMPv6 NA: someone advertises our address on %s!\n",
                           ifp->idev->dev->name);
                in6_ifa_put(ifp);
index 90c8506a0aac913afd2ad4d62d0d234039fc9315..8c03080321784fe7fee76ec1ea2ebd3d85187765 100644 (file)
@@ -562,7 +562,6 @@ static int netlbl_unlhsh_remove_addr4(struct net *net,
                                      const struct in_addr *mask,
                                      struct netlbl_audit *audit_info)
 {
-       int ret_val = 0;
        struct netlbl_af4list *list_entry;
        struct netlbl_unlhsh_addr4 *entry;
        struct audit_buffer *audit_buf;
@@ -577,7 +576,7 @@ static int netlbl_unlhsh_remove_addr4(struct net *net,
        if (list_entry != NULL)
                entry = netlbl_unlhsh_addr4_entry(list_entry);
        else
-               ret_val = -ENOENT;
+               entry = NULL;
 
        audit_buf = netlbl_audit_start_common(AUDIT_MAC_UNLBL_STCDEL,
                                              audit_info);
@@ -588,19 +587,21 @@ static int netlbl_unlhsh_remove_addr4(struct net *net,
                                          addr->s_addr, mask->s_addr);
                if (dev != NULL)
                        dev_put(dev);
-               if (entry && security_secid_to_secctx(entry->secid,
-                                                     &secctx,
-                                                     &secctx_len) == 0) {
+               if (entry != NULL &&
+                   security_secid_to_secctx(entry->secid,
+                                            &secctx, &secctx_len) == 0) {
                        audit_log_format(audit_buf, " sec_obj=%s", secctx);
                        security_release_secctx(secctx, secctx_len);
                }
-               audit_log_format(audit_buf, " res=%u", ret_val == 0 ? 1 : 0);
+               audit_log_format(audit_buf, " res=%u", entry != NULL ? 1 : 0);
                audit_log_end(audit_buf);
        }
 
-       if (ret_val == 0)
-               call_rcu(&entry->rcu, netlbl_unlhsh_free_addr4);
-       return ret_val;
+       if (entry == NULL)
+               return -ENOENT;
+
+       call_rcu(&entry->rcu, netlbl_unlhsh_free_addr4);
+       return 0;
 }
 
 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
@@ -624,7 +625,6 @@ static int netlbl_unlhsh_remove_addr6(struct net *net,
                                      const struct in6_addr *mask,
                                      struct netlbl_audit *audit_info)
 {
-       int ret_val = 0;
        struct netlbl_af6list *list_entry;
        struct netlbl_unlhsh_addr6 *entry;
        struct audit_buffer *audit_buf;
@@ -638,7 +638,7 @@ static int netlbl_unlhsh_remove_addr6(struct net *net,
        if (list_entry != NULL)
                entry = netlbl_unlhsh_addr6_entry(list_entry);
        else
-               ret_val = -ENOENT;
+               entry = NULL;
 
        audit_buf = netlbl_audit_start_common(AUDIT_MAC_UNLBL_STCDEL,
                                              audit_info);
@@ -649,19 +649,21 @@ static int netlbl_unlhsh_remove_addr6(struct net *net,
                                          addr, mask);
                if (dev != NULL)
                        dev_put(dev);
-               if (entry && security_secid_to_secctx(entry->secid,
-                                                     &secctx,
-                                                     &secctx_len) == 0) {
+               if (entry != NULL &&
+                   security_secid_to_secctx(entry->secid,
+                                            &secctx, &secctx_len) == 0) {
                        audit_log_format(audit_buf, " sec_obj=%s", secctx);
                        security_release_secctx(secctx, secctx_len);
                }
-               audit_log_format(audit_buf, " res=%u", ret_val == 0 ? 1 : 0);
+               audit_log_format(audit_buf, " res=%u", entry != NULL ? 1 : 0);
                audit_log_end(audit_buf);
        }
 
-       if (ret_val == 0)
-               call_rcu(&entry->rcu, netlbl_unlhsh_free_addr6);
-       return ret_val;
+       if (entry == NULL)
+               return -ENOENT;
+
+       call_rcu(&entry->rcu, netlbl_unlhsh_free_addr6);
+       return 0;
 }
 #endif /* IPv6 */
 
index 9978afbd9f2ad5033375df896358f88b929ecfcc..803eeef0aa856877ddced0e45fc283f4641da2ab 100644 (file)
@@ -155,12 +155,13 @@ static void gprs_data_ready(struct sock *sk, int len)
 static void gprs_write_space(struct sock *sk)
 {
        struct gprs_dev *dev = sk->sk_user_data;
+       struct net_device *net = dev->net;
        unsigned credits = pep_writeable(sk);
 
        spin_lock_bh(&dev->tx_lock);
        dev->tx_max = credits;
-       if (credits > skb_queue_len(&dev->tx_queue))
-               netif_wake_queue(dev->net);
+       if (credits > skb_queue_len(&dev->tx_queue) && netif_running(net))
+               netif_wake_queue(net);
        spin_unlock_bh(&dev->tx_lock);
 }
 
@@ -168,6 +169,23 @@ static void gprs_write_space(struct sock *sk)
  * Network device callbacks
  */
 
+static int gprs_open(struct net_device *dev)
+{
+       struct gprs_dev *gp = netdev_priv(dev);
+
+       gprs_write_space(gp->sk);
+       return 0;
+}
+
+static int gprs_close(struct net_device *dev)
+{
+       struct gprs_dev *gp = netdev_priv(dev);
+
+       netif_stop_queue(dev);
+       flush_work(&gp->tx_work);
+       return 0;
+}
+
 static int gprs_xmit(struct sk_buff *skb, struct net_device *net)
 {
        struct gprs_dev *dev = netdev_priv(net);
@@ -254,6 +272,8 @@ static void gprs_setup(struct net_device *net)
        net->tx_queue_len       = 10;
 
        net->destructor         = free_netdev;
+       net->open               = gprs_open;
+       net->stop               = gprs_close;
        net->hard_start_xmit    = gprs_xmit; /* mandatory */
        net->change_mtu         = gprs_set_mtu;
        net->get_stats          = gprs_get_stats;
@@ -318,7 +338,6 @@ int gprs_attach(struct sock *sk)
        dev->sk = sk;
 
        printk(KERN_DEBUG"%s: attached\n", net->name);
-       gprs_write_space(sk); /* kick off TX */
        return net->ifindex;
 
 out_rel:
@@ -341,7 +360,5 @@ void gprs_detach(struct sock *sk)
 
        printk(KERN_DEBUG"%s: detached\n", net->name);
        unregister_netdev(net);
-       flush_scheduled_work();
        sock_put(sk);
-       skb_queue_purge(&dev->tx_queue);
 }
index a11959908d9a68c405114d56c5073c0d77647402..98402f0efa47727677b8d57acfe2ecd7cb9441b2 100644 (file)
@@ -46,9 +46,6 @@
         layering other disciplines.  It does not need to do bandwidth
         control either since that can be handled by using token
         bucket or other rate control.
-
-        The simulator is limited by the Linux timer resolution
-        and will create packet bursts on the HZ boundary (1ms).
 */
 
 struct netem_sched_data {
index 92764d836891833e1cb7f8255a38edacad1f3b7f..76ba80aeac1a86217ae77edc0e239084840f90d6 100644 (file)
@@ -2307,6 +2307,7 @@ int kernel_accept(struct socket *sock, struct socket **newsock, int flags)
        }
 
        (*newsock)->ops = sock->ops;
+       __module_get((*newsock)->ops->owner);
 
 done:
        return err;
index 5dd3e89f620a2753511097d1fe86b4e6673afefa..b77f330d2650b7c13d23d1d0f84d9344d973940a 100644 (file)
@@ -69,6 +69,7 @@ enum {
 };
 
 enum {
+       STAC_92HD73XX_NO_JD, /* no jack-detection */
        STAC_92HD73XX_REF,
        STAC_DELL_M6_AMIC,
        STAC_DELL_M6_DMIC,
@@ -127,6 +128,7 @@ enum {
 };
 
 enum {
+       STAC_D965_REF_NO_JD, /* no jack-detection */
        STAC_D965_REF,
        STAC_D965_3ST,
        STAC_D965_5ST,
@@ -857,6 +859,7 @@ static struct hda_verb stac92hd83xxx_core_init[] = {
 
        /* power state controls amps */
        { 0x01, AC_VERB_SET_EAPD, 1 << 2},
+       {}
 };
 
 static struct hda_verb stac92hd71bxx_core_init[] = {
@@ -868,6 +871,7 @@ static struct hda_verb stac92hd71bxx_core_init[] = {
        { 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
        { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
        { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
+       {}
 };
 
 #define HD_DISABLE_PORTF 2
@@ -1611,6 +1615,7 @@ static unsigned int *stac92hd73xx_brd_tbl[STAC_92HD73XX_MODELS] = {
 };
 
 static const char *stac92hd73xx_models[STAC_92HD73XX_MODELS] = {
+       [STAC_92HD73XX_NO_JD] = "no-jd",
        [STAC_92HD73XX_REF] = "ref",
        [STAC_DELL_M6_AMIC] = "dell-m6-amic",
        [STAC_DELL_M6_DMIC] = "dell-m6-dmic",
@@ -1640,6 +1645,8 @@ static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = {
                                "unknown Dell", STAC_DELL_M6_DMIC),
        SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x029f,
                                "Dell Studio 1537", STAC_DELL_M6_DMIC),
+       SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02a0,
+                               "Dell Studio 17", STAC_DELL_M6_DMIC),
        {} /* terminator */
 };
 
@@ -1662,6 +1669,7 @@ static struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = {
        /* SigmaTel reference board */
        SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
                      "DFI LanParty", STAC_92HD71BXX_REF),
+       {} /* terminator */
 };
 
 static unsigned int ref92hd71bxx_pin_configs[11] = {
@@ -2027,6 +2035,7 @@ static unsigned int dell_3st_pin_configs[14] = {
 };
 
 static unsigned int *stac927x_brd_tbl[STAC_927X_MODELS] = {
+       [STAC_D965_REF_NO_JD] = ref927x_pin_configs,
        [STAC_D965_REF]  = ref927x_pin_configs,
        [STAC_D965_3ST]  = d965_3st_pin_configs,
        [STAC_D965_5ST]  = d965_5st_pin_configs,
@@ -2035,6 +2044,7 @@ static unsigned int *stac927x_brd_tbl[STAC_927X_MODELS] = {
 };
 
 static const char *stac927x_models[STAC_927X_MODELS] = {
+       [STAC_D965_REF_NO_JD]   = "ref-no-jd",
        [STAC_D965_REF]         = "ref",
        [STAC_D965_3ST]         = "3stack",
        [STAC_D965_5ST]         = "5stack",
@@ -2896,7 +2906,7 @@ static int stac92xx_auto_create_multi_out_ctls(struct hda_codec *codec,
        }
 
        if ((spec->multiout.num_dacs - cfg->line_outs) > 0 &&
-                       cfg->hp_outs && !spec->multiout.hp_nid)
+           cfg->hp_outs == 1 && !spec->multiout.hp_nid)
                spec->multiout.hp_nid = nid;
 
        if (cfg->hp_outs > 1 && cfg->line_out_type == AUTO_PIN_LINE_OUT) {
@@ -4254,14 +4264,17 @@ again:
 
        switch (spec->multiout.num_dacs) {
        case 0x3: /* 6 Channel */
+               spec->multiout.hp_nid = 0x17;
                spec->mixer = stac92hd73xx_6ch_mixer;
                spec->init = stac92hd73xx_6ch_core_init;
                break;
        case 0x4: /* 8 Channel */
+               spec->multiout.hp_nid = 0x18;
                spec->mixer = stac92hd73xx_8ch_mixer;
                spec->init = stac92hd73xx_8ch_core_init;
                break;
        case 0x5: /* 10 Channel */
+               spec->multiout.hp_nid = 0x19;
                spec->mixer = stac92hd73xx_10ch_mixer;
                spec->init = stac92hd73xx_10ch_core_init;
        };
@@ -4297,6 +4310,7 @@ again:
                spec->amp_nids = &stac92hd73xx_amp_nids[DELL_M6_AMP];
                spec->eapd_switch = 0;
                spec->num_amps = 1;
+               spec->multiout.hp_nid = 0; /* dual HPs */
 
                if (!spec->init)
                        spec->init = dell_m6_core_init;
@@ -4351,6 +4365,9 @@ again:
                return err;
        }
 
+       if (spec->board_config == STAC_92HD73XX_NO_JD)
+               spec->hp_detect = 0;
+
        codec->patch_ops = stac92xx_patch_ops;
 
        return 0;
@@ -4899,6 +4916,10 @@ static int patch_stac927x(struct hda_codec *codec)
         */
        codec->bus->needs_damn_long_delay = 1;
 
+       /* no jack detecion for ref-no-jd model */
+       if (spec->board_config == STAC_D965_REF_NO_JD)
+               spec->hp_detect = 0;
+
        return 0;
 }
 
index e9084fdd2082efcbc14695e801ec6ad89ff66599..acd68efb2b758dc59692036d4bd6f445854dc985 100644 (file)
@@ -233,7 +233,7 @@ static int omap_pcm_open(struct snd_pcm_substream *substream)
        if (ret < 0)
                goto out;
 
-       prtd = kzalloc(sizeof(prtd), GFP_KERNEL);
+       prtd = kzalloc(sizeof(*prtd), GFP_KERNEL);
        if (prtd == NULL) {
                ret = -ENOMEM;
                goto out;