commit a9366e61b03f55a6e009e687ad10e706714c9907 Merge: 24dfb2b 99dcade Author: Linus Torvalds Date: Sat Nov 14 13:05:27 2009 -0800 Merge git://git.infradead.org/users/dwmw2/iommu-2.6.32 * git://git.infradead.org/users/dwmw2/iommu-2.6.32: intel-iommu: Support PCIe hot-plug intel-iommu: Obey coherent_dma_mask for alloc_coherent on passthrough intel-iommu: Check for 'DMAR at zero' BIOS error earlier. commit 24dfb2b5867df24ba03b6c4418312e23b1300aa8 Merge: cd4ca27 5df9d11 Author: Linus Torvalds Date: Sat Nov 14 13:03:24 2009 -0800 Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: MIPS: SMTC: Fix lockup in smtc_distribute_timer MIPS: TXx9: Update rbtx49xx_defconfig MIPS: Make local arrays with CL_SIZE static __initdata MIPS: Add DMA declare coherent memory support MIPS: Fix emulation of 64-bit FPU on FPU-less 64-bit CPUs. commit cd4ca27d3dedfff09000586e4ae67771608696a0 Merge: 0e70613 3d4c3aa Author: Linus Torvalds Date: Sat Nov 14 13:00:17 2009 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: psmouse - remove unneeded '\n' from psmouse.proto parameter Input: atkbd - restore LED state at reconnect Input: force LED reset on resume Input: fix locking in memoryless force-feedback devices commit 0e70613b1c26bf23909d0e778de52d0cc6d88835 Merge: e0a2af1 c148ffd Author: Linus Torvalds Date: Sat Nov 14 12:59:32 2009 -0800 Merge branch 'for-linus' of git://neil.brown.name/md * 'for-linus' of git://neil.brown.name/md: md/raid5: Allow dirty-degraded arrays to be assembled when only party is degraded. Don't unconditionally set in_sync on newly added device in raid5_reshape md: allow v0.91 metadata to record devices as being active but not in-sync. md: factor out updating of 'recovery_offset'. commit e0a2af1e60ae89b18ef3afbf655f096564751045 Merge: 0283243 833af84 Author: Linus Torvalds Date: Sat Nov 14 12:59:06 2009 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: percpu: restructure pcpu_extend_area_map() to fix bugs and improve readability commit 0283243849e88f864a059783b29346cbf1e0b8e8 Merge: 7b8e2c1 bcc6525 Author: Linus Torvalds Date: Sat Nov 14 12:57:39 2009 -0800 Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6 * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: [S390] s390: fix single stepping on svc0 [S390] sclp: undo quiesce handler override on resume [S390] reset cputime accounting after IPL from NSS [S390] monreader: fix use after free bug with suspend/resume commit 7b8e2c1db0f358bc389dd1ee4633a92d80a5a6d0 Author: Oliver Neukum Date: Fri Nov 13 14:26:23 2009 +0100 fix memory leak in fixed btusb_close If the waker is killed before it can replay outstanding URBs, these URBs won't be freed or will be replayed at the next open. This patch closes the window by explicitely discarding outstanding URBs. Signed-off-by: Oliver Neukum Acked-by: Marcel Holtmann Signed-off-by: Linus Torvalds commit 479c2553af9a176a0613894b9f1ec73425fd56a3 Author: Petr Vandrovec Date: Sat Nov 14 10:47:07 2009 +0100 Fix memory corruption caused by nfsd readdir+ Commit 8177e6d6dfb9cd03d9bdeb647c32161f8f58f686 ("nfsd: clean up readdirplus encoding") introduced single character typo in nfs3 readdir+ implementation. Unfortunately that typo has quite bad side effects: random memory corruption, followed (on my box) with immediate spontaneous box reboot. Using 'p1' instead of 'p' fixes my Linux box rebooting whenever VMware ESXi box tries to list contents of my home directory. Signed-off-by: Petr Vandrovec Cc: "J. Bruce Fields" Cc: Neil Brown Signed-off-by: Linus Torvalds commit 5df9d11be46a9f704208644a1e7f13c6104ecff2 Author: Kevin D. Kissell Date: Tue Nov 10 11:45:46 2009 -0800 MIPS: SMTC: Fix lockup in smtc_distribute_timer 1. At the end of smtc_distribute_timer, nextstamp is valid and has already passed so we goto repeat. 2. Nothing updates nextstamp (only updated if the timeout is in the future And we just decided it is in the past) 3. At the end nextstamp still has the same value so it is still valid and in the past. 4. This repeats until read_c0_count has a value which causes nextstamp to be in the future. Reported and initial patch and testing by Mikael Starvik . Signed-off-by: Kevin D. Kissell Cc: Mikael Starvik Cc: linux-mips@linux-mips.org Cc: Jesper Nilsson Patchwork: http://patchwork.linux-mips.org/patch/621/ Signed-off-by: Ralf Baechle commit 1b12a9c87792550a3d7f5f39eb529c822b911b17 Author: Atsushi Nemoto Date: Wed Nov 11 21:38:46 2009 +0900 MIPS: TXx9: Update rbtx49xx_defconfig Enable following features: * MTD (RBTX4939, NAND_TXX9NDFMC) * HW_RANDOM (HW_RANDOM_TX4939) * SOUND (SND_SOC_TXX9ACLC) * DMADEVICE (TXX9_DMAC) Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle commit c4304529543114a5df7eeec31ec5ee5c7c924738 Author: Atsushi Nemoto Date: Sun Nov 8 02:20:37 2009 +0900 MIPS: Make local arrays with CL_SIZE static __initdata Since commit 22242681cff52bfb7cba5d2a37b91802be7a4e4c ("MIPS: Extend COMMAND_LINE_SIZE"), CL_SIZE is 4096 and local array variables with this size will cause an build failure with default CONFIG_FRAME_WARN settings. Although current users of such array variables are all early bootstrap code and not likely to cause real stack overflow (thread_info corruption), it is preferable to to declare these arrays static with __initdata. Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle commit f8ac04255dc8baa1c018e8028222d842efa56e6b Author: Yoichi Yuasa Date: Thu Jun 4 00:16:04 2009 +0900 MIPS: Add DMA declare coherent memory support The ohci-sm501 driver requires dma_declare_coherent_memory(). It is used by the driver's local memory allocation with dma_alloc_coherent(). Tested on TANBAC TB0287(VR4131 + SM501). [Ralf: Fixed reject in dma-default.c and removed the entire #if 0'ed block in dma-mapping.h instead of just the #if 0.] Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle commit da0bac33413b2888d3623dad3ad19ce76b688f07 Author: David Daney Date: Mon Nov 2 11:33:46 2009 -0800 MIPS: Fix emulation of 64-bit FPU on FPU-less 64-bit CPUs. Running a 64-bit kernel on a 64-bit CPU without an FPU would cause the emulator to run in 32-bit mode. The c0_Status.FR bit is wired to zero on systems without an FPU, so using that bit to decide how the emulator behaves doesn't allow for proper emulation on 64-bit FPU-less processors. Instead, we need to select the emulator mode based on the user-space ABI. Since the thread flag TIF_32BIT_REGS is used to set c0_Status.FR, we can just use it to decide if the emulator should be in 32-bit or 64-bit mode. Signed-off-by: David Daney Signed-off-by: Ralf Baechle commit bcc6525fb23d2cec7ffdf908d98826a66823bcb2 Author: Christian Borntraeger Date: Fri Nov 13 15:43:54 2009 +0100 [S390] s390: fix single stepping on svc0 On s390 there are two ways of specifying the system call number for the svc instruction. The standard way is to use the immediate field in the instruction (or to use EXecute for values unknown during assemble time). This can encode 256 system calls. The kernel ABI also allows to put the system call number in r1 and then execute svc 0 to enable system call numbers > 255. It turns out that single stepping svc 0 is broken, since the PER program check handler uses r1. We have to use a different register. Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky commit 8b94c1ed4d8232a452aa9db0f5ac9141d942590f Author: Martin Schwidefsky Date: Fri Nov 13 15:43:53 2009 +0100 [S390] sclp: undo quiesce handler override on resume In a system where the ctrl-alt-del init action initiated by signal quiesce suspends the machine the quiesce handler override for _machine_restart, _machine_halt and _machine_power_off needs to be undone, otherwise the override is still present in the resumed system. The next shutdown would then load the quiesce state psw instead of performing the correct shutdown action. Signed-off-by: Martin Schwidefsky commit b89031e087a47819be48028e62cebade5f9fb75b Author: Martin Schwidefsky Date: Fri Nov 13 15:43:52 2009 +0100 [S390] reset cputime accounting after IPL from NSS After an IPL from NSS the uptime of the system is incorrect. The reason is that the startup code in head.S is not executed in case of an IPL from NSS. Due to that sched_clock_base_cc which is used to initialze wall_to_monotonic contains the time stamp when the NSS has been created instead of the time stamp of the system start. Reinitialize the cputime accounting values in create_kernel_nss after the SAVESYS CP command that created the NSS segment. Signed-off-by: Martin Schwidefsky commit ccaf6553963bc6304d5820962a08a4397d0a2dc2 Author: Gerald Schaefer Date: Fri Nov 13 15:43:51 2009 +0100 [S390] monreader: fix use after free bug with suspend/resume The monreader device driver doesn't set dev->driver_data to NULL after freeing the corresponding data structure. This leads to a use after free bug in the freeze/thaw suspend/resume functions after the device has been opened and closed once. Fix this by clearing dev->driver_data in the close() function. Signed-off-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky commit 3d4c3aa938fcbfee1c7a6d66ee23288448fb97e7 Author: Takashi Iwai Date: Thu Nov 12 23:30:52 2009 -0800 Input: psmouse - remove unneeded '\n' from psmouse.proto parameter The get parameter function should return a string without a life-feed. Otherwise you'll see additional empty line in sysfs parameters file. Signed-off-by: Takashi Iwai Signed-off-by: Dmitry Torokhov commit d4119bdacfcd88a763e250fe0efa6a2e11d30e88 Author: Dmitry Torokhov Date: Thu Nov 12 23:19:05 2009 -0800 Input: atkbd - restore LED state at reconnect Even though input core tells us to restore LED state and repeat rate at resume keyboard may be reconnected either by request from userspace (via sysfs) or just by pulling it from the box and plugging it back in. In these cases we still need to restore state ourselves. Signed-off-by: Dmitry Torokhov commit 3cc96351799d3d82c3809aa6970ef537bc1af553 Author: Dmitry Torokhov Date: Thu Nov 12 23:19:05 2009 -0800 Input: force LED reset on resume We should be sending EV_LED event down to drivers upon resume even in cases when in-kernel state of the LED is off since device could come up with some leds turned on. Reported-and-tested-by: Mikko Vinni Signed-off-by: Dmitry Torokhov commit c148ffdcda00b6599b70f8b65e6a1fadd1dbb127 Author: NeilBrown Date: Fri Nov 13 17:47:00 2009 +1100 md/raid5: Allow dirty-degraded arrays to be assembled when only party is degraded. Normally is it not safe to allow a raid5 that is both dirty and degraded to be assembled without explicit request from that admin, as it can cause hidden data corruption. This is because 'dirty' means that the parity cannot be trusted, and 'degraded' means that the parity needs to be used. However, if the device that is missing contains only parity, then there is no issue and assembly can continue. This particularly applies when a RAID5 is being converted to a RAID6 and there is an unclean shutdown while the conversion is happening. So check for whether the degraded space only contains parity, and in that case, allow the assembly. Signed-off-by: NeilBrown commit 7ef90146a14c2bb1de2e22399f147ebec5b74f0b Author: NeilBrown Date: Fri Nov 13 17:40:51 2009 +1100 Don't unconditionally set in_sync on newly added device in raid5_reshape When a reshape finds that it can add spare devices into the array, those devices might already be 'in_sync' if they are beyond the old size of the array, or they might not if they are within the array. The first case happens when we change an N-drive RAID5 to an N+1-drive RAID5. The second happens when we convert an N-drive RAID5 to an N+1-drive RAID6. So set the flag more carefully. Also, ->recovery_offset is only meaningful when the flag is clear, so only set it in that case. This change needs the preceding two to ensure that the non-in_sync device doesn't get evicted from the array when it is stopped, in the case where v0.90 metadata is used. Signed-off-by: NeilBrown commit 0261cd9f1cb42fa44ece314d27868d83742bdf03 Author: NeilBrown Date: Fri Nov 13 17:40:48 2009 +1100 md: allow v0.91 metadata to record devices as being active but not in-sync. This is a combination that didn't really make sense before. However when a reshape is converting e.g. raid5 -> raid6, the extra device is not fully in-sync, but is certainly active and contains important data. So allow that start to be meaningful and in particular get the 'recovery_offset' value (which is needed for any non-in-sync active device) from the reshape_position. Signed-off-by: NeilBrown commit 833af8427be4b217b5bc522f61afdbd3f1d282c2 Author: Tejun Heo Date: Wed Nov 11 15:35:18 2009 +0900 percpu: restructure pcpu_extend_area_map() to fix bugs and improve readability pcpu_extend_area_map() had the following two bugs. * It should return 1 if pcpu_lock was dropped and reacquired but it returned 0. This could lead to oops if free_percpu() races with area map extension. * pcpu_mem_free() was called under pcpu_lock. pcpu_mem_free() might end up calling vfree() which isn't IRQ safe. This could lead to deadlock through lock order inversion via IRQ. In addition, Linus pointed out that the temporary lock dropping and subtle three-way return value of pcpu_extend_area_map() was very ugly and suggested to split the function into two - pcpu_need_to_extend() and pcpu_extend_area_map(). This patch restructures pcpu_extend_area_map() as suggested and fixes the two bugs. Signed-off-by: Tejun Heo Acked-by: Linus Torvalds Cc: Ingo Molnar commit 99dcadede42f8898d4c963ef69192ef4b9b76ba8 Author: Fenghua Yu Date: Wed Nov 11 07:23:06 2009 -0800 intel-iommu: Support PCIe hot-plug To support PCIe hot plug in IOMMU, we register a notifier to respond to device change action. When the notifier gets BUS_NOTIFY_UNBOUND_DRIVER, it removes the device from its DMAR domain. A hot added device will be added into an IOMMU domain when it first does IOMMU op. So there is no need to add more code for hot add. Without the patch, after a hot-remove, a hot-added device on the same slot will not work. Signed-off-by: Fenghua Yu Tested-by: Yinghai Lu Signed-off-by: David Woodhouse commit e8bb910d1bbc65e7081e73aab4b3a3dd8630332c Author: Alex Williamson Date: Wed Nov 4 15:59:34 2009 -0700 intel-iommu: Obey coherent_dma_mask for alloc_coherent on passthrough The model for IOMMU passthrough is that decent devices that can cope with DMA to all of memory get passthrough; crappy devices with a limited dma_mask don't -- they get to use the IOMMU anyway. This is done on the basis that IOMMU passthrough is usually wanted for performance reasons, and it's only the decent PCI devices that you really care about performance for, while the crappy 32-bit ones like your USB controller can just use the IOMMU and you won't really care. Unfortunately, the check for this was only looking at dev->dma_mask, not at dev->coherent_dma_mask. And some devices have a 32-bit coherent_dma_mask even though they have a full 64-bit dma_mask. Even more unfortunately, fixing that simple oversight would upset certain broken HP devices. Not only do they have a 32-bit coherent_dma_mask, but they also have a tendency to do stray DMA to unmapped addresses. And then they die when they take the DMA fault they so richly deserve. So if we do the 'correct' fix, it'll mean that affected users have to disable IOMMU support completely on "a large percentage of servers from a major vendor." Personally, I have little sympathy -- given that this is the _same_ 'major vendor' who is shipping machines which claim to have IOMMU support but have obviously never _once_ booted a VT-d capable OS to do any form of QA. But strictly speaking, it _would_ be a regression even though it only ever worked by fluke. For 2.6.33, we'll come up with a quirk which gives swiotlb support for this particular device, and other devices with an inadequate coherent_dma_mask will just get normal IOMMU mapping. The simplest fix for 2.6.32, though, is just to jump through some hoops to try to allocate coherent DMA memory for such devices in a place that they can reach. We'd use dma_generic_alloc_coherent() for this if it existed on IA64. Signed-off-by: Alex Williamson Signed-off-by: David Woodhouse commit 5e8651060cea6b44844521ddcac665e2c021f5d8 Author: NeilBrown Date: Thu Nov 12 12:08:04 2009 +1100 md: factor out updating of 'recovery_offset'. Each device has its own 'recovery_offset' showing how far recovery has progressed on the device. As the only real significance of this is that fact that it can be stored in the metadata and recovered at restart, and as only 1.x metadata can do this, we were only updating 'recovery_offset' to 'curr_resync_completed' when updating v1.x metadata. But this is wrong, and we will shortly make limited use of this field in v0.90 metadata. So move the update into common code. Signed-off-by: NeilBrown commit bf3204cbff7d2606e758afb0994e8da6ae1c6c26 Author: Dmitry Torokhov Date: Fri Nov 6 21:39:07 2009 -0800 Input: fix locking in memoryless force-feedback devices Now that input core acquires dev->event_lock spinlock and disables interrupts when propagating input events, using spin_lock_bh() in ff-memless driver is not allowed. Actually, the timer_lock itself is not needed anymore, we should simply use dev->event_lock as well. Also do a small cleanup in force-feedback core. Reported-by: kerneloops.org Reported-by: http://www.kerneloops.org/searchweek.php?search=ml_ff_set_gain Reported-by: Arjan van de Ven Signed-off-by: Dmitry Torokhov commit 86cf898e1d0fca245173980e3897580db38569a8 Author: David Woodhouse Date: Mon Nov 9 22:15:15 2009 +0000 intel-iommu: Check for 'DMAR at zero' BIOS error earlier. Chris Wright has some patches which let us fall back to swiotlb nicely if IOMMU initialisation fails. But those are a bit much for 2.6.32. Instead, let's shift the check for the biggest problem, the HP and Acer BIOS bug which reports a DMAR at physical address zero. That one can actually be checked much earlier -- before we even admit to having detected an IOMMU in the first place. So the swiotlb init goes ahead as we want. Signed-off-by: David Woodhouse