commit 55ec86f848a5f872fd43f5d7206464a0af419110 Merge: 21228e4 147dd56 d949750 Author: Linus Torvalds Date: Sun Dec 19 10:44:54 2010 -0800 Merge branches 'x86-fixes-for-linus' and 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86-32: Make sure we can map all of lowmem if we need to x86, vt-d: Handle previous faults after enabling fault handling x86: Enable the intr-remap fault handling after local APIC setup x86, vt-d: Fix the vt-d fault handling irq migration in the x2apic mode x86, vt-d: Quirk for masking vtd spec errors to platform error handling logic x86, xsave: Use alloc_bootmem_align() instead of alloc_bootmem() bootmem: Add alloc_bootmem_align() x86, gcc-4.6: Use gcc -m options when building vdso x86: HPET: Chose a paranoid safe value for the ETIME check x86: io_apic: Avoid unused variable warning when CONFIG_GENERIC_PENDING_IRQ=n * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: perf: Fix off by one in perf_swevent_init() perf: Fix duplicate events with multiple-pmu vs software events ftrace: Have recordmcount honor endianness in fn_ELF_R_INFO scripts/tags.sh: Add magic for trace-events tracing: Fix panic when lseek() called on "trace" opened for writing commit 21228e455756be11fbbcae7e1a184ad9d842f687 Merge: 0a59228 8e92c20 Author: Linus Torvalds Date: Sun Dec 19 10:37:37 2010 -0800 Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: Fix the irqtime code for 32bit sched: Fix the irqtime code to deal with u64 wraps nohz: Fix get_next_timer_interrupt() vs cpu hotplug Sched: fix skip_clock_update optimization sched: Cure more NO_HZ load average woes commit 0a59228168d3722b71f8e3dbc623316fb4be78f4 Merge: 2ba16c4 81711ce Author: Linus Torvalds Date: Sat Dec 18 10:28:54 2010 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: arch/tile: handle rt_sigreturn() more cleanly arch/tile: handle CLONE_SETTLS in copy_thread(), not user space commit 2ba16c4f456eb63f54b1d8b065377d41a1cd6a14 Merge: 46bdfe6 081d835 Author: Linus Torvalds Date: Sat Dec 18 10:23:29 2010 -0800 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus * 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus: MIPS: Fix build errors in sc-mips.c commit 46bdfe6a50b88942f5323f837a3afd93a1c86e60 Merge: c15524a a2c606d Author: Linus Torvalds Date: Sat Dec 18 10:13:24 2010 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: x86: avoid high BIOS area when allocating address space x86: avoid E820 regions when allocating address space x86: avoid low BIOS area when allocating address space resources: add arch hook for preventing allocation in reserved areas Revert "resources: support allocating space within a region from the top down" Revert "PCI: allocate bus resources from the top down" Revert "x86/PCI: allocate space from the end of a region, not the beginning" Revert "x86: allocate space within a region top-down" Revert "PCI: fix pci_bus_alloc_resource() hang, prefer positive decode" PCI: Update MCP55 quirk to not affect non HyperTransport variants commit 81711cee933599fa114abb0d258d8bbabef8adfb Author: Chris Metcalf Date: Tue Dec 14 16:07:25 2010 -0500 arch/tile: handle rt_sigreturn() more cleanly The current tile rt_sigreturn() syscall pattern uses the common idiom of loading up pt_regs with all the saved registers from the time of the signal, then anticipating the fact that we will clobber the ABI "return value" register (r0) as we return from the syscall by setting the rt_sigreturn return value to whatever random value was in the pt_regs for r0. However, this breaks in our 64-bit kernel when running "compat" tasks, since we always sign-extend the "return value" register to properly handle returned pointers that are in the upper 2GB of the 32-bit compat address space. Doing this to the sigreturn path then causes occasional random corruption of the 64-bit r0 register. Instead, we stop doing the crazy "load the return-value register" hack in sigreturn. We already have some sigreturn-specific assembly code that we use to pass the pt_regs pointer to C code. We extend that code to also set the link register to point to a spot a few instructions after the usual syscall return address so we don't clobber the saved r0. Now it no longer matters what the rt_sigreturn syscall returns, and the pt_regs structure can be cleanly and completely reloaded. Signed-off-by: Chris Metcalf commit bc4cf2bb271b2d557fc510426755da786fc985be Author: Chris Metcalf Date: Tue Dec 14 15:57:49 2010 -0500 arch/tile: handle CLONE_SETTLS in copy_thread(), not user space Previously we were just setting up the "tp" register in the new task as started by clone() in libc. However, this is not quite right, since in principle a signal might be delivered to the new task before it had its TLS set up. (Of course, this race window still exists for resetting the libc getpid() cached value in the new task, in principle. But in any case, we are now doing this exactly the way all other architectures do it.) This change is important for 2.6.37 since the tile glibc we will be submitting upstream will not set TLS in user space any more, so it will only work on a kernel that has this fix. It should also be taken for 2.6.36.x in the stable tree if possible. Signed-off-by: Chris Metcalf Cc: stable commit 081d835fa4ce70ad1e42ac76de850a49e23a1557 Author: Kevin Cernekee Date: Tue Nov 2 22:28:01 2010 -0700 MIPS: Fix build errors in sc-mips.c Seen with malta_defconfig on Linus' tree: CC arch/mips/mm/sc-mips.o arch/mips/mm/sc-mips.c: In function 'mips_sc_is_activated': arch/mips/mm/sc-mips.c:77: error: 'config2' undeclared (first use in this function) arch/mips/mm/sc-mips.c:77: error: (Each undeclared identifier is reported only once arch/mips/mm/sc-mips.c:77: error: for each function it appears in.) arch/mips/mm/sc-mips.c:81: error: 'tmp' undeclared (first use in this function) make[2]: *** [arch/mips/mm/sc-mips.o] Error 1 make[1]: *** [arch/mips/mm] Error 2 make: *** [arch/mips] Error 2 [Ralf: Cosmetic changes to minimize the number of arguments passed to mips_sc_is_activated] Signed-off-by: Kevin Cernekee Patchwork: https://patchwork.linux-mips.org/patch/1752/ Signed-off-by: Ralf Baechle commit a2c606d53ab71dee6410f10ef0adf67321d60e06 Author: Bjorn Helgaas Date: Thu Dec 16 10:39:02 2010 -0700 x86: avoid high BIOS area when allocating address space This prevents allocation of the last 2MB before 4GB. The experiment described here shows Windows 7 ignoring the last 1MB: https://bugzilla.kernel.org/show_bug.cgi?id=23542#c27 This patch ignores the top 2MB instead of just 1MB because H. Peter Anvin says "There will be ROM at the top of the 32-bit address space; it's a fact of the architecture, and on at least older systems it was common to have a shadow 1 MiB below." Acked-by: H. Peter Anvin Signed-off-by: Bjorn Helgaas Signed-off-by: Jesse Barnes commit 4dc2287c1805e7fe8a7cb90bbcd44abee8cdb914 Author: Bjorn Helgaas Date: Thu Dec 16 10:38:56 2010 -0700 x86: avoid E820 regions when allocating address space When we allocate address space, e.g., to assign it to a PCI device, don't allocate anything mentioned in the BIOS E820 memory map. On recent machines (2008 and newer), we assign PCI resources from the windows described by the ACPI PCI host bridge _CRS. On many Dell machines, these windows overlap some E820 reserved areas, e.g., BIOS-e820: 00000000bfe4dc00 - 00000000c0000000 (reserved) pci_root PNP0A03:00: host bridge window [mem 0xbff00000-0xdfffffff] If we put devices at 0xbff00000, they don't work, probably because that's really RAM, not I/O memory. This patch prevents that by removing the 0xbfe4dc00-0xbfffffff area from the "available" resource. I'm not very happy with this solution because Windows solves the problem differently (it seems to ignore E820 reserved areas and it allocates top-down instead of bottom-up; details at comment 45 of the bugzilla below). That means we're vulnerable to BIOS defects that Windows would not trip over. For example, if BIOS described a device in ACPI but didn't mention it in E820, Windows would work fine but Linux would fail. Reference: https://bugzilla.kernel.org/show_bug.cgi?id=16228 Acked-by: H. Peter Anvin Signed-off-by: Bjorn Helgaas Signed-off-by: Jesse Barnes commit 30919b0bf356a8ee0ef4f7d38ca8ad99b96820b2 Author: Bjorn Helgaas Date: Thu Dec 16 10:38:51 2010 -0700 x86: avoid low BIOS area when allocating address space This implements arch_remove_reservations() so allocate_resource() can avoid any arch-specific reserved areas. This currently just avoids the BIOS area (the first 1MB), but could be used for E820 reserved areas if that turns out to be necessary. We previously avoided this area in pcibios_align_resource(). This patch moves the test from that PCI-specific path to a generic path, so *all* resource allocations will avoid this area. Acked-by: H. Peter Anvin Signed-off-by: Bjorn Helgaas Signed-off-by: Jesse Barnes commit fcb119183c73bf0781009713f303e28b1fb13d3e Author: Bjorn Helgaas Date: Thu Dec 16 10:38:46 2010 -0700 resources: add arch hook for preventing allocation in reserved areas This adds arch_remove_reservations(), which an arch can implement if it needs to protect part of the address space from allocation. Sometimes that can be done by just putting a region in the resource tree, but there are cases where that doesn't work well. For example, x86 BIOS E820 reservations are not related to devices, so they may overlap part of, all of, or more than a device resource, so they may not end up at the correct spot in the resource tree. Acked-by: H. Peter Anvin Signed-off-by: Bjorn Helgaas Signed-off-by: Jesse Barnes commit c0f5ac5426f7fd82b23dd5c6a1e633b290294a08 Author: Bjorn Helgaas Date: Thu Dec 16 10:38:41 2010 -0700 Revert "resources: support allocating space within a region from the top down" This reverts commit e7f8567db9a7f6b3151b0b275e245c1cef0d9c70. Acked-by: H. Peter Anvin Signed-off-by: Bjorn Helgaas Signed-off-by: Jesse Barnes commit 6db45b76eaa08133187f2cb44d496de7e9503aa8 Author: Bjorn Helgaas Date: Thu Dec 16 10:38:36 2010 -0700 Revert "PCI: allocate bus resources from the top down" This reverts commit b126b4703afa4010b161784a43650337676dd03b. We're going back to the old behavior of allocating from bus resources in _CRS order. Acked-by: H. Peter Anvin Signed-off-by: Bjorn Helgaas Signed-off-by: Jesse Barnes commit d14125ecfee05473de46f06d992db109308c57a3 Author: Bjorn Helgaas Date: Thu Dec 16 10:38:31 2010 -0700 Revert "x86/PCI: allocate space from the end of a region, not the beginning" This reverts commit dc9887dc02e37bcf83f4e792aa14b07782ef54cf. Acked-by: H. Peter Anvin Signed-off-by: Bjorn Helgaas Signed-off-by: Jesse Barnes commit 5e52f1c5e85fdc3831eeae8b546577e94a586f81 Author: Bjorn Helgaas Date: Thu Dec 16 10:38:25 2010 -0700 Revert "x86: allocate space within a region top-down" This reverts commit 1af3c2e45e7a641e774bbb84fa428f2f0bf2d9c9. Acked-by: H. Peter Anvin Signed-off-by: Bjorn Helgaas Signed-off-by: Jesse Barnes commit ac57cd5ee1935d1e60de86d75f13f377775f1c96 Author: Bjorn Helgaas Date: Thu Dec 16 10:38:20 2010 -0700 Revert "PCI: fix pci_bus_alloc_resource() hang, prefer positive decode" This reverts commit 82e3e767c21fef2b1b38868e20eb4e470a1e38e3. We're going back to considering bus resources in the order we found them (in _CRS order, when we're using _CRS), so we don't need to define any ordering. Acked-by: H. Peter Anvin Signed-off-by: Bjorn Helgaas Signed-off-by: Jesse Barnes commit c15524a40a1603dc56a8691c4f50172fb86c23d8 Merge: a6ac1f0 c20b4dd Author: Linus Torvalds Date: Fri Dec 17 09:45:25 2010 -0800 Merge branch 'for_linus' of git://github.com/at91linux/linux-2.6-at91 * 'for_linus' of git://github.com/at91linux/linux-2.6-at91: at91: Refactor Stamp9G20 and PControl G20 board file at91: Fix uhpck clock rate in upll case commit a6ac1f0af4b39f41fa69477cc44621c612403374 Merge: 508817e 3e26f23 Author: Linus Torvalds Date: Fri Dec 17 09:32:39 2010 -0800 Merge branch 'kvm-updates/2.6.37' of git://git.kernel.org/pub/scm/virt/kvm/kvm * 'kvm-updates/2.6.37' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: Fix preemption counter leak in kvm_timer_init() KVM: enlarge number of possible CPUID leaves KVM: SVM: Do not report xsave in supported cpuid KVM: Fix OSXSAVE after migration commit 508817e7cd8cb585148d12b5673202142ece2330 Merge: 8efc1a1 f08f5a0 Author: Linus Torvalds Date: Fri Dec 17 09:31:59 2010 -0800 Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6 * 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6: PM / Runtime: Fix pm_runtime_suspended() PM / Hibernate: Restore old swap signature to avoid user space breakage PM / Hibernate: Fix PM_POST_* notification with user-space suspend commit 8efc1a1a22e6daf9d669e6095460c77df683c325 Merge: 7428081 673eb9f Author: Linus Torvalds Date: Fri Dec 17 09:28:17 2010 -0800 Merge branch 'bkl_removal' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 * 'bkl_removal' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: [media] uvcvideo: Convert to unlocked_ioctl [media] uvcvideo: Lock stream mutex when accessing format-related information [media] uvcvideo: Move mmap() handler to uvc_queue.c [media] uvcvideo: Move mutex lock/unlock inside uvc_free_buffers [media] uvcvideo: Lock controls mutex when querying menus [media] v4l2-dev: fix race condition [media] V4L: improve the BKL replacement heuristic [media] v4l2-dev: use mutex_lock_interruptible instead of plain mutex_lock [media] cx18: convert to unlocked_ioctl [media] radio-timb: convert to unlocked_ioctl [media] sh_vou: convert to unlocked_ioctl [media] cafe_ccic: replace ioctl by unlocked_ioctl [media] et61x251_core: trivial conversion to unlocked_ioctl [media] sn9c102: convert to unlocked_ioctl [media] BKL: trivial ioctl -> unlocked_ioctl video driver conversions [media] typhoon: convert to unlocked_ioctl [media] si4713: convert to unlocked_ioctl [media] tea5764: convert to unlocked_ioctl [media] cadet: use unlocked_ioctl [media] BKL: trivial BKL removal from V4L2 radio drivers commit 74280817e5013af83089a5dd511f6fb3b2362e09 Merge: a3383e8 5aad6c5 Author: Linus Torvalds Date: Fri Dec 17 09:27:30 2010 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: hda - Fix conflict of Mic Boot controls ALSA: HDA: Enable subwoofer on Asus G73Jw ALSA: HDA: Fix auto-mute on Lenovo Edge 14 ASoC: Fix bias power down of non-DAPM codec ASoC: WM8580: Fix R8 initial value ASoC: fix deemphasis control in wm8904/55/60 codecs commit 5aad6c5f7733b94e666e3bf8b57beb7bbee15886 Merge: 8cd1fd2 862af8a Author: Takashi Iwai Date: Fri Dec 17 15:28:37 2010 +0100 Merge branch 'fix/asoc' into for-linus commit 8cd1fd2526a78eaa1785a8ae3fe9f45a8ddd0e17 Merge: d70ab7f 53e8c32 Author: Takashi Iwai Date: Fri Dec 17 15:28:33 2010 +0100 Merge branch 'fix/hda' into for-linus commit 53e8c3239bcc7b89c76179fd33fb6faa3413c00d Author: Takashi Iwai Date: Fri Dec 17 15:23:41 2010 +0100 ALSA: hda - Fix conflict of Mic Boot controls Due to the recent change for multiple mics assignment, we need to handle the index of each Mic Boost control respectively. Otherwise the driver gets the control element conflicts, and gives the unsable state. Reference: kernel bug 25002 https://bugzilla.kernel.org/show_bug.cgi?id=25002 Reported-and-tested-by: Adam Williamson Signed-off-by: Takashi Iwai commit c20b4dd31820a551d0fb60bf27b99345905c2eb6 Author: Christian Glindkamp Date: Thu Dec 9 11:15:59 2010 +0100 at91: Refactor Stamp9G20 and PControl G20 board file As PControl G20 is a carrier board for the Stamp9G20 SoM, some code can be shared. Therefore board-stamp9g20.c is refactored to allow reusing the SoM initialization and board-pcontrol-g20.c is modified to use it. Signed-off-by: Christian Glindkamp Signed-off-by: Nicolas Ferre commit 8251544f9e28058e54c4f35b7cd13b0d191d7555 Author: Ryan Mallon Date: Wed Jun 2 12:55:36 2010 +1200 at91: Fix uhpck clock rate in upll case The uhpck clock should be divided from the utmi clock, not its parent (main). This change is mostly cosmetic as the uhpck rate value is not used anywhere except for the debugfs clock output. Signed-off-by: Ryan Mallon Signed-off-by: Nicolas Ferre commit 147dd5610c8d1bacb88a6c1dfdaceaf257946ed0 Author: H. Peter Anvin Date: Thu Dec 16 19:11:09 2010 -0800 x86-32: Make sure we can map all of lowmem if we need to A relocatable kernel can be anywhere in lowmem -- and in the case of a kdump kernel, is likely to be fairly high. Since the early page tables map everything from address zero up we need to make sure we allocate enough brk that we can map all of lowmem if we need to. Reported-by: Stanislaw Gruszka Signed-off-by: H. Peter Anvin Tested-by: Yinghai Lu LKML-Reference: <4D0AD3ED.8070607@kernel.org> commit a3383e8372c0c11238f9bb9777929bfc3a2d320a Merge: 68a4ec9 7d13162 Author: Linus Torvalds Date: Thu Dec 16 15:45:49 2010 -0800 Merge branch 'for-linus' of git://git.infradead.org/users/eparis/notify * 'for-linus' of git://git.infradead.org/users/eparis/notify: fanotify: fill in the metadata_len field on struct fanotify_event_metadata fanotify: split version into version and metadata_len fanotify: Dont try to open a file descriptor for the overflow event fanotify: Introduce FAN_NOFD fanotify: do not leak user reference on allocation failure inotify: stop kernel memory leak on file creation failure fanotify: on group destroy allow all waiters to bypass permission check fanotify: Dont allow a mask of 0 if setting or removing a mark fanotify: correct broken ref counting in case adding a mark failed fanotify: if set by user unset FMODE_NONOTIFY before fsnotify_perm() is called fanotify: remove packed from access response message fanotify: deny permissions when no event was sent commit 68a4ec9c03461e94a9577cf499069621bb074833 Merge: b3444d1 c9bace7 Author: Linus Torvalds Date: Thu Dec 16 15:45:25 2010 -0800 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus * 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus: (28 commits) MIPS: Add a CONFIG_FORCE_MAX_ZONEORDER Kconfig option. MIPS: LD/SD o32 macro GAS fix update MIPS: Alchemy: fix build with SERIAL_8250=n MIPS: Rename mips_dma_cache_sync back to dma_cache_sync MIPS: MT: Fix typo in comment. SSB: Fix nvram_get on BCM47xx platform MIPS: BCM47xx: Swap serial console if ttyS1 was specified. MIPS: BCM47xx: Use sscanf for parsing mac address MIPS: BCM47xx: Fill values for b43 into SSB sprom MIPS: BCM47xx: Do not read config from CFE MIPS: FDT size is a be32 MIPS: Fix CP0 COUNTER clockevent race MIPS: Fix regression on BCM4710 processor detection MIPS: JZ4740: Fix pcm device name MIPS: Separate two consecutive loads in memset.S MIPS: Send proper signal and siginfo on FP emulator faults. MIPS: AR7: Fix loops per jiffies on TNETD7200 devices MIPS: AR7: Fix double ar7_gpio_init declaration MIPS: Rework GENERIC_HARDIRQS Kconfig. MIPS: Alchemy: Add return value check for strict_strtoul() ... commit 49c2fa08a77a7eefa4cbc73601f64984aceacfa7 Author: Neil Horman Date: Wed Dec 8 09:47:48 2010 -0500 PCI: Update MCP55 quirk to not affect non HyperTransport variants I wrote this quirk awhile ago to properly setup MCP55 chips on hypertransport busses so that interrupts reached whatever cpu happend to boot the kdump kernel. while that works well, it was recently shown to me that a a non-hypertransport variant of the MCP55 exists, and on those system the register that this quirk manipulates causes hangs if you write to it. Since the quirk was only meant to handle errors found on MCP55 chips that have a HT interface, this patch adds a filter to make sure the chip is an HT capable before making the needed register adjustment. This lets the broken MCP55s work with kdump while not breaking the non-HT variants. Resolves https://bugzilla.kernel.org/show_bug.cgi?id=23952 Tested successfully by the reporter and myself. Cc: stable@kernel.org Reported-by: Mathieu Bérard Acked-by: Vivek Goyal Signed-off-by: Neil Horman Signed-off-by: Jesse Barnes commit c9bace7ca1e2aeb95754ebc92c8f88a9f215691d Author: David Daney Date: Mon Oct 11 14:52:45 2010 -0700 MIPS: Add a CONFIG_FORCE_MAX_ZONEORDER Kconfig option. For huge page support with base page size of 16K or 32K, we have to increase the MAX_ORDER so that huge pages can be allocated. [Ralf: I don't think a user should have to configure obscure constants like this but for the time being this will have to suffice.] Signed-off-by: David Daney To: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/1685/ Signed-off-by: Ralf Baechle commit 82b89152f00f7ad17844d5614d5011e8d7944ac9 Author: Maciej W. Rozycki Date: Sun Oct 10 10:42:12 2010 +0100 MIPS: LD/SD o32 macro GAS fix update I am about to commit: http://sourceware.org/ml/binutils/2010-10/msg00033.html that fixes a problem with the LD/SD macro currently implemented by GAS for the o32 ABI in an inconsistent way. This is best illustrated with a simple program, which I'm copying here from the message above for easier reference: $ cat ld.s ld $5,32767($4) ld $5,32768($4) This gets assebled into the following output: $ mips-linux-as -32 -mips3 -o ld.o ld.s $ mips-linux-objdump -d ld.o ld.o: file format elf32-tradbigmips Disassembly of section .text: 00000000 <.text>: 0: dc857fff ld a1,32767(a0) 4: 3c010001 lui at,0x1 8: 00810821 addu at,a0,at c: 8c258000 lw a1,-32768(at) 10: 8c268004 lw a2,-32764(at) ... Oops! The GAS fix makes the macro behave in a consistent way and pairs of LW/SW instructions to be output as appropriate regardless of the size of the offset associated with the address used. The machine instruction is still available, but to reach it macros have to be disabled first. This has a side effect of requiring the use of a machine-addressable memory operand. As some platforms require 64-bit operations for accesses to some I/O registers LD/SD instructions are used in a couple of places in Linux regardless of the ABI selected. Here's a fix for some pieces of code affected I've been able to track down. The fix should be backwards compatible with all supported binutils releases in existence and can be used as a reference for any other places or off-tree code. The use of the "R" constraint guarantees a machine-addressable operand. Signed-off-by: Maciej W. Rozycki Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/1680/ Signed-off-by: Ralf Baechle commit cf745a39dcb10ef80c4a2ff38448f57b69d4c4eb Author: Manuel Lauss Date: Mon Oct 25 18:44:11 2010 +0200 MIPS: Alchemy: fix build with SERIAL_8250=n In commit 7d172bfe ("Alchemy: Add UART PM methods") I introduced platform PM methods which call a function of the 8250 driver; this patch works around link failures when the kernel is built without 8250 support. Signed-off-by: Manuel Lauss To: Linux-MIPS Patchwork: https://patchwork.linux-mips.org/patch/1737/ Signed-off-by: Ralf Baechle commit a3aad4aaf871045ab1dd9c99be6c1ace881d8eb0 Author: Ralf Baechle Date: Thu Dec 9 19:14:09 2010 +0000 MIPS: Rename mips_dma_cache_sync back to dma_cache_sync This fixes IP22 and IP28 build errors. Signed-off-by: Ralf Baechle commit d002aaadf84c081623a0a8502c122d1492fbd47c Author: Ralf Baechle Date: Wed Dec 1 17:33:17 2010 +0000 MIPS: MT: Fix typo in comment. Signed-off-by: Ralf Baechle commit 3f84622d7c7818077f5e6cf4b8a0d1b10dc65147 Author: Hauke Mehrtens Date: Sat Nov 27 19:26:32 2010 +0100 SSB: Fix nvram_get on BCM47xx platform The nvram_get function was never in the mainline kernel, it only existed in an external OpenWrt patch. Use nvram_getenv function, which is in mainline and use an include instead of an extra function declaration. et0macaddr contains the mac address in text from like 00:11:22:33:44:55. We have to parse it before adding it into macaddr. nvram_parse_macaddr will be merged into asm/mach-bcm47xx/nvram.h through the MIPS git tree and will be available soon. It will not build now without nvram_parse_macaddr, but it hasn't before either. Signed-off-by: Hauke Mehrtens To: linux-mips@linux-mips.org Cc: mb@bu3sch.de Cc: netdev@vger.kernel.org Cc: Hauke Mehrtens Acked-by: Michael Buesch Patchwork: https://patchwork.linux-mips.org/patch/1849/ Signed-off-by: Ralf Baechle commit 1690a7f9ab83f5c823f3044275a4a771a059d5bb Author: Hauke Mehrtens Date: Sat Nov 27 17:46:01 2010 +0100 MIPS: BCM47xx: Swap serial console if ttyS1 was specified. Some devices like the Netgear WGT634U are using ttyS1 for default console output. We should switch to that console if it was given in the kernel_args parameters. Signed-off-by: Hauke Mehrtens To: linux-mips@linux-mips.org Cc: Hauke Mehrtens Patchwork: https://patchwork.linux-mips.org/patch/1848/ Signed-off-by: Ralf Baechle commit 59833fcf48ee7b7c8a01e590aa7b7212305c3077 Author: Hauke Mehrtens Date: Sat Nov 27 17:46:00 2010 +0100 MIPS: BCM47xx: Use sscanf for parsing mac address Instead of writing own function for parsing the mac address we now use sscanf. Signed-off-by: Hauke Mehrtens To: linux-mips@linux-mips.org Cc: Hauke Mehrtens Patchwork: https://patchwork.linux-mips.org/patch/1847/ Signed-off-by: Ralf Baechle commit 2aa088d6fd8a6c6e6020ea46b70141f0b7ccf5d2 Author: Hauke Mehrtens Date: Sat Nov 27 17:45:59 2010 +0100 MIPS: BCM47xx: Fill values for b43 into SSB sprom Fill the sprom with all available values from the nvram. Most of these new values are needed for the b43 or b43legacy driver. Parts of this patch have been in OpenWRT for a long time and were written by Michael Buesch. Signed-off-by: Hauke Mehrtens To: linux-mips@linux-mips.org Cc: Hauke Mehrtens Patchwork: https://patchwork.linux-mips.org/patch/1846/ Signed-off-by: Ralf Baechle commit 825710843640dd173bc4b2ea99f1296923e4aa06 Author: Hauke Mehrtens Date: Sat Nov 27 17:45:58 2010 +0100 MIPS: BCM47xx: Do not read config from CFE The config options read out here are not stored in CFE but only in NVRAM on the devices. Remove reading from CFE and only access the NVRAM. Reading out CFE does not harm but is useless here. Signed-off-by: Hauke Mehrtens To: linux-mips@linux-mips.org Cc: Hauke Mehrtens Patchwork: https://patchwork.linux-mips.org/patch/1845/ Signed-off-by: Ralf Baechle commit e31fee7c3a197d88d1d0ced0e8600386da27fec4 Author: Thomas Chou Date: Wed Nov 24 15:35:48 2010 +0800 MIPS: FDT size is a be32 The totalsize field was be32. And the reserve bootmem would cause failure. Signed-off-by: Thomas Chou To: devicetree-discuss@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: grant.likely@secretlab.ca Cc: David Daney Cc: Dezhong Diao Patchwork: https://patchwork.linux-mips.org/patch/1838/ Signed-off-by: Ralf Baechle commit 5878fc936aebf592cca418ca50773cd578f7daf4 Author: Kevin Cernekee Date: Tue Nov 23 10:26:44 2010 -0800 MIPS: Fix CP0 COUNTER clockevent race Consider the following test case: write_c0_compare(read_c0_count()); Even if the counter doesn't increment during execution, this might not generate an interrupt until the counter wraps around. The CPU may perform the comparison each time CP0 COUNT increments, not when CP0 COMPARE is written. If mips_next_event() is called with a very small delta, and CP0 COUNT increments during the calculation of "cnt += delta", it is possible that CP0 COMPARE will be written with the current value of CP0 COUNT. If this is detected, the function should return -ETIME, to indicate that the interrupt might not have actually gotten scheduled. Signed-off-by: Kevin Cernekee Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/1836/ Signed-off-by: Ralf Baechle commit 190fca3e40a65303eac35ac4fbae4f1f1342431c Author: Kevin Cernekee Date: Tue Nov 23 10:26:45 2010 -0800 MIPS: Fix regression on BCM4710 processor detection BCM4710 uses the BMIPS32 core (like BCM6345), not the MIPS 4Kc core as was previously believed. Signed-off-by: Kevin Cernekee Tested-by: Alexandros C. Couloumbis Patchwork: https://patchwork.linux-mips.org/patch/1837/ Signed-off-by: Ralf Baechle commit 4afdea81821880d0fc35e6c7ff54eeed9ec0614d Author: Lars-Peter Clausen Date: Thu Nov 11 19:08:52 2010 +0100 MIPS: JZ4740: Fix pcm device name As part the ASoC multi-component patch (commit f0fba2ad) the jz4740 pcm driver was renamed to 'jz4740-pcm-audio'. Adjust the device name accordingly. Signed-off-by: Lars-Peter Clausen Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/1770/ Signed-off-by: Ralf Baechle commit e5674ad6ca9f1020c2bcc009a55becba3c30d8a3 Author: Tony Wu Date: Wed Nov 10 21:48:15 2010 +0800 MIPS: Separate two consecutive loads in memset.S partial_fixup is used in noreorder block. Separating two consecutive loads can save one cycle on processors with GPR intrelock and can fix load-use on processors that need a load delay slot. Also do so for fwd_fixup. [Ralf: Only R2000/R3000 class processors are lacking the the load-user interlock and even some of those got it retrofitted. With R2000/R3000 being fairly uncommon these days the impact of this bug should be minor.] Signed-off-by: Tony Wu To: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/1768/ Signed-off-by: Ralf Baechle commit 515b029d005b5694cf612a0a5ca6f861a7e45362 Author: David Daney Date: Thu Oct 21 16:32:26 2010 -0700 MIPS: Send proper signal and siginfo on FP emulator faults. We were unconditionally sending SIGBUS with an empty siginfo on FP emulator faults. This differs from what happens when real floating point hardware would get a fault. For most faults we need to send SIGSEGV with the faulting address filled in in the struct siginfo. Reported-by: Camm Maguire Signed-off-by: David Daney To: linux-mips@linux-mips.org Cc: Camm Maguire Patchwork: https://patchwork.linux-mips.org/patch/1727/ Signed-off-by: Ralf Baechle commit 0bc6791707694c77b3543de39f77972a65de917a Author: Florian Fainelli Date: Sun Oct 31 23:49:58 2010 +0100 MIPS: AR7: Fix loops per jiffies on TNETD7200 devices TNETD7200 run their CPU clock faster than the default CPU clock we assume. In order to have the correct loops per jiffies settings, initialize clocks right before setting mips_hpt_frequency. As a side effect, we can no longer use msleep in clocks.c which requires other parts of the kernel to be initialized, so replace these with mdelay. Signed-off-by: Florian Fainelli To: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/1749/ Signed-off-by: Ralf Baechle commit ff42d62047e45075c54a5543bd4f110dfd032d11 Author: Florian Fainelli Date: Sun Oct 31 23:49:57 2010 +0100 MIPS: AR7: Fix double ar7_gpio_init declaration Signed-off-by: Florian Fainelli To: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/1748/ Signed-off-by: Ralf Baechle commit 3bd27e329ca80f4946efdd12bf1f5a9bf0886e76 Author: David Daney Date: Fri Nov 5 15:12:48 2010 -0700 MIPS: Rework GENERIC_HARDIRQS Kconfig. Recent changes to CONFIG_GENERIC_HARDIRQS have caused us to start getting: warning: (SMP && SYS_SUPPORTS_SMP) selects IRQ_PER_CPU which has unmet direct dependencies (HAVE_GENERIC_HARDIRQS) Rearranging our Kconfig quiets the message. Signed-off-by: David Daney To: linux-mips@linux-mips.org Cc: Thomas Gleixner Patchwork: https://patchwork.linux-mips.org/patch/1757/ Signed-off-by: Ralf Baechle commit 690ca2ce0c824e8d3da7b2e273c2c873ab96d1e6 Author: Yoichi Yuasa Date: Mon Nov 8 17:23:52 2010 +0900 MIPS: Alchemy: Add return value check for strict_strtoul() arch/mips/alchemy/devboards/prom.c: In function 'prom_init': arch/mips/alchemy/devboards/prom.c:60: error: ignoring return value of 'strict_strtoul', declared with attribute warn_unused_result Signed-off-by: Yoichi Yuasa Cc: linux-mips Patchwork: https://patchwork.linux-mips.org/patch/1761/ Signed-off-by: Ralf Baechle commit ec79812580e360081b58c3e2e8b5b69b8080b5a0 Author: Wu Zhangjin Date: Mon Nov 8 21:25:24 2010 +0800 MIPS: Loongson: Add return value check for strict_strtoul() cc1: warnings being treated as errors arch/mips/loongson/common/env.c: In function 'prom_init_env': arch/mips/loongson/common/env.c:49: error: ignoring return value of 'strict_strtol', declared with attribute warn_unused_result arch/mips/loongson/common/env.c:50: error: ignoring return value of 'strict_strtol', declared with attribute warn_unused_result arch/mips/loongson/common/env.c:51: error: ignoring return value of 'strict_strtol', declared with attribute warn_unused_result arch/mips/loongson/common/env.c:52: error: ignoring return value of 'strict_strtol', declared with attribute warn_unused_result Signed-off-by: Wu Zhangjin Cc: linux-mips Patchwork: https://patchwork.linux-mips.org/patch/1762/ Signed-off-by: Ralf Baechle commit 863abad4f644b6c12bc8176206b35fa7e7cfe1a9 Author: Jesper Juhl Date: Sat Oct 30 18:37:16 2010 +0200 MIPS: VPE loader: Check vmalloc return value in vpe_open The return value of the vmalloc() call in arch/mips/kernel/vpe.c::vpe_open() is not checked, so we potentially store a null pointer in v->pbuffer. Add a check for a null return and then return -ENOMEM in that case. [Ralf: The check added by Jesper's original patch is where it logically should be. Adding it eleminated the need for the checks in a few other places, so I removed them. There still is a zillion of other things that need to be fixed in this file / API.] Signed-off-by: Jesper Juhl Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/1747/ Signed-off-by: Ralf Baechle commit d62c9ced7ca783e64ff4d9d3d1340cfe2284d47b Author: David Daney Date: Mon Nov 1 17:43:08 2010 -0700 MIPS: compat: Don't clobber personality bits in 32-bit sys_personality(). If PER_LINUX32 has been set on a 32-bit kernel, only twiddle with the low-order personality bits, let the upper bits pass through. Signed-off-by: David Daney To: linux-mips@linux-mips.org Cc: Camm Maguire Patchwork: https://patchwork.linux-mips.org/patch/1751/ Signed-off-by: Ralf Baechle commit 1c0d52b9b5e6ca277c13d6fece9c34ed3159423d Author: David Daney Date: Mon Nov 1 17:43:07 2010 -0700 MIPS: Don't clobber personality high bits. The high bits of current->personality carry settings that we don't want to clobber on each exec. Only clobber them if the lower bits that indicate either PER_LINUX or PER_LINUX32 are invalid. The clobbering prevents us from using useful bits like ADDR_NO_RANDOMIZE. Reported-by: Camm Maguire Signed-off-by: David Daney Cc: Camm Maguire Patchwork: https://patchwork.linux-mips.org/patch/1750/ Signed-off-by: Ralf Baechle commit 1d210386f6ef9000b1cd723cf453c5eb0377e722 Author: Lars-Peter Clausen Date: Thu Nov 4 23:25:57 2010 +0100 MIPS: jz4740: Fix section mismatch in prom.c This patch fixes the following section mismatch: WARNING: arch/mips/built-in.o(.text+0xc): Section mismatch in reference from the function jz4740_init_cmdline() to the variable .init.data:arcs_cmdline While were at it, make jz4740_init_cmdline static as well. Signed-off-by: Lars-Peter Clausen Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/1755/ Signed-off-by: Ralf Baechle commit fe749aab1d21cbb4d87527a7df8799583c233496 Author: Lars-Peter Clausen Date: Thu Nov 4 23:25:56 2010 +0100 MIPS: jz4740: qi_lb60: Fix gpio for the 6th row of the keyboard matrix This patch fixes the gpio number for the 6th row of the keyboard matrix. (And fixes a typo in my name...) Signed-off-by: Lars-Peter Clausen Cc: linux-mips@linux-mips.org Cc: stable@kernel.org Signed-off-by: https://patchwork.linux-mips.org/patch/1754/ Signed-off-by: Ralf Baechle commit a989ff898f9740651d00388c33bdf4f2a7914920 Author: Al Viro Date: Thu Nov 4 11:13:59 2010 +0000 MIPS: Don't stomp on caller's ->regs[2] in copy_thread() We never needed that (->regs[2] is overwritten on return from syscall paths with return value of syscall, so storing it there early made no sense) and with new restart logics since d27240bf7e61d2656de18e158ec910a902030847 it has become really bad - we lose the original syscall number before the place where we decide that we might need a syscall restart. Note that for child we do need the assignment to regs[2] - it won't go through the normal return from syscall path. [Ralf: Issue found and reported by Lluís; initial investigations by me; bug finally found and patch by Al; testing by me and Lluís.] Signed-off-by: Al Viro Tested-by: Lluís Batlle i Rossell Signed-off-by: Ralf Baechle commit 2b3e50234eafc40a04f5f4a2b7bb24b506fd7e87 Author: Ralf Baechle Date: Tue Nov 2 19:38:53 2010 +0000 MIPS: Swarm: Fix typo in symbol name: RTC_M4LT81 -> RTC_M41T81 Signed-off-by: Ralf Baechle commit b3444d164be8f977f4133ef0c6f4a18f2741373f Merge: 4ef5c68 da32dac Author: Linus Torvalds Date: Thu Dec 16 08:51:57 2010 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: lguest: populate initial_page_table lguest: restore boot speed lguest: fix crash lguest_time_init commit 4ef5c68f0a40a95d63c210ba7e3751540e1cb1f1 Merge: 9fe4145 947b10a Author: Linus Torvalds Date: Thu Dec 16 08:34:22 2010 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2: nilfs2: fix regression of garbage collection ioctl commit 9fe4145530e6072cc838beb95ca68cada8c56909 Merge: b0c3844 ab4e019 Author: Linus Torvalds Date: Thu Dec 16 08:33:44 2010 -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: define separate EVIOCGKEYCODE_V2/EVIOCSKEYCODE_V2 Input: wacom - add another Bamboo Pen ID (0xd4) commit f08f5a0add20834d3f3d876dfe08005a5df656db Author: Rafael J. Wysocki Date: Thu Dec 16 17:11:58 2010 +0100 PM / Runtime: Fix pm_runtime_suspended() There are some situations (e.g. in __pm_generic_call()), where pm_runtime_suspended() is used to decide whether or not to execute a device's (system) ->suspend() callback. The callback is not executed if pm_runtime_suspended() returns true, but it does so for devices that don't even support runtime PM, because the power.disable_depth device field is ignored by it. This leads to problems (i.e. devices are not suspened when they should), so rework pm_runtime_suspended() so that it returns false if the device's power.disable_depth field is different from zero. Signed-off-by: Rafael J. Wysocki Cc: stable@kernel.org commit be8cd644c49dca4212e975455c8e7119b848ebe8 Author: Rafael J. Wysocki Date: Sat Dec 11 21:46:44 2010 +0100 PM / Hibernate: Restore old swap signature to avoid user space breakage Commit 3624eb0 (PM / Hibernate: Modify signature used to mark swap) attempted to modify hibernate signature used to mark swap partitions containing hibernation images, so that old kernels don't try to handle compressed images. However, this change broke resume from hibernation on Fedora 14 that apparently doesn't pass the resume= argument to the kernel and tries to trigger resume from early user space. This doesn't work, because the signature is now different, so the old signature has to be restored to avoid the problem. Addresses https://bugzilla.kernel.org/show_bug.cgi?id=22732 . Reported-by: Dr. David Alan Gilbert Reported-by: Zhang Rui Reported-by: Pascal Chapperon Signed-off-by: Rafael J. Wysocki commit 1497dd1d29c6a53fcd3c80f7ac8d0e0239e7389e Author: Takashi Iwai Date: Fri Dec 10 00:16:39 2010 +0100 PM / Hibernate: Fix PM_POST_* notification with user-space suspend The user-space hibernation sends a wrong notification after the image restoration because of thinko for the file flag check. RDONLY corresponds to hibernation and WRONLY to restoration, confusingly. Signed-off-by: Takashi Iwai Signed-off-by: Rafael J. Wysocki Cc: stable@kernel.org commit 3e26f23091da06d02fa62da14c95f3688d27857c Author: Avi Kivity Date: Thu Dec 16 12:16:34 2010 +0200 KVM: Fix preemption counter leak in kvm_timer_init() Based on a patch from Thomas Meyer. Signed-off-by: Avi Kivity commit d949750fed168b6553ca11ed19e4affd19d7a4d7 Merge: ce67783 e63233f7 Author: Ingo Molnar Date: Thu Dec 16 11:21:24 2010 +0100 Merge branch 'tip/perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/urgent commit 8e92c20183ed0579d94501311b81c42b65cb2129 Author: Peter Zijlstra Date: Thu Dec 9 14:15:34 2010 +0100 sched: Fix the irqtime code for 32bit Since the irqtime accounting is using non-atomic u64 and can be read from remote cpus (writes are strictly cpu local, reads are not) we have to deal with observing partial updates. When we do observe partial updates the clock movement (in particular, ->clock_task movement) will go funny (in either direction), a subsequent clock update (observing the full update) will make it go funny in the oposite direction. Since we rely on these clocks to be strictly monotonic we cannot suffer backwards motion. One possible solution would be to simply ignore all backwards deltas, but that will lead to accounting artefacts, most notable: clock_task + irq_time != clock, this inaccuracy would end up in user visible stats. Therefore serialize the reads using a seqcount. Reviewed-by: Venkatesh Pallipadi Reported-by: Mikael Pettersson Tested-by: Mikael Pettersson Signed-off-by: Peter Zijlstra LKML-Reference: <1292242434.6803.200.camel@twins> Signed-off-by: Ingo Molnar commit fe44d62122829959e960bc699318d58966922a69 Author: Peter Zijlstra Date: Thu Dec 9 14:15:34 2010 +0100 sched: Fix the irqtime code to deal with u64 wraps Some ARM systems have a short sched_clock() [ which needs to be fixed too ], but this exposed a bug in the irq_time code as well, it doesn't deal with wraps at all. Fix the irq_time code to deal with u64 wraps by re-writing the code to only use delta increments, which avoids the whole issue. Reviewed-by: Venkatesh Pallipadi Reported-by: Mikael Pettersson Tested-by: Mikael Pettersson Signed-off-by: Peter Zijlstra LKML-Reference: <1292242433.6803.199.camel@twins> Signed-off-by: Ingo Molnar commit ce677831a4abd0f9f957c90ac6f6a0d0472bafb4 Author: Dan Carpenter Date: Sun Oct 24 21:50:42 2010 +0200 perf: Fix off by one in perf_swevent_init() The perf_swevent_enabled[] array has PERF_COUNT_SW_MAX elements. Signed-off-by: Dan Carpenter Signed-off-by: Peter Zijlstra LKML-Reference: <20101024195041.GT5985@bicker> Signed-off-by: Ingo Molnar commit da32dac101263fb5b155407507c548e3ac2a6a2a Author: Rusty Russell Date: Thu Dec 16 17:03:15 2010 -0600 lguest: populate initial_page_table Two x86 patches broke lguest: 1) v2.6.35-492-g72d7c3b, which changed x86 to use the memblock allocator. In lguest, the host places linear page tables at the top of mem, which used to be enough to get us up to the swapper_pg_dir page tables. With the first patch, the direct mapping tables used that memory: Before: kernel direct mapping tables up to 4000000 @ 7000-1a000 After: kernel direct mapping tables up to 4000000 @ 3fed000-4000000 I initially fixed this by lying about the amount of memory we had, so the kernel wouldn't blatt the lguest boot pagetables (yuk!), but then... 2) v2.6.36-rc8-54-gb40827f, which made x86 boot use initial_page_table. This was initialized in a part of head_32.S which isn't executed by lguest; it is then copied into swapper_pg_dir. So we have to initialize it; and anyway we switch to it before we blatt the old tables, so that fixes the previous damage as well. For the moment, I cut & pasted the code into lguest's boot code, but next merge window I will merge them. Signed-off-by: Rusty Russell Cc: Jeremy Fitzhardinge Cc: Konrad Rzeszutek Wilk To: x86@kernel.org commit bb4093deb259ea9c92415796a6a139e35272f8a8 Author: Rusty Russell Date: Thu Dec 16 17:03:15 2010 -0600 lguest: restore boot speed lguest is dumb and drops *all* the pagetables for set_pte (which is only used for kernel mapping manipulation, so it's OK without highmem). But it's used a lot in boot, too. As a guest optimization, we suppressed this flushing until the first page switch. Now we have initial_page_table, that happens much earlier, so extend the heuristic to wait until we switch to something other than the swapper_pg_dir or initial_page_table. As measured on my laptop under kvm, this dropped the time-to-mount-root from 48 seconds to 4.3 seconds. Signed-off-by: Rusty Russell commit bb6f1d9a99f1947d91693de62ed54ac3bf1e2dfe Author: Rusty Russell Date: Thu Dec 16 17:03:13 2010 -0600 lguest: fix crash lguest_time_init fe25c7fc2e "x86: lguest: Convert to new irq chip functions" converted enable_lguest_irq() to take a struct irq_data *, but didn't fix the one internal caller. Signed-off-by: Rusty Russell To: x86@kernel.org commit 947b10ae0aeda89fc066a7470fdba55f72b0b8fc Author: Ryusuke Konishi Date: Thu Dec 16 09:57:57 2010 +0900 nilfs2: fix regression of garbage collection ioctl On 2.6.37-rc1, garbage collection ioctl of nilfs was broken due to the commit 263d90cefc7d82a0 ("nilfs2: remove own inode hash used for GC"), and leading to filesystem corruption. The patch doesn't queue gc-inodes for log writer if they are reused through the vfs inode cache. Here, gc-inode is the inode which buffers blocks to be relocated on GC. That patch queues gc-inodes in nilfs_init_gcinode() function, but this function is not called when they don't have I_NEW flag. Thus, some of live blocks are wrongly overrode without being moved to new logs. This resolves the problem by moving the gc-inode queueing to an outer function to ensure it's done right. Signed-off-by: Ryusuke Konishi commit 7d13162332f2b67a941d18cee20f1c0413e020de Author: Eric Paris Date: Tue Dec 7 15:27:57 2010 -0500 fanotify: fill in the metadata_len field on struct fanotify_event_metadata The fanotify_event_metadata now has a field which is supposed to indicate the length of the metadata portion of the event. Fill in that field as well. Based-in-part-on-patch-by: Alexey Zaytsev Signed-off-by: Eric Paris commit 62731fa0c893515dc6cbc3e0a2879a92793c735f Author: Alexey Zaytsev Date: Mon Nov 22 00:33:03 2010 +0000 fanotify: split version into version and metadata_len To implement per event type optional headers we are interested in knowing how long the metadata structure is. This patch slits the __u32 version field into a __u8 version and a __u16 metadata_len field (with __u8 left over). This should allow for backwards compat ABI. Signed-off-by: Alexey Zaytsev [rewrote descrtion and changed object sizes and ordering - eparis] Signed-off-by: Eric Paris commit ac612407932be18697b5ae9da0a80f138b8bea8e Author: David Henningsson Date: Wed Dec 15 09:18:18 2010 +0100 ALSA: HDA: Enable subwoofer on Asus G73Jw Set default association/sequence right on pin 0x17 in order for the automatic parser to recognize the subwoofer correctly. Signed-off-by: David Henningsson Signed-off-by: Takashi Iwai commit ab4e0192196b8d4e43a3945742d4996da934a86f Author: Dmitry Torokhov Date: Tue Dec 14 23:53:21 2010 -0800 Input: define separate EVIOCGKEYCODE_V2/EVIOCSKEYCODE_V2 The desire to keep old names for the EVIOCGKEYCODE/EVIOCSKEYCODE while extending them to support large scancodes was a mistake. While we tried to keep ABI intact (and we succeeded in doing that, programs compiled on older kernels will work on newer ones) there is still a problem with recompiling existing software with newer kernel headers. New kernel headers will supply updated ioctl numbers and kernel will expect that userspace will use struct input_keymap_entry to set and retrieve keymap data. But since the names of ioctls are still the same userspace will happily compile even if not adjusted to make use of the new structure and will start miraculously fail in the field. To avoid this issue let's revert EVIOCGKEYCODE/EVIOCSKEYCODE definitions and add EVIOCGKEYCODE_V2/EVIOCSKEYCODE_V2 so that userspace can explicitly select the style of ioctls it wants to employ. Reviewed-by: Henrik Rydberg Acked-by: Jarod Wilson Acked-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov commit fe67b24010c66a14d84117ac67d23ed1bcb18a71 Author: David Henningsson Date: Wed Dec 15 08:01:46 2010 +0100 ALSA: HDA: Fix auto-mute on Lenovo Edge 14 BugLink: http://launchpad.net/bugs/690530 The SKU value of this machine dictates that auto-mute should be disabled. Since the SKU value is similar to the PCI SSID, the most likely conclusion is that the SKU value should be ignored. Signed-off-by: David Henningsson Signed-off-by: Takashi Iwai commit 7f99d946e71e71d484b7543b49e990508e70d0c0 Author: Suresh Siddha Date: Tue Nov 30 22:22:29 2010 -0800 x86, vt-d: Handle previous faults after enabling fault handling Fault handling is getting enabled after enabling the interrupt-remapping (as the success of interrupt-remapping can affect the apic mode and hence the fault handling mode). Hence there can potentially be some faults between the window of enabling interrupt-remapping in the vt-d and the fault-handling of the vt-d units. Handle any previous faults after enabling the vt-d fault handling. For v2.6.38 cleanup, need to check if we can remove the dmar_fault() in the enable_intr_remapping() and see if we can enable fault handling along with enabling intr-remapping. Signed-off-by: Suresh Siddha LKML-Reference: <20101201062244.630417138@intel.com> Cc: stable@kernel.org [v2.6.32+] Acked-by: Chris Wright Signed-off-by: H. Peter Anvin commit 7f7fbf45c6b748074546f7f16b9488ca71de99c1 Author: Kenji Kaneshige Date: Tue Nov 30 22:22:28 2010 -0800 x86: Enable the intr-remap fault handling after local APIC setup Interrupt-remapping gets enabled very early in the boot, as it determines the apic mode that the processor can use. And the current code enables the vt-d fault handling before the setup_local_APIC(). And hence the APIC LDR registers and data structure in the memory may not be initialized. So the vt-d fault handling in logical xapic/x2apic modes were broken. Fix this by enabling the vt-d fault handling in the end_local_APIC_setup() A cleaner fix of enabling fault handling while enabling intr-remapping will be addressed for v2.6.38. [ Enabling intr-remapping determines the usage of x2apic mode and the apic mode determines the fault-handling configuration. ] Signed-off-by: Kenji Kaneshige LKML-Reference: <20101201062244.541996375@intel.com> Signed-off-by: Suresh Siddha Cc: stable@kernel.org [v2.6.32+] Acked-by: Chris Wright Signed-off-by: H. Peter Anvin commit 086e8ced65d9bcc4a8e8f1cd39b09640f2883f90 Author: Kenji Kaneshige Date: Wed Dec 1 09:40:32 2010 -0800 x86, vt-d: Fix the vt-d fault handling irq migration in the x2apic mode In x2apic mode, we need to set the upper address register of the fault handling interrupt register of the vt-d hardware. Without this irq migration of the vt-d fault handling interrupt is broken. Signed-off-by: Kenji Kaneshige LKML-Reference: <1291225233.2648.39.camel@sbsiddha-MOBL3> Signed-off-by: Suresh Siddha Cc: stable@kernel.org [v2.6.32+] Acked-by: Chris Wright Tested-by: Takao Indoh Signed-off-by: H. Peter Anvin commit 254e42006c893f45bca48f313536fcba12206418 Author: Suresh Siddha Date: Mon Dec 6 12:26:30 2010 -0800 x86, vt-d: Quirk for masking vtd spec errors to platform error handling logic On platforms with Intel 7500 chipset, there were some reports of system hang/NMI's during kexec/kdump in the presence of interrupt-remapping enabled. During kdump, there is a window where the devices might be still using old kernel's interrupt information, while the kdump kernel is coming up. This can cause vt-d faults as the interrupt configuration from the old kernel map to null IRTE entries in the new kernel etc. (with out interrupt-remapping enabled, we still have the same issue but in this case we will see benign spurious interrupt hit the new kernel). Based on platform config settings, these platforms seem to generate NMI/SMI when a vt-d fault happens and there were reports that the resulting SMI causes the system to hang. Fix it by masking vt-d spec defined errors to platform error reporting logic. VT-d spec related errors are already handled by the VT-d OS code, so need to report the same error through other channels. Signed-off-by: Suresh Siddha LKML-Reference: <1291667190.2675.8.camel@sbsiddha-MOBL3.sc.intel.com> Cc: stable@kernel.org [v2.6.32+] Reported-by: Max Asbock Reported-and-tested-by: Takao Indoh Acked-by: Chris Wright Acked-by: Kenji Kaneshige Signed-off-by: H. Peter Anvin commit 10340ae130fb70352eae1ae8a00b7906d91bf166 Author: Suresh Siddha Date: Tue Nov 16 13:23:51 2010 -0800 x86, xsave: Use alloc_bootmem_align() instead of alloc_bootmem() Alignment of alloc_bootmem() depends on the value of L1_CACHE_SHIFT. What we need here, however, is 64 byte alignment. Use alloc_bootmem_align() and explicitly specify the alignment instead. This fixes a kernel boot crash reported by Jody when the cpu in .config is set to MPENTIUMII but the kernel is booted on a xsave-capable CPU. Reported-by: Jody Bruchon Signed-off-by: Suresh Siddha LKML-Reference: <20101116212442.059967454@sbsiddha-MOBL3.sc.intel.com> Signed-off-by: H. Peter Anvin Cc: commit 53dde5f385bc56e312f78b7cb25ffaf8efd4735d Author: Suresh Siddha Date: Tue Nov 16 13:23:50 2010 -0800 bootmem: Add alloc_bootmem_align() Add an alloc_bootmem_align() interface to allocate bootmem with specified alignment. This is necessary to be able to allocate the xsave area in a subsequent patch. Signed-off-by: Suresh Siddha LKML-Reference: <20101116212441.977574826@sbsiddha-MOBL3.sc.intel.com> Acked-by: H. Peter Anvin Signed-off-by: H. Peter Anvin Cc: commit de2a8cf98ecdde25231d6c5e7901e2cffaf32af9 Author: H. Peter Anvin Date: Mon Dec 13 16:01:38 2010 -0800 x86, gcc-4.6: Use gcc -m options when building vdso The vdso Makefile passes linker-style -m options not to the linker but to gcc. This happens to work with earlier gcc, but fails with gcc 4.6. Pass gcc-style -m options, instead. Note: all currently supported versions of gcc supports -m32, so there is no reason to conditionalize it any more. Reported-by: H. J. Lu Signed-off-by: H. Peter Anvin LKML-Reference: Cc: commit 862af8adbe6b9ccb7c00c13717b1f92465f79aa2 Author: Jarkko Nikula Date: Fri Dec 10 20:53:55 2010 +0200 ASoC: Fix bias power down of non-DAPM codec Currently bias of non-DAPM codec will be powered down (standby/off) whenever there is a stream stop. This is wrong in simultaneous playback/capture since the bias is put down immediately after stopping the first stream. Fix this by using the codec->active count when figuring out the needed bias level after stream stop. Signed-off-by: Jarkko Nikula Acked-by: Liam Girdwood Signed-off-by: Mark Brown commit f1c18071ad70e2a78ab31fc26a18fcfa954a05c6 Author: Thomas Gleixner Date: Mon Dec 13 12:43:23 2010 +0100 x86: HPET: Chose a paranoid safe value for the ETIME check commit 995bd3bb5 (x86: Hpet: Avoid the comparator readback penalty) chose 8 HPET cycles as a safe value for the ETIME check, as we had the confirmation that the posted write to the comparator register is delayed by two HPET clock cycles on Intel chipsets which showed readback problems. After that patch hit mainline we got reports from machines with newer AMD chipsets which seem to have an even longer delay. See http://thread.gmane.org/gmane.linux.kernel/1054283 and http://thread.gmane.org/gmane.linux.kernel/1069458 for further information. Boris tried to come up with an ACPI based selection of the minimum HPET cycles, but this failed on a couple of test machines. And of course we did not get any useful information from the hardware folks. For now our only option is to chose a paranoid high and safe value for the minimum HPET cycles used by the ETIME check. Adjust the minimum ns value for the HPET clockevent accordingly. Reported-Bistected-and-Tested-by: Markus Trippelsdorf Signed-off-by: Thomas Gleixner LKML-Reference: Cc: Simon Kirby Cc: Borislav Petkov Cc: Andreas Herrmann Cc: John Stultz commit 57a7872fa0f03e90be0fa224b9ea533f5b03ee4f Author: Kevin Granade Date: Fri Dec 10 23:04:02 2010 -0800 Input: wacom - add another Bamboo Pen ID (0xd4) Add the features struct and device table entry to enable yet another version of Wacom Bamboo Pen (CTL460, Product ID 0xD4). Signed-off-by: Kevin Granade Acked-by: Ping Cheng Signed-off-by: Dmitry Torokhov commit 4720dd1b3858f0da2593188cb1e57eb0d3bc4af2 Author: Thomas Gleixner Date: Thu Dec 9 17:43:21 2010 +0100 x86: io_apic: Avoid unused variable warning when CONFIG_GENERIC_PENDING_IRQ=n arch/x86/kernel/apic/io_apic.c: In function 'ack_apic_level': arch/x86/kernel/apic/io_apic.c:2433: warning: unused variable 'desc' Signed-off-by: Andrew Morton LKML-Reference: <201010272107.o9RL7rse018212@imap1.linux-foundation.org> Signed-off-by: Thomas Gleixner commit a0968628097380be52db8b4664da98fc425546a5 Author: Seungwhan Youn Date: Thu Dec 9 18:07:52 2010 +0900 ASoC: WM8580: Fix R8 initial value Acc to WM8580 manual, the default value for R8 is 0x10, not 0x1c. Signed-off-by: Seungwhan Youn Acked-by: Liam Girdwood Signed-off-by: Mark Brown Cc: stable@kernel.org commit 3f343f8512c7882a3637d9aea4ec6b3801cbcdc5 Author: Dmitry Artamonow Date: Wed Dec 8 23:36:17 2010 +0300 ASoC: fix deemphasis control in wm8904/55/60 codecs Deemphasis control's .get callback should update control's value instead of returning it - return value of callback function is used for indicating error or success of operation. Signed-off-by: Dmitry Artamonow Acked-by: Liam Girdwood Signed-off-by: Mark Brown Cc: stable@kernel.org commit dbd87b5af055a0cc9bba17795c9a2b0d17795389 Author: Heiko Carstens Date: Wed Dec 1 10:11:09 2010 +0100 nohz: Fix get_next_timer_interrupt() vs cpu hotplug This fixes a bug as seen on 2.6.32 based kernels where timers got enqueued on offline cpus. If a cpu goes offline it might still have pending timers. These will be migrated during CPU_DEAD handling after the cpu is offline. However while the cpu is going offline it will schedule the idle task which will then call tick_nohz_stop_sched_tick(). That function in turn will call get_next_timer_intterupt() to figure out if the tick of the cpu can be stopped or not. If it turns out that the next tick is just one jiffy off (delta_jiffies == 1) tick_nohz_stop_sched_tick() incorrectly assumes that the tick should not stop and takes an early exit and thus it won't update the load balancer cpu. Just afterwards the cpu will be killed and the load balancer cpu could be the offline cpu. On 2.6.32 based kernel get_nohz_load_balancer() gets called to decide on which cpu a timer should be enqueued (see __mod_timer()). Which leads to the possibility that timers get enqueued on an offline cpu. These will never expire and can cause a system hang. This has been observed 2.6.32 kernels. On current kernels __mod_timer() uses get_nohz_timer_target() which doesn't have that problem. However there might be other problems because of the too early exit tick_nohz_stop_sched_tick() in case a cpu goes offline. The easiest and probably safest fix seems to be to let get_next_timer_interrupt() just lie and let it say there isn't any pending timer if the current cpu is offline. I also thought of moving migrate_[hr]timers() from CPU_DEAD to CPU_DYING, but seeing that there already have been fixes at least in the hrtimer code in this area I'm afraid that this could add new subtle bugs. Signed-off-by: Heiko Carstens Signed-off-by: Peter Zijlstra LKML-Reference: <20101201091109.GA8984@osiris.boeblingen.de.ibm.com> Cc: stable@kernel.org Signed-off-by: Ingo Molnar commit f26f9aff6aaf67e9a430d16c266f91b13a5bff64 Author: Mike Galbraith Date: Wed Dec 8 11:05:42 2010 +0100 Sched: fix skip_clock_update optimization idle_balance() drops/retakes rq->lock, leaving the previous task vulnerable to set_tsk_need_resched(). Clear it after we return from balancing instead, and in setup_thread_stack() as well, so no successfully descheduled or never scheduled task has it set. Need resched confused the skip_clock_update logic, which assumes that the next call to update_rq_clock() will come nearly immediately after being set. Make the optimization robust against the waking a sleeper before it sucessfully deschedules case by checking that the current task has not been dequeued before setting the flag, since it is that useless clock update we're trying to save, and clear unconditionally in schedule() proper instead of conditionally in put_prev_task(). Signed-off-by: Mike Galbraith Reported-by: Bjoern B. Brandenburg Tested-by: Yong Zhang Signed-off-by: Peter Zijlstra Cc: stable@kernel.org LKML-Reference: <1291802742.1417.9.camel@marge.simson.net> Signed-off-by: Ingo Molnar commit 0f004f5a696a9434b7214d0d3cbd0525ee77d428 Author: Peter Zijlstra Date: Tue Nov 30 19:48:45 2010 +0100 sched: Cure more NO_HZ load average woes There's a long-running regression that proved difficult to fix and which is hitting certain people and is rather annoying in its effects. Damien reported that after 74f5187ac8 (sched: Cure load average vs NO_HZ woes) his load average is unnaturally high, he also noted that even with that patch reverted the load avgerage numbers are not correct. The problem is that the previous patch only solved half the NO_HZ problem, it addressed the part of going into NO_HZ mode, not of comming out of NO_HZ mode. This patch implements that missing half. When comming out of NO_HZ mode there are two important things to take care of: - Folding the pending idle delta into the global active count. - Correctly aging the averages for the idle-duration. So with this patch the NO_HZ interaction should be complete and behaviour between CONFIG_NO_HZ=[yn] should be equivalent. Furthermore, this patch slightly changes the load average computation by adding a rounding term to the fixed point multiplication. Reported-by: Damien Wyart Reported-by: Tim McGrath Tested-by: Damien Wyart Tested-by: Orion Poplawski Tested-by: Kyle McMartin Signed-off-by: Peter Zijlstra Cc: stable@kernel.org Cc: Chase Douglas LKML-Reference: <1291129145.32004.874.camel@laptop> Signed-off-by: Ingo Molnar commit 5167695753c63444a9e6cbbef136200a16c7a225 Author: Peter Zijlstra Date: Tue Dec 7 14:18:20 2010 +0100 perf: Fix duplicate events with multiple-pmu vs software events Because the multi-pmu bits can share contexts between struct pmu instances we could get duplicate events by iterating the pmu list. Signed-off-by: Peter Zijlstra Signed-off-by: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar commit 73c1160ce377d8fc6d84cb630ebf9658808bec49 Author: Andre Przywara Date: Wed Dec 1 12:17:44 2010 +0100 KVM: enlarge number of possible CPUID leaves Currently the number of CPUID leaves KVM handles is limited to 40. My desktop machine (AthlonII) already has 35 and future CPUs will expand this well beyond the limit. Extend the limit to 80 to make room for future processors. KVM-Stable-Tag. Signed-off-by: Andre Przywara Signed-off-by: Avi Kivity commit 24d1b15f72abe3465e871d11cfc9dc34d1aab8b2 Author: Joerg Roedel Date: Tue Dec 7 17:15:05 2010 +0100 KVM: SVM: Do not report xsave in supported cpuid To support xsave properly for the guest the SVM module need software support for it. As long as this is not present do not report the xsave as supported feature in cpuid. As a side-effect this patch moves the bit() helper function into the x86.h file so that it can be used in svm.c too. KVM-Stable-Tag. Signed-off-by: Joerg Roedel Signed-off-by: Avi Kivity commit 3ea3aa8cf67d3bbe00a19b6a4013d19efa7d0f41 Author: Sheng Yang Date: Wed Dec 8 10:49:43 2010 +0800 KVM: Fix OSXSAVE after migration CPUID's OSXSAVE is a mirror of CR4.OSXSAVE bit. We need to update the CPUID after migration. KVM-Stable-Tag. Signed-off-by: Sheng Yang Signed-off-by: Avi Kivity commit fdbf3ceeb659f0b3c0e8dd79b331b7ac05910f1e Author: Lino Sanfilippo Date: Wed Nov 24 18:26:04 2010 +0100 fanotify: Dont try to open a file descriptor for the overflow event We should not try to open a file descriptor for the overflow event since this will always fail. Signed-off-by: Lino Sanfilippo Signed-off-by: Eric Paris commit e9a3854fd4ff3907e6c200a3980e19365ee695e9 Author: Lino Sanfilippo Date: Wed Nov 24 18:22:09 2010 +0100 fanotify: Introduce FAN_NOFD FAN_NOFD is used in fanotify events that do not provide an open file descriptor (like the overflow_event). Signed-off-by: Lino Sanfilippo Signed-off-by: Eric Paris commit 26379198937fcc9bbe7be76be695d06df8334eaa Author: Eric Paris Date: Tue Nov 23 23:48:26 2010 -0500 fanotify: do not leak user reference on allocation failure If fanotify_init is unable to allocate a new fsnotify group it will return but will not drop its reference on the associated user struct. Drop that reference on error. Reported-by: Vegard Nossum Signed-off-by: Eric Paris commit a2ae4cc9a16e211c8a128ba10d22a85431f093ab Author: Eric Paris Date: Tue Nov 23 18:18:37 2010 -0500 inotify: stop kernel memory leak on file creation failure If inotify_init is unable to allocate a new file for the new inotify group we leak the new group. This patch drops the reference on the group on file allocation failure. Reported-by: Vegard Nossum cc: stable@kernel.org Signed-off-by: Eric Paris commit 09e5f14e57c70f9d357862bb56e57026c51092a1 Author: Lino Sanfilippo Date: Fri Nov 19 10:58:07 2010 +0100 fanotify: on group destroy allow all waiters to bypass permission check When fanotify_release() is called, there may still be processes waiting for access permission. Currently only processes for which an event has already been queued into the groups access list will be woken up. Processes for which no event has been queued will continue to sleep and thus cause a deadlock when fsnotify_put_group() is called. Furthermore there is a race allowing further processes to be waiting on the access wait queue after wake_up (if they arrive before clear_marks_by_group() is called). This patch corrects this by setting a flag to inform processes that the group is about to be destroyed and thus not to wait for access permission. [additional changelog from eparis] Lets think about the 4 relevant code paths from the PoV of the 'operator' 'listener' 'responder' and 'closer'. Where operator is the process doing an action (like open/read) which could require permission. Listener is the task (or in this case thread) slated with reading from the fanotify file descriptor. The 'responder' is the thread responsible for responding to access requests. 'Closer' is the thread attempting to close the fanotify file descriptor. The 'operator' is going to end up in: fanotify_handle_event() get_response_from_access() (THIS BLOCKS WAITING ON USERSPACE) The 'listener' interesting code path fanotify_read() copy_event_to_user() prepare_for_access_response() (THIS CREATES AN fanotify_response_event) The 'responder' code path: fanotify_write() process_access_response() (REMOVE A fanotify_response_event, SET RESPONSE, WAKE UP 'operator') The 'closer': fanotify_release() (SUPPOSED TO CLEAN UP THE REST OF THIS MESS) What we have today is that in the closer we remove all of the fanotify_response_events and set a bit so no more response events are ever created in prepare_for_access_response(). The bug is that we never wake all of the operators up and tell them to move along. You fix that in fanotify_get_response_from_access(). You also fix other operators which haven't gotten there yet. So I agree that's a good fix. [/additional changelog from eparis] [remove additional changes to minimize patch size] [move initialization so it was inside CONFIG_FANOTIFY_PERMISSION] Signed-off-by: Lino Sanfilippo Signed-off-by: Eric Paris commit 1734dee4e3a296cb72b4819fc2e7ef2440737dff Author: Lino Sanfilippo Date: Mon Nov 22 18:46:33 2010 +0100 fanotify: Dont allow a mask of 0 if setting or removing a mark In mark_remove_from_mask() we destroy marks that have their event mask cleared. Thus we should not allow the creation of those marks in the first place. With this patch we check if the mask given from user is 0 in case of FAN_MARK_ADD. If so we return an error. Same for FAN_MARK_REMOVE since this does not have any effect. Signed-off-by: Lino Sanfilippo Signed-off-by: Eric Paris commit fa218ab98c31eeacd12b89501e6b99d146ea56cc Author: Lino Sanfilippo Date: Tue Nov 9 18:18:16 2010 +0100 fanotify: correct broken ref counting in case adding a mark failed If adding a mount or inode mark failed fanotify_free_mark() is called explicitly. But at this time the mark has already been put into the destroy list of the fsnotify_mark kernel thread. If the thread is too slow it will try to decrease the reference of a mark, that has already been freed by fanotify_free_mark(). (If its fast enough it will only decrease the marks ref counter from 2 to 1 - note that the counter has been increased to 2 in add_mark() - which has practically no effect.) This patch fixes the ref counting by not calling free_mark() explicitly, but decreasing the ref counter and rely on the fsnotify_mark thread to cleanup in case adding the mark has failed. Signed-off-by: Lino Sanfilippo Signed-off-by: Eric Paris commit b1085ba80cd2784400a7beec3fda5099198ed01c Author: Lino Sanfilippo Date: Fri Nov 5 17:05:27 2010 +0100 fanotify: if set by user unset FMODE_NONOTIFY before fsnotify_perm() is called Unsetting FMODE_NONOTIFY in fsnotify_open() is too late, since fsnotify_perm() is called before. If FMODE_NONOTIFY is set fsnotify_perm() will skip permission checks, so a user can still disable permission checks by setting this flag in an open() call. This patch corrects this by unsetting the flag before fsnotify_perm is called. Signed-off-by: Lino Sanfilippo Signed-off-by: Eric Paris commit 88d60c32765716289abeb362c44adf6c35c6824c Author: Eric Paris Date: Mon Nov 8 18:19:22 2010 -0500 fanotify: remove packed from access response message Since fanotify has decided to be careful about alignment and packing rather than rely on __attribute__((packed)) for multiarch support. Since this attribute isn't doing anything on fanotify_response we just drop it. This does not break API/ABI. Suggested-by: Tvrtko Ursulin Signed-off-by: Eric Paris commit ecf6f5e7d68471b08603f7c20143ac236602364f Author: Eric Paris Date: Mon Nov 8 18:08:14 2010 -0500 fanotify: deny permissions when no event was sent If no event was sent to userspace we cannot expect userspace to respond to permissions requests. Today such requests just hang forever. This patch will deny any permissions event which was unable to be sent to userspace. Reported-by: Tvrtko Ursulin Signed-off-by: Eric Paris commit e63233f75a1a6bfa97ffb52a20cc6801a4c63fb2 Author: John Reiser Date: Mon Nov 22 19:41:44 2010 -0800 ftrace: Have recordmcount honor endianness in fn_ELF_R_INFO It looks to me like the change which introduced "virtual functions" forgot about cross-platform endianness. Thank you to Arnaud for supplying before+after data files do_mounts*.o. This fixes a MIPS build failure triggered by recordmcount. Reported-by: Arnaud Lacombe Tested-by: Arnaud Lacombe Acked-by: Wu Zhangjin Acked-by: Ralf Baechle Signed-off-by: John Reiser Signed-off-by: Steven Rostedt commit 15664125f7cadcb6d725cb2d9b90f9715397848d Author: Peter Zijlstra Date: Wed Nov 24 10:43:55 2010 +0100 scripts/tags.sh: Add magic for trace-events Make tags find the trace-event definitions Acked-by: WANG Cong Signed-off-by: Peter Zijlstra LKML-Reference: <1290591835.2072.438.camel@laptop> Signed-off-by: Steven Rostedt commit 673eb9ff33e26ee6f4278cdab06749aef1bbef5b Author: Laurent Pinchart Date: Sun Nov 21 16:54:56 2010 -0300 [media] uvcvideo: Convert to unlocked_ioctl The uvcvideo driver now locks all ioctls correctly on its own, the BKL isn't needed anymore. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 6947756dfcecc493062a46e77f6bf51dddb5be75 Author: Laurent Pinchart Date: Sun Nov 21 13:36:34 2010 -0300 [media] uvcvideo: Lock stream mutex when accessing format-related information The stream mutex protects access to the struct uvc_streaming ctrl, cur_format and cur_frame fields as well as to the hardware probe control. Lock it appropriately. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 4aa275975beee41fd542a0f6df8cd0fee06089bf Author: Laurent Pinchart Date: Sun Nov 21 15:18:08 2010 -0300 [media] uvcvideo: Move mmap() handler to uvc_queue.c The mmap() implementation belongs to the video buffers queue, move it there. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 8e815e1763b8d4e5adf0dc14bde8c55329cf95a8 Author: Laurent Pinchart Date: Sun Nov 21 14:46:44 2010 -0300 [media] uvcvideo: Move mutex lock/unlock inside uvc_free_buffers Callers outside uvc_queue.c should not be forced to lock/unlock the queue mutex manually. Move the mutex operations inside uvc_free_buffers(). Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 23d9f3ef23f0dc4bb20ccd5540b9a91ff08da08f Author: Laurent Pinchart Date: Sun Nov 21 07:58:54 2010 -0300 [media] uvcvideo: Lock controls mutex when querying menus uvc_find_control() must be called with the controls mutex locked. Fix uvc_query_v4l2_menu() accordingly. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit ca9afe6f87b569cdf8e797395381f18ae23a2905 Author: Hans Verkuil Date: Fri Nov 26 06:54:53 2010 -0300 [media] v4l2-dev: fix race condition The unregister function had a race condition with the v4l2_open function. Ensure that both functions test and clear the REGISTER flag from within a critical section. Thanks to Laurent Pinchart for finding this race. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 879aa24d6394aa04b690a600a41ff500441ad384 Author: Hans Verkuil Date: Fri Nov 26 06:47:28 2010 -0300 [media] V4L: improve the BKL replacement heuristic The BKL replacement mutex had some serious performance side-effects on V4L drivers. It is replaced by a better heuristic that works around the worst of the side-effects. Read the v4l2-dev.c comments for the whole sorry story. This is a temporary measure only until we can convert all v4l drivers to use unlocked_ioctl. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2877842de8cbf6272b0a851cb12587b7dd8c2afb Author: Hans Verkuil Date: Fri Nov 26 06:43:51 2010 -0300 [media] v4l2-dev: use mutex_lock_interruptible instead of plain mutex_lock Where reasonable use mutex_lock_interruptible instead of mutex_lock. Also fix the poll, read and write error codes when called with an unregistered device (e.g. after a USB device was disconnected). Poll must return POLLERR|POLLHUP and read/write must return -ENODEV. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 78b055be2710b63cb196fc37669f3b662fecc9e4 Author: Hans Verkuil Date: Fri Nov 19 17:04:31 2010 -0300 [media] cx18: convert to unlocked_ioctl Also added locking around snd_cx18_pcm_ioctl as a precaution as requested by Andy Walls. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4f68775b7dfc6115169f689a42535486bf10977e Author: Hans Verkuil Date: Tue Nov 16 18:13:06 2010 -0300 [media] radio-timb: convert to unlocked_ioctl Signed-off-by: Hans Verkuil Acked-by: Richard Röjfors Signed-off-by: Mauro Carvalho Chehab commit 697566939dc60048fca6e6dd69c7e089aaeb7ff8 Author: Hans Verkuil Date: Tue Nov 16 18:12:16 2010 -0300 [media] sh_vou: convert to unlocked_ioctl Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 20aa5bb9dc4b5aba1b4d0f15aa92c4e83721a343 Author: Hans Verkuil Date: Sun Nov 14 13:09:21 2010 -0300 [media] cafe_ccic: replace ioctl by unlocked_ioctl Trivial change, approved by Jonathan Corbet . Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ca2621963de3934613f8aa63e19c03b1751707ae Author: Hans Verkuil Date: Sun Nov 14 11:17:00 2010 -0300 [media] et61x251_core: trivial conversion to unlocked_ioctl Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit feecf93d6b16887bf7e12fcc604bfba9048b2fa5 Author: Hans Verkuil Date: Sun Nov 14 11:13:39 2010 -0300 [media] sn9c102: convert to unlocked_ioctl Trivial conversion, this driver used a mutex already. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 61df3c9b3fe6a7e47d25b27ae4df0ecdb07b8fbd Author: Hans Verkuil Date: Sun Nov 14 10:09:38 2010 -0300 [media] BKL: trivial ioctl -> unlocked_ioctl video driver conversions These drivers could be trivially converted to unlocked_ioctl since they already did locking. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d2c998f7453af7ad416bc38d09ae9d453d2fac5e Author: Hans Verkuil Date: Sun Nov 14 09:49:34 2010 -0300 [media] typhoon: convert to unlocked_ioctl Convert the typhoon driver from ioctl to unlocked_ioctl. When doing this I noticed a bug where curfreq was not initialized correctly to mutefreq (it wasn't multiplied by 16). The initialization is now also done before the device node is created. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 725ea8cf1c1f5ba53177d20d2d2f6dbc139b643e Author: Hans Verkuil Date: Sun Nov 14 09:48:24 2010 -0300 [media] si4713: convert to unlocked_ioctl Convert ioctl to unlocked_ioctl. Note that for this driver the locking is done inside the sub-device. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ee71e42321cced11fecb989d743ad9cdb0c384ea Author: Hans Verkuil Date: Sun Nov 14 09:46:23 2010 -0300 [media] tea5764: convert to unlocked_ioctl Convert from ioctl to unlocked_ioctl using the v4l2 core lock. Also removed the 'exclusive access' limitation. There was no need for it and it violates the v4l2 spec as well. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1cccee0b84e3445a142d0e9edcbf66b677b2e7e5 Author: Hans Verkuil Date: Sun Nov 14 09:43:52 2010 -0300 [media] cadet: use unlocked_ioctl Converted from ioctl to unlocked_ioctl. This driver already used an internal lock, but it was missing in cadet_open and cadet_release and it was not used correctly in cadet_read. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 32958fdd1663aeaa23b5edbfbb0db684ffd4e20e Author: Hans Verkuil Date: Sun Nov 14 09:36:23 2010 -0300 [media] BKL: trivial BKL removal from V4L2 radio drivers The patch converts a bunch of V4L2 radio drivers to unlocked_ioctl. These are all simple conversions: most already had a lock and so the ioctl fop could simply be replaced by unlocked_ioctl. radio-miropcm20.c was converted to use the new V4L2 core lock. While doing this work I noticed that many of these drivers initialized some more fields or muted audio or something like that *after* creating the device node. This should be done before the device node is created to prevent problems. Especially hal tends to grab a device node as soon as it is created. In one or two cases the mutex_init was even done after the device creation! Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 364829b1263b44aa60383824e4c1289d83d78ca7 Author: Slava Pestov Date: Wed Nov 24 15:13:16 2010 -0800 tracing: Fix panic when lseek() called on "trace" opened for writing The file_ops struct for the "trace" special file defined llseek as seq_lseek(). However, if the file was opened for writing only, seq_open() was not called, and the seek would dereference a null pointer, file->private_data. This patch introduces a new wrapper for seq_lseek() which checks if the file descriptor is opened for reading first. If not, it does nothing. Cc: Signed-off-by: Slava Pestov LKML-Reference: <1290640396-24179-1-git-send-email-slavapestov@google.com> Signed-off-by: Steven Rostedt