commit 17d857be649a21ca90008c6dc425d849fa83db5c Author: Linus Torvalds Date: Sun Sep 27 14:57:48 2009 -0700 Linux 2.6.32-rc1 commit b3b75cef705708402b5d381a30fa17f89e0549b4 Author: Linus Torvalds Date: Sun Sep 27 14:46:05 2009 -0700 alpha: Fix duplicate include .. duplicated by merging the same fix twice, for details see commit 0d9df2515dbceb67d343c0f10fd3ff218380d524 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes") Signed-off-by: Linus Torvalds commit f278a2f7bbc2239f479eaf63d0b3ae573b1d746c Author: Dave Young Date: Sun Sep 27 16:00:42 2009 +0000 tty: Fix regressions caused by commit b50989dc The following commit made console open fails while booting: commit b50989dc444599c8b21edc23536fc305f4e9b7d5 Author: Alan Cox Date: Sat Sep 19 13:13:22 2009 -0700 tty: make the kref destructor occur asynchronously Due to tty release routines run in a workqueue now, error like the following will be reported while booting: INIT open /dev/console Input/output error It also causes hibernation regression to appear as reported at http://bugzilla.kernel.org/show_bug.cgi?id=14229 The reason is that now there's latency issue with closing, but when we open a "closing not finished" tty, -EIO will be returned. Fix it as per the following Alan's suggestion: Fun but it's actually not a bug and the fix is wrong in itself as the port may be closing but not yet being destructed, in which case it seems to do the wrong thing. Opening a tty that is closing (and could be closing for long periods) is supposed to return -EIO. I suspect a better way to deal with this and keep the old console timing is to split tty->shutdown into two functions. tty->shutdown() - called synchronously just before we dump the tty onto the waitqueue for destruction tty->cleanup() - called when the destructor runs. We would then do the shutdown part which can occur in IRQ context fine, before queueing the rest of the release (from tty->magic = 0 ... the end) to occur asynchronously The USB update in -next would then need a call like if (tty->cleanup) tty->cleanup(tty); at the top of the async function and the USB shutdown to be split between shutdown and cleanup as the USB resource cleanup and final tidy cannot occur synchronously as it needs to sleep. In other words the logic becomes final kref put make object unfindable async clean it up Signed-off-by: Dave Young [ rjw: Rebased on top of 2.6.31-git, reworked the changelog. ] Signed-off-by: "Rafael J. Wysocki" [ Changed serial naming to match new rules, dropped tty_shutdown as per comments from Alan Stern - Linus ] Signed-off-by: Linus Torvalds commit 569ec4cc779c8aae03a4659939d08822c9e4a242 Author: Linus Torvalds Date: Sun Sep 27 11:58:36 2009 -0700 ACPI: kill "unused variable ‘i’" warning Commit 3d5b6fb47a8e68fa311ca2c3447e7f8a7c3a9cf3 ("ACPI: Kill overly verbose "power state" log messages") removed the actual use of this variable, but didn't remove the variable itself, resulting in build warnings like drivers/acpi/processor_idle.c: In function ‘acpi_processor_power_init’: drivers/acpi/processor_idle.c:1169: warning: unused variable ‘i’ Just get rid of the now unused variable. Signed-off-by: Linus Torvalds commit f0f37e2f77731b3473fa6bd5ee53255d9a9cdb40 Author: Alexey Dobriyan Date: Sun Sep 27 22:29:37 2009 +0400 const: mark struct vm_struct_operations * mark struct vm_area_struct::vm_ops as const * mark vm_ops in AGP code But leave TTM code alone, something is fishy there with global vm_ops being used. Signed-off-by: Alexey Dobriyan Signed-off-by: Linus Torvalds commit 6f5071020d5ec89b5d095aa488db604adb921aec Merge: 73964f6 7403f41 Author: Linus Torvalds Date: Sun Sep 27 10:39:04 2009 -0700 Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: hrtimer: Eliminate needless reprogramming of clock events device commit 73964f6bc8e378715887592abe8a512f403db6a8 Merge: 9d98ece e56d953 Author: Linus Torvalds Date: Sun Sep 27 10:38:48 2009 -0700 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: ACPI: IA64=y ACPI=n build fix ACPI: Kill overly verbose "power state" log messages ACPI: fix Compaq Evo N800c (Pentium 4m) boot hang regression ACPI: Clarify resource conflict message thinkpad-acpi: fix CONFIG_THINKPAD_ACPI_HOTKEY_POLL build problem commit 9d98ece16f1a1df0f456a2ee9429d03e82e839a2 Merge: ba77d20 d949f36 Author: Linus Torvalds Date: Sun Sep 27 10:38:34 2009 -0700 Merge branch 'x86-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: Fix hwpoison code related build failure on 32-bit NUMAQ commit e56d953d190061938b31cabbe01b7f3d76c60bd0 Author: Len Brown Date: Sun Sep 27 04:17:21 2009 -0400 ACPI: IA64=y ACPI=n build fix ia64's sim_defconfig uses CONFIG_ACPI=n which now #define's acpi_disabled in So we shouldn't re-define it here in Signed-off-by: Len Brown commit 3d5b6fb47a8e68fa311ca2c3447e7f8a7c3a9cf3 Author: Roland Dreier Date: Thu Sep 24 14:52:36 2009 -0700 ACPI: Kill overly verbose "power state" log messages I was recently lucky enough to get a 64-CPU system, so my kernel log ends up with 64 lines like: ACPI: CPU0 (power states: C1[C1] C2[C3]) This is pretty useless clutter because this info is already available after boot from both /sys/devices/system/cpu/cpu*/cpuidle/state?/ as well as /proc/acpi/processor/CPU*/power. So just delete the code that prints the C-states in processor_idle.c. Signed-off-by: Roland Dreier Signed-off-by: Len Brown commit d949f36f1865c60239d4265b50c4b75354fcb8f3 Author: Linus Torvalds Date: Sat Sep 26 09:35:07 2009 -0700 x86: Fix hwpoison code related build failure on 32-bit NUMAQ This build failure triggers: In file included from include/linux/suspend.h:8, from arch/x86/kernel/asm-offsets_32.c:11, from arch/x86/kernel/asm-offsets.c:2: include/linux/mm.h:503:2: error: #error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > BITS_PER_LONG - NR_PAGEFLAGS Because due to the hwpoison page flag we ran out of page flags on 32-bit. Dont turn on hwpoison on 32-bit NUMA (it's rare in any case). Also clean up the Kconfig dependencies in the generic MM code by introducing ARCH_SUPPORTS_MEMORY_FAILURE. Signed-off-by: Linus Torvalds Signed-off-by: Ingo Molnar commit 3e2ada5867b7e9fa0b296d30fa8f3726ebd0a8b7 Author: Zhao Yakui Date: Sun Sep 27 03:30:51 2009 -0400 ACPI: fix Compaq Evo N800c (Pentium 4m) boot hang regression Don't disable ARB_DISABLE when the familary ID is 0x0F. http://bugzilla.kernel.org/show_bug.cgi?id=14211 This was a 2.6.31 regression, and so this patch needs to be applied to 2.6.31.stable Signed-off-by: Zhao Yakui Signed-off-by: Len Brown commit 14f03343ad1080c2fea29ab2c13f05b976c4584e Author: Jean Delvare Date: Tue Sep 8 15:31:46 2009 +0200 ACPI: Clarify resource conflict message The message "ACPI: Device needs an ACPI driver" is misleading. The device _may_ need an ACPI driver, if the BIOS implemented a custom API for the device in question (which, AFAIK, can't be checked.) If not, then either a generic ACPI driver may be used (for example "thermal"), or nothing can be done (other than a white list). I propose to reword the message to: ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver which I think is more correct. Comments and suggestions welcome. I also added a message warning about possible problems and system instability when users pass acpi_enforce_resources=lax, as suggested by Len. Signed-off-by: Jean Delvare Cc: Thomas Renninger Cc: Alan Jenkins Signed-off-by: Len Brown commit b684a3637e0887683a0a3d6fd471fc41d7c1606a Author: Henrique de Moraes Holschuh Date: Sat Sep 26 21:42:49 2009 -0300 thinkpad-acpi: fix CONFIG_THINKPAD_ACPI_HOTKEY_POLL build problem Fix this problem when CONFIG_THINKPAD_ACPI_HOTKEY_POLL is undefined: CHECK drivers/platform/x86/thinkpad_acpi.c drivers/platform/x86/thinkpad_acpi.c:1968:21: error: not an lvalue CC [M] drivers/platform/x86/thinkpad_acpi.o drivers/platform/x86/thinkpad_acpi.c: In function 'tpacpi_hotkey_driver_mask_set': drivers/platform/x86/thinkpad_acpi.c:1968: error: lvalue required as left operand of assignment Reported-by: Noah Dain Reported-by: Audrius Kazukauskas Signed-off-by: Henrique de Moraes Holschuh Signed-off-by: Len Brown commit ba77d20ff56028128259a9282d06b938073f169c Merge: 0d9df25 2c86963 Author: Linus Torvalds Date: Sat Sep 26 13:39:21 2009 -0700 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: [IA64] implement ticket locks for Itanium commit 0d9df2515dbceb67d343c0f10fd3ff218380d524 Merge: cce1d9f de078ef Author: Linus Torvalds Date: Sat Sep 26 10:51:54 2009 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes * git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes: alpha: fix build after vmlinux.lds.S cleanup mips: fix build of vmlinux.lds commit cce1d9f23213f3a8a43b6038df84a665aa8d8612 Merge: d910fc7 f16a5db Author: Linus Torvalds Date: Sat Sep 26 10:50:47 2009 -0700 Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds * 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds: leds: move leds-clevo-mail's probe function to .devinit.text leds: Fix indentation in LEDS_LP3944 Kconfig entry leds: Fix LED names leds: Fix leds-pca9532 whitespace issues leds: fix coding style in worker thread code for ledtrig-gpio. leds: gpio-leds: fix typographics fault leds: Add WM831x status LED driver commit d910fc786014ac3fb72f837c329c112e0c7a9aea Merge: 1d1764c a7998ce Author: Linus Torvalds Date: Sat Sep 26 10:49:42 2009 -0700 Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight * 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight: backlight: new driver for ADP5520/ADP5501 MFD PMICs backlight: extend event support to also support poll() backlight/eeepc-laptop: Update the backlight state when we change brightness backlight/acpi: Update the backlight state when we change brightness backlight: Allow drivers to update the core, and generate events on changes backlight: switch to da903x driver to dev_pm_ops backlight: Add support for the Avionic Design Xanthos backlight device. backlight: spi driver for LMS283GF05 LCD backlight: move hp680-bl's probe function to .devinit.text backlight: Add support for new Apple machines. backlight: mbp_nvidia_bl: add support for MacBookAir 1,1 backlight: Add WM831x backlight driver Trivial conflicts due to '#ifdef CONFIG_PM' differences in drivers/video/backlight/da903x_bl.c commit 1d1764c39815db55e10b2d78732db4d6dd9d6039 Author: Alexey Dobriyan Date: Sat Sep 26 19:37:22 2009 +0400 headers: kref.h redux * remove asm/atomic.h inclusion from kref.h -- not needed, linux/types.h is enough for atomic_t * remove linux/kref.h inclusion from files which do not need it. Signed-off-by: Alexey Dobriyan Signed-off-by: Linus Torvalds commit 3b383767c41be070cae24875789d97b42a3e71a8 Merge: 49e70dd 9beba3c Author: Linus Torvalds Date: Sat Sep 26 10:15:53 2009 -0700 Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: futex: Add memory barrier commentary to futex_wait_queue_me() futex: Fix wakeup race by setting TASK_INTERRUPTIBLE before queue_me() futex: Correct futex_q woken state commentary futex: Make function kernel-doc commentary consistent futex: Correct queue_me and unqueue_me commentary futex: Correct futex_wait_requeue_pi() commentary commit 49e70dda359660f20fa21d03bfae132e15c78195 Merge: 179b914 725b136 Author: Linus Torvalds Date: Sat Sep 26 10:15:33 2009 -0700 Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: perf tools: Dont use openat() perf tools: Fix buffer allocation perf tools: .gitignore += perf*.html perf tools: Handle relative paths while loading module symbols perf tools: Fix module symbol loading bug perf_event, x86: Fix 'perf sched record' crashing the machine perf_event: Update PERF_EVENT_FORK header definition perf stat: Fix zero total printouts commit 179b9145d58eb7158d4053a8308b9fc4608a6d6b Merge: 4187e7e 89133f9 Author: Linus Torvalds Date: Sat Sep 26 10:14:41 2009 -0700 Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: clocksource: Resume clocksource without taking the clocksource mutex commit 4187e7e9f1294afdcb3be5d00aa74412a1c2ded8 Merge: 5bb241b 115e8a2 Author: Linus Torvalds Date: Sat Sep 26 10:13:54 2009 -0700 Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: modules, tracing: Remove stale struct marker signature from module_layout() tracing/workqueue: Use %pf in workqueue trace events tracing: Fix a comment and a trivial format issue in tracepoint.h tracing: Fix failure path in ftrace_regex_open() tracing: Fix failure path in ftrace_graph_write() tracing: Check the return value of trace_get_user() tracing: Fix off-by-one in trace_get_user() commit 5bb241b325d7d91bc4ec0b394f31dffb17fe7978 Merge: 76e0134 704daf5 Author: Linus Torvalds Date: Sat Sep 26 10:13:35 2009 -0700 Merge branch 'x86-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: Remove redundant non-NUMA topology functions x86: early_printk: Protect against using the same device twice x86: Reduce verbosity of "PAT enabled" kernel message x86: Reduce verbosity of "TSC is reliable" message x86: mce: Use safer ways to access MCE registers x86: mce, inject: Use real inject-msg in raise_local x86: mce: Fix thermal throttling message storm x86: mce: Clean up thermal throttling state tracking code x86: split NX setup into separate file to limit unstack-protected code xen: check EFER for NX before setting up GDT mapping x86: Cleanup linker script using new linker script macros. x86: Use section .data.page_aligned for the idt_table. x86: convert to use __HEAD and HEAD_TEXT macros. x86: convert compressed loader to use __HEAD and HEAD_TEXT macros. x86: fix fragile computation of vsyscall address commit 76e0134f4154aeadac833c2daea32102c64c0bb0 Merge: bfebb14 e96c928 Author: Linus Torvalds Date: Sat Sep 26 10:12:03 2009 -0700 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (32 commits) ACPI: i2c-scmi: don't use acpi_device_uid() ACPI: simplify building device HID/CID list ACPI: remove acpi_device_uid() and related stuff ACPI: remove acpi_device.flags.hardware_id ACPI: remove acpi_device.flags.compatible_ids ACPI: maintain a single list of _HID and _CID IDs ACPI: make sure every acpi_device has an ID ACPI: use acpi_device_hid() when possible ACPI: fix synthetic HID for \_SB_ ACPI: handle re-enumeration, when acpi_devices might already exist ACPI: factor out device type and status checking ACPI: add acpi_bus_get_status_handle() ACPI: use acpi_walk_namespace() to enumerate devices ACPI: identify device tree root by null parent pointer, not ACPI_BUS_TYPE ACPI: enumerate namespace before adding functional fixed hardware devices ACPI: convert acpi_bus_scan() to operate on an acpi_handle ACPI: add acpi_bus_get_parent() and remove "parent" arguments ACPI: remove unnecessary argument checking ACPI: remove redundant "type" arguments ACPI: remove acpi_device_set_context() "type" argument ... commit bfebb1406329667f2cccb50fad1de87f573b2c1a Merge: 07e2e6b a72bfd4 Author: Linus Torvalds Date: Sat Sep 26 10:11:13 2009 -0700 Merge branch 'writeback' of git://git.kernel.dk/linux-2.6-block * 'writeback' of git://git.kernel.dk/linux-2.6-block: writeback: pass in super_block to bdi_start_writeback() commit 07e2e6ba2761291aa182993ebba1f490b5005dcc Merge: d8f654e 3321b79 Author: Linus Torvalds Date: Sat Sep 26 10:10:35 2009 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: cifs: fix locking and list handling code in cifs_open and its helper [CIFS] Remove build warning cifs: fix problems with last two commits [CIFS] Fix build break when keys support turned off cifs: eliminate cifs_init_private cifs: convert oplock breaks to use slow_work facility (try #4) cifs: have cifsFileInfo hold an extra inode reference cifs: take read lock on GlobalSMBSes_lock in is_valid_oplock_break cifs: remove cifsInodeInfo.oplockPending flag cifs: fix oplock request handling in posix codepath [CIFS] Re-enable Lanman security commit d8f654ef6a55495e548427b997a388e0d5a1ffb4 Merge: 052a0cf 99c4a63 Author: Linus Torvalds Date: Sat Sep 26 10:09:39 2009 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: at91_can: Forgotten git 'add' of at91_can.c TI Davinci EMAC: Fix in vector definition for EMAC_VERSION_2 ax25: Fix ax25_cb refcounting in ax25_ctl_ioctl virtio_net: Check for room in the vq before adding buffer virtio_net: avoid (most) NETDEV_TX_BUSY by stopping queue early. virtio_net: formalize skb_vnet_hdr virtio_net: don't free buffers in xmit ring virtio_net: return NETDEV_TX_BUSY instead of queueing an extra skb. virtio_net: skb_orphan() and nf_reset() in xmit path. commit 052a0cf6f85a136dc0654ec3c2d25ddd4495c65d Merge: 9e6ec39 87ba005 Author: Linus Torvalds Date: Sat Sep 26 10:08:23 2009 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: sparc64: vio: Kill BUILD_BUG_ON() in vio_dring_avail(). Trivial conflict in arch/sparc/include/asm/vio.h due to David removing the whole messy BUG_ON that was confused. commit 9e6ec39becb02bda776eebf12c0677910d54b848 Author: Nicolas Pitre Date: Fri Sep 25 16:28:02 2009 -0400 make Linux bootable on ARM again Commit 200b812d00 "Clear the exclusive monitor when returning from an exception" broke the vast majority of ARM systems in the wild which are still pre ARMv6. The kernel is crashing on the first occurrence of an exception due to the removal of the actual return instruction for them. Let's add it back. Signed-off-by: Nicolas Pitre Acked-by: Uwe Kleine-König Signed-off-by: Linus Torvalds commit a7998cecf5073e0755feeb7fd50b2bdc08dea6bd Author: Michael Hennerich Date: Thu Sep 17 14:29:52 2009 -0400 backlight: new driver for ADP5520/ADP5501 MFD PMICs Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu Signed-off-by: Mike Frysinger Signed-off-by: Richard Purdie commit 89dfc28ccbff6521a4df9dc3699a94bbde11a6ed Author: Henrique de Moraes Holschuh Date: Sun Sep 20 14:44:47 2009 -0300 backlight: extend event support to also support poll() Extend the backlight event support to also allow the use of poll()/select() on actual_brightness. We already have the entire event hookup anyway, adding a single function call in one line to get functionality like that is a really good deal. Signed-off-by: Henrique de Moraes Holschuh Signed-off-by: Richard Purdie commit e96c9284bdffa1f1d39a502c3d3b71fd8cce7014 Author: Bjorn Helgaas Date: Fri Sep 25 21:11:43 2009 -0600 ACPI: i2c-scmi: don't use acpi_device_uid() We recently removed the acpi_device_uid() interface because nobody used it. I don't think it's essential here either. Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown commit 2b474ad8473f57c2930b2bda6c397c3aa8d97896 Merge: ea26105 67bcae6 Author: Len Brown Date: Sat Sep 26 01:08:55 2009 -0400 Merge branch 'thinkpad-2.6.32-part2' into release commit ea2610515755614da76677185349c66880c1e84d Merge: 6d7f18f 57f3674 Author: Len Brown Date: Sat Sep 26 01:08:43 2009 -0400 Merge branch 'bjorn-HID' into release commit a72bfd4dea053bb8e2233902c3f1893ef5485802 Author: Jens Axboe Date: Sat Sep 26 00:07:46 2009 +0200 writeback: pass in super_block to bdi_start_writeback() Sometimes we only want to write pages from a specific super_block, so allow that to be passed in. This fixes a problem with commit 56a131dcf7ed36c3c6e36bea448b674ea85ed5bb causing writeback on all super_blocks on a bdi, where we only really want to sync a specific sb from writeback_inodes_sb(). Signed-off-by: Jens Axboe commit 99c4a6344f6574c97019ac16e8d54bfe5ad21f2d Author: David S. Miller Date: Fri Sep 25 12:14:43 2009 -0700 at91_can: Forgotten git 'add' of at91_can.c Signed-off-by: David S. Miller commit 43c2ed8e9e2d285be49d7ea1afc05071d5d7b0f9 Author: Sriram Date: Thu Sep 24 19:15:18 2009 +0000 TI Davinci EMAC: Fix in vector definition for EMAC_VERSION_2 In the emac_poll function when looking for interrupt status masks correct definition must be chosen based on EMAC_VERSION(the bit mask has changed from version 1 to version 2). Signed-off-by: Sriram Acked-by: Chaithrika U S Signed-off-by: David S. Miller commit c0181d420cc1a506ca4418ce90e2ad89831eee2c Author: Jarek Poplawski Date: Fri Sep 25 03:10:38 2009 +0000 ax25: Fix ax25_cb refcounting in ax25_ctl_ioctl Use ax25_cb_put after ax25_find_cb in ax25_ctl_ioctl. Reported-by: Bernard Pidoux F6BVP Signed-off-by: Jarek Poplawski Reviewed-by: Ralf Baechle Signed-off-by: David S. Miller commit 57f3674f5e9c7b1102ae62fc2920d2fa09fce1ea Author: Bjorn Helgaas Date: Mon Sep 21 13:35:40 2009 -0600 ACPI: simplify building device HID/CID list Minor code cleanup, no functional change. Instead of remembering what HIDs & CIDs to add later, just add them immediately. Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown commit 6622d8cee73a26bce958484065c8f0e704911a62 Author: Bjorn Helgaas Date: Mon Sep 21 13:35:35 2009 -0600 ACPI: remove acpi_device_uid() and related stuff Nobody uses acpi_device_uid(), so this patch removes it. Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown commit 1131b938f0757350f569f8ad5bee737cd02b8e58 Author: Bjorn Helgaas Date: Mon Sep 21 13:35:29 2009 -0600 ACPI: remove acpi_device.flags.hardware_id Every acpi_device has at least one ID (if there's no _HID or _CID, we give it a synthetic or default ID). So there's no longer a need to check whether an ID exists; we can just use it. Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown commit b2972f87508a21db7584d11fdb5c97cb7101a788 Author: Bjorn Helgaas Date: Mon Sep 21 13:35:24 2009 -0600 ACPI: remove acpi_device.flags.compatible_ids We now keep a single list of IDs that includes both the _HID and any _CIDs. We no longer need to keep track of whether the device has a _CID. Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown commit 7f47fa6c2ff15f5e59cdbb350f86faef6829294a Author: Bjorn Helgaas Date: Mon Sep 21 13:35:19 2009 -0600 ACPI: maintain a single list of _HID and _CID IDs There's no need to treat _HID and _CID differently. Keeping them in a single list makes code that uses the IDs a little simpler because it can just traverse the list rather than checking "do we have a HID?", "do we have any CIDs?" Signed-off-by: Bjorn Helgaas Reviewed-by: Alex Chiang Signed-off-by: Len Brown commit b1fbfb2ae8f2f0e04219218da6f52f7313466899 Author: Bjorn Helgaas Date: Mon Sep 21 13:35:14 2009 -0600 ACPI: make sure every acpi_device has an ID This makes sure every acpi_device has at least one ID. If we build an acpi_device for a namespace node with no _HID or _CID, we sometimes synthesize an ID like "LNXCPU" or "LNXVIDEO". If we don't even have that, give it a default "device" ID. Note that this means things like: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/HWP0001:00/HWP0002:04/device:00 (a PCI slot SxFy device) will have "hid" and "modprobe" entries, where they didn't before. These aren't very useful (a HID of "device" doesn't tell you what *kind* of device it is, so it doesn't help find a driver), but I don't think they're harmful. Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown commit ea8d82fd316208bd0ffe6f64823d04bcb8c57158 Author: Bjorn Helgaas Date: Mon Sep 21 13:35:09 2009 -0600 ACPI: use acpi_device_hid() when possible Use acpi_device_hid() rather than accessing acpi_device.pnp.hardware_id directly. Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown commit 78b8e141f8458ba0b8ac53c45bc327112c53887e Author: Bjorn Helgaas Date: Mon Sep 21 13:35:04 2009 -0600 ACPI: fix synthetic HID for \_SB_ This makes \_SB_ show up as /sys/devices/LNXSYSTM:00/LNXSYBUS:00 rather than "device:00". This has been broken for a loooong time (at least since 2.6.13) because device->parent is an acpi_device pointer, not a handle. Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown commit e3b87f8a9d5a61f6367c66d1bb0a4e19d251194d Author: Bjorn Helgaas Date: Mon Sep 21 19:30:11 2009 +0000 ACPI: handle re-enumeration, when acpi_devices might already exist acpi_bus_scan() traverses the namespace to enumerate devices and uses acpi_add_single_object() to create acpi_devices. When the platform notifies us of a hot-plug event, we need to traverse part of the namespace again to figure out what appeared or disappeared. (We don't yet call acpi_bus_scan() during hot-plug, but I plan to do that in the future.) This patch makes acpi_add_single_object() notice when we already have an acpi_device, so we don't need to make a new one. Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown commit 778cbc1d3abd434b6d882714630235e3711bb15b Author: Bjorn Helgaas Date: Mon Sep 21 19:30:06 2009 +0000 ACPI: factor out device type and status checking This patch adds acpi_bus_type_and_status(), which determines the type of the object and whether we want to build an acpi_device for it. If it is acpi_device-worthy, it returns the type and the device's current status. Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown commit 402ac53614bce0c273c73a80339556bf56dd3d39 Author: Bjorn Helgaas Date: Mon Sep 21 19:30:01 2009 +0000 ACPI: add acpi_bus_get_status_handle() Add acpi_bus_get_status_handle() so we can get the status of a namespace object before building a struct acpi_device. This removes a use of "device->flags.dynamic_status", a cached indicator of whether _STA exists. It seems simpler and more reliable to just evaluate _STA and catch AE_NOT_FOUND errors. Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown commit 51a85faf2d4ffecd8384b3f501f9f7ee2b05ee53 Author: Bjorn Helgaas Date: Mon Sep 21 19:29:56 2009 +0000 ACPI: use acpi_walk_namespace() to enumerate devices acpi_bus_scan() currently walks the namespace manually. This patch changes it to use acpi_walk_namespace() instead. Besides removing some complicated code, this means we take advantage of the namespace locking done by acpi_walk_namespace(). The locking isn't so important at boot-time, but I hope to eventually use this same path to handle hot-addition of devices, when it will be important. Note that acpi_walk_namespace() does not actually visit the starting node first, so we need to do that by hand first. Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown commit 859ac9a4be0c753cece0e30a2e4a65fd2cdcaeee Author: Bjorn Helgaas Date: Mon Sep 21 19:29:50 2009 +0000 ACPI: identify device tree root by null parent pointer, not ACPI_BUS_TYPE We can identify the root of the ACPI device tree by the fact that it has no parent. This is simpler than passing around ACPI_BUS_TYPE_SYSTEM and will help remove special treatment of the device tree root. Currently, we add the root by hand with ACPI_BUS_TYPE_SYSTEM. If we traverse the tree treating the root as just another device and use acpi_get_type(), the root shows up as ACPI_TYPE_DEVICE. Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown commit adc08e2035f1859d4b129f42b2c2305ef090d226 Author: Bjorn Helgaas Date: Mon Sep 21 19:29:45 2009 +0000 ACPI: enumerate namespace before adding functional fixed hardware devices This patch changes the order so we enumerate in the "root, namespace, functional fixed" order instead of the "root, functional fixed, namespace" order. When I change acpi_bus_scan() to use acpi_walk_namespace(), it will use the former order, so this patch isolates the order change for bisectability. Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown commit 8e029bf0a611ea3995bd1fae0285cbaf6eed7f16 Author: Bjorn Helgaas Date: Mon Sep 21 19:29:40 2009 +0000 ACPI: convert acpi_bus_scan() to operate on an acpi_handle This patch changes acpi_bus_scan() to take an acpi_handle rather than an acpi_device pointer. I plan to use acpi_bus_scan() in the hotplug path, and I'd rather not assume that notifications only go to nodes that already have acpi_devices. This will also help remove the special case for adding the root node. We currently add the root by hand before acpi_bus_scan(), but using a handle here means we can start the acpi_bus_scan() directly with the root even though it doesn't have an acpi_device yet. Note that acpi_bus_scan() currently adds and/or starts the *children* of its device argument. It doesn't do anything with the device itself. Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown commit 5c478f499c9e6a3ac542c940f7b434686f4967a5 Author: Bjorn Helgaas Date: Mon Sep 21 19:29:35 2009 +0000 ACPI: add acpi_bus_get_parent() and remove "parent" arguments This patch adds acpi_bus_get_parent(), which ascends the namespace until it finds a parent with an acpi_device. Then we use acpi_bus_get_parent() in acpi_add_single_object(), so callers don't have to figure out or keep track of the parent acpi_device. Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown commit 77c24888b7693eecee904308e0ee51f7f1f564df Author: Bjorn Helgaas Date: Mon Sep 21 19:29:30 2009 +0000 ACPI: remove unnecessary argument checking acpi_add_single_object() is static, and all callers supply a valid "child" argument, so we don't need to check it. This patch also remove some unnecessary initializations. Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown commit c7bcb4e98aca348f6f8ab432496ff35ba7a49a1d Author: Bjorn Helgaas Date: Mon Sep 21 19:29:25 2009 +0000 ACPI: remove redundant "type" arguments We now save the ACPI bus "device_type" in the acpi_device structure, so we don't need to pass it around explicitly anymore. Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown commit bc3b07726aa288e2a5e60d9a1dd8188b3faa7385 Author: Bjorn Helgaas Date: Mon Sep 21 19:29:20 2009 +0000 ACPI: remove acpi_device_set_context() "type" argument We only pass the "type" to acpi_device_set_context() so we know whether the device has a handle to which we can attach the acpi_device pointer. But it's safer to just check for the handle directly, since it's in the acpi_device already. Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown commit ccba2a36d74a9da815e597ac727cfd096fa8e750 Author: Bjorn Helgaas Date: Mon Sep 21 19:29:15 2009 +0000 ACPI: use device_type rather than comparing HID Check the acpi_device device_type rather than the HID. Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown commit caaa6efb3d82d0102db9e7094ca5773c46e6780c Author: Bjorn Helgaas Date: Mon Sep 21 19:29:10 2009 +0000 ACPI: save device_type in acpi_device Most uses of the ACPI bus device_type (ACPI_BUS_TYPE_DEVICE, ACPI_BUS_TYPE_POWER, etc) are during device initialization, but we do need it later for notify handler installation, since that is different for fixed hardware devices vs. namespace devices. This patch saves the device_type in the acpi_device structure, so we can check that rather than comparing against the _HID string. Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown commit 66b7ed40aaf153d634aabff409a0dda675f37f45 Author: Bjorn Helgaas Date: Mon Sep 21 19:29:05 2009 +0000 ACPI: remove redundant "handle" and "parent" arguments In several cases, functions take handle and parent device pointers in addition to acpi_device pointers. But the acpi_device structure contains both the handle and the parent pointer, so it's pointless and error-prone to pass them all. This patch removes the unnecessary "handle" and "parent" arguments. Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown commit e8b945c9c155d06e1d1ea594f8e18e01aa36f612 Author: Bjorn Helgaas Date: Mon Sep 21 19:28:59 2009 +0000 ACPI: remove unused acpi_bus_scan_fixed() argument We never use the "root" argument, so just remove it. Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown commit 29aaefa68f933110e577fbf3ca360c88331e5ff5 Author: Bjorn Helgaas Date: Mon Sep 21 19:28:54 2009 +0000 ACPI: add debug for device addition Add debug output for adding an ACPI device. Enable this with "acpi.debug_layer=0x00010000" (ACPI_BUS_COMPONENT). Signed-off-by: Bjorn Helgaas Signed-off-by: Len Brown commit b24715027aab5e586c4ab1d035f3e543307dea69 Author: Bjorn Helgaas Date: Mon Sep 21 19:28:49 2009 +0000 ACPICA: fixup after acpi_get_object_info() change Commit 15b8dd53f5ffa changed info->hardware_id from a static array to a pointer. If hardware_id is non-NULL, it points to a NULL-terminated string, so we don't need to terminate it explicitly. However, it may be NULL; in that case, we *can't* add a NULL terminator. This causes a NULL pointer dereference oops for devices without _HID. Signed-off-by: Bjorn Helgaas CC: Lin Ming CC: Bob Moore CC: Gary Hade Signed-off-by: Len Brown commit a91eba5b9db4c09f53c8f23327915c7c75d3235f Merge: b827357 0aea51c Author: David S. Miller Date: Fri Sep 25 11:09:08 2009 -0700 Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-davem commit 3321b791b2e8897323f8c044a0c77ff25781381c Author: Jeff Layton Date: Fri Sep 25 09:53:37 2009 -0400 cifs: fix locking and list handling code in cifs_open and its helper The patch to remove cifs_init_private introduced a locking imbalance. It didn't remove the leftover list addition code and the unlocking in that function. cifs_new_fileinfo does the list addition now, so there should be no need to do it outside of that function. pCifsInode will never be NULL, so we don't need to check for that. This patch also gets rid of the ugly locking and unlocking across function calls. Signed-off-by: Jeff Layton Acked-by: Steve French Signed-off-by: Steve French commit de078ef55c74d02ee93d44513da5ee88a089d71d Author: Sam Ravnborg Date: Fri Sep 25 19:53:43 2009 +0200 alpha: fix build after vmlinux.lds.S cleanup Add include to get missing THREAD_SIZE definition Signed-off-by: Sam Ravnborg Cc: Tim Abbott Cc: Ivan Kokshaysky Cc: Richard Henderson commit d71789b6fa37c21ce5eb588d279f57904a62e7e2 Author: Manuel Lauss Date: Thu Sep 24 21:44:24 2009 +0200 mips: fix build of vmlinux.lds Commit 51b563fc93c8cb5bff1d67a0a71c374e4a4ea049 ("arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash 4.0") removed a few CPPFLAGS with vital include paths necessary to build vmlinux.lds on MIPS, and moved the calculation of the 'jiffies' symbol directly to vmlinux.lds.S but forgot to change make ifdef/... to cpp macros. Signed-off-by: Manuel Lauss [sam: moved assignment of CPPFLAGS arch/mips/kernel/Makefile] Signed-off-by: Sam Ravnborg Acked-by: Dmitri Vorobiev commit 6d7f18f6ea3a13af95bdf507fc54d42b165e1712 Merge: 53cddfc 56a131d Author: Linus Torvalds Date: Fri Sep 25 09:27:30 2009 -0700 Merge branch 'writeback' of git://git.kernel.dk/linux-2.6-block * 'writeback' of git://git.kernel.dk/linux-2.6-block: writeback: writeback_inodes_sb() should use bdi_start_writeback() writeback: don't delay inodes redirtied by a fast dirtier writeback: make the super_block pinning more efficient writeback: don't resort for a single super_block in move_expired_inodes() writeback: move inodes from one super_block together writeback: get rid to incorrect references to pdflush in comments writeback: improve readability of the wb_writeback() continue/break logic writeback: cleanup writeback_single_inode() writeback: kupdate writeback shall not stop when more io is possible writeback: stop background writeback when below background threshold writeback: balance_dirty_pages() shall write more than dirtied pages fs: Fix busyloop in wb_writeback() commit 56a131dcf7ed36c3c6e36bea448b674ea85ed5bb Author: Jens Axboe Date: Fri Sep 25 17:15:03 2009 +0200 writeback: writeback_inodes_sb() should use bdi_start_writeback() Pointless to iterate other devices looking for a super, when we have a bdi mapping. Signed-off-by: Jens Axboe commit b3af9468aebf5fcb573d0a116b31d2be1d43c0e9 Author: Wu Fengguang Date: Fri Sep 25 06:04:10 2009 +0200 writeback: don't delay inodes redirtied by a fast dirtier Debug traces show that in per-bdi writeback, the inode under writeback almost always get redirtied by a busy dirtier. We used to call redirty_tail() in this case, which could delay inode for up to 30s. This is unacceptable because it now happens so frequently for plain cp/dd, that the accumulated delays could make writeback of big files very slow. So let's distinguish between data redirty and metadata only redirty. The first one is caused by a busy dirtier, while the latter one could happen in XFS, NFS, etc. when they are doing delalloc or updating isize. The inode being busy dirtied will now be requeued for next io, while the inode being redirtied by fs will continue to be delayed to avoid repeated IO. CC: Jan Kara CC: Theodore Ts'o CC: Dave Chinner CC: Chris Mason CC: Christoph Hellwig Signed-off-by: Wu Fengguang Signed-off-by: Jens Axboe commit 9ecc2738ac2371f88dff5d48914b4e35c45203cd Author: Jens Axboe Date: Thu Sep 24 15:25:11 2009 +0200 writeback: make the super_block pinning more efficient Currently we pin the inode->i_sb for every single inode. This increases cache traffic on sb->s_umount sem. Lets instead cache the inode sb pin state and keep the super_block pinned for as long as keep writing out inodes from the same super_block. Signed-off-by: Jens Axboe commit cf137307cd9827495b65e7d74ea2b610daa9898b Author: Jens Axboe Date: Thu Sep 24 15:12:57 2009 +0200 writeback: don't resort for a single super_block in move_expired_inodes() If we only moved inodes from a single super_block to the temporary list, there's no point in doing a resort for multiple super_blocks. Signed-off-by: Jens Axboe commit 5c03449d34debca0deab58046377e1175c1bcd7e Author: Shaohua Li Date: Thu Sep 24 14:42:33 2009 +0200 writeback: move inodes from one super_block together __mark_inode_dirty adds inode to wb dirty list in random order. If a disk has several partitions, writeback might keep spindle moving between partitions. To reduce the move, better write big chunk of one partition and then move to another. Inodes from one fs usually are in one partion, so idealy move indoes from one fs together should reduce spindle move. This patch tries to address this. Before per-bdi writeback is added, the behavior is write indoes from one fs first and then another, so the patch restores previous behavior. The loop in the patch is a bit ugly, should we add a dirty list for each superblock in bdi_writeback? Test in a two partition disk with attached fio script shows about 3% ~ 6% improvement. Signed-off-by: Shaohua Li Reviewed-by: Wu Fengguang Signed-off-by: Jens Axboe commit 5b0830cb9085f4b69f9d57d7f3aaff322ffbec26 Author: Jens Axboe Date: Wed Sep 23 19:37:09 2009 +0200 writeback: get rid to incorrect references to pdflush in comments Signed-off-by: Jens Axboe commit 71fd05a887e0f3f6bfff76ff81b33776177d0606 Author: Jens Axboe Date: Wed Sep 23 19:32:26 2009 +0200 writeback: improve readability of the wb_writeback() continue/break logic And throw some comments in there, too. Reviewed-by: Wu Fengguang Signed-off-by: Jens Axboe commit ae1b7f7d4b9ea587fda95c38301f4e72e8146634 Author: Wu Fengguang Date: Wed Sep 23 20:33:42 2009 +0800 writeback: cleanup writeback_single_inode() Make the if-else straight in writeback_single_inode(). No behavior change. Cc: Jan Kara Cc: Michael Rubin Cc: Peter Zijlstra Signed-off-by: Fengguang Wu Signed-off-by: Jens Axboe commit 7fbdea32328312c65870c397a0a436c3226c8631 Author: Wu Fengguang Date: Wed Sep 23 20:33:41 2009 +0800 writeback: kupdate writeback shall not stop when more io is possible Fix the kupdate case, which disregards wbc.more_io and stop writeback prematurely even when there are more inodes to be synced. wbc.more_io should always be respected. Also remove the pages_skipped check. It will set when some page(s) of some inode(s) cannot be written for now. Such inodes will be delayed for a while. This variable has nothing to do with whether there are other writeable inodes. CC: Jan Kara CC: Dave Chinner CC: Peter Zijlstra Signed-off-by: Wu Fengguang Signed-off-by: Jens Axboe commit d3ddec7635b6fb37cb49e3553bdeea59642be653 Author: Wu Fengguang Date: Wed Sep 23 20:33:40 2009 +0800 writeback: stop background writeback when below background threshold Treat bdi_start_writeback(0) as a special request to do background write, and stop such work when we are below the background dirty threshold. Also simplify the (nr_pages <= 0) checks. Since we already pass in nr_pages=LONG_MAX for WB_SYNC_ALL and background writes, we don't need to worry about it being decreased to zero. Reported-by: Richard Kennedy CC: Jan Kara Acked-by: Peter Zijlstra Signed-off-by: Wu Fengguang Signed-off-by: Jens Axboe commit 3a2e9a5a2afc1a2d2c548b8987f133235cebe933 Author: Wu Fengguang Date: Wed Sep 23 21:56:00 2009 +0800 writeback: balance_dirty_pages() shall write more than dirtied pages Some filesystem may choose to write much more than ratelimit_pages before calling balance_dirty_pages_ratelimited_nr(). So it is safer to determine number to write based on real number of dirtied pages. Otherwise it is possible that loop { btrfs_file_write(): dirty 1024 pages balance_dirty_pages(): write up to 48 pages (= ratelimit_pages * 1.5) } in which the writeback rate cannot keep up with dirty rate, and the dirty pages go all the way beyond dirty_thresh. The increased write_chunk may make the dirtier more bumpy. So filesystems shall be take care not to dirty too much at a time (eg. > 4MB) without checking the ratelimit. Signed-off-by: Wu Fengguang Acked-by: Peter Zijlstra Signed-off-by: Jens Axboe commit a5989bdc981ec85e0734ac22519cc0b780813d7b Author: Jan Kara Date: Wed Sep 16 19:22:48 2009 +0200 fs: Fix busyloop in wb_writeback() If all inodes are under writeback (e.g. in case when there's only one inode with dirty pages), wb_writeback() with WB_SYNC_NONE work basically degrades to busylooping until I_SYNC flags of the inode is cleared. Fix the problem by waiting on I_SYNC flags of an inode on b_more_io list in case we failed to write anything. Tested-by: Wu Fengguang Signed-off-by: Jan Kara Signed-off-by: Jens Axboe commit 2c86963b093c1a0887dfc6b32c6e5ea3a80f2922 Author: Tony Luck Date: Fri Sep 25 08:42:16 2009 -0700 [IA64] implement ticket locks for Itanium Back in January 2008 Nick Piggin implemented "ticket" spinlocks for X86 (See commit 314cdbefd1fd0a7acf3780e9628465b77ea6a836). IA64 implementation has a couple of differences because of the available atomic operations ... e.g. we have no fetchadd2 instruction that operates on a 16-bit quantity so we make ticket locks use a 32-bit word for each of the current ticket and now-serving values. Performance on uncontended locks is about 8% worse than the previous implementation, but this seems a good trade for determinism in the contended case. Performance impact on macro-level benchmarks is in the noise. Signed-off-by: Tony Luck commit 53cddfcc0e760d2b364878b6dadbd0c6d087cfae Merge: c09c2d1 a79aebf Author: Linus Torvalds Date: Fri Sep 25 07:44:14 2009 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: sh_mobile_ceu_camera: fix compile breakage, caused by a bad merge sh: Add support DMA Engine to SH7780 sh: Add support DMA Engine to SH7722 sh: enable onenand support in kfr2r09 defconfig. sh: update defconfigs. sh: add FSI driver support for ms7724se sh: Fix up uninitialized variable use caught by gcc 4.4. sh: Handle unaligned 16-bit instructions on SH-2A. sh: mach-ecovec24: Add active low setting for sh_eth sh: includecheck fix: dwarf.c commit c09c2d1089b55a3da7058a2f1a76c2f21c8b0688 Merge: 5c3cc20 38461c5 Author: Linus Torvalds Date: Fri Sep 25 07:24:42 2009 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog * git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog: [WATCHDOG] Add support for the Avionic Design Xanthos watchdog timer. commit 5c3cc2084dd9dc26b258f88abb629550090956e0 Merge: 851b147 b827357 Author: Linus Torvalds Date: Fri Sep 25 07:22:11 2009 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (94 commits) genetlink: fix netns vs. netlink table locking (2) 3c59x: Get rid of "Trying to free already-free IRQ" tunnel: eliminate recursion field ems_pci: fix size of CAN controllers BAR mapping for CPC-PCI v2 net: fix htmldocs sunrpc, clnt.c Phonet: error on broadcast sending (unimplemented) Phonet: fix race for port number in concurrent bind() pktgen: better scheduler friendliness pktgen: T_TERMINATE flag is unused ipv4: check optlen for IP_MULTICAST_IF option ath9k: Initialize txgain and rxgain for newer AR9287 chipsets. iwlagn: fix panic in iwl{5000,4965}_rx_reply_tx ath9k: Fix RFKILL bugs drivers/net/wireless: Use usb_endpoint_dir_out cfg80211: don't overwrite privacy setting wl12xx: fix kconfig/link errors rt2x00: fix the definition of rt2x00crypto_rx_insert_iv iwlwifi: reduce noise when skb allocation fails iwlwifi: do not send sync command while holding spinlock mac80211: fix DTIM setting ... commit 704daf55c7297e727021063cb5d8ba1c55b84426 Merge: b0c6fbe 123f3e1 Author: Ingo Molnar Date: Fri Sep 25 10:45:32 2009 +0200 Merge branch 'x86/asm' into x86/urgent Merge reason: The linker script cleanups are ready for upstream. Signed-off-by: Ingo Molnar commit 38461c5c084ec9119f481f27629d84283733b82a Author: Thierry Reding Date: Wed Sep 23 13:49:52 2009 +0200 [WATCHDOG] Add support for the Avionic Design Xanthos watchdog timer. This patch adds support for the watchdog timer on Avionic Design Xanthos boards. Signed-off-by: Thierry Reding Acked-by: Russell King Signed-off-by: Wim Van Sebroeck commit a79aebfca1e597c1aab4b8e327028f96f5ea9095 Author: Guennadi Liakhovetski Date: Fri Sep 25 13:36:51 2009 +0900 sh_mobile_ceu_camera: fix compile breakage, caused by a bad merge Signed-off-by: Guennadi Liakhovetski Acked-by: Mauro Carvalho Chehab Signed-off-by: Paul Mundt commit ecb6fd529942c143c8837dfb11262009c77e9c77 Author: Nobuhiro Iwamatsu Date: Thu Mar 12 07:31:45 2009 +0000 sh: Add support DMA Engine to SH7780 Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Paul Mundt commit 8255fff45b2a9b53f8bf39147157ddaf9c72a585 Author: Nobuhiro Iwamatsu Date: Thu Mar 12 07:31:41 2009 +0000 sh: Add support DMA Engine to SH7722 Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Paul Mundt commit c373ba999103fa794f041eab5bd490714d2dee88 Merge: 6f3529f 851b147 Author: Paul Mundt Date: Fri Sep 25 12:15:15 2009 +0900 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 commit 6f3529f00a0a9ac06413d18d3926adf099cb59af Author: Paul Mundt Date: Fri Sep 25 11:55:07 2009 +0900 sh: enable onenand support in kfr2r09 defconfig. Signed-off-by: Paul Mundt commit 5d65498b09316c744609617ffd7d59dbc18c7031 Author: Paul Mundt Date: Fri Sep 25 11:53:02 2009 +0900 sh: update defconfigs. Signed-off-by: Paul Mundt commit 15dd478107fb110689ef09d276d84051b31b7e5c Author: Steve French Date: Fri Sep 25 02:24:45 2009 +0000 [CIFS] Remove build warning Acked-by: Jeff Layton Signed-off-by: Steve French commit 5d2c0e225982c667167264a62252308f78727f44 Author: Jeff Layton Date: Thu Sep 24 20:35:33 2009 -0400 cifs: fix problems with last two commits Fix problems with commits: 086f68bd97126618ecb2dcff5f766f3a21722df7 3bc303c254335dbd7c7012cc1760b12f1d5514d3 Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 3e9ad52b95e259e68c7dcb69a25d58047ed51094 Author: Kuninori Morimoto Date: Fri Aug 21 01:24:54 2009 +0000 sh: add FSI driver support for ms7724se Signed-off-by: Kuninori Morimoto Acked-by: Mark Brown Signed-off-by: Paul Mundt commit 0f59e61c1f034b8088086bc85dc777af2ad3e836 Author: Steve French Date: Fri Sep 25 00:33:37 2009 +0000 [CIFS] Fix build break when keys support turned off Acked-by: Jeff Layton Signed-off-by: Steve French commit 851b147e4411df6a1e7e90e2a609773c277eefd2 Merge: 8e44e43 85233c4 Author: Linus Torvalds Date: Thu Sep 24 17:25:09 2009 -0700 Merge branch 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev * 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev: m32r: Cleanup linker script using new linker script macros. m32r: Move the spi_stack_top and spu_stack_top into .init.data section. m32r: Remove unused .altinstructions and .exit.* code from linker script. m32r: Move GET_THREAD_INFO definition out of asm/thread_info.h. m32r: Define THREAD_SIZE only once. m32r: make PAGE_SIZE available to assembly. commit 8e44e4347735229b518cc02938c351428bcd7492 Merge: 06aab5a 09dd3fc Author: Linus Torvalds Date: Thu Sep 24 17:22:31 2009 -0700 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: Fix build of cpm_uart due to core changes powerpc/8xx: Fix regression introduced by cache coherency rewrite powerpc/4xx: Fix erroneous xmon warning on PowerPC 4xx powerpc/mm: Fix 40x and 8xx vs. _PAGE_SPECIAL powerpc: Cleanup linker script using new linker script macros. powerpc: Fix ibm,client-architecture-support printout powerpc: Increase NODES_SHIFT on 64bit from 4 to 8 powerpc/perf_counter: Fix vdso detection powerpc: Move 64bit heap above 1TB on machines with 1TB segments powerpc: Change archdata dma_data to a union powerpc: Rename get_dma_direct_offset get_dma_offset powerpc/mm: Remove duplicated #include powerpc/book3e-64: Remove duplicated #include powerpc: Check for unsupported relocs when using CONFIG_RELOCATABLE powerpc/pmc: Don't access lppaca on Book3E powerpc: kmalloc failure ignored in vio_build_iommu_table() hvc_console: Provide (un)locked version for hvc_resize() commit 06aab5a3084e1d825384fa353e6df4c7949c8683 Author: David Howells Date: Thu Sep 24 12:33:48 2009 +0100 NOMMU: Ignore mmap() address param as it is a hint Ignore the address parameter given to NOMMU mmap() as it is a hint, rather than giving an error if it's non-zero. MAP_FIXED still gets an error. Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit 934831d060ccd5471ecbc562804a8d3ccd6e562c Author: David Howells Date: Thu Sep 24 12:33:32 2009 +0100 NOMMU: Fallback for is_vmalloc_or_module_addr() should be inline The NOMMU fallback for is_vmalloc_or_module_addr() should be static inline, not just static, in linux/mm.h. Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit 645d83c5db970a1c57225e155113b4aa2451e920 Author: David Howells Date: Thu Sep 24 15:13:10 2009 +0100 NOMMU: Fix MAP_PRIVATE mmap() of objects where the data can be mapped directly Fix MAP_PRIVATE mmap() of files and devices where the data in the backing store might be mapped directly. Use the BDI_CAP_MAP_DIRECT capability flag to govern whether or not we should be trying to map a file directly. This can be used to determine whether or not a region has been filled in at the point where we call do_mmap_shared() or do_mmap_private(). The BDI_CAP_MAP_DIRECT capability flag is cleared by validate_mmap_request() if there's any reason we can't use it. It's also cleared in do_mmap_pgoff() if f_op->get_unmapped_area() fails. Without this fix, attempting to run a program from a RomFS image on a non-mappable MTD partition results in a BUG as the kernel attempts XIP, and this can be caught in gdb: Program received signal SIGABRT, Aborted. 0xc005dce8 in add_nommu_region (region=) at mm/nommu.c:547 (gdb) bt #0 0xc005dce8 in add_nommu_region (region=) at mm/nommu.c:547 #1 0xc005f168 in do_mmap_pgoff (file=0xc31a6620, addr=, len=3808, prot=3, flags=6146, pgoff=0) at mm/nommu.c:1373 #2 0xc00a96b8 in elf_fdpic_map_file (params=0xc33fbbec, file=0xc31a6620, mm=0xc31bef60, what=0xc0213144 "executable") at mm.h:1145 #3 0xc00aa8b4 in load_elf_fdpic_binary (bprm=0xc316cb00, regs=) at fs/binfmt_elf_fdpic.c:343 #4 0xc006b588 in search_binary_handler (bprm=0x6, regs=0xc33fbce0) at fs/exec.c:1234 #5 0xc006c648 in do_execve (filename=, argv=0xc3ad14cc, envp=0xc3ad1460, regs=0xc33fbce0) at fs/exec.c:1356 #6 0xc0008cf0 in sys_execve (name=, argv=0xc3ad14cc, envp=0xc3ad1460) at arch/frv/kernel/process.c:263 #7 0xc00075dc in __syscall_call () at arch/frv/kernel/entry.S:897 Note that this fix does the following commit differently: commit a190887b58c32d19c2eee007c5eb8faa970a69ba Author: David Howells Date: Sat Sep 5 11:17:07 2009 -0700 nommu: fix error handling in do_mmap_pgoff() Reported-by: Graff Yang Signed-off-by: David Howells Acked-by: Pekka Enberg Cc: Paul Mundt Cc: Mel Gorman Cc: Greg Ungerer Signed-off-by: Linus Torvalds commit c775197d59995228909957e9f0ec128de2590682 Author: David Howells Date: Thu Sep 24 15:12:00 2009 +0100 FRV: Flash mappings for the MB93090-MB00 motherboard Flash mappings for the MB93090-MB00 evaluation motherboard. Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit 9d93f00580243cc059510d9d6ac4d2f5e97e5b83 Author: Geoffrey Thomas Date: Thu Sep 24 10:36:26 2009 -0400 alpha: Clean up linker script using new linker script macros. Note that .data.page_aligned and .data.cacheline_aligned are now after _data; it was probably a bug that they were before it. Also, some explicit ALIGN(8)'s between various initcall sections were removed; this should be harmless as the implicit alignment of initcall_t was already 8. Signed-off-by: Geoffrey Thomas Signed-off-by: Tim Abbott Cc: Ivan Kokshaysky Cc: Sam Ravnborg Signed-off-by: Richard Henderson Signed-off-by: Linus Torvalds commit ea12c2ed547f415ef9699cc67374d90924592c9b Author: Tim Abbott Date: Thu Sep 24 10:36:25 2009 -0400 alpha: use .data.init_task instead of .data.init_thread. alpha is the only architecture that uses the section name .data.init_thread instead of .data.init_task. So convert alpha to use .data.init_task like everything else. .data.init_task does not need a separate output section; this change also moves it into the .data output section. Signed-off-by: Tim Abbott Cc: Richard Henderson Cc: linux-alpha@vger.kernel.org Signed-off-by: Linus Torvalds commit 62bef288588bee976b753f7168716621d7a984e2 Author: Tim Abbott Date: Thu Sep 24 10:36:24 2009 -0400 powerpc: Cleanup linker script using new linker script macros. Signed-off-by: Tim Abbott Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linuxppc-dev@ozlabs.org Acked-by: Sam Ravnborg Signed-off-by: Linus Torvalds commit 4a5e35135d1ffcf14ebb2bb3c730b92c18ae9657 Author: Tim Abbott Date: Thu Sep 24 10:36:23 2009 -0400 blackfin: Cleanup linker script using new linker script macros. Signed-off-by: Tim Abbott Cc: Bryan Wu Cc: uclinux-dist-devel@blackfin.uclinux.org Acked-by: Sam Ravnborg Signed-off-by: Mike Frysinger Signed-off-by: Linus Torvalds commit 4295f8b318b424be0f87c9fd9aa1eb35c9585faf Author: Tim Abbott Date: Thu Sep 24 10:36:22 2009 -0400 mn10300: Clean up linker script using higher-level macros. Signed-off-by: Tim Abbott Acked-by: Sam Ravnborg Signed-off-by: Linus Torvalds commit eb121d1f17480793a0d8aa278929976dbb7612f5 Author: Tim Abbott Date: Thu Sep 24 10:36:21 2009 -0400 h8300: Cleanup linker script using new linker script macros. Signed-off-by: Tim Abbott Cc: Yoshinori Sato Acked-by: Sam Ravnborg Signed-off-by: Linus Torvalds commit 5d150a97f9391f5bcd7ba0d59d7a11c3de3cea80 Author: Tim Abbott Date: Thu Sep 24 10:36:20 2009 -0400 um: Clean up linker script using standard macros. Signed-off-by: Tim Abbott Cc: Jeff Dike Cc: user-mode-linux-devel@lists.sourceforge.net Acked-by: Sam Ravnborg Signed-off-by: Linus Torvalds commit cd3db323eb88514c45d25db51335a522560af702 Author: Tim Abbott Date: Thu Sep 24 10:36:19 2009 -0400 xtensa: Cleanup linker script using new linker script macros. Signed-off-by: Tim Abbott Cc: Chris Zankel Acked-by: Sam Ravnborg Signed-off-by: Linus Torvalds commit ab635e7d499f23a5791e69e2ebbc9a40c9983d89 Author: Tim Abbott Date: Thu Sep 24 10:36:18 2009 -0400 parisc: Remove useless altinstructions code copied from x86. Signed-off-by: Tim Abbott Cc: Kyle McMartin Cc: Helge Deller Cc: linux-parisc@vger.kernel.org Acked-by: Sam Ravnborg Signed-off-by: Linus Torvalds commit 57a8e1161e1a944823542138e61dd8f38fd9b9e8 Author: Tim Abbott Date: Thu Sep 24 10:36:17 2009 -0400 parisc: Clean up linker script using new linker script macros. This patch has the (likely harmless) side effect of moving .data.init_task inside the _edata. It also changes the alignment of .data.init_task from 16384 to THREAD_SIZE, which can in some configurations be larger than 16384. I believe that this change fixes a potential bug on those configurations. Signed-off-by: Tim Abbott Cc: Kyle McMartin Cc: Helge Deller Cc: linux-parisc@vger.kernel.org Acked-by: Sam Ravnborg Signed-off-by: Linus Torvalds commit 1b2086227cd1a24f748398c22ea9652c383499cf Author: Tim Abbott Date: Thu Sep 24 10:36:16 2009 -0400 Optimize the ordering of sections in RW_DATA_SECTION. The old RW_DATA_SECTION had INIT_TASK_DATA (which was more-than-PAGE_SIZE-aligned), followed by a bunch of small alignment stuff, followed by more PAGE_SIZE-aligned stuff, so you wasted memory in the middle of .data re-aligning back up to PAGE_SIZE. This patch sorts the sections by alignment requirements, which should pack them essentially optimally. Signed-off-by: Tim Abbott Reviewed-by: Sam Ravnborg Signed-off-by: Linus Torvalds commit e9ea0e2d1d00959b451dfc239df126d3c6a22043 Author: Andrew Morton Date: Thu Sep 24 14:47:45 2009 -0700 hugetlb_file_setup(): use C, not cpp Why macros are always wrong: mm/mmap.c: In function 'do_mmap_pgoff': mm/mmap.c:953: warning: unused variable 'user' also, move a couple of struct forward-decls outside `#ifdef CONFIG_HUGETLB_PAGE' - it's pointless and frequently harmful to make these conditional (eg, this patch needed `struct user_struct'). Cc: Lee Schermerhorn Cc: Mel Gorman Cc: Nishanth Aravamudan Cc: David Rientjes Cc: Adam Litke Cc: Andy Whitcroft Cc: Eric Whitney Cc: Eric B Munson Cc: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c44972f1782124f945ec8bea8a78f30f1a3538bd Author: Andrew Morton Date: Thu Sep 24 14:47:43 2009 -0700 procfs: disable per-task stack usage on NOMMU It needs walk_page_range(). Reported-by: Michal Simek Tested-by: Michal Simek Cc: Stefani Seibold Cc: David Howells Cc: Paul Mundt Cc: Geert Uytterhoeven Cc: Greg Ungerer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b9b9df62e7fd6b5f099c24bc867100ab86e1da5a Merge: 5f8fe42 9c2d205 Author: Linus Torvalds Date: Thu Sep 24 17:10:17 2009 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6: eCryptfs: Prevent lower dentry from going negative during unlink eCryptfs: Propagate vfs_read and vfs_write return codes eCryptfs: Validate global auth tok keys eCryptfs: Filename encryption only supports password auth tokens eCryptfs: Check for O_RDONLY lower inodes when opening lower files eCryptfs: Handle unrecognized tag 3 cipher codes ecryptfs: improved dependency checking and reporting eCryptfs: Fix lockdep-reported AB-BA mutex issue ecryptfs: Remove unneeded locking that triggers lockdep false positives commit 5f8fe4270e53d38421ba34c428c3b58933b48e50 Merge: d9fbd9a 24924ec Author: Linus Torvalds Date: Thu Sep 24 17:08:56 2009 -0700 Merge branch 'for-linus' of git://repo.or.cz/cris-mirror * 'for-linus' of git://repo.or.cz/cris-mirror: CRIS: Cleanup linker script using new linker script macros. ARRAY_SIZE changes CRIS: convert to asm-generic/hardirq.h CRISv10: Don't autonegotiate if autonegotiation is off CRIS: fix defconfig build failure CRIS: add pgprot_noncached commit d9fbd9a2cd5ac1b286a7d7cdb1a180ce1edaee2f Merge: f25f60b baea7b9 Author: Linus Torvalds Date: Thu Sep 24 17:06:51 2009 -0700 Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm * 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (103 commits) ARM: 5719/1: [AT91] Fix AC97 breakage ARM: 5721/1: MMCI enable the use of a regulator ARM: 5720/1: Move MMCI header to amba include dir ARM: 5718/1: Sane busids for RealView board components ARM: 5715/1: Make kprobes unregistration SMP safe ARM: 5711/1: locomo.c: CodingStyle cleanups ARM: 5710/1: at91: add AC97 support to at91sam9rl and at91sam9rlek board ARM: 5709/1: at91: add AC97 support to at91sam9g45 series and at91sam9m10g45ek board ARM: 5621/1: at91/dmaengine: integration of at_hdmac driver in at91sam9g45 series ARM: 5620/1: at91/dmaengine: integration of at_hdmac driver in at91sam9rl ARM: Add support for checking access permissions on prefetch aborts ARM: Separate out access error checking ARM: Ensure correct might_sleep() check in pagefault path ARM: Update page fault handling for new OOM techniques ARM: Provide definitions and helpers for decoding the FSR register ARM: 5712/1: SA1100: initialise spinlock in DMA code ARM: s3c: fix check of index into s3c_gpios[] ARM: spitz: fix touchscreen max presure ARM: STMP3xxx: deallocation with negative index of descriptors[] Thumb-2: Correctly handle undefined instructions in the kernel ... commit f25f60beea574d7cff65680694a909e58c5c81c1 Merge: d7757be 36dd2fd Author: Linus Torvalds Date: Thu Sep 24 17:06:16 2009 -0700 Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6 * 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: nfs[23] tcp breakage in mount with binary options net: fix htmldocs sunrpc, clnt.c commit d7757be133cc05620608af46acd178686681b7ef Merge: 94e0fb0 216c7f9 Author: Linus Torvalds Date: Thu Sep 24 17:06:01 2009 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: IPoIB: Don't turn on carrier for a non-active port IB/mthca: Fix access to freed memory in catastrophic event handling mlx4_core: Pass cache line size to device FW RDMA/nes: Remove duplicate .ndo_set_mac_address field initialization IB/mad: Fix lock-lock-timer deadlock in RMPP code commit b8273570f802a7658827dcb077b0b517ba75a289 Author: Johannes Berg Date: Thu Sep 24 15:44:05 2009 -0700 genetlink: fix netns vs. netlink table locking (2) Similar to commit d136f1bd366fdb7e747ca7e0218171e7a00a98a5, there's a bug when unregistering a generic netlink family, which is caught by the might_sleep() added in that commit: BUG: sleeping function called from invalid context at net/netlink/af_netlink.c:183 in_atomic(): 1, irqs_disabled(): 0, pid: 1510, name: rmmod 2 locks held by rmmod/1510: #0: (genl_mutex){+.+.+.}, at: [] genl_unregister_family+0x2b/0x130 #1: (rcu_read_lock){.+.+..}, at: [] __genl_unregister_mc_group+0x1c/0x120 Pid: 1510, comm: rmmod Not tainted 2.6.31-wl #444 Call Trace: [] __might_sleep+0x119/0x150 [] netlink_table_grab+0x21/0x100 [] netlink_clear_multicast_users+0x23/0x60 [] __genl_unregister_mc_group+0x71/0x120 [] genl_unregister_family+0x56/0x130 [] nl80211_exit+0x15/0x20 [cfg80211] [] cfg80211_exit+0x1a/0x40 [cfg80211] Fix in the same way by grabbing the netlink table lock before doing rcu_read_lock(). Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit 704cc92e9ffe29458ea8831ae097c631b1160c01 Author: Anton Vorontsov Date: Thu Sep 24 08:31:52 2009 +0000 3c59x: Get rid of "Trying to free already-free IRQ" Following trace pops up if we try to suspend with 3c59x ethernet NIC brought down: root@b1:~# ifconfig eth16 down root@b1:~# echo mem > /sys/power/state ... 3c59x 0000:00:10.0: suspend 3c59x 0000:00:10.0: PME# disabled Trying to free already-free IRQ 48 ------------[ cut here ]------------ Badness at c00554e4 [verbose debug info unavailable] NIP: c00554e4 LR: c00554e4 CTR: c019a098 REGS: c7975c60 TRAP: 0700 Not tainted (2.6.31-rc4) MSR: 00021032 CR: 28242422 XER: 20000000 TASK = c79cb0c0[1746] 'bash' THREAD: c7974000 ... NIP [c00554e4] __free_irq+0x108/0x1b0 LR [c00554e4] __free_irq+0x108/0x1b0 Call Trace: [c7975d10] [c00554e4] __free_irq+0x108/0x1b0 (unreliable) [c7975d30] [c005559c] free_irq+0x10/0x24 [c7975d40] [c01e21ec] vortex_suspend+0x70/0xc4 [c7975d60] [c017e584] pci_legacy_suspend+0x58/0x100 This is because the driver manages interrupts without checking for netif_running(). Though, there are few other issues with suspend/resume in this driver. The intention of calling free_irq() in suspend() was to avoid any possible spurious interrupts (see commit 5b039e681b8c5f30aac9cc04385 "3c59x PM fixes"). But, - On resume, the driver was requesting IRQ just after pci_set_master(), but before vortex_up() (which actually resets 3c59x chips). - Issuing free_irq() on a shared IRQ doesn't guarantee that a buggy HW won't trigger spurious interrupts in another driver that requested the same interrupt. So, if we want to protect from unexpected interrupts, then on suspend we should issue disable_irq(), not free_irq(). Signed-off-by: Anton Vorontsov Signed-off-by: David S. Miller commit a43912ab1925788765208da5cd664b6f8e011d08 Author: Eric Dumazet Date: Wed Sep 23 10:28:33 2009 +0000 tunnel: eliminate recursion field It seems recursion field from "struct ip_tunnel" is not anymore needed. recursion prevention is done at the upper level (in dev_queue_xmit()), since we use HARD_TX_LOCK protection for tunnels. This avoids a cache line ping pong on "struct ip_tunnel" : This structure should be now mostly read on xmit and receive paths. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit edf42a27e8e242e543716663e54aa2b592ea070a Author: Sebastian Haas Date: Thu Sep 24 03:55:05 2009 +0000 ems_pci: fix size of CAN controllers BAR mapping for CPC-PCI v2 The driver mapped only 128 bytes of the CAN controller address space when a CPC-PCI v2 was detected (incl. CPC-104P). This patch will fix it by always mapping the whole address space (4096 bytes on all boards) of the corresponding PCI BAR. Signed-off-by: Sebastian Haas Signed-off-by: Wolfgang Grandegger Signed-off-by: David S. Miller commit 0c01695dabe508ecf3a619c36f0918e8d24c0d05 Author: Jaswinder Singh Rajput Date: Thu Sep 24 02:19:41 2009 +0000 net: fix htmldocs sunrpc, clnt.c DOCPROC Documentation/DocBook/networking.xml Warning(net/sunrpc/clnt.c:647): No description found for parameter 'req' Warning(net/sunrpc/clnt.c:647): No description found for parameter 'tk_ops' Warning(net/sunrpc/clnt.c:647): Excess function parameter 'ops' description in 'rpc_run_bc_task' Signed-off-by: Jaswinder Singh Rajput Cc: Ricardo Labiaga Cc: Benny Halevy Cc: Andy Adamson Cc: Trond Myklebust Cc: Randy Dunlap Cc: David Miller Signed-off-by: David S. Miller commit 18a1166de994685d770425086b2bcc1ba567f7ed Author: Rémi Denis-Courmont Date: Wed Sep 23 03:17:11 2009 +0000 Phonet: error on broadcast sending (unimplemented) If we ever implement this, then we can stop returning an error. Signed-off-by: Rémi Denis-Courmont Signed-off-by: David S. Miller commit 582b0b611345fc8d9ab8a0605d2f14c468902719 Author: Rémi Denis-Courmont Date: Wed Sep 23 03:17:10 2009 +0000 Phonet: fix race for port number in concurrent bind() Allocating a port number to a socket and hashing that socket shall be an atomic operation with regards to other port allocation. Otherwise, we could allocate a port that is already being allocated to another socket. Signed-off-by: Rémi Denis-Courmont Signed-off-by: David S. Miller commit ef87979c273a2348430648ad1d5c2a5e5df50b6e Author: Stephen Hemminger Date: Tue Sep 22 19:41:43 2009 +0000 pktgen: better scheduler friendliness Previous update did not resched in inner loop causing watchdogs. Rewrite inner loop to: * account for delays better with less clock calls * more accurate timing of delay: - only delay if packet was successfully sent - if delay is 100ns and it takes 10ns to build packet then account for that * use wait_event_interruptible_timeout rather than open coding it. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 6b80d6a6b4e27fd355641823c5f4ac3f96d072e5 Author: Stephen Hemminger Date: Tue Sep 22 19:41:42 2009 +0000 pktgen: T_TERMINATE flag is unused Get rid of unused flag bit. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 0915921bde4eb5d943b17c175febac58a254d7b6 Author: Shan Wei Date: Tue Sep 22 15:41:10 2009 +0000 ipv4: check optlen for IP_MULTICAST_IF option Due to man page of setsockopt, if optlen is not valid, kernel should return -EINVAL. But a simple testcase as following, errno is 0, which means setsockopt is successful. addr.s_addr = inet_addr("192.1.2.3"); setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF, &addr, 1); printf("errno is %d\n", errno); Xiaotian Feng(dfeng@redhat.com) caught the bug. We fix it firstly checking the availability of optlen and then dealing with the logic like other options. Reported-by: Xiaotian Feng Signed-off-by: Shan Wei Acked-by: Alexey Kuznetsov Signed-off-by: David S. Miller commit 8b3f6af86378d0a10ca2f1ded1da124aef13b62c Merge: 139d606 94e0fb0 Author: David S. Miller Date: Thu Sep 24 15:13:11 2009 -0700 Merge branch 'master' of /home/davem/src/GIT/linux-2.6/ Conflicts: drivers/staging/Kconfig drivers/staging/Makefile drivers/staging/cpc-usb/TODO drivers/staging/cpc-usb/cpc-usb_drv.c drivers/staging/cpc-usb/cpc.h drivers/staging/cpc-usb/cpc_int.h drivers/staging/cpc-usb/cpcusb.h commit 89133f93508137231251543d1732da638e6022e1 Author: Martin Schwidefsky Date: Thu Sep 24 17:29:52 2009 +0200 clocksource: Resume clocksource without taking the clocksource mutex git commit 75c5158f70c065b9 converted the clocksource spinlock to a mutex. This causes the following BUG: BUG: sleeping function called from invalid context at kernel/mutex.c:280 in_atomic(): 0, irqs_disabled(): 1, pid: 2473, name: pm-suspend 2 locks held by pm-suspend/2473: #0: (&buffer->mutex){......}, at: [] sysfs_write_file+0x3c/0x137 #1: (pm_mutex){......}, at: [] enter_state+0x39/0x130 Pid: 2473, comm: pm-suspend Not tainted 2.6.31 #1 Call Trace: [] ? __debug_show_held_locks+0x22/0x24 [] __might_sleep+0x107/0x10b [] mutex_lock_nested+0x25/0x43 [] clocksource_resume+0x1c/0x60 [] timekeeping_resume+0x1e/0x1c8 [] __sysdev_resume+0x25/0xcf [] sysdev_resume+0x6d/0xae [] suspend_devices_and_enter+0x12b/0x1af [] enter_state+0xdf/0x130 [] state_store+0xb6/0xd3 [] kobj_attr_store+0x17/0x19 [] sysfs_write_file+0xfb/0x137 [] vfs_write+0xae/0x10b [] ? __up_read+0x1a/0x7f [] sys_write+0x4a/0x6e [] system_call_fastpath+0x16/0x1b clocksource_resume is called early in the resume process, there is only one cpu, no processes are running and the interrupts are disabled. It is therefore possible to resume the clocksources without taking the clocksource mutex. Reported-by: Xiaotian Feng Signed-off-by: Martin Schwidefsky Tested-by: Michal Schmidt Cc: Xiaotian Feng Cc: John Stultz LKML-Reference: <20090924172952.49697825@mschwide.boeblingen.de.ibm.com> Signed-off-by: Ingo Molnar commit 9beba3c54dd180a26a1da2027cfbe9edfaf9c40e Author: Darren Hart Date: Thu Sep 24 11:54:47 2009 -0700 futex: Add memory barrier commentary to futex_wait_queue_me() The memory barrier semantics of futex_wait_queue_me() are non-obvious. Add some commentary to try and clarify it. Signed-off-by: Darren Hart Cc: Peter Zijlstra Cc: Eric Dumazet Cc: Dinakar Guniguntala Cc: John Stultz LKML-Reference: <20090924185447.694.38948.stgit@Aeon> Signed-off-by: Ingo Molnar commit baea7b946f00a291b166ccae7fcfed6c01530cc6 Merge: ae19ffb 94e0fb0 Author: Russell King Date: Thu Sep 24 21:22:33 2009 +0100 Merge branch 'origin' into for-linus Conflicts: MAINTAINERS commit 216c7f92b9ca7766600a3a04b9dda445a9217832 Merge: 5ee9512 0e442af c57e20dcf d686159 bdf6438 Author: Roland Dreier Date: Thu Sep 24 12:43:08 2009 -0700 Merge branches 'ipoib', 'mad', 'mlx4', 'mthca' and 'nes' into for-linus commit 086f68bd97126618ecb2dcff5f766f3a21722df7 Author: Jeff Layton Date: Mon Sep 21 14:08:18 2009 -0400 cifs: eliminate cifs_init_private ...it does the same thing as cifs_fill_fileinfo, but doesn't handle the flist ordering correctly. Also rename cifs_fill_fileinfo to a more descriptive name and have it take an open flags arg instead of just a write_only flag. That makes the logic in the callers a little simpler. Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 725b13685c61168f71825b3fb67d96d2d7aa3b0f Author: Eric Dumazet Date: Thu Sep 24 15:39:09 2009 +0200 perf tools: Dont use openat() openat() is still a young glibc facility, better to not use it in a non performance critical program (perf list) Many machines have older glibc (RHEL 4 Update 5 -> glibc-2.3.4-2.36 on my dev machine for example). Signed-off-by: Eric Dumazet Cc: Peter Zijlstra Cc: Ulrich Drepper LKML-Reference: <4ABB767D.6080004@gmail.com> Signed-off-by: Ingo Molnar commit 5ee95120841fd623c48d7d971182cf58e3b0c8de Author: Moni Shoua Date: Thu Sep 24 12:01:05 2009 -0700 IPoIB: Don't turn on carrier for a non-active port Multicast joins can succeed even if the IB port is down. This happens when the SM runs on the same port with the requesting port. However, IPoIB calls netif_carrier_on() when the join of the broadcast group succeeds, without caring about the state of the IB port. The result is an IPoIB interface in RUNNING state but without an active IB port to support it. If a bonding interface uses this IPoIB interface as a slave it might not detect that this slave is almost useless and failover functionality will be damaged. The fix checks the state of the IB port in the carrier_task before calling netif_carrier_on(). Adresses: https://bugs.openfabrics.org/show_bug.cgi?id=1726 Signed-off-by: Moni Shoua Signed-off-by: Roland Dreier commit 36dd2fdb37efdab15844eb72026f8ce3aa0fb560 Author: Al Viro Date: Thu Sep 24 14:58:42 2009 -0400 nfs[23] tcp breakage in mount with binary options We forget to set nfs_server.protocol in tcp case when old-style binary options are passed to mount. The thing remains zero and never validated afterwards. As the result, we hit BUG in fs/nfs/client.c:588. Breakage has been introduced in NFS: Add nfs_alloc_parsed_mount_data merged yesterday... Signed-off-by: Al Viro Signed-off-by: Trond Myklebust commit 7a73fdde3990ea840b604248362876437ea8ce80 Author: Jaswinder Singh Rajput Date: Thu Sep 24 14:58:42 2009 -0400 net: fix htmldocs sunrpc, clnt.c DOCPROC Documentation/DocBook/networking.xml Warning(net/sunrpc/clnt.c:647): No description found for parameter 'req' Warning(net/sunrpc/clnt.c:647): No description found for parameter 'tk_ops' Warning(net/sunrpc/clnt.c:647): Excess function parameter 'ops' description in 'rpc_run_bc_task' Signed-off-by: Jaswinder Singh Rajput Cc: Ricardo Labiaga Cc: Benny Halevy Cc: Andy Adamson Cc: Trond Myklebust Cc: Randy Dunlap Cc: David Miller Acked-by: Randy Dunlap Acked-by: Benny Halevy Signed-off-by: Trond Myklebust commit d686159e50c57788001001e9537aa8b4bbc38001 Author: Jack Morgenstein Date: Thu Sep 24 11:55:41 2009 -0700 IB/mthca: Fix access to freed memory in catastrophic event handling catas_reset() uses a pointer to mthca_dev, but mthca_dev is not valid after the call to __mthca_restart_one(). Based on a similar patch for mlx4 (634354d7, "mlx4: Fix access to freed memory") by Vitaliy Gusev Signed-off-by: Jack Morgenstein Signed-off-by: Roland Dreier commit 3bc303c254335dbd7c7012cc1760b12f1d5514d3 Author: Jeff Layton Date: Mon Sep 21 06:47:50 2009 -0400 cifs: convert oplock breaks to use slow_work facility (try #4) This is the fourth respin of the patch to convert oplock breaks to use the slow_work facility. A customer of ours was testing a backport of one of the earlier patchsets, and hit a "Busy inodes after umount..." problem. An oplock break job had raced with a umount, and the superblock got torn down and its memory reused. When the oplock break job tried to dereference the inode->i_sb, the kernel oopsed. This patchset has the oplock break job hold an inode and vfsmount reference until the oplock break completes. With this, there should be no need to take a tcon reference (the vfsmount implicitly holds one already). Currently, when an oplock break comes in there's a chance that the oplock break job won't occur if the allocation of the oplock_q_entry fails. There are also some rather nasty races in the allocation and handling these structs. Rather than allocating oplock queue entries when an oplock break comes in, add a few extra fields to the cifsFileInfo struct. Get rid of the dedicated cifs_oplock_thread as well and queue the oplock break job to the slow_work thread pool. This approach also has the advantage that the oplock break jobs can potentially run in parallel rather than be serialized like they are today. Signed-off-by: Jeff Layton Signed-off-by: Steve French commit c57e20dcff981c39e43c857f3997095bacb2223f Author: Eli Cohen Date: Thu Sep 24 11:03:03 2009 -0700 mlx4_core: Pass cache line size to device FW ConnectX can work more efficiently if the CPU cache line size is passed to it with the INIT_HCA firmware command. Signed-off-by: Eli Cohen Signed-off-by: Roland Dreier commit bdf643816a2017eba9af280b6d29ef4213358984 Author: Julia Lawall Date: Thu Sep 24 10:59:34 2009 -0700 RDMA/nes: Remove duplicate .ndo_set_mac_address field initialization The definition of nes_netdev_ops has initializations of a local function and eth_mac_addr for its ndo_set_mac_address field. This change uses only the local function. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r@ identifier I, s, fld; position p0,p; expression E; @@ struct I s =@p0 { ... .fld@p = E, ...}; @s@ identifier I, s, r.fld; position r.p0,p; expression E; @@ struct I s =@p0 { ... .fld@p = E, ...}; @script:python@ p0 << r.p0; fld << r.fld; ps << s.p; pr << r.p; @@ if int(ps[0].line)!=int(pr[0].line) or int(ps[0].column)!=int(pr[0].column): cocci.print_main(fld,p0) // Signed-off-by: Julia Lawall Signed-off-by: Roland Dreier commit 94e0fb086fc5663c38bbc0fe86d698be8314f82f Merge: b7f21bb c715089 Author: Linus Torvalds Date: Thu Sep 24 10:30:41 2009 -0700 Merge branch 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel * 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel: (57 commits) drm/i915: Handle ERESTARTSYS during page fault drm/i915: Warn before mmaping a purgeable buffer. drm/i915: Track purged state. drm/i915: Remove eviction debug spam drm/i915: Immediately discard any backing storage for uneeded objects drm/i915: Do not mis-classify clean objects as purgeable drm/i915: Whitespace correction for madv drm/i915: BUG_ON page refleak during unbind drm/i915: Search harder for a reusable object drm/i915: Clean up evict from list. drm/i915: Add tracepoints drm/i915: framebuffer compression for GM45+ drm/i915: split display functions by chip type drm/i915: Skip the sanity checks if the current relocation is valid drm/i915: Check that the relocation points to within the target drm/i915: correct FBC update when pipe base update occurs drm/i915: blacklist Acer AspireOne lid status ACPI: make ACPI button funcs no-ops if not built in drm/i915: prevent FIFO calculation overflows on 32 bits with high dotclocks drm/i915: intel_display.c handle latency variable efficiently ... Fix up trivial conflicts in drivers/gpu/drm/i915/{i915_dma.c|i915_drv.h} commit b7f21bb2e23b4fec16b448a34889f467465be659 Merge: 7ca263cd 76baeeb Author: Linus Torvalds Date: Thu Sep 24 09:57:08 2009 -0700 Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (21 commits) x86/PCI: make 32 bit NUMA node array int, not unsigned char x86/PCI: default pcibus cpumask to all cpus if it lacks affinity MAINTAINTERS: remove hotplug driver entries PCI: pciehp: remove slot capabilities definitions PCI: pciehp: remove error message definitions PCI: pciehp: remove number field PCI: pciehp: remove hpc_ops PCI: pciehp: remove pci_dev field PCI: pciehp: remove crit_sect mutex PCI: pciehp: remove slot_bus field PCI: pciehp: remove first_slot field PCI: pciehp: remove slot_device_offset field PCI: pciehp: remove hp_slot field PCI: pciehp: remove device field PCI: pciehp: remove bus field PCI: pciehp: remove slot_num_inc field PCI: pciehp: remove num_slots field PCI: pciehp: remove slot_list field PCI: fix VGA arbiter header file PCI: Disable AER with pci=nomsi ... Fixed up trivial conflicts in MAINTAINERS commit 7ca263cdf8cf74d0f1c6f48d07d556de92e3bec9 Merge: a6b49cb 96830a5 Author: Linus Torvalds Date: Thu Sep 24 09:04:24 2009 -0700 Merge branch 'cputime' of git://git390.marist.edu/pub/scm/linux-2.6 * 'cputime' of git://git390.marist.edu/pub/scm/linux-2.6: [PATCH] Fix idle time field in /proc/uptime commit a6b49cb210f878709bdc0bddc16a853f18790d02 Merge: 2c9871d bfc8125 Author: Linus Torvalds Date: Thu Sep 24 09:01:44 2009 -0700 Merge branch 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze * 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze: (24 commits) microblaze: Disable heartbeat/enable emaclite in defconfigs microblaze: Support simpleImage.dts make target microblaze: Fix _start symbol to physical address microblaze: Use LOAD_OFFSET macro to get correct LMA for all sections microblaze: Create the LOAD_OFFSET macro used to compute VMA vs LMA offsets microblaze: Copy ppc asm-compat.h for clean handling of constants in asm and C microblaze: Actually show KiB rather than pages in "Freeing initrd memory:" microblaze: Support ptrace syscall tracing. microblaze: Updated CPU version and FPGA family codes in PVR microblaze: Generate correct signal and siginfo for integer div-by-zero microblaze: Don't be noisy when userspace causes hardware exceptions microblaze: Remove ipc.h file which points to non-existing asm-generic file microblaze: Clear sticky FSR register after generating exception signals microblaze: Ensure CPU usermode is set on new userspace processes microblaze: Use correct kbuild variable KBUILD_CFLAGS microblaze: Save and restore msr in hw exception microblaze: Add architectural support for USB EHCI host controllers microblaze: Implement include/asm/syscall.h. microblaze: Improve checking mechanism for MSR instruction microblaze: Add checking mechanism for MSR instruction ... commit 2c9871de0ae89a0e2c365ea6e277135fe031d8b4 Merge: dc2af6a ffa9f12 Author: Linus Torvalds Date: Thu Sep 24 09:01:05 2009 -0700 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: module: don't call percpu_modfree on NULL pointer. module: fix memory leak when load fails after srcversion/version allocated module: preferred way to use MODULE_AUTHOR param: allow whitespace as kernel parameter separator module: reduce string table for loaded modules (v2) module: reduce symbol table for loaded modules (v2) commit dc2af6a6bcf3abdf44ac545759a6547dfe12070e Merge: 6c5daf0 54bcf38 Author: Linus Torvalds Date: Thu Sep 24 08:57:29 2009 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (42 commits) Btrfs: hash the btree inode during fill_super Btrfs: relocate file extents in clusters Btrfs: don't rename file into dummy directory Btrfs: check size of inode backref before adding hardlink Btrfs: fix releasepage to avoid unlocking extents we haven't locked Btrfs: Fix test_range_bit for whole file extents Btrfs: fix errors handling cached state in set/clear_extent_bit Btrfs: fix early enospc during balancing Btrfs: deal with NULL space info Btrfs: account for space used by the super mirrors Btrfs: fix extent entry threshold calculation Btrfs: remove dead code Btrfs: fix bitmap size tracking Btrfs: don't keep retrying a block group if we fail to allocate a cluster Btrfs: make balance code choose more wisely when relocating Btrfs: fix arithmetic error in clone ioctl Btrfs: add snapshot/subvolume destroy ioctl Btrfs: change how subvolumes are organized Btrfs: do not reuse objectid of deleted snapshot/subvol Btrfs: speed up snapshot dropping ... commit 6c5daf012c9155aafd2c7973e4278766c30dfad0 Merge: 6d39b27 c08d3b0 Author: Linus Torvalds Date: Thu Sep 24 08:32:11 2009 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: truncate: use new helpers truncate: new helpers fs: fix overflow in sys_mount() for in-kernel calls fs: Make unload_nls() NULL pointer safe freeze_bdev: grab active reference to frozen superblocks freeze_bdev: kill bd_mount_sem exofs: remove BKL from super operations fs/romfs: correct error-handling code vfs: seq_file: add helpers for data filling vfs: remove redundant position check in do_sendfile vfs: change sb->s_maxbytes to a loff_t vfs: explicitly cast s_maxbytes in fiemap_check_ranges libfs: return error code on failed attr set seq_file: return a negative error code when seq_path_root() fails. vfs: optimize touch_time() too vfs: optimization for touch_atime() vfs: split generic_forget_inode() so that hugetlbfs does not have to copy it fs/inode.c: add dev-id and inode number for debugging in init_special_inode() libfs: make simple_read_from_buffer conventional commit 6d39b27f0ac7e805ae3bd9efa51d7da04bec0360 Merge: a487b67 d811659 Author: Linus Torvalds Date: Thu Sep 24 08:31:04 2009 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current * git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current: lsm: Use a compressed IPv6 string format in audit events Audit: send signal info if selinux is disabled Audit: rearrange audit_context to save 16 bytes per struct Audit: reorganize struct audit_watch to save 8 bytes commit ffa9f12a41ec117207e8d953f90b9c179546c8d7 Author: Rusty Russell Date: Fri Sep 25 00:32:59 2009 -0600 module: don't call percpu_modfree on NULL pointer. The general one handles NULL, the static obsolescent (CONFIG_HAVE_LEGACY_PER_CPU_AREA) one in module.c doesn't; Eric's commit 720eba31 assumed it did, and various frobbings since then kept that assumption. All other callers in module.c all protect it with an if; this effectively does the same as free_init is only goto if we fail percpu_modalloc(). Reported-by: Kamalesh Babulal Signed-off-by: Rusty Russell Cc: Eric Dumazet Cc: Masami Hiramatsu Cc: Américo Wang Tested-by: Kamalesh Babulal commit a263f7763c364015f92e7c097fa46c6673f6fcb0 Author: Rusty Russell Date: Fri Sep 25 00:32:58 2009 -0600 module: fix memory leak when load fails after srcversion/version allocated Normally the twisty paths of sysfs will free the attributes, but not if we fail before we hook it into sysfs (which is the last thing we do in load_module). (This sysfs code is a turd, no doubt there are other issues lurking too). Reported-by: Tetsuo Handa Signed-off-by: Rusty Russell Cc: Catalin Marinas Tested-by: Tetsuo Handa commit 1d7015caa082d465faeae5d6fd1be077ee6dfa87 Author: Johannes Berg Date: Fri Sep 25 00:32:58 2009 -0600 module: preferred way to use MODULE_AUTHOR For the longest time now we've been using multiple MODULE_AUTHOR() statements when a module has more than one author, but the comment here disagrees. Signed-off-by: Johannes Berg Cc: Jiri Kosina Cc: Luciano Coelho Signed-off-by: Andrew Morton Signed-off-by: Rusty Russell commit 26d052bfce799ef0e7262695b46e3525ca4d381d Author: Peter Oberparleiter Date: Mon Jul 6 17:11:22 2009 +0200 param: allow whitespace as kernel parameter separator Some boot mechanisms require that kernel parameters are stored in a separate file which is loaded to memory without further processing (e.g. the "Load from FTP" method on s390). When such a file contains newline characters, the kernel parameter preceding the newline might not be correctly parsed (due to the newline being stuck to the end of the actual parameter value) which can lead to boot failures. This patch improves kernel command line usability in such a situation by allowing generic whitespace characters as separators between kernel parameters. Signed-off-by: Peter Oberparleiter Signed-off-by: Rusty Russell commit 554bdfe5acf3715e87c8d5e25a4f9a896ac9f014 Author: Jan Beulich Date: Mon Jul 6 14:51:44 2009 +0100 module: reduce string table for loaded modules (v2) Also remove all parts of the string table (referenced by the symbol table) that are not needed for kallsyms use (i.e. which were only referenced by symbols discarded by the previous patch, or not referenced at all for whatever reason). Signed-off-by: Jan Beulich Signed-off-by: Rusty Russell commit 4a4962263f07d14660849ec134ee42b63e95ea9a Author: Jan Beulich Date: Mon Jul 6 14:50:42 2009 +0100 module: reduce symbol table for loaded modules (v2) Discard all symbols not interesting for kallsyms use: absolute, section, and in the common case (!KALLSYMS_ALL) data ones. Signed-off-by: Jan Beulich Signed-off-by: Rusty Russell commit a487b6705a811087c182c8cab7e3b5845dfa6ccb Merge: 9f6ac78 4b3df56 Author: Linus Torvalds Date: Thu Sep 24 07:55:29 2009 -0700 Merge branch 'for-linus' of git://neil.brown.name/md * 'for-linus' of git://neil.brown.name/md: (97 commits) md: raid-1/10: fix RW bits manipulation md: remove unnecessary memset from multipath. md: report device as congested when suspended md: Improve name of threads created by md_register_thread md: remove sparse warnings about lock context. md: remove sparse waring "symbol xxx shadows an earlier one" async_tx/raid6: add missing dma_unmap calls to the async fail case ioat3: fix uninitialized var warnings drivers/dma/ioat/dma_v2.c: fix warnings raid6test: fix stack overflow ioat2: clarify ring size limits md/raid6: cleanup ops_run_compute6_2 md/raid6: eliminate BUG_ON with side effect dca: module load should not be an error message ioat: driver version 4.0 dca: registering requesters in multiple dca domains async_tx: remove HIGHMEM64G restriction dmaengine: sh: Add Support SuperH DMA Engine driver dmaengine: Move all map_sg/unmap_sg for slave channel to its client fsldma: Add DMA_SLAVE support ... commit 9f6ac7850a9c6363f4117fd2248e232a2d534627 Merge: db16826 3f48258 Author: Linus Torvalds Date: Thu Sep 24 07:54:16 2009 -0700 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: V4L/DVB (13039): dib0700: not building CONFIG_DVB_TUNER_DIB0070 breaks compilation V4L/DVB (13038): dvbdev: Remove an anoying/uneeded warning V4L/DVB (13037): go7007: Revert compatibility code added at the wrong place media: video: Fix build in saa7164 commit db16826367fefcb0ddb93d76b66adc52eb4e6339 Merge: cd60451 465fdd9 Author: Linus Torvalds Date: Thu Sep 24 07:53:22 2009 -0700 Merge branch 'hwpoison' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6 * 'hwpoison' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6: (21 commits) HWPOISON: Enable error_remove_page on btrfs HWPOISON: Add simple debugfs interface to inject hwpoison on arbitary PFNs HWPOISON: Add madvise() based injector for hardware poisoned pages v4 HWPOISON: Enable error_remove_page for NFS HWPOISON: Enable .remove_error_page for migration aware file systems HWPOISON: The high level memory error handler in the VM v7 HWPOISON: Add PR_MCE_KILL prctl to control early kill behaviour per process HWPOISON: shmem: call set_page_dirty() with locked page HWPOISON: Define a new error_remove_page address space op for async truncation HWPOISON: Add invalidate_inode_page HWPOISON: Refactor truncate to allow direct truncating of page v2 HWPOISON: check and isolate corrupted free pages v2 HWPOISON: Handle hardware poisoned pages in try_to_unmap HWPOISON: Use bitmask/action code for try_to_unmap behaviour HWPOISON: x86: Add VM_FAULT_HWPOISON handling to x86 page fault handler v2 HWPOISON: Add poison check to page fault handling HWPOISON: Add basic support for poisoned pages in fault handler v3 HWPOISON: Add new SIGBUS error codes for hardware poison signals HWPOISON: Add support for poison swap entries v2 HWPOISON: Export some rmap vma locking to outside world ... commit cd6045138ed1bb5d8773e940d51c34318eef3ef2 Author: Andrew Morton Date: Wed Sep 23 15:57:43 2009 -0700 drivers/usb/serial/sierra.c: fix CONFIG_PM=n build drivers/usb/serial/sierra.c: In function 'sierra_suspend': drivers/usb/serial/sierra.c:936: error: 'struct usb_device' has no member named 'auto_pm' Repairs commit e6929a9020acbeb04d9a3ad9a88234c15be808fd Author: Oliver Neukum Date: Fri Sep 4 23:19:53 2009 +0200 USB: support for autosuspend in sierra while online Cc: Greg KH Cc: Oliver Neukum Cc: Elina Pasheva Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d68721eb339e9237c11c1fea5f73f86211d14918 Author: Ivan Kokshaysky Date: Wed Sep 23 15:57:42 2009 -0700 alpha: AGP update (fixes compile failure) This brings Alpha AGP platforms in sync with the change to struct agp_memory (unsigned long *memory => struct page **pages). Only compile tested (I don't have titan/marvel hardware), but this change looks pretty straightforward, so hopefully it's ok. Signed-off-by: Ivan Kokshaysky Cc: Richard Henderson Cc: Dave Airlie Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 801460d0cf5c5288153b722565773059b0f44348 Author: Hiroshi Shimamoto Date: Wed Sep 23 15:57:41 2009 -0700 task_struct cleanup: move binfmt field to mm_struct Because the binfmt is not different between threads in the same process, it can be moved from task_struct to mm_struct. And binfmt moudle is handled per mm_struct instead of task_struct. Signed-off-by: Hiroshi Shimamoto Acked-by: Oleg Nesterov Cc: Rusty Russell Acked-by: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2fa4341074cd02fb39aa23410740764948755635 Author: Albin Tonnerre Date: Wed Sep 23 15:57:38 2009 -0700 include/linux/unaligned/{l,b}e_byteshift.h: fix usage for compressed kernels When unaligned accesses are required for uncompressing a kernel (such as for LZO decompression on ARM in a patch that follows), including causes issues as it brings in a lot of things that are not available in the decompression environment. linux/kernel.h brings at least: extern int console_printk[]; extern const char hex_asc[]; which causes errors at link-time as they are not available when compiling the pre-boot environement. There are also a few others: arch/arm/boot/compressed/misc.o: In function `valid_user_regs': arch/arm/include/asm/ptrace.h:158: undefined reference to `elf_hwcap' arch/arm/boot/compressed/misc.o: In function `console_silent': include/linux/kernel.h:292: undefined reference to `console_printk' arch/arm/boot/compressed/misc.o: In function `console_verbose': include/linux/kernel.h:297: undefined reference to `console_printk' arch/arm/boot/compressed/misc.o: In function `pack_hex_byte': include/linux/kernel.h:360: undefined reference to `hex_asc' arch/arm/boot/compressed/misc.o: In function `hweight_long': include/linux/bitops.h:45: undefined reference to `hweight32' arch/arm/boot/compressed/misc.o: In function `__cmpxchg_local_generic': include/asm-generic/cmpxchg-local.h:21: undefined reference to `wrong_size_cmpxchg' include/asm-generic/cmpxchg-local.h:42: undefined reference to `wrong_size_cmpxchg' arch/arm/boot/compressed/misc.o: In function `__xchg': arch/arm/include/asm/system.h:309: undefined reference to `__bad_xchg' However, those files apparently use nothing from , all they need is the declaration of types such as u32 or u64, so should be enough Signed-off-by: Albin Tonnerre Cc: Sam Ravnborg Cc: Russell King Cc: Ingo Molnar Cc: Thomas Gleixner Cc: "H. Peter Anvin" Cc: Phillip Lougher Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6a8811629e9aa611aa710162f9e02020bba52c87 Author: Phillip Lougher Date: Wed Sep 23 15:57:37 2009 -0700 lzma/gzip: fix potential oops when input data is truncated If the lzma/gzip decompressors are called with insufficient input data (len > 0 & fill = NULL), they will attempt to call the fill function to obtain more data, leading to a kernel oops. Signed-off-by: Phillip Lougher Cc: "H. Peter Anvin" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3354f73b24c6d392ed7fd5583cfcc7604c1934ae Author: Julia Lawall Date: Wed Sep 23 15:57:36 2009 -0700 drivers/vlynq/vlynq.c: fix resource size off by 1 error In this case, the calls to request_mem_region, ioremap, and release_mem_region all have a consistent length argument, len, but since in other files (res->end - res->start) + 1, equivalent to resource_size(res), is used for a resource-typed structure res, one could consider whether the same should be done here. The problem was found using the following semantic patch: (http://www.emn.fr/x-info/coccinelle/) // @@ struct resource *res; @@ - (res->end - res->start) + 1 + resource_size(res) @@ struct resource *res; @@ - res->end - res->start + BAD(resource_size(res)) // Signed-off-by: Julia Lawall Acked-by: Florian Fainelli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a21f3c2a04d8a8d26b4bf3523368380feb8742b7 Author: Julia Lawall Date: Wed Sep 23 15:57:35 2009 -0700 fs/romfs: correct error-handling code romfs_iget returns an ERR_PTR value in an error case instead of NULL. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @match exists@ expression x, E; statement S1, S2; @@ x = romfs_iget(...) ... when != x = E ( * if (x == NULL || ...) S1 else S2 | * if (x == NULL && ...) S1 else S2 ) // Signed-off-by: Julia Lawall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9e5f1138d76e45b0ce56314ba0587e5942b55dcc Author: Roel Kluin Date: Wed Sep 23 15:57:33 2009 -0700 gru: allocation may fail in quicktest1() The allocation may fail. Signed-off-by: Roel Kluin Acked-by: Jack Steiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f8679af874b604db78d59d2a0a873a7f3d542842 Author: Alexey Dobriyan Date: Wed Sep 23 15:57:33 2009 -0700 gru: use proc_create() Signed-off-by: Alexey Dobriyan Cc: Jack Steiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 858f09930b32c11b40fd0c5c467982ba09b10894 Author: Alexey Dobriyan Date: Wed Sep 23 15:57:32 2009 -0700 aio: ifdef fields in mm_struct ->ioctx_lock and ->ioctx_list are used only under CONFIG_AIO. Signed-off-by: Alexey Dobriyan Cc: Zach Brown Cc: Benjamin LaHaise Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b873c2f34ecd4a5a69b41b852cbc365694541c5f Author: Jiri Slaby Date: Wed Sep 23 15:57:31 2009 -0700 memstick: move dev_dbg id_reg.if_mode might be unitialized when (*mrq)->error is nonzero. move dev_dbg() inside the if so that we are sure we can use id_reg values. Signed-off-by: Jiri Slaby Cc: Alex Dubov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3886de938cc23d5208a34064d8363d6d7b54b461 Author: Roel Kluin Date: Wed Sep 23 15:57:30 2009 -0700 adfs: remove redundant test on unsigned unsigned block cannot be less than 0. Signed-off-by: Roel Kluin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 458e5ff13e1bed050990d97e9aa55bcdafc951a7 Author: Jesper Dangaard Brouer Date: Wed Sep 23 15:57:29 2009 -0700 edac: core: remove completion-wait for complete with rcu_barrier Module edac_core.ko uses call_rcu() callbacks in edac_device.c, edac_mc.c and edac_pci.c. They all use a wait_for_completion() scheme, but this scheme it not 100% safe on multiple CPUs. See the _rcu_barrier() implementation which explains why extra precausion is needed. The patch adds a comment about rcu_barrier() and as a precausion calls rcu_barrier(). A maintainer needs to look at removing the wait_for_completion code. [dougthompson@xmission.com: remove the wait_for_completion code] Signed-off-by Jesper Dangaard Brouer Signed-off-by: Doug Thompson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dd8ef1db87a486577b3a76e6ad45df52e12d0145 Author: Jason Uhlenkott Date: Wed Sep 23 15:57:27 2009 -0700 edac: i3200 memory controller driver A driver for the Intel 3200 and 3210 memory controllers. It has only had light testing so far, and currently makes no attempt to decode error addresses at anything finer than csrow granularity. Signed-off-by: Jason Uhlenkott Signed-off-by: Doug Thompson Cc: Ingo Molnar Cc: "H. Peter Anvin" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 30a61fff3a2b19506c66ea81fecb6a7747af3d47 Author: Julia Lawall Date: Wed Sep 23 15:57:26 2009 -0700 edac: fix resource size calculation Use the function resource_size, which reduces the chance of introducing off-by-one errors in calculating the resource size. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // @@ struct resource *res; @@ - (res->end - res->start) + 1 + resource_size(res) // Signed-off-by: Julia Lawall Signed-off-by: Doug Thompson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b4846251727a38a7f248e41308c060995371dd05 Author: Ira W. Snyder Date: Wed Sep 23 15:57:25 2009 -0700 edac: mpc85xx add mpc83xx support Add support for the Freescale MPC83xx memory controller to the existing driver for the Freescale MPC85xx memory controller. The only difference between the two processors are in the CS_BNDS register parsing code, which has been changed so it will work on both processors. The L2 cache controller does not exist on the MPC83xx, but the OF subsystem will not use the driver if the device is not present in the OF device tree. I had to change the nr_pages calculation to make the math work out. I checked it on my board and did the math by hand for a 64GB 85xx using 64K pages. In both cases, nr_pages * PAGE_SIZE comes out to the correct value. Signed-off-by: Ira W. Snyder Signed-off-by: Doug Thompson Cc: Kumar Gala Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a014554e667d702a3a7ae1cf500ebd358e7991be Author: Yang Shi Date: Wed Sep 23 15:57:24 2009 -0700 edac: mpc85xx add P2020DS support Based on Kumar's new compatible types patch, add P2020 into MPC85xx EDAC compatible lists so that EDAC can recognize P2020 meomry controller and L2 cache controller and export the relevant fields to sysfs. EDAC MPC85xx DDR3 support is needed if DDR3 memory stick is installed on a P2020DS board so that EDAC core can recognize DDR3 memory type. Signed-off-by: Yang Shi Acked-by: Dave Jiang Signed-off-by: Doug Thompson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9064a6787aa1d8ceaf5ba16fe1dfedb0755dc7eb Author: Mike Frysinger Date: Wed Sep 23 15:57:23 2009 -0700 linux/futex.h: place kernel types behind __KERNEL__ The forward decls for some kernel types are only needed by the code behind __KERNEL__, so don't bleed these types to userspace. Signed-off-by: Mike Frysinger Cc: Thomas Gleixner Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e5a4738699d6eca408dcb225bd350413927701e2 Author: Sukadev Bhattiprolu Date: Wed Sep 23 15:57:22 2009 -0700 pidns: deny CLONE_PARENT|CLONE_NEWPID combination CLONE_PARENT was used to implement an older threading model. For consistency with the CLONE_THREAD check in copy_pid_ns(), disable CLONE_PARENT with CLONE_NEWPID, at least until the required semantics of pid namespaces are clear. Signed-off-by: Sukadev Bhattiprolu Acked-by: Roland McGrath Acked-by: Serge Hallyn Cc: Oren Laadan Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 123be07b0b399670a7cc3d82fef0cb4f93ef885c Author: Sukadev Bhattiprolu Date: Wed Sep 23 15:57:20 2009 -0700 fork(): disable CLONE_PARENT for init When global or container-init processes use CLONE_PARENT, they create a multi-rooted process tree. Besides siblings of global init remain as zombies on exit since they are not reaped by their parent (swapper). So prevent global and container-inits from creating siblings. Signed-off-by: Sukadev Bhattiprolu Acked-by: Eric W. Biederman Acked-by: Roland McGrath Cc: Oren Laadan Cc: Oleg Nesterov Cc: Serge Hallyn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8d65af789f3e2cf4cfbdbf71a0f7a61ebcd41d38 Author: Alexey Dobriyan Date: Wed Sep 23 15:57:19 2009 -0700 sysctl: remove "struct file *" argument of ->proc_handler It's unused. It isn't needed -- read or write flag is already passed and sysctl shouldn't care about the rest. It _was_ used in two places at arch/frv for some reason. Signed-off-by: Alexey Dobriyan Cc: David Howells Cc: "Eric W. Biederman" Cc: Al Viro Cc: Ralf Baechle Cc: Martin Schwidefsky Cc: Ingo Molnar Cc: "David S. Miller" Cc: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c0d0787b6d47d9f4d5e8bd321921104e854a9135 Author: Joe Perches Date: Wed Sep 23 15:57:17 2009 -0700 MAINTAINERS: add Matt Mackall and Herbert Xu to HARDWARE RANDOM NUMBER GENERATOR Signed-off-by: Joe Perches Cc: David Daney Cc: Herbert Xu Cc: Matt Mackall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 156dd635e26ab2b356be139ec4b5651afd3805e2 Author: Mike Frysinger Date: Wed Sep 23 15:57:16 2009 -0700 bfin-otp: add writing support The on-chip OTP may be written at runtime, so enable support for it in the driver. However, since writing should really be done only on development systems, don't bend over backwards to make sure the simple software lock is per-fd -- per-device is OK. Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fbd8ae106850b6a0215c2776e70a75a1b93cafc2 Author: Dimitri Sivanich Date: Wed Sep 23 15:57:15 2009 -0700 drivers/char/uv_mmtimer.c: add memory mapped RTC driver for UV This driver memory maps the UV Hub RTC. Signed-off-by: Dimitri Sivanich Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 459ca8b4ed1889b0a69bbe21888e6af136d495f3 Author: Dan Carpenter Date: Wed Sep 23 15:57:14 2009 -0700 drivers/char/rio/rioctrl.c: off by one error in rioctrl.c If DownLoad.ProductCode == MAX_PRODUCT, that would be a problem when we do RIOBootTable[DownLoad.ProductCode] a couple lines down. Found by smatch (http://repo.or.cz/w/smatch.git). Signed-off-by: Dan Carpenter Cc: Jiri Slaby Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ae21cf9248584d9b3776bfe2ebec47256bf098f8 Author: Nils Carlson Date: Wed Sep 23 15:57:13 2009 -0700 hpet: hpet driver periodic timer setup bug fixes The periodic interrupt from drivers/char/hpet.c does not work correctly, both when using the periodic capability of the hardware and while emulating the periodic interrupt (when hardware does not support periodic mode). With timers capable of periodic interrupts, the comparator field is first set with the period value followed by set of hidden accumulator, which has the side effect of overwriting the comparator value. This results in wrong periodicity for the interrupts. For, periodic interrupts to work, following steps are necessary, in that order. * Set config with Tn_VAL_SET_CNF bit * Write to hidden accumulator, the value written is the time when the first interrupt should be generated * Write compartor with period interval for subsequent interrupts (http://www.intel.com/hardwaredesign/hpetspec_1.pdf ) When emulating periodic timer with timers not capable of periodic interrupt, driver is adding the period to counter value instead of comparator value, which causes slow drift when using this emulation. Also, driver seems to add hpetp->hp_delta both while setting up periodic interrupt and while emulating periodic interrupts with timers not capable of doing periodic interrupts. This hp_delta will result in slower than expected interrupt rate and should not be used while setting the interval. Signed-off-by: Venkatesh Pallipadi Signed-off-by: Nils Carlson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dc80df567dd04738ee8b3922feacf099ae81645e Author: Roel Kluin Date: Wed Sep 23 15:57:11 2009 -0700 mwave: fix read buffer overflow Check whether index is within bounds before grabbing the element. Signed-off-by: Roel Kluin Cc: Kay Sievers Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dd5d81f326da8d151939b833993b799c0d0d1d6e Author: Renzo Davoli Date: Wed Sep 23 15:57:10 2009 -0700 fs/char_dev.c: remove useless loop There are two useless lines in fs/char_dev.c. In register_chrdev there is a loop to change all '/' into '!' in the kernel object name. This code is useless as the same substitution is in kobject_set_name_vargs in lib/kobject.c: 228 /* ewww... some of these buggers have '/' in the name ... */ 229 while ((s = strchr(kobj->name, '/'))) 230 s[0] = '!'; kobject_set_name_vargs is called by kobject_set_name. kobject_set_name is called just above the useless loop. [hidave.darkstar@gmail.com: fix warning, remove the unused char *s] Signed-off-by: Renzo Davoli Cc: Al Viro Signed-off-by: Dave Young Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bb521c5de070b86a1e049e2dbf62328f717ff1e8 Author: Nikanth Karthikesan Date: Wed Sep 23 15:57:09 2009 -0700 /dev/zero: avoid repeated access_ok() checks In read_zero, we check for access_ok() once for the count bytes. It is unnecessarily checked again in clear_user. Use __clear_user, which does not check for access_ok(). Signed-off-by: Nikanth Karthikesan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0b8c78f2bfa6ebed0f47794b5995a0d4b3fe456d Author: Mike Frysinger Date: Wed Sep 23 15:57:07 2009 -0700 flat: use IS_ERR_VALUE() helper macro There is a common macro now for testing mixed pointer/errno values, so use that rather than handling the casts ourself. Signed-off-by: Mike Frysinger Acked-by: David McCullough Acked-by: Greg Ungerer Cc: David Howells Cc: Paul Mundt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8e8b63a68c7ec95ef23770813120f4f98c76e08b Author: David Howells Date: Wed Sep 23 15:57:06 2009 -0700 fdpic: ignore the loader's PT_GNU_STACK when calculating the stack size Ignore the loader's PT_GNU_STACK when calculating the stack size, and only consider the executable's PT_GNU_STACK, assuming the executable has one. Currently the behaviour is to take the largest stack size and use that, but that means you can't reduce the stack size in the executable. The loader's stack size should probably only be used when executing the loader directly. WARNING: This patch is slightly dangerous - it may render a system inoperable if the loader's stack size is larger than that of important executables, and the system relies unknowingly on this increasing the size of the stack. Signed-off-by: David Howells Signed-off-by: Mike Frysinger Acked-by: Paul Mundt Cc: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0cf062d0ffa33d491e2695b0d298ccf9cbb58d3d Author: Amerigo Wang Date: Wed Sep 23 15:57:05 2009 -0700 elf: clean up fill_note_info() Introduce a helper function elf_note_info_init() to help fill_note_info() to do initializations, also fix the potential memory leaks. [akpm@linux-foundation.org: remove NUM_NOTES] Signed-off-by: WANG Cong Cc: Alexander Viro Cc: David Howells Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d9588725e52650e82989707f8fd2feb67ad2dc8e Author: Roland McGrath Date: Wed Sep 23 15:57:04 2009 -0700 signals: inline __fatal_signal_pending __fatal_signal_pending inlines to one instruction on x86, probably two instructions on other machines. It takes two longer x86 instructions just to call it and test its return value, not to mention the function itself. On my random x86_64 config, this saved 70 bytes of text (59 of those being __fatal_signal_pending itself). Signed-off-by: Roland McGrath Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ba0a6c9f6fceed11c6a99e8326f0477fe383e6b5 Author: Peter Zijlstra Date: Wed Sep 23 15:57:03 2009 -0700 fcntl: add F_[SG]ETOWN_EX In order to direct the SIGIO signal to a particular thread of a multi-threaded application we cannot, like suggested by the manpage, put a TID into the regular fcntl(F_SETOWN) call. It will still be send to the whole process of which that thread is part. Since people do want to properly direct SIGIO we introduce F_SETOWN_EX. The need to direct SIGIO comes from self-monitoring profiling such as with perf-counters. Perf-counters uses SIGIO to notify that new sample data is available. If the signal is delivered to the same task that generated the new sample it can augment that data by inspecting the task's user-space state right after it returns from the kernel. This is esp. convenient for interpreted or virtual machine driven environments. Both F_SETOWN_EX and F_GETOWN_EX take a pointer to a struct f_owner_ex as argument: struct f_owner_ex { int type; pid_t pid; }; Where type is one of F_OWNER_TID, F_OWNER_PID or F_OWNER_GID. Signed-off-by: Peter Zijlstra Reviewed-by: Oleg Nesterov Tested-by: stephane eranian Cc: Michael Kerrisk Cc: Roland McGrath Cc: Al Viro Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 06f1631a1671bce2d59d58cb1debdf23e1803ebf Author: Oleg Nesterov Date: Wed Sep 23 15:57:01 2009 -0700 signals: send_sigio: use do_send_sig_info() to avoid check_kill_permission() group_send_sig_info()->check_kill_permission() assumes that current is the sender and uses current_cred(). This is not true in send_sigio_to_task() case. From the security pov the sender is not current, but the task which did fcntl(F_SETOWN), that is why we have sigio_perm() which uses the right creds to check. Fortunately, send_sigio() always sends either SEND_SIG_PRIV or SI_FROMKERNEL() signal, so check_kill_permission() does nothing. But still it would be tidier to avoid this bogus security check and save a couple of cycles. Signed-off-by: Oleg Nesterov Cc: Peter Zijlstra Cc: stephane eranian Cc: Ingo Molnar Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4a30debfb778240a4b1767d4b0c5a5b25ab97160 Author: Oleg Nesterov Date: Wed Sep 23 15:57:00 2009 -0700 signals: introduce do_send_sig_info() helper Introduce do_send_sig_info() and convert group_send_sig_info(), send_sig_info(), do_send_specific() to use this helper. Hopefully it will have more users soon, it allows to specify specific/group behaviour via "bool group" argument. Shaves 80 bytes from .text. Signed-off-by: Oleg Nesterov Cc: Peter Zijlstra Cc: stephane eranian Cc: Ingo Molnar Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 964ee7df90d799e38fb1556c57cd5c45fc736436 Author: Oleg Nesterov Date: Wed Sep 23 15:56:59 2009 -0700 exec: fix set_binfmt() vs sys_delete_module() race sys_delete_module() can set MODULE_STATE_GOING after search_binary_handler() does try_module_get(). In this case set_binfmt()->try_module_get() fails but since none of the callers check the returned error, the task will run with the wrong old ->binfmt. The proper fix should change all ->load_binary() methods, but we can rely on fact that the caller must hold a reference to binfmt->module and use __module_get() which never fails. Signed-off-by: Oleg Nesterov Acked-by: Rusty Russell Cc: Hiroshi Shimamoto Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 61be228a06dc6e8662f30e89eda3c12083c1f379 Author: Neil Horman Date: Wed Sep 23 15:56:58 2009 -0700 exec: allow do_coredump() to wait for user space pipe readers to complete Allow core_pattern pipes to wait for user space to complete One of the things that user space processes like to do is look at metadata for a crashing process in their /proc/ directory. this is racy however, since do_coredump in the kernel doesn't wait for the user space process to complete before it reaps the crashing process. This patch corrects that. Allowing the kernel to wait for the user space process to complete before cleaning up the crashing process. This is a bit tricky to do for a few reasons: 1) The user space process isn't our child, so we can't sys_wait4 on it 2) We need to close the pipe before waiting for the user process to complete, since the user process may rely on an EOF condition I've discussed several solutions with Oleg Nesterov off-list about this, and this is the one we've come up with. We add ourselves as a pipe reader (to prevent premature cleanup of the pipe_inode_info), and remove ourselves as a writer (to provide an EOF condition to the writer in user space), then we iterate until the user space process exits (which we detect by pipe->readers == 1, hence the > 1 check in the loop). When we exit the loop, we restore the proper reader/writer values, then we return and let filp_close in do_coredump clean up the pipe data properly. Signed-off-by: Neil Horman Reported-by: Earl Chew Cc: Oleg Nesterov Cc: Andi Kleen Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a293980c2e261bd5b0d2a77340dd04f684caff58 Author: Neil Horman Date: Wed Sep 23 15:56:56 2009 -0700 exec: let do_coredump() limit the number of concurrent dumps to pipes Introduce core pipe limiting sysctl. Since we can dump cores to pipe, rather than directly to the filesystem, we create a condition in which a user can create a very high load on the system simply by running bad applications. If the pipe reader specified in core_pattern is poorly written, we can have lots of ourstandig resources and processes in the system. This sysctl introduces an ability to limit that resource consumption. core_pipe_limit defines how many in-flight dumps may be run in parallel, dumps beyond this value are skipped and a note is made in the kernel log. A special value of 0 in core_pipe_limit denotes unlimited core dumps may be handled (this is the default value). [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Neil Horman Reported-by: Earl Chew Cc: Oleg Nesterov Cc: Andi Kleen Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 725eae32df7754044809973034429a47e6035158 Author: Neil Horman Date: Wed Sep 23 15:56:54 2009 -0700 exec: make do_coredump() more resilient to recursive crashes Change how we detect recursive dumps. Currently we have a mechanism by which we try to compare pathnames of the crashing process to the core_pattern path. This is broken for a dozen reasons, and just doesn't work in any sort of robust way. I'm replacing it with the use of a 0 RLIMIT_CORE value. Since helper apps set RLIMIT_CORE to zero, we don't write out core files for any process with that particular limit set. It the core_pattern is a pipe, any non-zero limit is translated to RLIM_INFINITY. This allows complete dumps to be captured, but prevents infinite recursion in the event that the core_pattern process itself crashes. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Neil Horman Reported-by: Earl Chew Cc: Oleg Nesterov Cc: Andi Kleen Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ae6d2ed7bb3877ff35b9569402025f40ea2e1803 Author: Roland McGrath Date: Wed Sep 23 15:56:53 2009 -0700 signals: tracehook_notify_jctl change This changes tracehook_notify_jctl() so it's called with the siglock held, and changes its argument and return value definition. These clean-ups make it a better fit for what new tracing hooks need to check. Tracing needs the siglock here, held from the time TASK_STOPPED was set, to avoid potential SIGCONT races if it wants to allow any blocking in its tracing hooks. This also folds the finish_stop() function into its caller do_signal_stop(). The function is short, called only once and only unconditionally. It aids readability to fold it in. [oleg@redhat.com: do not call tracehook_notify_jctl() in TASK_STOPPED state] [oleg@redhat.com: introduce tracehook_finish_jctl() helper] Signed-off-by: Roland McGrath Signed-off-by: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b6fe2d117e98805ee76352e6468f87d494a97292 Author: Vitaly Mayatskikh Date: Wed Sep 23 15:56:52 2009 -0700 wait_noreap_copyout(): check for ->wo_info != NULL Current behaviour of sys_waitid() looks odd. If user passes infop == NULL, sys_waitid() returns success. When user additionally specifies flag WNOWAIT, sys_waitid() returns -EFAULT on the same conditions. When user combines WNOWAIT with WCONTINUED, sys_waitid() again returns success. This patch adds check for ->wo_info in wait_noreap_copyout(). User-visible change: starting from this commit, sys_waitid() always checks infop != NULL and does not fail if it is NULL. Signed-off-by: Vitaly Mayatskikh Reviewed-by: Oleg Nesterov Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dfe16dfa4ac178d9a10b489a73d535c6976e48d2 Author: Vitaly Mayatskikh Date: Wed Sep 23 15:56:51 2009 -0700 do_wait: fix sys_waitid()-specific behaviour do_wait() checks ->wo_info to figure out who is the caller. If it's not NULL the caller should be sys_waitid(), in that case do_wait() fixes up the retval or zeros ->wo_info, depending on retval from underlying function. This is bug: user can pass ->wo_info == NULL and sys_waitid() will return incorrect value. man 2 waitid says: waitid(): returns 0 on success Test-case: int main(void) { if (fork()) assert(waitid(P_ALL, 0, NULL, WEXITED) == 0); return 0; } Result: Assertion `waitid(P_ALL, 0, ((void *)0), 4) == 0' failed. Move that code to sys_waitid(). User-visible change: sys_waitid() will return 0 on success, either infop is set or not. Note, there's another bug in wait_noreap_copyout() which affects return value of sys_waitid(). It will be fixed in next patch. Signed-off-by: Vitaly Mayatskikh Reviewed-by: Oleg Nesterov Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b6e763f07fba6243d2a553ed9a4f3e10a789932a Author: Oleg Nesterov Date: Wed Sep 23 15:56:50 2009 -0700 wait_consider_task: kill "parent" argument Kill the unused "parent" argument in wait_consider_task(), it was never used. Signed-off-by: Oleg Nesterov Cc: Roland McGrath Cc: Ingo Molnar Cc: Ratan Nalumasu Cc: Vitaly Mayatskikh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 989264f4645c183331a1279d513f4b1ddc06e1f5 Author: Oleg Nesterov Date: Wed Sep 23 15:56:49 2009 -0700 do_wait-wakeup-optimization: simplify task_pid_type() task_pid_type() is only used by eligible_pid() which has to check wo_type != PIDTYPE_MAX anyway. Remove this check from task_pid_type() and factor out ->pids[type] access, this shrinks .text a bit and simplifies the code. The matches the behaviour of other similar helpers, say get_task_pid(). The caller must ensure that pid_type is valid, not the callee. Signed-off-by: Oleg Nesterov Cc: Roland McGrath Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5c01ba49e6647d86bc7576105f82027200d1f303 Author: Oleg Nesterov Date: Wed Sep 23 15:56:48 2009 -0700 do_wait-wakeup-optimization: fix child_wait_callback()->eligible_child() usage child_wait_callback()->eligible_child() is not right, we can miss the wakeup if the task was detached before __wake_up_parent() and the caller of do_wait() didn't use __WALL. Move ->wo_pid checks from eligible_child() to the new helper, eligible_pid(), and change child_wait_callback() to use it instead of eligible_child(). Note: actually I think it would be better to fix the __WCLONE check in eligible_child(), it doesn't look exactly right. But it is not clear what is the supposed behaviour, and any change is user-visible. Reported-by: KAMEZAWA Hiroyuki Tested-by: KAMEZAWA Hiroyuki Signed-off-by: Oleg Nesterov Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b4fe51823d797d6959b2eee7868023e61606daa9 Author: Oleg Nesterov Date: Wed Sep 23 15:56:47 2009 -0700 do_wait() wakeup optimization: child_wait_callback: check __WNOTHREAD case Suggested by Roland. do_wait(__WNOTHREAD) can only succeed if the caller is either ptracer, or it is ->real_parent and the child is not traced. IOW, caller == p->parent otherwise we should not wake up. Change child_wait_callback() to check this. Ratan reports the workload with CPU load >99% caused by unnecessary wakeups, should be fixed by this patch. Signed-off-by: Oleg Nesterov Acked-by: Roland McGrath Cc: Ingo Molnar Cc: Ratan Nalumasu Cc: Vitaly Mayatskikh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0b7570e77f7c3abd43107dabc47ea89daf9a1cba Author: Oleg Nesterov Date: Wed Sep 23 15:56:46 2009 -0700 do_wait() wakeup optimization: change __wake_up_parent() to use filtered wakeup Ratan Nalumasu reported that in a process with many threads doing unnecessary wakeups. Every waiting thread in the process wakes up to loop through the children and see that the only ones it cares about are still not ready. Now that we have struct wait_opts we can change do_wait/__wake_up_parent to use filtered wakeups. We can make child_wait_callback() more clever later, right now it only checks eligible_child(). Signed-off-by: Oleg Nesterov Acked-by: Roland McGrath Cc: Ingo Molnar Cc: Ratan Nalumasu Cc: Vitaly Mayatskikh Acked-by: James Morris Tested-by: Valdis Kletnieks Acked-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a2322e1d272938d192d8c24cdacf57c0c7a2683f Author: Oleg Nesterov Date: Wed Sep 23 15:56:45 2009 -0700 do_wait() wakeup optimization: shift security_task_wait() from eligible_child() to wait_consider_task() Preparation, no functional changes. eligible_child() has a single caller, wait_consider_task(). We can move security_task_wait() out from eligible_child(), this allows us to use it for filtered wake_up(). Signed-off-by: Oleg Nesterov Acked-by: Roland McGrath Cc: Ingo Molnar Cc: Ratan Nalumasu Cc: Vitaly Mayatskikh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a7f0765edfd53aed09cb7b0e15863688b39447de Author: Oleg Nesterov Date: Wed Sep 23 15:56:44 2009 -0700 ptrace: __ptrace_detach: do __wake_up_parent() if we reap the tracee The bug is old, it wasn't cause by recent changes. Test case: static void *tfunc(void *arg) { int pid = (long)arg; assert(ptrace(PTRACE_ATTACH, pid, NULL, NULL) == 0); kill(pid, SIGKILL); sleep(1); return NULL; } int main(void) { pthread_t th; long pid = fork(); if (!pid) pause(); signal(SIGCHLD, SIG_IGN); assert(pthread_create(&th, NULL, tfunc, (void*)pid) == 0); int r = waitpid(-1, NULL, __WNOTHREAD); printf("waitpid: %d %m\n", r); return 0; } Before the patch this program hangs, after this patch waitpid() correctly fails with errno == -ECHILD. The problem is, __ptrace_detach() reaps the EXIT_ZOMBIE tracee if its ->real_parent is our sub-thread and we ignore SIGCHLD. But in this case we should wake up other threads which can sleep in do_wait(). Signed-off-by: Oleg Nesterov Cc: Roland McGrath Cc: Vitaly Mayatskikh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1dd3a27326d307952f8ad2499478c84dc7311517 Author: Daisuke Nishimura Date: Wed Sep 23 15:56:43 2009 -0700 memcg: show swap usage in stat file We now count MEM_CGROUP_STAT_SWAPOUT, so we can show swap usage. It would be useful for users to show swap usage in memory.stat file, because they don't need calculate memsw.usage - res.usage to know swap usage. Signed-off-by: Daisuke Nishimura Reviewed-by: KAMEZAWA Hiroyuki Reviewed-by: Balbir Singh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0c3e73e84fe3f64cf1c2e8bb4e91e8901cbcdc38 Author: Balbir Singh Date: Wed Sep 23 15:56:42 2009 -0700 memcg: improve resource counter scalability Reduce the resource counter overhead (mostly spinlock) associated with the root cgroup. This is a part of the several patches to reduce mem cgroup overhead. I had posted other approaches earlier (including using percpu counters). Those patches will be a natural addition and will be added iteratively on top of these. The patch stops resource counter accounting for the root cgroup. The data for display is derived from the statisitcs we maintain via mem_cgroup_charge_statistics (which is more scalable). What happens today is that, we do double accounting, once using res_counter_charge() and once using memory_cgroup_charge_statistics(). For the root, since we don't implement limits any more, we don't need to track every charge via res_counter_charge() and check for limit being exceeded and reclaim. The main mem->res usage_in_bytes can be derived by summing the cache and rss usage data from memory statistics (MEM_CGROUP_STAT_RSS and MEM_CGROUP_STAT_CACHE). However, for memsw->res usage_in_bytes, we need additional data about swapped out memory. This patch adds a MEM_CGROUP_STAT_SWAPOUT and uses that along with MEM_CGROUP_STAT_RSS and MEM_CGROUP_STAT_CACHE to derive the memsw data. This data is computed recursively when hierarchy is enabled. The tests results I see on a 24 way show that 1. The lock contention disappears from /proc/lock_stats 2. The results of the test are comparable to running with cgroup_disable=memory. Here is a sample of my program runs Without Patch Performance counter stats for '/home/balbir/parallel_pagefault': 7192804.124144 task-clock-msecs # 23.937 CPUs 424691 context-switches # 0.000 M/sec 267 CPU-migrations # 0.000 M/sec 28498113 page-faults # 0.004 M/sec 5826093739340 cycles # 809.989 M/sec 408883496292 instructions # 0.070 IPC 7057079452 cache-references # 0.981 M/sec 3036086243 cache-misses # 0.422 M/sec 300.485365680 seconds time elapsed With cgroup_disable=memory Performance counter stats for '/home/balbir/parallel_pagefault': 7182183.546587 task-clock-msecs # 23.915 CPUs 425458 context-switches # 0.000 M/sec 203 CPU-migrations # 0.000 M/sec 92545093 page-faults # 0.013 M/sec 6034363609986 cycles # 840.185 M/sec 437204346785 instructions # 0.072 IPC 6636073192 cache-references # 0.924 M/sec 2358117732 cache-misses # 0.328 M/sec 300.320905827 seconds time elapsed With this patch applied Performance counter stats for '/home/balbir/parallel_pagefault': 7191619.223977 task-clock-msecs # 23.955 CPUs 422579 context-switches # 0.000 M/sec 88 CPU-migrations # 0.000 M/sec 91946060 page-faults # 0.013 M/sec 5957054385619 cycles # 828.333 M/sec 1058117350365 instructions # 0.178 IPC 9161776218 cache-references # 1.274 M/sec 1920494280 cache-misses # 0.267 M/sec 300.218764862 seconds time elapsed Data from Prarit (kernel compile with make -j64 on a 64 CPU/32G machine) For a single run Without patch real 27m8.988s user 87m24.916s sys 382m6.037s With patch real 4m18.607s user 84m58.943s sys 50m52.682s With config turned off real 4m54.972s user 90m13.456s sys 50m19.711s NOTE: The data looks counterintuitive due to the increased performance with the patch, even over the config being turned off. We probably need more runs, but so far all testing has shown that the patches definitely help. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Balbir Singh Cc: Prarit Bhargava Cc: Andi Kleen Reviewed-by: KAMEZAWA Hiroyuki Reviewed-by: Daisuke Nishimura Cc: KOSAKI Motohiro Cc: Paul Menage Cc: Li Zefan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4e41695356fb4e0b153be1440ad027e46e0a7ea2 Author: Balbir Singh Date: Wed Sep 23 15:56:39 2009 -0700 memory controller: soft limit reclaim on contention Implement reclaim from groups over their soft limit Permit reclaim from memory cgroups on contention (via the direct reclaim path). memory cgroup soft limit reclaim finds the group that exceeds its soft limit by the largest number of pages and reclaims pages from it and then reinserts the cgroup into its correct place in the rbtree. Add additional checks to mem_cgroup_hierarchical_reclaim() to detect long loops in case all swap is turned off. The code has been refactored and the loop check (loop < 2) has been enhanced for soft limits. For soft limits, we try to do more targetted reclaim. Instead of bailing out after two loops, the routine now reclaims memory proportional to the size by which the soft limit is exceeded. The proportion has been empirically determined. [akpm@linux-foundation.org: build fix] [kamezawa.hiroyu@jp.fujitsu.com: fix softlimit css refcnt handling] [nishimura@mxp.nes.nec.co.jp: refcount of the "victim" should be decremented before exiting the loop] Signed-off-by: Balbir Singh Cc: KAMEZAWA Hiroyuki Cc: Li Zefan Acked-by: KOSAKI Motohiro Signed-off-by: KAMEZAWA Hiroyuki Signed-off-by: Daisuke Nishimura Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 75822b4495b62e8721e9b88e3cf9e653a0c85b73 Author: Balbir Singh Date: Wed Sep 23 15:56:38 2009 -0700 memory controller: soft limit refactor reclaim flags Refactor mem_cgroup_hierarchical_reclaim() Refactor the arguments passed to mem_cgroup_hierarchical_reclaim() into flags, so that new parameters don't have to be passed as we make the reclaim routine more flexible Signed-off-by: Balbir Singh Cc: KAMEZAWA Hiroyuki Cc: Li Zefan Cc: KOSAKI Motohiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f64c3f54940d6929a2b6dcffaab942bd62be2e66 Author: Balbir Singh Date: Wed Sep 23 15:56:37 2009 -0700 memory controller: soft limit organize cgroups Organize cgroups over soft limit in a RB-Tree Introduce an RB-Tree for storing memory cgroups that are over their soft limit. The overall goal is to 1. Add a memory cgroup to the RB-Tree when the soft limit is exceeded. We are careful about updates, updates take place only after a particular time interval has passed 2. We remove the node from the RB-Tree when the usage goes below the soft limit The next set of patches will exploit the RB-Tree to get the group that is over its soft limit by the largest amount and reclaim from it, when we face memory contention. [hugh.dickins@tiscali.co.uk: CONFIG_CGROUP_MEM_RES_CTLR=y CONFIG_PREEMPT=y fails to boot] Signed-off-by: Balbir Singh Signed-off-by: KAMEZAWA Hiroyuki Cc: Li Zefan Cc: KOSAKI Motohiro Signed-off-by: Hugh Dickins Cc: Jiri Slaby Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 296c81d89f4f14269f7346f81442910158c0a83a Author: Balbir Singh Date: Wed Sep 23 15:56:36 2009 -0700 memory controller: soft limit interface Add an interface to allow get/set of soft limits. Soft limits for memory plus swap controller (memsw) is currently not supported. Resource counters have been enhanced to support soft limits and new type RES_SOFT_LIMIT has been added. Unlike hard limits, soft limits can be directly set and do not need any reclaim or checks before setting them to a newer value. Kamezawa-San raised a question as to whether soft limit should belong to res_counter. Since all resources understand the basic concepts of hard and soft limits, it is justified to add soft limits here. Soft limits are a generic resource usage feature, even file system quotas support soft limits. Signed-off-by: Balbir Singh Cc: KAMEZAWA Hiroyuki Cc: Li Zefan Cc: KOSAKI Motohiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a6df63615b943dbef22df04c19f4506330fe835e Author: Balbir Singh Date: Wed Sep 23 15:56:34 2009 -0700 memory controller: soft limit documentation Soft limits is a new feature for the memory resource controller, something similar has existed in the group scheduler in the form of shares. The CPU controllers interpretation of shares is very different though. Soft limits are the most useful feature to have for environments where the administrator wants to overcommit the system, such that only on memory contention do the limits become active. The current soft limits implementation provides a soft_limit_in_bytes interface for the memory controller and not for memory+swap controller. The implementation maintains an RB-Tree of groups that exceed their soft limit and starts reclaiming from the group that exceeds this limit by the maximum amount. This patch: Add documentation for soft limits Signed-off-by: Balbir Singh Cc: KAMEZAWA Hiroyuki Cc: Li Zefan Cc: KOSAKI Motohiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 261fb61a8bf6d3bd964ae6f1e6af49585d30db51 Author: KAMEZAWA Hiroyuki Date: Wed Sep 23 15:56:33 2009 -0700 memcg: add comments explaining memory barriers Add comments for the reason of smp_wmb() in mem_cgroup_commit_charge(). [akpm@linux-foundation.org: coding-style fixes] Cc: Daisuke Nishimura Cc: Balbir Singh Signed-off-by: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4b3bde4c983de36c59e6c1a24701f6fe816f9f55 Author: Balbir Singh Date: Wed Sep 23 15:56:32 2009 -0700 memcg: remove the overhead associated with the root cgroup Change the memory cgroup to remove the overhead associated with accounting all pages in the root cgroup. As a side-effect, we can no longer set a memory hard limit in the root cgroup. A new flag to track whether the page has been accounted or not has been added as well. Flags are now set atomically for page_cgroup, pcg_default_flags is now obsolete and removed. [akpm@linux-foundation.org: fix a few documentation glitches] Signed-off-by: Balbir Singh Signed-off-by: Daisuke Nishimura Reviewed-by: KAMEZAWA Hiroyuki Cc: Daisuke Nishimura Cc: Li Zefan Cc: Paul Menage Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit be367d09927023d081f9199665c8500f69f14d22 Author: Ben Blum Date: Wed Sep 23 15:56:31 2009 -0700 cgroups: let ss->can_attach and ss->attach do whole threadgroups at a time Alter the ss->can_attach and ss->attach functions to be able to deal with a whole threadgroup at a time, for use in cgroup_attach_proc. (This is a pre-patch to cgroup-procs-writable.patch.) Currently, new mode of the attach function can only tell the subsystem about the old cgroup of the threadgroup leader. No subsystem currently needs that information for each thread that's being moved, but if one were to be added (for example, one that counts tasks within a group) this bit would need to be reworked a bit to tell the subsystem the right information. [hidave.darkstar@gmail.com: fix build] Signed-off-by: Ben Blum Signed-off-by: Paul Menage Acked-by: Li Zefan Reviewed-by: Matt Helsley Cc: "Eric W. Biederman" Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Dave Young Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c378369d8b4fa516ff2b1e79c3eded4e0e955ebb Author: Ben Blum Date: Wed Sep 23 15:56:29 2009 -0700 cgroups: change css_set freeing mechanism to be under RCU Changes css_set freeing mechanism to be under RCU This is a prepatch for making the procs file writable. In order to free the old css_sets for each task to be moved as they're being moved, the freeing mechanism must be RCU-protected, or else we would have to have a call to synchronize_rcu() for each task before freeing its old css_set. Signed-off-by: Ben Blum Signed-off-by: Paul Menage Cc: "Paul E. McKenney" Acked-by: Li Zefan Cc: Matt Helsley Cc: "Eric W. Biederman" Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d1d9fd3308fdef6b4bf564fa3d6cfe35b68b50bc Author: Ben Blum Date: Wed Sep 23 15:56:28 2009 -0700 cgroups: use vmalloc for large cgroups pidlist allocations Separates all pidlist allocation requests to a separate function that judges based on the requested size whether or not the array needs to be vmalloced or can be gotten via kmalloc, and similar for kfree/vfree. Signed-off-by: Ben Blum Signed-off-by: Paul Menage Acked-by: Li Zefan Cc: Matt Helsley Cc: "Eric W. Biederman" Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 72a8cb30d10d4041c455a7054607a7d519167c87 Author: Ben Blum Date: Wed Sep 23 15:56:27 2009 -0700 cgroups: ensure correct concurrent opening/reading of pidlists across pid namespaces Previously there was the problem in which two processes from different pid namespaces reading the tasks or procs file could result in one process seeing results from the other's namespace. Rather than one pidlist for each file in a cgroup, we now keep a list of pidlists keyed by namespace and file type (tasks versus procs) in which entries are placed on demand. Each pidlist has its own lock, and that the pidlists themselves are passed around in the seq_file's private pointer means we don't have to touch the cgroup or its master list except when creating and destroying entries. Signed-off-by: Ben Blum Signed-off-by: Paul Menage Cc: Li Zefan Cc: Matt Helsley Cc: "Eric W. Biederman" Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 102a775e3647628727ae83a9a6abf0564c3ca7cb Author: Ben Blum Date: Wed Sep 23 15:56:26 2009 -0700 cgroups: add a read-only "procs" file similar to "tasks" that shows only unique tgids struct cgroup used to have a bunch of fields for keeping track of the pidlist for the tasks file. Those are now separated into a new struct cgroup_pidlist, of which two are had, one for procs and one for tasks. The way the seq_file operations are set up is changed so that just the pidlist struct gets passed around as the private data. Interface example: Suppose a multithreaded process has pid 1000 and other threads with ids 1001, 1002, 1003: $ cat tasks 1000 1001 1002 1003 $ cat cgroup.procs 1000 $ Signed-off-by: Ben Blum Signed-off-by: Paul Menage Acked-by: Li Zefan Cc: Matt Helsley Cc: "Eric W. Biederman" Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8f3ff20862cfcb85500a2bb55ee64622bd59fd0c Author: Paul Menage Date: Wed Sep 23 15:56:25 2009 -0700 cgroups: revert "cgroups: fix pid namespace bug" The following series adds a "cgroup.procs" file to each cgroup that reports unique tgids rather than pids, and allows all threads in a threadgroup to be atomically moved to a new cgroup. The subsystem "attach" interface is modified to support attaching whole threadgroups at a time, which could introduce potential problems if any subsystem were to need to access the old cgroup of every thread being moved. The attach interface may need to be revised if this becomes the case. Also added is functionality for read/write locking all CLONE_THREAD fork()ing within a threadgroup, by means of an rwsem that lives in the sighand_struct, for per-threadgroup-ness and also for sharing a cacheline with the sighand's atomic count. This scheme should introduce no extra overhead in the fork path when there's no contention. The final patch reveals potential for a race when forking before a subsystem's attach function is called - one potential solution in case any subsystem has this problem is to hang on to the group's fork mutex through the attach() calls, though no subsystem yet demonstrates need for an extended critical section. This patch: Revert commit 096b7fe012d66ed55e98bc8022405ede0cc80e96 Author: Li Zefan AuthorDate: Wed Jul 29 15:04:04 2009 -0700 Commit: Linus Torvalds CommitDate: Wed Jul 29 19:10:35 2009 -0700 cgroups: fix pid namespace bug This is in preparation for some clashing cgroups changes that subsume the original commit's functionaliy. The original commit fixed a pid namespace bug which Ben Blum fixed independently (in the same way, but with different code) as part of a series of patches. I played around with trying to reconcile Ben's patch series with Li's patch, but concluded that it was simpler to just revert Li's, given that Ben's patch series contained essentially the same fix. Signed-off-by: Paul Menage Cc: Li Zefan Cc: Matt Helsley Cc: "Eric W. Biederman" Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2c6ab6d200827e1c41dc71fff3a2ac7473f51777 Author: Paul Menage Date: Wed Sep 23 15:56:23 2009 -0700 cgroups: allow cgroup hierarchies to be created with no bound subsystems This patch removes the restriction that a cgroup hierarchy must have at least one bound subsystem. The mount option "none" is treated as an explicit request for no bound subsystems. A hierarchy with no subsystems can be useful for plain task tracking, and is also a step towards the support for multiply-bindable subsystems. As part of this change, the hierarchy id is no longer calculated from the bitmask of subsystems in the hierarchy (since this is not guaranteed to be unique) but is allocated via an ida. Reference counts on cgroups from css_set objects are now taken explicitly one per hierarchy, rather than one per subsystem. Example usage: mount -t cgroup -o none,name=foo cgroup /mnt/cgroup Based on the "no-op"/"none" subsystem concept proposed by kamezawa.hiroyu@jp.fujitsu.com Signed-off-by: Paul Menage Reviewed-by: Li Zefan Cc: KAMEZAWA Hiroyuki Cc: Balbir Singh Cc: Dhaval Giani Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7717f7ba92de485bce8293419a20ffef130f4286 Author: Paul Menage Date: Wed Sep 23 15:56:22 2009 -0700 cgroups: add a back-pointer from struct cg_cgroup_link to struct cgroup Currently the cgroups code makes the assumption that the subsystem pointers in a struct css_set uniquely identify the hierarchy->cgroup mappings associated with the css_set; and there's no way to directly identify the associated set of cgroups other than by indirecting through the appropriate subsystem state pointers. This patch removes the need for that assumption by adding a back-pointer from struct cg_cgroup_link object to its associated cgroup; this allows the set of cgroups to be determined by traversing the cg_links list in the struct css_set. Signed-off-by: Paul Menage Reviewed-by: Li Zefan Cc: KAMEZAWA Hiroyuki Cc: Balbir Singh Cc: Dhaval Giani Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fe6934354f8e287275500cd6ec73826d4d6ad457 Author: Paul Menage Date: Wed Sep 23 15:56:20 2009 -0700 cgroups: move the cgroup debug subsys into cgroup.c to access internal state While it's architecturally clean to have the cgroup debug subsystem be completely independent of the cgroups framework, it limits its usefulness for debugging the contents of internal data structures. Move the debug subsystem code into the scope of all the cgroups data structures to make more detailed debugging possible. Signed-off-by: Paul Menage Reviewed-by: Li Zefan Reviewed-by: KAMEZAWA Hiroyuki Cc: Balbir Singh Cc: Dhaval Giani Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c6d57f3312a6619d47c5557b5f6154a74d04ff80 Author: Paul Menage Date: Wed Sep 23 15:56:19 2009 -0700 cgroups: support named cgroups hierarchies To simplify referring to cgroup hierarchies in mount statements, and to allow disambiguation in the presence of empty hierarchies and multiply-bindable subsystems this patch adds support for naming a new cgroup hierarchy via the "name=" mount option A pre-existing hierarchy may be specified by either name or by subsystems; a hierarchy's name cannot be changed by a remount operation. Example usage: # To create a hierarchy called "foo" containing the "cpu" subsystem mount -t cgroup -oname=foo,cpu cgroup /mnt/cgroup1 # To mount the "foo" hierarchy on a second location mount -t cgroup -oname=foo cgroup /mnt/cgroup2 Signed-off-by: Paul Menage Reviewed-by: Li Zefan Cc: KAMEZAWA Hiroyuki Cc: Balbir Singh Cc: Dhaval Giani Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 34f77a90f79fca31802c2e942bd73f7f557fe28c Author: Xiaotian Feng Date: Wed Sep 23 15:56:18 2009 -0700 cgroups: make unlock sequence in cgroup_get_sb consistent Make the last unlock sequence consistent with previous unlock sequeue. Acked-by: Balbir Singh Acked-by: Paul Menage Signed-off-by: Xiaotian Feng Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 55dff4954ebdeba2be59e19398a607d799c5fa9f Author: Randy Dunlap Date: Wed Sep 23 15:56:17 2009 -0700 docs: fix various Documentation/ paths in header files Fix various Documentation/ paths in include/linux/. Signed-off-by: Randy Dunlap Reviewed-by: Jesper Juhl Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0b4b2ad5307c76c7105d6e7c724b1c14b8daf482 Author: Wu Fengguang Date: Wed Sep 23 15:56:16 2009 -0700 page-types: add feature for walking process address space Introduce "-p|--pid " for walking the process address space. The default action is to walk raw memory PFNs. Both the virtual address and physical address of each present pages will be listed: # ./tools/vm/page-types -lp $$ | head -3 voffset offset len flags 400 11bebe 1 __RU_lA____M______________________ 402 11bebc 1 __RU_lA____M______________________ Note that voffset/offset/len are now showed as hex numbers. [akpm@linux-foundation.org: coding-style fixes] Cc: Andi Kleen Signed-off-by: Wu Fengguang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ba36c440ba9486b155c9254ce5e50f5f20eb1fcb Author: Josh Triplett Date: Wed Sep 23 15:56:15 2009 -0700 Documentation/vm/.gitignore: add page-types Signed-off-by: Josh Triplett Cc: Wu Fengguang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2552a99b6e3c3f3c9ee1038e6c1f4669a856c59b Author: Jaswinder Singh Rajput Date: Wed Sep 23 15:56:14 2009 -0700 includecheck fix: Documentation, cfag12864b-example.c fix the following 'make includecheck' warning: Documentation/auxdisplay/cfag12864b-example.c: string.h is included more than once. Signed-off-by: Jaswinder Singh Rajput Acked-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bcadbbd4c896c80c263c35ce94b763e5ff58cecd Author: Xiaotian Feng Date: Wed Sep 23 15:56:13 2009 -0700 Documentation: update stale definition of file-nr in fs.txt In "documentation: update Documentation/filesystem/proc.txt and Documentation/sysctls" (commit 760df93ec) we merged /proc/sys/fs documentation in Documentation/sysctl/fs.txt and Documentation/filesystem/proc.txt, but stale file-nr definition remained. This patch adds back the right fs-nr definition for 2.6 kernel. Signed-off-by: Xiaotian Feng Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 16c01b20ae0572d5a1fe8059f1b4c09f79b73cbf Author: Peng Tao Date: Wed Sep 23 15:56:13 2009 -0700 doc/filesystems: more mount cleanups Documentation/filesystems/sharedsubtree.txt needs updating because the mount command in util-linux package is well aware of shared subtree features now. The patch also fixes two typos in sharedsubtree.txt. Signed-off-by: Peng Tao Signed-off-by: Randy Dunlap Cc: Miklos Szeredi Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0288b95b432b88f9daf895b526f64beeaca9ac73 Author: Randy Dunlap Date: Wed Sep 23 15:56:11 2009 -0700 doc/filesystems: remove smount program mount(8) handles shared subtrees just fine, so remove the smount program from Documentation/filesystems/sharedsubtree.txt. Fix annoying "Lets" -> "Let's". Insert space between '#' prompt and "mount" command. Signed-off-by: Randy Dunlap Acked-by: Miklos Szeredi Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 57f1f0874f426a9bdfc5cd3f886113dd5cd17834 Author: Zhaolei Date: Wed Sep 23 15:56:10 2009 -0700 time: add function to convert between calendar time and broken-down time for universal use There are many similar code in kernel for one object: convert time between calendar time and broken-down time. Here is some source I found: fs/ncpfs/dir.c fs/smbfs/proc.c fs/fat/misc.c fs/udf/udftime.c fs/cifs/netmisc.c net/netfilter/xt_time.c drivers/scsi/ips.c drivers/input/misc/hp_sdc_rtc.c drivers/rtc/rtc-lib.c arch/ia64/hp/sim/boot/fw-emu.c arch/m68k/mac/misc.c arch/powerpc/kernel/time.c arch/parisc/include/asm/rtc.h ... We can make a common function for this type of conversion, At least we can get following benefit: 1: Make kernel simple and unify 2: Easy to fix bug in converting code 3: Reduce clone of code in future For example, I'm trying to make ftrace display walltime, this patch will make me easy. This code is based on code from glibc-2.6 Signed-off-by: Zhao Lei Cc: OGAWA Hirofumi Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Pavel Machek Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ef1ff6b8c08954bc203b59e887d1e580dd91755a Author: From: Mel Gorman Date: Wed Sep 23 15:56:05 2009 -0700 hugetlbfs: do not call user_shm_lock() for MAP_HUGETLB fix Commit 6bfde05bf5c ("hugetlbfs: allow the creation of files suitable for MAP_PRIVATE on the vfs internal mount") altered can_do_hugetlb_shm() to check if a file is being created for shared memory or mmap(). If this returns false, we then unconditionally call user_shm_lock() triggering a warning. This block should never be entered for MAP_HUGETLB. This patch partially reverts the problem and fixes the check. Signed-off-by: Eric B Munson Cc: David Rientjes Cc: Mel Gorman Cc: Adam Litke Cc: David Gibson Cc: Lee Schermerhorn Cc: Nick Piggin Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2c6854fdadf940678fd54779b778f6faafb870bb Author: Izik Eidus Date: Wed Sep 23 15:56:04 2009 -0700 ksm: change default values to better fit into mainline kernel Now that ksm is in mainline it is better to change the default values to better fit to most of the users. This patch change the ksm default values to be: ksm_thread_pages_to_scan = 100 (instead of 200) ksm_thread_sleep_millisecs = 20 (like before) ksm_run = KSM_RUN_STOP (instead of KSM_RUN_MERGE - meaning ksm is disabled by default) ksm_max_kernel_pages = nr_free_buffer_pages / 4 (instead of 2046) The important aspect of this patch is: it disables ksm by default, and sets the number of the kernel_pages that can be allocated to be a reasonable number. Signed-off-by: Izik Eidus Cc: Hugh Dickins Cc: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d2b5ec3aa0784335f031239e71fb50924cac9e0d Author: Ingo Molnar Date: Wed Sep 23 15:56:02 2009 -0700 input: fix build failures caused by Kconfig Winbond WPCD376I Consumer IR hardware driver Kconfig entry Fix these warnings: drivers/built-in.o: In function `apanel_remove': apanel.c:(.text+0x56e852): undefined reference to `led_classdev_unregister' drivers/built-in.o: In function `apanel_probe': apanel.c:(.text+0x56eae3): undefined reference to `led_classdev_register' drivers/built-in.o: In function `acpi_fujitsu_hotkey_add': fujitsu-laptop.c:(.text+0x5d7647): undefined reference to `led_classdev_register' fujitsu-laptop.c:(.text+0x5d76b5): undefined reference to `led_classdev_register' drivers/built-in.o: In function `wbcir_probe': winbond-cir.c:(.devinit.text+0x5f375): undefined reference to `led_classdev_register' winbond-cir.c:(.devinit.text+0x5f663): undefined reference to `led_classdev_unregister' drivers/built-in.o: In function `wbcir_remove': winbond-cir.c:(.devexit.text+0x7f23): undefined reference to `led_classdev_unregister' drivers/built-in.o: In function `fujitsu_cleanup': fujitsu-laptop.c:(.exit.text+0xbe37): undefined reference to `led_classdev_unregister' fujitsu-laptop.c:(.exit.text+0xbe53): undefined reference to `led_classdev_unregister' It happens because the new INPUT_WINBOND_CIR driver relies on new-leds infrastructure - but does not select it in drivers/input/misc/Kconfig. But it selects LEDS_CLASS, which confuses a number of other drivers into thinking that all the leds infrastructure is in place. Fix this by selecting NEW_LEDS as well, like similar drivers do. Eventually, this whole leds infrastructure complexity should be cleaned up, it's been going on for years. Signed-off-by: Ingo Molnar Cc: Jesse Barnes Cc: Dmitry Torokhov Cc: David Härdeman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 54bcf382daf08c1396edb8b81e650b58930ccaef Merge: 94a8d5c c65ddb5 Author: Chris Mason Date: Thu Sep 24 10:00:58 2009 -0400 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable into for-linus Conflicts: fs/btrfs/super.c commit c65ddb52dc412c9b67681b1aa16cd1bac8434e24 Author: Yan Zheng Date: Thu Sep 24 09:24:43 2009 -0400 Btrfs: hash the btree inode during fill_super The snapshot deletion patches dropped this line, but the inode needs to be hashed. Signed-off-by: Chris Mason commit 0257bb82d21bedff26541bcf12f1461c23f9ed61 Author: Yan, Zheng Date: Thu Sep 24 09:17:31 2009 -0400 Btrfs: relocate file extents in clusters The extent relocation code copy file extents one by one when relocating data block group. This is inefficient if file extents are small. This patch makes the relocation code copy file extents in clusters. So we can can make better use of read-ahead. Signed-off-by: Yan Zheng Signed-off-by: Chris Mason commit f679a84034be6f7da123be786bbd8838bf3e9207 Author: Yan, Zheng Date: Thu Sep 24 09:17:31 2009 -0400 Btrfs: don't rename file into dummy directory A recent change enforces only one access point to each subvolume. The first directory entry (the one added when the subvolume/snapshot was created) is treated as valid access point, all other subvolume links are linked to dummy empty directories. The dummy directories are temporary inodes that only in memory, so we can not rename file into them. Signed-off-by: Yan Zheng Signed-off-by: Chris Mason commit a57195214358b75807a74bad96a8601a36262af7 Author: Yan, Zheng Date: Thu Sep 24 09:17:31 2009 -0400 Btrfs: check size of inode backref before adding hardlink For every hardlink in btrfs, there is a corresponding inode back reference. All inode back references for hardlinks in a given directory are stored in single b-tree item. The size of b-tree item is limited by the size of b-tree leaf, so we can only create limited number of hardlinks to a given file in a directory. The original code lacks of the check, it oops if the number of hardlinks goes over the limit. This patch fixes the issue by adding check to btrfs_link and btrfs_rename. Signed-off-by: Yan Zheng Signed-off-by: Chris Mason commit a255a9981a8566a1efabec983b7811e937e662d2 Author: Eric Dumazet Date: Thu Sep 24 15:05:59 2009 +0200 perf tools: Fix buffer allocation "perf top" cores dump on my dev machine, if run from a directory where vmlinux is present: *** glibc detected *** malloc(): memory corruption: 0x085670d0 *** Signed-off-by: Eric Dumazet Cc: LKML-Reference: <4ABB6EB7.7000002@gmail.com> Signed-off-by: Ingo Molnar commit c08d3b0e33edce28e9cfa7b64f7fe5bdeeb29248 Author: npiggin@suse.de Date: Fri Aug 21 02:35:06 2009 +1000 truncate: use new helpers Update some fs code to make use of new helper functions introduced in the previous patch. Should be no significant change in behaviour (except CIFS now calls send_sig under i_lock, via inode_newsize_ok). Reviewed-by: Christoph Hellwig Acked-by: Miklos Szeredi Cc: linux-nfs@vger.kernel.org Cc: Trond.Myklebust@netapp.com Cc: linux-cifs-client@lists.samba.org Cc: sfrench@samba.org Signed-off-by: Nick Piggin Signed-off-by: Al Viro commit 25d9e2d15286281ec834b829a4aaf8969011f1cd Author: npiggin@suse.de Date: Fri Aug 21 02:35:05 2009 +1000 truncate: new helpers Introduce new truncate helpers truncate_pagecache and inode_newsize_ok. vmtruncate is also consolidated from mm/memory.c and mm/nommu.c and into mm/truncate.c. Reviewed-by: Christoph Hellwig Signed-off-by: Nick Piggin Signed-off-by: Al Viro commit eca6f534e61919b28fb21aafbd1c2983deae75be Author: Vegard Nossum Date: Fri Sep 18 13:05:45 2009 -0700 fs: fix overflow in sys_mount() for in-kernel calls sys_mount() reads/copies a whole page for its "type" parameter. When do_mount_root() passes a kernel address that points to an object which is smaller than a whole page, copy_mount_options() will happily go past this memory object, possibly dereferencing "wild" pointers that could be in any state (hence the kmemcheck warning, which shows that parts of the next page are not even allocated). (The likelihood of something going wrong here is pretty low -- first of all this only applies to kernel calls to sys_mount(), which are mostly found in the boot code. Secondly, I guess if the page was not mapped, exact_copy_from_user() _would_ in fact handle it correctly because of its access_ok(), etc. checks.) But it is much nicer to avoid the dubious reads altogether, by stopping as soon as we find a NUL byte. Is there a good reason why we can't do something like this, using the already existing strndup_from_user()? [akpm@linux-foundation.org: make copy_mount_string() static] [AV: fix compat mount breakage, which involves undoing akpm's change above] Reported-by: Ingo Molnar Signed-off-by: Vegard Nossum Cc: Al Viro Cc: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: al commit b0c6fbe458183cc7e1cab17be6efcbe7e435bad3 Author: Rusty Russell Date: Thu Sep 24 17:48:44 2009 +0930 x86: Remove redundant non-NUMA topology functions arch/x86/include/asm/topology.h declares inline fns cpu_to_node and cpumask_of_node for !NUMA, even though they are then declared as macros by asm-generic/topology.h, which is #included just below. The macros (which are the same) end up being used; these functions are just confusing. Noticed-by: Linus Torvalds Signed-off-by: Rusty Russell Cc: Jesse Barnes Cc: "Greg Kroah-Hartman" Cc: Yinghai Lu Cc: Tejun Heo LKML-Reference: <200909241748.45629.rusty@rustcorp.com.au> Signed-off-by: Ingo Molnar commit 67030036ebb370b0aa5561ae2fe31668ed1ccd1c Author: Kirill Smelkov Date: Thu Sep 24 15:00:22 2009 +0400 perf tools: .gitignore += perf*.html I've tried building the docs in tools/perf/Documentation/ , and after that `git status` showed dozen of untracked htmls. Let's ignore them. Signed-off-by: Kirill Smelkov LKML-Reference: <1253790022-10300-1-git-send-email-kirr@mns.spb.ru> Signed-off-by: Ingo Molnar commit 6d729e44a55547c009d7a87ea66bff21a8e0afea Author: Thomas Gleixner Date: Sun Aug 16 21:05:08 2009 +0000 fs: Make unload_nls() NULL pointer safe Most call sites of unload_nls() do: if (nls) unload_nls(nls); Check the pointer inside unload_nls() like we do in kfree() and simplify the call sites. Signed-off-by: Thomas Gleixner Cc: Steve French Cc: OGAWA Hirofumi Cc: Roman Zippel Cc: Dave Kleikamp Cc: Petr Vandrovec Cc: Anton Altaparmakov Signed-off-by: Al Viro commit 4504230a71566785a05d3e6b53fa1ee071b864eb Author: Christoph Hellwig Date: Mon Aug 3 23:28:35 2009 +0200 freeze_bdev: grab active reference to frozen superblocks Currently we held s_umount while a filesystem is frozen, despite that we might return to userspace and unlock it from a different process. Instead grab an active reference to keep the file system busy and add an explicit check for frozen filesystems in remount and reject the remount instead of blocking on s_umount. Add a new get_active_super helper to super.c for use by freeze_bdev that grabs an active reference to a superblock from a given block device. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 4fadd7bb20a1e7c774ed88dc703d8fbcd00ff917 Author: Christoph Hellwig Date: Mon Aug 3 23:28:06 2009 +0200 freeze_bdev: kill bd_mount_sem Now that we have the freeze count there is not much reason for bd_mount_sem anymore. The actual freeze/thaw operations are serialized using the bd_fsfreeze_mutex, and the only other place we take bd_mount_sem is get_sb_bdev which tries to prevent mounting a filesystem while the block device is frozen. Instead of add a check for bd_fsfreeze_count and return -EBUSY if a filesystem is frozen. While that is a change in user visible behaviour a failing mount is much better for this case rather than having the mount process stuck uninterruptible for a long time. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 1ba50bbe93ebb98e83b174a85eff76af430c4e5b Author: Boaz Harrosh Date: Wed Aug 19 17:56:46 2009 +0300 exofs: remove BKL from super operations the two places inside exofs that where taking the BKL were: exofs_put_super() - .put_super and exofs_sync_fs() - which is .sync_fs and is also called from .write_super. Now exofs_sync_fs() is protected from itself by also taking the sb_lock. exofs_put_super() directly calls exofs_sync_fs() so there is no danger between these two either. In anyway there is absolutely nothing dangerous been done inside exofs_sync_fs(). Unless there is some subtle race with the actual lifetime of the super_block in regard to .put_super and some other parts of the VFS. Which is highly unlikely. Signed-off-by: Boaz Harrosh Signed-off-by: Al Viro commit 88a0a53d702b1fa39ed9e631939d2dbd92dfe486 Author: Julia Lawall Date: Tue Jul 28 17:54:58 2009 +0200 fs/romfs: correct error-handling code romfs_fill_super() assumes that romfs_iget() returns NULL when it fails. romfs_iget() actually returns ERR_PTR(-ve) in that case... Signed-off-by: Julia Lawall Signed-off-by: Al Viro commit f84398068d9c2babe41500504ef247ae07081857 Author: Miklos Szeredi Date: Mon Sep 21 14:48:36 2009 +0200 vfs: seq_file: add helpers for data filling Add two helpers that allow access to the seq_file's own buffer, but hide the internal details of seq_files. This allows easier implementation of special purpose filling functions. It also cleans up some existing functions which duplicated the seq_file logic. Make these inline functions in seq_file.h, as suggested by Al. Signed-off-by: Miklos Szeredi Acked-by: Hugh Dickins Signed-off-by: Al Viro commit f9098980ffea9c749622ff8ddf3b6d5831902a46 Author: Jeff Layton Date: Fri Sep 18 13:05:53 2009 -0700 vfs: remove redundant position check in do_sendfile As Johannes Weiner pointed out, one of the range checks in do_sendfile is redundant and is already checked in rw_verify_area. Signed-off-by: Jeff Layton Reviewed-by: Johannes Weiner Cc: Christoph Hellwig Cc: Al Viro Cc: Robert Love Cc: Mandeep Singh Baines Signed-off-by: Andrew Morton Signed-off-by: Al Viro commit 42cb56ae2ab67390da34906b27bedc3f2ff1393b Author: Jeff Layton Date: Fri Sep 18 13:05:53 2009 -0700 vfs: change sb->s_maxbytes to a loff_t sb->s_maxbytes is supposed to indicate the maximum size of a file that can exist on the filesystem. It's declared as an unsigned long long. Even if a filesystem has no inherent limit that prevents it from using every bit in that unsigned long long, it's still problematic to set it to anything larger than MAX_LFS_FILESIZE. There are places in the kernel that cast s_maxbytes to a signed value. If it's set too large then this cast makes it a negative number and generally breaks the comparison. Change s_maxbytes to be loff_t instead. That should help eliminate the temptation to set it too large by making it a signed value. Also, add a warning for couple of releases to help catch filesystems that set s_maxbytes too large. Eventually we can either convert this to a BUG() or just remove it and in the hope that no one will get it wrong now that it's a signed value. Signed-off-by: Jeff Layton Cc: Johannes Weiner Cc: Christoph Hellwig Cc: Al Viro Cc: Robert Love Cc: Mandeep Singh Baines Signed-off-by: Andrew Morton Signed-off-by: Al Viro commit 5aa98b706e83da4cde4172c890d6e815915536a0 Author: Jeff Layton Date: Fri Sep 18 13:05:50 2009 -0700 vfs: explicitly cast s_maxbytes in fiemap_check_ranges If fiemap_check_ranges is passed a large enough value, then it's possible that the value would be cast to a signed value for comparison against s_maxbytes when we change it to loff_t. Make sure that doesn't happen by explicitly casting s_maxbytes to an unsigned value for the purposes of comparison. Signed-off-by: Jeff Layton Cc: Christoph Hellwig Cc: Robert Love Cc: Al Viro Cc: Johannes Weiner Cc: Mandeep Singh Baines Signed-off-by: Andrew Morton Signed-off-by: Al Viro commit 05cc0cee6948fc11985d11557fb130645a7f69a6 Author: Wu Fengguang Date: Fri Sep 18 13:06:03 2009 -0700 libfs: return error code on failed attr set Currently all simple_attr.set handlers return 0 on success and negative codes on error. Fix simple_attr_write() to return these error codes. Signed-off-by: Wu Fengguang Cc: Theodore Ts'o Cc: Al Viro Cc: Christoph Hellwig Cc: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Al Viro commit 7a62cc10215838286c747f86766063d5f01fcbd6 Author: Tetsuo Handa Date: Fri Sep 18 13:05:59 2009 -0700 seq_file: return a negative error code when seq_path_root() fails. seq_path_root() is returning a return value of successful __d_path() instead of returning a negative value when mangle_path() failed. This is not a bug so far because nobody is using return value of seq_path_root(). Signed-off-by: Tetsuo Handa Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Al Viro commit ce06e0b21d6732a2bab10a585a3ec6909499be28 Author: Andi Kleen Date: Fri Sep 18 13:05:48 2009 -0700 vfs: optimize touch_time() too Do a similar optimization as earlier for touch_atime. Getting the lock in mnt_get_write is relatively costly, so try all avenues to avoid it first. This patch is careful to still only update inode fields inside the lock region. This didn't show up in benchmarks, but it's easy enough to do. [akpm@linux-foundation.org: fix typo in comment] [hugh.dickins@tiscali.co.uk: fix inverted test of mnt_want_write_file()] Signed-off-by: Andi Kleen Cc: Christoph Hellwig Cc: Valerie Aurora Cc: Al Viro Cc: Dave Hansen Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Al Viro commit b12536c27043f1c21195e587eb59950428326e22 Author: Andi Kleen Date: Fri Sep 18 13:05:47 2009 -0700 vfs: optimization for touch_atime() Some benchmark testing shows touch_atime to be high up in profile logs for IO intensive workloads. Most likely that's due to the lock in mnt_want_write(). Unfortunately touch_atime first takes the lock, and then does all the other tests that could avoid atime updates (like noatime or relatime). Do it the other way round -- first try to avoid the update and only then if that didn't succeed take the lock. That works because none of the atime avoidance tests rely on locking. This also eliminates a goto. Signed-off-by: Andi Kleen Cc: Christoph Hellwig Reviewed-by: Valerie Aurora Cc: Al Viro Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Al Viro commit 22fe404218156328a27e66349b1175cd0baa4990 Author: Jan Kara Date: Fri Sep 18 13:05:44 2009 -0700 vfs: split generic_forget_inode() so that hugetlbfs does not have to copy it Hugetlbfs needs to do special things instead of truncate_inode_pages(). Currently, it copied generic_forget_inode() except for truncate_inode_pages() call which is asking for trouble (the code there isn't trivial). So create a separate function generic_detach_inode() which does all the list magic done in generic_forget_inode() and call it from hugetlbfs_forget_inode(). Signed-off-by: Jan Kara Cc: Al Viro Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Al Viro commit af0d9ae811d11de8a01d6bc922c5e062be01bd7f Author: Manish Katiyar Date: Fri Sep 18 13:05:43 2009 -0700 fs/inode.c: add dev-id and inode number for debugging in init_special_inode() Add device-id and inode number for better debugging. This was suggested by Andreas in one of the threads http://article.gmane.org/gmane.comp.file-systems.ext4/12062 . "If anyone has a chance, fixing this error message to be not-useless would be good... Including the device name and the inode number would help track down the source of the problem." Signed-off-by: Manish Katiyar Cc: Andreas Dilger Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Al Viro commit 14be27460e4722d7135de3c46d043b4fc4382247 Author: Steven Rostedt Date: Fri Sep 18 13:05:42 2009 -0700 libfs: make simple_read_from_buffer conventional Impact: have simple_read_from_buffer conform to standards It was brought to my attention by Andrew Morton, Theodore Tso, and H. Peter Anvin that a read from userspace should only return -EFAULT if nothing was actually read. Looking at the simple_read_from_buffer I noticed that this function does not conform to that rule. This patch fixes that function. [akpm@linux-foundation.org: simplification suggested by hpa] [hpa@zytor.com: fix count==0 handling] Signed-off-by: Steven Rostedt Cc: Al Viro Cc: Theodore Ts'o Cc: Ingo Molnar Signed-off-by: H. Peter Anvin Signed-off-by: Andrew Morton Signed-off-by: Al Viro commit 429a6e5e2c1fbe5d805aad123efbdb5f0c14769f Author: Jason Wessel Date: Wed Sep 23 18:13:13 2009 -0500 x86: early_printk: Protect against using the same device twice If you use the kernel argument: earlyprintk=serial,ttyS0,115200 This will cause a recursive hang printing the same line again and again: BIOS-e820: 000000003fff3000 - 0000000040000000 (ACPI data) BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved) BIOS-e820: 00000000fec00000 - 0000000100000000 (reserved) bootconsole [earlyser0] enabled Linux version 2.6.31-07863-gb64ada6 (mingo@sirius) (gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) ) #16789 SMP Wed Sep 23 21:09:43 CEST 2009 Linux version 2.6.31-07863-gb64ada6 (mingo@sirius) (gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) ) #16789 SMP Wed Sep 23 21:09:43 CEST 2009 Linux version 2.6.31-07863-gb64ada6 (mingo@sirius) (gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) ) #16789 SMP Wed Sep 23 21:09:43 CEST 2009 Linux version 2.6.31-07863-gb64ada6 (mingo@sirius) (gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) ) #16789 SMP Wed Sep 23 21:09:43 CEST 2009 Linux version 2.6.31-07863-gb64ada6 (mingo@sirius) (gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) ) #16789 SMP Wed Sep 23 21:09:43 CEST 2009 Instead warn the end user that they specified the device a second time, and ignore that second console. Reported-by: Ingo Molnar Signed-off-by: Jason Wessel Cc: Len Brown Cc: Greg KH Cc: Andrew Morton Cc: Linus Torvalds LKML-Reference: <4ABAAB89.1080407@windriver.com> Signed-off-by: Ingo Molnar commit d2ff6de537c61a0f05731c6679f3e1abc2d95e68 Merge: e23a8b6 a724ead Author: Ingo Molnar Date: Thu Sep 24 12:59:11 2009 +0200 Merge branch 'linus' into x86/urgent Merge reason: Queueing up dependent early-printk fix. Signed-off-by: Ingo Molnar commit dd906a0fe8d78b925702cd3916a65f34dfdfc011 Author: Mike Galbraith Date: Thu Sep 24 10:07:08 2009 +0200 perf tools: Handle relative paths while loading module symbols Inform util/module.c::mod_dso__load_module_paths() that relative paths do exist in some modules.dep, and make it fail noisily should it encounter a path that it doesn't understand, or a module it cannot open. Reported-by: Avi Kivity Signed-off-by: Mike Galbraith Cc: Arnaldo Carvalho de Melo Cc: rostedt@goodmis.org Cc: Mathieu Desnoyers Cc: Peter Zijlstra Cc: Frederic Weisbecker Cc: Masami Hiramatsu LKML-Reference: <1253779628.10513.8.camel@marge.simson.net> Signed-off-by: Ingo Molnar commit e23a8b6a8f319c0f08b6ccef2dccbb37e7603dc2 Author: Roland Dreier Date: Wed Sep 23 15:35:35 2009 -0700 x86: Reduce verbosity of "PAT enabled" kernel message On modern systems, the kernel prints the message x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106 once for every CPU. This gets kind of ridiculous on huge systems; for example, on a 64-thread system I was lucky enough to get: dmesg| grep 'PAT enabled' | wc 64 704 5174 There is already a BUG() if non-boot CPUs have PAT capabilities that don't match the boot CPU, so just print the message on the boot CPU. (I kept the print after the wrmsrl() that enables PAT, so that the log output continues to mean that the system survived enabling PAT on the boot CPU) Signed-off-by: Roland Dreier Cc: Suresh Siddha Cc: Venkatesh Pallipadi LKML-Reference: Signed-off-by: Ingo Molnar commit ea01c0d7315d6e3218fd22a6947c5b09305fcf65 Author: Roland Dreier Date: Wed Sep 23 15:33:23 2009 -0700 x86: Reduce verbosity of "TSC is reliable" message On modern systems, the kernel prints the message Skipping synchronization checks as TSC is reliable. once for every non-boot CPU. This gets kind of ridiculous on huge systems; for example, on a 64-thread system I was lucky enough to get: $ dmesg | grep 'TSC is reliable' | wc 63 567 4221 There's no point to doing this for every CPU, since the code is just checking the boot CPU anyway, so change this to a printk_once() to make the message appears only once. Signed-off-by: Roland Dreier LKML-Reference: Signed-off-by: Ingo Molnar commit 40258ee97d0d5e5c30a3d4b7acaf294fe82cd23f Author: Paul Mundt Date: Thu Sep 24 17:48:15 2009 +0900 sh: Fix up uninitialized variable use caught by gcc 4.4. In the unaligned kernel exception fixup case the printk() was ordered before the copy_from_user(), resulting in a nonsensical instruction value. This fixes up the ordering properly. Signed-off-by: Paul Mundt commit 23c4c82171008c8b18d8627c9741cdd577631cea Author: Paul Mundt Date: Thu Sep 24 17:38:18 2009 +0900 sh: Handle unaligned 16-bit instructions on SH-2A. This adds some sanity checking in the unaligned instruction handler to verify the instruction size, which enables basic support for 16-bit fixups on SH-2A parts. Signed-off-by: Paul Mundt commit bfc8125858d777bd5bdba03a091c07cc2e0e17c0 Author: Michal Simek Date: Tue Sep 22 10:32:33 2009 +0200 microblaze: Disable heartbeat/enable emaclite in defconfigs I need to disable heartbeat function because this features breaks testing in Qemu. Signed-off-by: Michal Simek commit f05131cd7a9521031ccb1afd6234ce57ff03ae45 Author: Michal Simek Date: Mon Sep 14 15:15:49 2009 +0200 microblaze: Support simpleImage.dts make target Instead of remembering to specify DTB= on the make commandline, this commit allows the much friendlier make simpleImage. where .dts is expected to be found in arch/microblaze/boot/dts/ The resulting vmlinux, with the compiled DTS linked in, will be copied to boot/simpleImage. This mirrors the same functionality as on PowerPC, albeit achieving it in a slightly different way. + strip simpleImage file The size of output file is very similar to linux.bin. vmlinux - full elf without fdt blob simpleImage..unstrip - full elf with fdt blob simpleImage. - stripped elf with fdt blob Add symlink to generic system.dts in platform folder Signed-off-by: John Williams Signed-off-by: Michal Simek commit 96830a57de1197519b62af6a4c9ceea556c18c3d Author: Michael Abbott Date: Thu Sep 24 10:15:19 2009 +0200 [PATCH] Fix idle time field in /proc/uptime Git commit 79741dd changes idle cputime accounting, but unfortunately the /proc/uptime file hasn't caught up. Here the idle time calculation from /proc/stat is copied over. Signed-off-by: Michael Abbott Signed-off-by: Martin Schwidefsky commit d81165919ebf6e1cb9eeb612150f9287ad414659 Author: Paul Moore Date: Wed Sep 23 13:46:00 2009 -0400 lsm: Use a compressed IPv6 string format in audit events Currently the audit subsystem prints uncompressed IPv6 addresses which not only differs from common usage but also results in ridiculously large audit strings which is not a good thing. This patch fixes this by simply converting audit to always print compressed IPv6 addresses. Old message example: audit(1253576792.161:30): avc: denied { ingress } for saddr=0000:0000:0000:0000:0000:0000:0000:0001 src=5000 daddr=0000:0000:0000:0000:0000:0000:0000:0001 dest=35502 netif=lo scontext=system_u:object_r:unlabeled_t:s15:c0.c1023 tcontext=system_u:object_r:lo_netif_t:s0-s15:c0.c1023 tclass=netif New message example: audit(1253576792.161:30): avc: denied { ingress } for saddr=::1 src=5000 daddr=::1 dest=35502 netif=lo scontext=system_u:object_r:unlabeled_t:s15:c0.c1023 tcontext=system_u:object_r:lo_netif_t:s0-s15:c0.c1023 tclass=netif Signed-off-by: Paul Moore Signed-off-by: Eric Paris Signed-off-by: Al Viro commit 939cbf260c1abce6cad4b95ea4ba9f5132b660b3 Author: Eric Paris Date: Wed Sep 23 13:46:00 2009 -0400 Audit: send signal info if selinux is disabled Audit will not respond to signal requests if selinux is disabled since it is unable to translate the 0 sid from the sending process to a context. This patch just doesn't send the context info if there isn't any. Signed-off-by: Eric Paris Signed-off-by: Al Viro commit 44e51a1b7852bd421ff5303c64dcc5c8524c21ef Author: Eric Paris Date: Fri Aug 7 16:54:29 2009 -0400 Audit: rearrange audit_context to save 16 bytes per struct pahole pointed out that on x86_64 struct audit_context can be rearrainged to save 16 bytes per struct. Since we have an audit_context per task this can acually be a pretty significant gain. Signed-off-by: Eric Paris Signed-off-by: Al Viro commit e08b061ec0fca1f63bb1006bf1edc0556f36d0ae Author: Eric Paris Date: Fri Aug 7 16:54:23 2009 -0400 Audit: reorganize struct audit_watch to save 8 bytes pahole showed that struct audit_watch had two holes: struct audit_watch { atomic_t count; /* 0 4 */ /* XXX 4 bytes hole, try to pack */ char * path; /* 8 8 */ dev_t dev; /* 16 4 */ /* XXX 4 bytes hole, try to pack */ long unsigned int ino; /* 24 8 */ struct audit_parent * parent; /* 32 8 */ struct list_head wlist; /* 40 16 */ struct list_head rules; /* 56 16 */ /* --- cacheline 1 boundary (64 bytes) was 8 bytes ago --- */ /* size: 72, cachelines: 2, members: 7 */ /* sum members: 64, holes: 2, sum holes: 8 */ /* last cacheline: 8 bytes */ }; /* definitions: 1 */ by moving dev after count we save 8 bytes, actually improving cacheline usage. There are typically very few of these in the kernel so it won't be a large savings, but it's a good thing no matter what. Signed-off-by: Eric Paris Signed-off-by: Al Viro commit acf3cc283f1ea4ed7e579663eefed62f0aa572da Author: Kuninori Morimoto Date: Thu Sep 24 06:28:27 2009 +0000 sh: mach-ecovec24: Add active low setting for sh_eth Signed-off-by: Kuninori Morimoto Signed-off-by: Paul Mundt commit a6bbce200deefb78c49e159ca718df22f18e5037 Author: Jaswinder Singh Rajput Date: Tue Sep 22 13:50:26 2009 +0000 sh: includecheck fix: dwarf.c fix the following 'make includecheck' warning: arch/sh/kernel/dwarf.c: asm/dwarf.h is included more than once. Signed-off-by: Jaswinder Singh Rajput Signed-off-by: Paul Mundt commit 09dd3fc19c09f79115267361ecd7d5c5d2c27a3a Author: Benjamin Herrenschmidt Date: Thu Sep 24 16:05:52 2009 +1000 Fix build of cpm_uart due to core changes Commit ebd2c8f6d2ec4012c267ecb95e72a57b8355a705 "serial: kill off uart_info" broke the build of this driver, this fixes it. Signed-off-by: Benjamin Herrenschmidt commit e0908085fc2391c85b85fb814ae1df377c8e0dcb Author: Rex Feany Date: Wed Sep 23 14:45:52 2009 +0000 powerpc/8xx: Fix regression introduced by cache coherency rewrite After upgrading to the latest kernel on my mpc875 userspace started running incredibly slow (hours to get to a shell, even!). I tracked it down to commit 8d30c14cab30d405a05f2aaceda1e9ad57800f36, that patch removed a work-around for the 8xx. Adding it back makes my problem go away. Signed-off-by: Rex Feany Signed-off-by: Benjamin Herrenschmidt commit daf8f40391b2a1978ea2071c20959d91fade6b1a Author: Josh Boyer Date: Wed Sep 23 03:51:04 2009 +0000 powerpc/4xx: Fix erroneous xmon warning on PowerPC 4xx The xmon code relies on MSR_RI being non-zero to indicate that an exception is recoverable. If it is not, it prints a warning message. However, the PowerPC 4xx cores do not have an MSR_RI bit and this warning is produced for every xmon event. This introduces an unrecoverable_excp function to determine if an exception is recoverable or not. This gets rid of the erroneous warnings on 4xx. Signed-off-by: Josh Boyer Signed-off-by: Benjamin Herrenschmidt commit f32af63ed1327451cb91e3816fa043b6c2c52db1 Author: Benjamin Herrenschmidt Date: Tue Sep 22 18:12:26 2009 +0000 powerpc/mm: Fix 40x and 8xx vs. _PAGE_SPECIAL The test to check whether we have _PAGE_SPECIAL defined is broken, since we always define it, just not always to a meaninful value :-) That broke 8xx and 40x under some circumstances. This fixes it by adding _PAGE_SPECIAL for both of these since they had a free PTE bit, and removing the condition around advertising it. Signed-off-by: Benjamin Herrenschmidt commit 142597dbbd8a1d516af3dacfa00037f21612e865 Author: Tim Abbott Date: Tue Sep 22 05:18:09 2009 +0000 powerpc: Cleanup linker script using new linker script macros. Signed-off-by: Tim Abbott Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linuxppc-dev@ozlabs.org Cc: Sam Ravnborg Acked-by: Sam Ravnborg Signed-off-by: Benjamin Herrenschmidt commit 049d0497060bc8db944f7b4984271327448b3603 Author: Anton Blanchard Date: Mon Sep 21 20:47:39 2009 +0000 powerpc: Fix ibm,client-architecture-support printout On machines without the ibm,client-architecture-support call we were missing a newline. We may as well print the full name in all its glory too - its ibm,client-architecture-support, not ibm,client-architecture as I mistakenly wrote (a name only an IBM architect could love). For my penance I will write out ibm,client-architecture-support 100 times. Before: Calling ibm,client-architecture...command line: root=/dev/sda6 console=hvc0 quiet After: Calling ibm,client-architecture-support... not implemented command line: root=/dev/sda6 console=hvc0 Signed-off-by: Anton Blanchard Signed-off-by: Benjamin Herrenschmidt commit ea55bf29126f0066a4e82a8545437494ff4fc431 Author: Anton Blanchard Date: Mon Sep 21 19:56:43 2009 +0000 powerpc: Increase NODES_SHIFT on 64bit from 4 to 8 Some System p configurations can already have more than 16 nodes so we need to increase NODES_SHIFT. I chose 256 to give us some room to grow in the future, although we can look at something smaller if the memory bloat is considered too much. Unless we clamp MAX_ACTIVE_REGIONS we end up with 300kB of extra bloat in early_node_map in mm/page_alloc.c: < 6144 early_node_map > 307200 early_node_map due to: #if MAX_NUMNODES >= 32 /* If there can be many nodes, allow up to 50 holes per node */ #define MAX_ACTIVE_REGIONS (MAX_NUMNODES*50) #else /* By default, allow up to 256 distinct regions */ #define MAX_ACTIVE_REGIONS 256 Since our memory is mostly contiguous it seems reasonable to keep this at 256 for now. I also set 32bit to 32 to save space (is there any chance a 32bit system will have more than 32 discontiguous memory ranges?). Even with that fixed we have a few data structures that grow: < 896 bootmem_node_data > 14336 bootmem_node_data < 1280 node_devices > 20480 node_devices < 25088 kmalloc_caches > 59648 kmalloc_caches < 1632 hstates > 21792 hstates Signed-off-by: Anton Blanchard Signed-off-by: Benjamin Herrenschmidt commit f2053f1a7bf6005b4e81826b1ac8d0b4117c4cf0 Author: Anton Blanchard Date: Mon Sep 21 16:57:40 2009 +0000 powerpc/perf_counter: Fix vdso detection perf_counter uses arch_vma_name() to detect a vdso region which in turn uses current->mm->context.vdso_base. We need to initialise this before doing the mmap or else we fail to detect the vdso. Signed-off-by: Anton Blanchard Signed-off-by: Benjamin Herrenschmidt commit 8bbde7a7062facf8af35bcc9a64cbafe8f36f3cf Author: Anton Blanchard Date: Mon Sep 21 16:52:35 2009 +0000 powerpc: Move 64bit heap above 1TB on machines with 1TB segments If we are using 1TB segments and we are allowed to randomise the heap, we can put it above 1TB so it is backed by a 1TB segment. Otherwise the heap will be in the bottom 1TB which always uses 256MB segments and this may result in a performance penalty. This functionality is disabled when heap randomisation is turned off: echo 1 > /proc/sys/kernel/randomize_va_space which may be useful when trying to allocate the maximum amount of 16M or 16G pages. On a microbenchmark that repeatedly touches 32GB of memory with a stride of 256MB + 4kB (designed to stress 256MB segments while still mapping nicely into the L1 cache), we see the improvement: Force malloc to use heap all the time: # export MALLOC_MMAP_MAX_=0 MALLOC_TRIM_THRESHOLD_=-1 Disable heap randomization: # echo 1 > /proc/sys/kernel/randomize_va_space # time ./test 12.51s Enable heap randomization: # echo 2 > /proc/sys/kernel/randomize_va_space # time ./test 1.70s Signed-off-by: Anton Blanchard Signed-off-by: Benjamin Herrenschmidt commit 738ef42e32fe95553a424c04016b936c9f6c9afb Author: Becky Bruce Date: Mon Sep 21 08:26:35 2009 +0000 powerpc: Change archdata dma_data to a union Sometimes this is used to hold a simple offset, and sometimes it is used to hold a pointer. This patch changes it to a union containing void * and dma_addr_t. get/set accessors are also provided, because it was getting a bit ugly to get to the actual data. Signed-off-by: Becky Bruce Signed-off-by: Benjamin Herrenschmidt commit 1cebd7a0f62804ca24f7b7b35e8105000b9e879a Author: Becky Bruce Date: Mon Sep 21 08:26:34 2009 +0000 powerpc: Rename get_dma_direct_offset get_dma_offset The former is no longer really accurate with the swiotlb case now a possibility. I also move it into dma-mapping.h - it no longer needs to be in dma.c, and there are about to be some more accessors that should all end up in the same place. A comment is added to indicate that this function is not used in configs where there is no simple dma offset, such as the iommu case. Signed-off-by: Becky Bruce Signed-off-by: Benjamin Herrenschmidt commit b9eceb2307f8dda124669a9dc213aad8c1569b5a Author: Huang Weiyi Date: Wed Sep 16 03:09:22 2009 +0000 powerpc/mm: Remove duplicated #include Remove duplicated #include('s) in arch/powerpc/mm/tlb_low_64e.S Signed-off-by: Huang Weiyi Signed-off-by: Benjamin Herrenschmidt commit 5c8f382c0b96aedcd709c05eae13bd684e16417e Author: Huang Weiyi Date: Wed Sep 16 03:08:58 2009 +0000 powerpc/book3e-64: Remove duplicated #include Remove duplicated #include('s) in arch/powerpc/kernel/exceptions-64e.S Signed-off-by: Huang Weiyi Signed-off-by: Benjamin Herrenschmidt commit 144ef909c09b60c97b3c20b69ea30abd1e60e54d Author: Tony Breeds Date: Mon Sep 14 19:57:02 2009 +0000 powerpc: Check for unsupported relocs when using CONFIG_RELOCATABLE When using CONFIG_RELOCATABLE, we build the kernel as a position independent executable. The kernel then uses a little bit of relocation code to relocate itself. That code only deals with R_PPC64_RELATIVE relocations though. If for some reason you use assembly constructs such as LOAD_REG_IMMEDIATE() to load the address of a symbol, you'll generate different kinds of relocations that won't be processed properly and bad things will happen. (We have 2 such bugs today). The perl script tries to filter out "known" bad ones. It's possible that we are missing some in the case of a weak function that nobody implements, we'll see if we get false positive and fix it. Signed-off-by: Tony Breeds Signed-off-by: Benjamin Herrenschmidt commit ad08587e5df17e192a57437bfedaba125998de25 Author: Benjamin Herrenschmidt Date: Sat Sep 12 16:08:08 2009 +0000 powerpc/pmc: Don't access lppaca on Book3E It doesn't exist ! Signed-off-by: Benjamin Herrenschmidt commit 0f3372741f2de8dc85a60be737b519a47b395b85 Author: roel kluin Date: Wed Sep 9 05:02:24 2009 +0000 powerpc: kmalloc failure ignored in vio_build_iommu_table() Prevent NULL dereference if kmalloc() fails. Signed-off-by: Roel Kluin Signed-off-by: Benjamin Herrenschmidt commit 254be490f257fc3f76ca5f869ac8d107b3827025 Author: Hendrik Brueckner Date: Thu Aug 27 01:45:39 2009 +0000 hvc_console: Provide (un)locked version for hvc_resize() Rename the locking free hvc_resize() function to __hvc_resize() and provide an inline function that locks the hvc_struct and calls __hvc_resize(). The rationale for this patch is that virtio_console calls the hvc_resize() function without locking the hvc_struct. So it needs to call the lock itself. According to naming rules, the unlocked version is renamed and prefixed with "__". References to unlocked function calls in hvc back-ends has been updated. Signed-off-by: Hendrik Brueckner Acked-by: Christian Borntraeger Signed-off-by: Benjamin Herrenschmidt commit 94a8d5caba74211ec76dac80fc6e2d5c391530df Merge: 2bcd57a 6ba2ef7 Author: Linus Torvalds Date: Wed Sep 23 18:14:11 2009 -0700 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: (39 commits) cpumask: Move deprecated functions to end of header. cpumask: remove unused deprecated functions, avoid accusations of insanity cpumask: use new-style cpumask ops in mm/quicklist. cpumask: use mm_cpumask() wrapper: x86 cpumask: use mm_cpumask() wrapper: um cpumask: use mm_cpumask() wrapper: mips cpumask: use mm_cpumask() wrapper: mn10300 cpumask: use mm_cpumask() wrapper: m32r cpumask: use mm_cpumask() wrapper: arm cpumask: Use accessors for cpu_*_mask: um cpumask: Use accessors for cpu_*_mask: powerpc cpumask: Use accessors for cpu_*_mask: mips cpumask: Use accessors for cpu_*_mask: m32r cpumask: remove arch_send_call_function_ipi cpumask: arch_send_call_function_ipi_mask: s390 cpumask: arch_send_call_function_ipi_mask: powerpc cpumask: arch_send_call_function_ipi_mask: mips cpumask: arch_send_call_function_ipi_mask: m32r cpumask: arch_send_call_function_ipi_mask: alpha cpumask: remove obsolete topology_core_siblings and topology_thread_siblings: ia64 ... commit 2bcd57ab61e7cabed626226a3771617981c11ce1 Author: Alexey Dobriyan Date: Thu Sep 24 04:22:25 2009 +0400 headers: utsname.h redux * remove asm/atomic.h inclusion from linux/utsname.h -- not needed after kref conversion * remove linux/utsname.h inclusion from files which do not need it NOTE: it looks like fs/binfmt_elf.c do not need utsname.h, however due to some personality stuff it _is_ needed -- cowardly leave ELF-related headers and files alone. Signed-off-by: Alexey Dobriyan Signed-off-by: Linus Torvalds commit 95e0d86badc410d525ea7218fd32df7bfbf9c837 Author: Sebastian Andrzej Siewior Date: Thu Sep 24 01:02:55 2009 +0200 Revert "kmod: fix race in usermodehelper code" This reverts commit c02e3f361c7 ("kmod: fix race in usermodehelper code") The patch is wrong. UMH_WAIT_EXEC is called with VFORK what ensures that the child finishes prior returing back to the parent. No race. In fact, the patch makes it even worse because it does the thing it claims not do: - It calls ->complete() on UMH_WAIT_EXEC - the complete() callback may de-allocated subinfo as seen in the following call chain: [] (__link_path_walk+0x20/0xeb4) from [] (path_walk+0x48/0x94) [] (path_walk+0x48/0x94) from [] (do_path_lookup+0x24/0x4c) [] (do_path_lookup+0x24/0x4c) from [] (do_filp_open+0xa4/0x83c) [] (do_filp_open+0xa4/0x83c) from [] (open_exec+0x24/0xe0) [] (open_exec+0x24/0xe0) from [] (do_execve+0x7c/0x2e4) [] (do_execve+0x7c/0x2e4) from [] (kernel_execve+0x34/0x80) [] (kernel_execve+0x34/0x80) from [] (____call_usermodehelper+0x130/0x148) [] (____call_usermodehelper+0x130/0x148) from [] (kernel_thread_exit+0x0/0x8) and the path pointer was NULL. Good that ARM's kernel_execve() doesn't check the pointer for NULL or else I wouldn't notice it. The only race there might be is with UMH_NO_WAIT but it is too late for me to investigate it now. UMH_WAIT_PROC could probably also use VFORK and we could save one exec. So the only race I see is with UMH_NO_WAIT and recent scheduler changes where the child does not always run first might have trigger here something but as I said, it is late.... Signed-off-by: Sebastian Andrzej Siewior Acked-by: Neil Horman Signed-off-by: Linus Torvalds commit 11ef160fda9c150cd75db77194bcc66839709662 Author: Chris Mason Date: Wed Sep 23 20:28:46 2009 -0400 Btrfs: fix releasepage to avoid unlocking extents we haven't locked During releasepage, we try to drop any extent_state structs for the bye offsets of the page we're releaseing. But the code was incorrectly telling clear_extent_bit to delete the state struct unconditionallly. Normally this would be fine because we have the page locked, but other parts of btrfs will lock down an entire extent, the most common place being IO completion. releasepage was deleting the extent state without first locking the extent, which may result in removing a state struct that another process had locked down. The fix here is to leave the NODATASUM and EXTENT_LOCKED bits alone in releasepage. Signed-off-by: Chris Mason commit 46562cec98368623bcd18d7fd30f20c04afd5978 Author: Chris Mason Date: Wed Sep 23 20:23:16 2009 -0400 Btrfs: Fix test_range_bit for whole file extents If test_range_bit finds an extent that goes all the way to (u64)-1, it can incorrectly wrap the u64 instead of treaing it like the end of the address space. This just adds a check for the highest possible offset so we don't wrap. Signed-off-by: Chris Mason commit 42daec299b8b6b9605976d0ee1266b343a31cbcc Author: Chris Mason Date: Wed Sep 23 19:51:09 2009 -0400 Btrfs: fix errors handling cached state in set/clear_extent_bit Both set and clear_extent_bit allow passing a cached state struct to reduce rbtree search times. clear_extent_bit was improperly bypassing some of the checks around making sure the extent state fields were correct for a given operation. The fix used here (from Yan Zheng) is to use the hit_next goto target instead of jumping all the way down to start clearing bits without making sure the cached state was exactly correct for the operation we were doing. This also fixes up the setting of the start variable for both ops in the case where we find an overlapping extent that begins before the range we want to change. In both cases we were incorrectly going backwards from the original requested change. Signed-off-by: Chris Mason commit 0aea51c37fc5868cd723f670af9056c2ef694fee Author: Amit Shah Date: Wed Aug 26 14:58:28 2009 +0530 virtio_net: Check for room in the vq before adding buffer Saves us one cycle of alloc-add-free if the queue was full. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell (modified) commit 48925e372f04f5e35fec6269127c62b2c71ab794 Author: Rusty Russell Date: Thu Sep 24 09:59:20 2009 -0600 virtio_net: avoid (most) NETDEV_TX_BUSY by stopping queue early. Now we can tell the theoretical capacity remaining in the output queue, virtio_net can waste entries by stopping the queue early. It doesn't work in the case of indirect buffers and kmalloc failure, but that's rare (we could drop the packet in that case, but other drivers return TX_BUSY for similar reasons). For the record, I think this patch reflects poorly on the linux network API. Signed-off-by: Rusty Russell Cc: Dinesh Subhraveti commit b3f24698a7faa6e9d8a14124cfdc25353fc8ca19 Author: Rusty Russell Date: Thu Sep 24 09:59:19 2009 -0600 virtio_net: formalize skb_vnet_hdr We put the virtio_net_hdr into the skb's cb region; turn this into a union to clean up the code slightly and allow future expansion. Signed-off-by: Rusty Russell Cc: Mark McLoughlin Cc: Dinesh Subhraveti commit b0c39dbdc204006ef3558a66716ff09797619778 Author: Rusty Russell Date: Thu Sep 24 09:59:19 2009 -0600 virtio_net: don't free buffers in xmit ring The virtio_net driver is complicated by the two methods of freeing old xmit buffers (in addition to freeing old ones at the start of the xmit path). The original code used a 1/10 second timer attached to xmit_free(), reset on every xmit. Before we orphaned skbs on xmit, the transmitting userspace could block with a full socket until the timer fired, the skb destructor was called, and they were re-woken. So we added the VIRTIO_F_NOTIFY_ON_EMPTY feature: supporting devices send an interrupt (even if normally suppressed) on an empty xmit ring which makes us schedule xmit_tasklet(). This was a benchmark win. Unfortunately, VIRTIO_F_NOTIFY_ON_EMPTY makes quite a lot of work: a host which is faster than the guest will fire the interrupt every xmit packet (slowing the guest down further). Attempting mitigation in the host adds overhead of userspace timers (possibly with the additional pain of signals), and risks increasing latency anyway if you get it wrong. In practice, this effect was masked by benchmarks which take advantage of GSO (with its inherent transmit batching), but it's still there. Now we orphan xmitted skbs, the pressure is off: remove both paths and no longer request VIRTIO_F_NOTIFY_ON_EMPTY. Note that the current QEMU will notify us even if we don't negotiate this feature (legal, but suboptimal); a patch is outstanding to improve that. Move the skb_orphan/nf_reset to after we've done the send and notified the other end, for a slight optimization. Signed-off-by: Rusty Russell Cc: Mark McLoughlin commit 8958f574dbe7e41cc54df0df1accc861bb9f6be8 Author: Rusty Russell Date: Thu Sep 24 09:59:18 2009 -0600 virtio_net: return NETDEV_TX_BUSY instead of queueing an extra skb. This effectively reverts 99ffc696d10b28580fe93441d627cf290ac4484c "virtio: wean net driver off NETDEV_TX_BUSY". The complexity of queuing an skb (setting a tasklet to re-xmit) is questionable, especially once we get rid of the other reason for the tasklet in the next patch. If the skb won't fit in the tx queue, just return NETDEV_TX_BUSY. This is frowned upon, so a followup patch uses a more complex solution. Signed-off-by: Rusty Russell Cc: Herbert Xu commit 2b5bbe3b8bee8b38bdc27dd9c0270829b6eb7eeb Author: Rusty Russell Date: Thu Sep 24 09:59:17 2009 -0600 virtio_net: skb_orphan() and nf_reset() in xmit path. The complex transmit free logic was introduced to avoid hangs on removing the ip_conntrack module and also because drivers aren't generally supposed to keep stale skbs for unbounded times. After some debate, it was decided that while doing skb_orphan() generally is a rat's nest, we can do it in this driver. Following patches take advantage of this. Signed-off-by: Rusty Russell commit 6ba2ef7baac23a5d9bb85e28b882d16b439a2293 Author: Rusty Russell Date: Thu Sep 24 09:34:53 2009 -0600 cpumask: Move deprecated functions to end of header. The new ones have pretty kerneldoc. Move the old ones to the end to avoid confusing people. Signed-off-by: Rusty Russell Cc: benh@kernel.crashing.org commit 4b805b17382c11a8b1c9bb8053ce9d1dcde0701a Author: Rusty Russell Date: Thu Sep 24 09:34:52 2009 -0600 cpumask: remove unused deprecated functions, avoid accusations of insanity We're not forcing removal of the old cpu_ functions, but we might as well delete the now-unused ones. Especially CPUMASK_ALLOC and friends. I actually got a phone call (!) from a hacker who thought I had introduced them as the new cpumask API. He seemed bewildered that I had lost all taste. Signed-off-by: Rusty Russell Cc: benh@kernel.crashing.org commit db7907865817137bfa3d5b4b30de9cc859b41bf1 Author: Rusty Russell Date: Thu Sep 24 09:34:52 2009 -0600 cpumask: use new-style cpumask ops in mm/quicklist. This slipped past the previous sweeps. Signed-off-by: Rusty Russell Acked-by: Christoph Lameter commit 78f1c4d6b027993763a5aba83873b0462d06db8f Author: Rusty Russell Date: Thu Sep 24 09:34:51 2009 -0600 cpumask: use mm_cpumask() wrapper: x86 Makes code futureproof against the impending change to mm->cpu_vm_mask (to be a pointer). It's also a chance to use the new cpumask_ ops which take a pointer (the older ones are deprecated, but there's no hurry for arch code). Signed-off-by: Rusty Russell commit fa40699b975131028a61aa8e095b0b17f350da40 Author: Rusty Russell Date: Thu Sep 24 09:34:51 2009 -0600 cpumask: use mm_cpumask() wrapper: um Makes code futureproof against the impending change to mm->cpu_vm_mask. It's also a chance to use the new cpumask_ ops which take a pointer (the older ones are deprecated, but there's no hurry for arch code). Signed-off-by: Rusty Russell commit 55b8cab49dd43d227f0dd49e3524406fdc46d37b Author: Rusty Russell Date: Thu Sep 24 09:34:50 2009 -0600 cpumask: use mm_cpumask() wrapper: mips Makes code futureproof against the impending change to mm->cpu_vm_mask. It's also a chance to use the new cpumask_ ops which take a pointer (the older ones are deprecated, but there's no hurry for arch code). Signed-off-by: Rusty Russell commit 7ce1df49e1b1b004ff15fb0af9a02c6b1ff71f70 Author: Rusty Russell Date: Thu Sep 24 09:34:50 2009 -0600 cpumask: use mm_cpumask() wrapper: mn10300 Makes code futureproof against the impending change to mm->cpu_vm_mask (to be a pointer). It's also a chance to use the new cpumask_ ops which take a pointer (the older ones are deprecated, but there's no hurry for arch code). Also change the actual arg name here to "mm" (which it is), not "task". Signed-off-by: Rusty Russell commit 49b92050f6ce436cde7f495bbb27437bcb09e238 Author: Rusty Russell Date: Thu Sep 24 09:34:49 2009 -0600 cpumask: use mm_cpumask() wrapper: m32r Makes code futureproof against the impending change to mm->cpu_vm_mask. It's also a chance to use the new cpumask_ ops which take a pointer (the older ones are deprecated, but there's no hurry for arch code). Signed-off-by: Rusty Russell Acked-by: Hirokazu Takata (fixes) commit 56f8ba83a52b9f9e3711eff8e54168ac14aa288f Author: Rusty Russell Date: Thu Sep 24 09:34:49 2009 -0600 cpumask: use mm_cpumask() wrapper: arm Makes code futureproof against the impending change to mm->cpu_vm_mask. It's also a chance to use the new cpumask_ ops which take a pointer (the older ones are deprecated, but there's no hurry for arch code). Signed-off-by: Rusty Russell commit a6a01063de6298c60f2506dc7659403e02b4b224 Author: Rusty Russell Date: Thu Sep 24 09:34:48 2009 -0600 cpumask: Use accessors for cpu_*_mask: um Use the accessors rather than frobbing bits directly (the new versions are const). Signed-off-by: Rusty Russell Signed-off-by: Mike Travis commit ea0f1cab6ed43121ff6f24c1bb02e88a8d11a2d6 Author: Rusty Russell Date: Thu Sep 24 09:34:48 2009 -0600 cpumask: Use accessors for cpu_*_mask: powerpc Use the accessors rather than frobbing bits directly (the new versions are const). Signed-off-by: Rusty Russell Signed-off-by: Mike Travis commit 4037ac6e2cb4e3148c25124b431eead4e704a4ff Author: Rusty Russell Date: Thu Sep 24 09:34:47 2009 -0600 cpumask: Use accessors for cpu_*_mask: mips Use the accessors rather than frobbing bits directly (the new versions are const). Signed-off-by: Rusty Russell Signed-off-by: Mike Travis commit 2377afdde16a50b72e0b7ddb96d6b905f73754e2 Author: Rusty Russell Date: Thu Sep 24 09:34:47 2009 -0600 cpumask: Use accessors for cpu_*_mask: m32r Use the accessors rather than frobbing bits directly (the new versions are const). Signed-off-by: Rusty Russell Signed-off-by: Mike Travis commit 0748bd01773395003208996c4c0b3f80caf80976 Author: Rusty Russell Date: Thu Sep 24 09:34:46 2009 -0600 cpumask: remove arch_send_call_function_ipi Now everyone is converted to arch_send_call_function_ipi_mask, remove the shim and the #defines. Signed-off-by: Rusty Russell commit 630cd0460724e286d3c5cb2c33930b0ae9cd6645 Author: Rusty Russell Date: Thu Sep 24 09:34:45 2009 -0600 cpumask: arch_send_call_function_ipi_mask: s390 We're weaning the core code off handing cpumask's around on-stack. This introduces arch_send_call_function_ipi_mask(). Signed-off-by: Rusty Russell commit f063ea02fba5782099b6730d5733ee44638df8f9 Author: Rusty Russell Date: Thu Sep 24 09:34:45 2009 -0600 cpumask: arch_send_call_function_ipi_mask: powerpc We're weaning the core code off handing cpumask's around on-stack. This introduces arch_send_call_function_ipi_mask(), and by defining it, the old arch_send_call_function_ipi is defined by the core code. Signed-off-by: Rusty Russell commit 48a048fed82a8e5fdd8618574f6d3de1a0d67a50 Author: Rusty Russell Date: Thu Sep 24 09:34:44 2009 -0600 cpumask: arch_send_call_function_ipi_mask: mips We're weaning the core code off handing cpumask's around on-stack. This introduces arch_send_call_function_ipi_mask(), and by defining it, the old arch_send_call_function_ipi is defined by the core code. We also take the chance to wean the implementations off the obsolescent for_each_cpu_mask(): making send_ipi_mask take the pointer seemed the most natural way to ensure all implementations used for_each_cpu. Signed-off-by: Rusty Russell commit c2a3a4881dc851ec9b5bdc83fdc03afa31d6fbed Author: Rusty Russell Date: Thu Sep 24 09:34:43 2009 -0600 cpumask: arch_send_call_function_ipi_mask: m32r We're weaning the core code off handing cpumask's around on-stack. This introduces arch_send_call_function_ipi_mask(), and by defining it, the old arch_send_call_function_ipi is defined by the core code. We also take the chance to wean the implementations off the obsolescent for_each_cpu_mask(): making send_ipi_mask take the pointer seemed the most natural way to ensure all implementations used for_each_cpu. Signed-off-by: Rusty Russell commit 81065e4f2b525410d0c80040140e086abfbf7de2 Author: Rusty Russell Date: Thu Sep 24 09:34:43 2009 -0600 cpumask: arch_send_call_function_ipi_mask: alpha We're weaning the core code off handing cpumask's around on-stack. This introduces arch_send_call_function_ipi_mask(). We also take the chance to wean the send_ipi_message off the obsolescent for_each_cpu_mask(): making it take a pointer seemed the most natural way to do this. Signed-off-by: Rusty Russell commit e50a6f19537362ed61f7f74af724345975e602ed Author: Rusty Russell Date: Thu Sep 24 09:34:42 2009 -0600 cpumask: remove obsolete topology_core_siblings and topology_thread_siblings: ia64 There were replaced by topology_core_cpumask and topology_thread_cpumask. Signed-off-by: Rusty Russell commit 399d0682704144ddadb27164343a265774d8b301 Author: Rusty Russell Date: Thu Sep 24 09:34:42 2009 -0600 cpumask: remove obsolete topology_core_siblings and topology_thread_siblings: powerpc There were replaced by topology_core_cpumask and topology_thread_cpumask. Signed-off-by: Rusty Russell commit 4f269bf5e1652370164a0b4b04db7c47c0c96a8a Author: Rusty Russell Date: Thu Sep 24 09:34:41 2009 -0600 cpumask: remove obsolete topology_core_siblings and topology_thread_siblings: s390 There were replaced by topology_core_cpumask and topology_thread_cpumask. Signed-off-by: Rusty Russell commit 434e2187e69b97ad8d035258766e1ea56067625d Author: Rusty Russell Date: Thu Sep 24 09:34:41 2009 -0600 cpumask: remove obsolete topology_core_siblings and topology_thread_siblings: sparc There were replaced by topology_core_cpumask and topology_thread_cpumask. Signed-off-by: Rusty Russell commit 6f401420e2822c24c36e6e1c657f6e7f7f777a93 Author: Rusty Russell Date: Thu Sep 24 09:34:40 2009 -0600 cpumask: remove obsolete topology_core_siblings and topology_thread_siblings: core There were replaced by topology_core_cpumask and topology_thread_cpumask. Signed-off-by: Rusty Russell commit fe71a3c7dc8cfe0f239c04b4fc6501f4aa56aa0a Author: Rusty Russell Date: Thu Sep 24 09:34:40 2009 -0600 cpumask: remove the deprecated smp_call_function_mask() Everyone is now using smp_call_function_many(). Signed-off-by: Rusty Russell commit da83a84b53296a2ea498be8a497c86fb4a1fd2d6 Author: Rusty Russell Date: Thu Sep 24 09:34:39 2009 -0600 ia64: convert last user of smp_call_function_mask smp_call_function_many is the new version: it takes a pointer. Also, use mm accessor macro while we're changing this. Signed-off-by: Rusty Russell commit e0ad955680878998ff7dc51ce06ddad12260423a Author: Rusty Russell Date: Thu Sep 24 09:34:38 2009 -0600 cpumask: don't define set_cpus_allowed() if CONFIG_CPUMASK_OFFSTACK=y You're not supposed to pass cpumasks on the stack in that case. Signed-off-by: Rusty Russell commit e68110fb54c3c784fb66be67d8d18a86286eefdd Author: Bjorn Helgaas Date: Thu Sep 24 09:34:38 2009 -0600 ACPI: remove cpumask_t usage set_cpus_allowed() is on the way out; replace it with set_cpus_allowed_ptr(). Reference: http://lkml.org/lkml/2008/11/6/448 Signed-off-by: Bjorn Helgaas Signed-off-by: Rusty Russell commit 144e2ce6115c0a1ee4cb5c935360ea4e2966b0ce Author: Nobuhiro Iwamatsu Date: Mon Jun 15 12:16:54 2009 +0900 cpumask: Remove mask field from comments By 7be23e278f, mask field was deleted by irqaction. However, it was not deleted from comment. Signed-off-by: Nobuhiro Iwamatsu CC: Rusty Russell Signed-off-by: Rusty Russell commit ef79f8e191722dbc1fc33bdfc448f572266c37e9 Author: Rusty Russell Date: Thu Sep 24 09:34:37 2009 -0600 cpumask: remove unused mask field from struct irqaction. Up until 1.1.83, the primitive human tribes used struct sigaction for interrupts. The sa_mask field was overloaded to hold a pointer to the name. When someone created the new "struct irqaction" they carried across the "mask" field as a kind of ancestor worship: the fact that it was unused makes clear its spiritual significance. Signed-off-by: Rusty Russell commit 1d1afc1957a441fc75a27517b17437d8af3b3b93 Author: Rusty Russell Date: Thu Sep 24 09:34:36 2009 -0600 cpumask: remove last assignment to mask field of struct irqaction. This snuck in after the patch which removed all the others. Signed-off-by: Rusty Russell Cc: Ingo Molnar commit 72d78d05cbaa69f2a32f5f9d65a4551ba0da571f Author: Rusty Russell Date: Thu Sep 24 09:34:36 2009 -0600 cpumask: remove unused cpu_mask_all It's only defined for NR_CPUS > BITS_PER_LONG; cpu_all_mask is always defined (and const). Signed-off-by: Rusty Russell commit 51c870a2d8708bda83c4ba47f26012a8420bdaff Author: Rusty Russell Date: Thu Sep 24 09:34:35 2009 -0600 cpumask: remove dangerous CPU_MASK_ALL_PTR, &CPU_MASK_ALL.: mips (Thanks to Al Viro for reminding me of this, via Ingo) CPU_MASK_ALL is the (deprecated) "all bits set" cpumask, defined as so: #define CPU_MASK_ALL (cpumask_t) { { ... } } Taking the address of such a temporary is questionable at best, unfortunately 321a8e9d (cpumask: add CPU_MASK_ALL_PTR macro) added CPU_MASK_ALL_PTR: #define CPU_MASK_ALL_PTR (&CPU_MASK_ALL) Which formalizes this practice. One day gcc could bite us over this usage (though we seem to have gotten away with it so far). So replace everywhere which used &CPU_MASK_ALL or CPU_MASK_ALL_PTR with the modern "cpu_all_mask" (a real struct cpumask *), and remove CPU_MASK_ALL_PTR altogether. Signed-off-by: Rusty Russell Acked-by: Ingo Molnar Reported-by: Al Viro Cc: Mike Travis commit a0219d948dd712561817b0d7c95fd2f10b698203 Author: Rusty Russell Date: Thu Sep 24 09:34:35 2009 -0600 cpumask: remove dangerous CPU_MASK_ALL_PTR (Thanks to Al Viro for reminding me of this, via Ingo) CPU_MASK_ALL is the (deprecated) "all bits set" cpumask, defined as so: #define CPU_MASK_ALL (cpumask_t) { { ... } } Taking the address of such a temporary is questionable at best, unfortunately 321a8e9d (cpumask: add CPU_MASK_ALL_PTR macro) added CPU_MASK_ALL_PTR: #define CPU_MASK_ALL_PTR (&CPU_MASK_ALL) Which formalizes this practice. One day gcc could bite us over this usage (though we seem to have gotten away with it so far). Now all callers are removed, we kill it. Signed-off-by: Rusty Russell Acked-by: Ingo Molnar Reported-by: Al Viro Cc: Mike Travis commit 29c337a034b5526e80a785409d15d3b7c7edecf4 Author: Rusty Russell Date: Thu Sep 24 09:34:26 2009 -0600 cpumask: remove obsolete node_to_cpumask now everyone uses cpumask_of_node Signed-off-by: Rusty Russell commit b966cd6b285d4cd6feaf8b06b21bc87adb907929 Author: Rusty Russell Date: Thu Sep 24 09:34:25 2009 -0600 cpumask: remove the now-obsoleted pcibus_to_cpumask(): powerpc cpumask_of_pcibus() is the new version. Signed-off-by: Rusty Russell commit f5564b823bbe211bab98d12de7b1f7d42cfb4a87 Author: Rusty Russell Date: Thu Sep 24 09:34:25 2009 -0600 cpumask: remove the now-obsoleted pcibus_to_cpumask(): mips cpumask_of_pcibus() is the new version. Signed-off-by: Rusty Russell commit 8194a40bee5c2b47e336febb3666a68154fec427 Author: Rusty Russell Date: Thu Sep 24 09:34:24 2009 -0600 cpumask: remove the now-obsoleted pcibus_to_cpumask(): alpha cpumask_of_pcibus() is the new version. Signed-off-by: Rusty Russell commit 79f5599772ac2f138d7a75b8f3f06a93f09c75f7 Author: Li Zefan Date: Mon Jun 15 14:58:26 2009 +0800 cpumask: use zalloc_cpumask_var() where possible Remove open-coded zalloc_cpumask_var() and zalloc_cpumask_var_node(). Signed-off-by: Li Zefan Signed-off-by: Rusty Russell commit 139d6065c83071d5f66cd013a274a43699f8e2c1 Merge: efb064d b37fa87 Author: David S. Miller Date: Wed Sep 23 16:23:46 2009 -0700 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 Conflicts: drivers/net/wireless/iwlwifi/iwl-rx.c commit 0dd52d0df02733dfc2d5f3824e41b96492305384 Merge: c37efa9 fde1132 Author: Linus Torvalds Date: Wed Sep 23 15:39:36 2009 -0700 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: add driver for Atmel AT42QT2160 Sensor Chip Input: max7359 - use threaded IRQs Input: add driver for Maxim MAX7359 key switch controller Input: add driver for ADP5588 QWERTY I2C Keypad Input: add touchscreen driver for MELFAS MCS-5000 controller Input: add driver for OpenCores Keyboard Controller Input: dm355evm_keys - remove dm355evm_keys_hardirq Input: synaptics_i2c - switch to using __cancel_delayed_work() Input: ad7879 - add support for AD7889 Input: atkbd - rely on input core to restore state on resume Input: add generic suspend and resume for input devices Input: libps2 - additional locking for i8042 ports commit c37efa932598de5e30330a1414e34d9e082e0d9e Merge: 9e12a7e abe1ee3 Author: Linus Torvalds Date: Wed Sep 23 15:37:02 2009 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next * git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next: (30 commits) Use macros for .data.page_aligned section. Use macros for .bss.page_aligned section. Use new __init_task_data macro in arch init_task.c files. kbuild: Don't define ALIGN and ENTRY when preprocessing linker scripts. arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash 4.0 kbuild: add static to prototypes kbuild: fail build if recordmcount.pl fails kbuild: set -fconserve-stack option for gcc 4.5 kbuild: echo the record_mcount command gconfig: disable "typeahead find" search in treeviews kbuild: fix cc1 options check to ensure we do not use -fPIC when compiling checkincludes.pl: add option to remove duplicates in place markup_oops: use modinfo to avoid confusion with underscored module names checkincludes.pl: provide usage helper checkincludes.pl: close file as soon as we're done with it ctags: usability fix kernel hacking: move STRIP_ASM_SYMS from General gitignore usr/initramfs_data.cpio.bz2 and usr/initramfs_data.cpio.lzma kbuild: Check if linker supports the -X option kbuild: introduce ld-option ... Fix trivial conflict in scripts/basic/fixdep.c commit 9e12a7e7d89ad813d01092890010cf67d0f914bd Merge: a7ddbf8 2df5480 Author: Linus Torvalds Date: Wed Sep 23 15:22:41 2009 -0700 Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6 * 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: NFS: Propagate 'fsc' mount option through automounts sunrpc/rpc_pipe: fix kernel-doc notation sunrpc: xdr_xcode_hyper helpers cannot presume 64-bit alignment NFS: Add nfs_alloc_parsed_mount_data NFS/RPC: fix problems with reestablish_timeout and related code. NFS: Get rid of the NFS_MOUNT_VER3 and NFS_MOUNT_TCP flags commit a7ddbf891b8236b51fb3c9574555eb7d7d13aca6 Merge: 3e56d49 f4edeeb Author: Linus Torvalds Date: Wed Sep 23 15:21:54 2009 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs: 9p: Update documentation to add fscache related bits 9p: Add fscache support to 9p 9p: Fix the incorrect update of inode size in v9fs_file_write() 9p: Use the i_size_[read, write]() macros instead of using inode->i_size directly. commit 3e56d49390cd161f34cc049a3661045183d276d5 Merge: c82ffab 58f055e Author: Linus Torvalds Date: Wed Sep 23 15:20:16 2009 -0700 Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: hwmon: (ltc4245) Clear faults at startup hwmon: (ltc4215) Clear faults at startup hwmon: (coretemp) Add Lynnfield CPU hwmon: (coretemp) Add support for Penryn mobile CPUs hwmon: (coretemp) Fix Atom CPUs support hwmon: Delete deprecated FSC drivers hwmon: (adm1031) Add sysfs files for temperature offsets commit c82ffab9a857f8286ed2b559624b7005a367b638 Merge: a724ead 5224ee0 Author: Linus Torvalds Date: Wed Sep 23 15:18:57 2009 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: SELinux: do not destroy the avc_cache_nodep KEYS: Have the garbage collector set its timer for live expired keys tpm-fixup-pcrs-sysfs-file-update creds_are_invalid() needs to be exported for use by modules: include/linux/cred.h: fix build Fix trivial BUILD_BUG_ON-induced conflicts in drivers/char/tpm/tpm.c commit 58f055e5314856a3badfa61fe144347903488989 Author: Ira W. Snyder Date: Wed Sep 23 22:59:44 2009 +0200 hwmon: (ltc4245) Clear faults at startup When power is applied to the ltc4245 chip it sometimes reports spurious faults, which are exposed as alarms in the hwmon output. Clear the fault register when the driver is installed to clear the alarms. Signed-off-by: Ira W. Snyder Signed-off-by: Jean Delvare commit b6b9d69602aec2c869dd2ca730aab2cc58473c2d Author: Ira W. Snyder Date: Wed Sep 23 22:59:43 2009 +0200 hwmon: (ltc4215) Clear faults at startup When power is applied to the ltc4215 chip it sometimes reports spurious faults. The faults are not yet exposed via sysfs, however it may be useful for userspace to read the fault register directly with the i2cget command. Clear the fault register when the driver is installed so userspace doesn't have to worry about spurious fault indications. Signed-off-by: Ira W. Snyder Signed-off-by: Jean Delvare commit fa08acd7d16cd7ea8114f3844b0ef2505a4276a8 Author: Huaxu Wan Date: Wed Sep 23 22:59:43 2009 +0200 hwmon: (coretemp) Add Lynnfield CPU Add Lynnfield processor support. Lynnfield is a quad-core Nehalem based microprocessor for Desktop market, which is introduced in September 2009. Signed-off-by: Huaxu Wan Signed-off-by: Kent Liu Acked-by: Rudolf Marek Signed-off-by: Jean Delvare commit eccfed42215bebda0acc3158c1a4ff8325dea275 Author: Rudolf Marek Date: Wed Sep 23 22:59:42 2009 +0200 hwmon: (coretemp) Add support for Penryn mobile CPUs Following patch adds support for mobile Penryn CPUs. Intel documents this poorly. I asked the Coretemp author for some help. This is totally untested and may not work. Please test! Signed-off-by: Rudolf Marek Cc: Huaxu Wan Cc: Kent Liu Signed-off-by: Jean Delvare commit 708a62bcd5f699756bae81491e64648fbf19e2a4 Author: Rudolf Marek Date: Wed Sep 23 22:59:42 2009 +0200 hwmon: (coretemp) Fix Atom CPUs support Fix Atom CPUs support. Intel documents TjMax at 90 degrees C but some Atoms may have 125 degrees C (this is undocumented speculation). Signed-off-by: Rudolf Marek Cc: Huaxu Wan Cc: Kent Liu Signed-off-by: Jean Delvare commit 91f17e02a224dc649eaffc8e0bca6db85efb9cd7 Author: Jean Delvare Date: Wed Sep 23 22:59:42 2009 +0200 hwmon: Delete deprecated FSC drivers The legacy fscpos and fscher drivers have been replaced by the unified fschmd driver. The transition period is over now, we can delete them. Signed-off-by: Jean Delvare Acked-by: Hans de Goede commit 49dc9efed05ad3e49000097ce1ec31cd3bbc909b Author: Ira Snyder Date: Wed Sep 23 22:59:41 2009 +0200 hwmon: (adm1031) Add sysfs files for temperature offsets The ADM1030/ADM1031 chips have temperature offset registers, for both the local and remote temperature sensors. Following the example set forth in the LM90/ADM1032 driver, expose the offset registers to userspace. Signed-off-by: Ira W. Snyder Signed-off-by: Jean Delvare commit 2df54806389205d76bc3d1ce8a10cc14889ddec9 Author: David Howells Date: Wed Sep 23 14:36:39 2009 -0400 NFS: Propagate 'fsc' mount option through automounts Propagate the NFS 'fsc' mount option through NFS automounts of various types. This is now required as commit: commit c02d7adf8c5429727a98bad1d039bccad4c61c50 Author: Trond Myklebust Date: Mon Jun 22 15:09:14 2009 -0400 NFSv4: Replace nfs4_path_walk() with VFS path lookup in a private namespace uses VFS-driven automounting to reach all submounts barring the root, thus preventing fscaching from being enabled on any submount other than the root. This patch gets around that by propagating the NFS_OPTION_FSCACHE flag across automounts. If a uniquifier is supplied to a mount then this is propagated to all automounts of that mount too. Signed-off-by: David Howells [Trond: Fixed up the definition of nfs_fscache_get_super_cookie for the case of #undef CONFIG_NFS_FSCACHE] Signed-off-by: Trond Myklebust commit 4111d4fde6aa04a2e42c43d0e74593e6144b0f0f Author: Randy Dunlap Date: Wed Sep 23 14:36:38 2009 -0400 sunrpc/rpc_pipe: fix kernel-doc notation Fix kernel-doc notation (& warnings) in sunrpc/rpc_pipe.c. Signed-off-by: Randy Dunlap Signed-off-by: Trond Myklebust commit 97363c6a4f93a20380b4a9e11f35e27fed68a517 Author: Benny Halevy Date: Wed Sep 23 14:36:38 2009 -0400 sunrpc: xdr_xcode_hyper helpers cannot presume 64-bit alignment Signed-off-by: Benny Halevy Signed-off-by: Trond Myklebust commit 9423a08ad5773d0a7612d434700561dc8346b6d6 Author: Chuck Lever Date: Wed Sep 23 14:36:38 2009 -0400 NFS: Add nfs_alloc_parsed_mount_data Allocating nfs_parsed_mount_data and setting up the defaults is nearly the same for both nfs and nfs4 mounts. Both paths seem to use nfs_validate_transport_protocol(), so setting a default value for nfs_server.protocol ought to be unnecessary. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 61d0a8e6a8049cea246ee7ec19b042d4ff1f6ef6 Author: Neil Brown Date: Wed Sep 23 14:36:37 2009 -0400 NFS/RPC: fix problems with reestablish_timeout and related code. [[resending with correct cc: - "vfs.kernel.org" just isn't right!]] xprt->reestablish_timeout is used to cause TCP connection attempts to back off if the connection fails so as not to hammer the network, but to still allow immediate connections when there is no reason to believe there is a problem. It is not used for the first connection (when transport->sock is NULL) but only on reconnects. It is currently set: a/ to 0 when xs_tcp_state_change finds a state of TCP_FIN_WAIT1 on the assumption that the client has closed the connection so the reconnect should be immediate when needed. b/ to at least XS_TCP_INIT_REEST_TO when xs_tcp_state_change detects TCP_CLOSING or TCP_CLOSE_WAIT on the assumption that the server closed the connection so a small delay at least is required. c/ as above when xs_tcp_state_change detects TCP_SYN_SENT, so that it is never 0 while a connection has been attempted, else the doubling will produce 0 and there will be no backoff. d/ to double is value (up to a limit) when delaying a connection, thus providing exponential backoff and e/ to XS_TCP_INIT_REEST_TO in xs_setup_tcp as simple initialisation. So you can see it is highly dependant on xs_tcp_state_change being called as expected. However experimental evidence shows that xs_tcp_state_change does not see all state changes. ("rpcdebug -m rpc trans" can help show what actually happens). Results show: TCP_ESTABLISHED is reported when a connection is made. TCP_SYN_SENT is never reported, so rule 'c' above is never effective. When the server closes the connection, TCP_CLOSE_WAIT and TCP_LAST_ACK *might* be reported, and TCP_CLOSE is always reported. This rule 'b' above will sometimes be effective, but not reliably. When the client closes the connection, it used to result in TCP_FIN_WAIT1, TCP_FIN_WAIT2, TCP_CLOSE. However since commit f75e674 (SUNRPC: Fix the problem of EADDRNOTAVAIL syslog floods on reconnect) we don't see *any* events on client-close. I think this is because xs_restore_old_callbacks is called to disconnect xs_tcp_state_change before the socket is closed. In any case, rule 'a' no longer applies. So all that is left are rule d, which successfully doubles the timeout which is never rest, and rule e which initialises the timeout. Even if the rules worked as expected, there would be a problem because a successful connection does not reset the timeout, so a sequence of events where the server closes the connection (e.g. during failover testing) will cause longer and longer timeouts with no good reason. This patch: - sets reestablish_timeout to 0 in xs_close thus effecting rule 'a' - sets it to 0 in xs_tcp_data_ready to ensure that a successful connection resets the timeout - sets it to at least XS_TCP_INIT_REEST_TO after it is doubled, thus effecting rule c I have not reimplemented rule b and the new version of rule c seems sufficient. I suspect other code in xs_tcp_data_ready needs to be revised as well. For example I don't think connect_cookie is being incremented as often as it should be. Signed-off-by: NeilBrown Signed-off-by: Trond Myklebust commit 8a6e5deb8a8caa810fef2c525f5dbea2cfe04a47 Author: Trond Myklebust Date: Wed Sep 23 14:36:37 2009 -0400 NFS: Get rid of the NFS_MOUNT_VER3 and NFS_MOUNT_TCP flags Keep it in the case of the legacy binary mount interface, but purge it from the nfs_server structure. Signed-off-by: Trond Myklebust commit a724eada8c2a7b62463b73ccf73fd0bb6e928aeb Merge: 1b9894f dfdd8cc Author: Linus Torvalds Date: Wed Sep 23 11:25:16 2009 -0700 Merge branch 'ixp4xx' of git://git.kernel.org/pub/scm/linux/kernel/git/chris/linux-2.6 * 'ixp4xx' of git://git.kernel.org/pub/scm/linux/kernel/git/chris/linux-2.6: Add MAINTAINERS entry for ARM/INTEL IXP4xx arch support. ixp4xx: arch_idle() documentation fixup ixp4xx: timer and clocks cleanups commit 1b9894f342a39601bb0420b7b8c7e445670c1b51 Author: Randy Dunlap Date: Mon Sep 21 11:12:03 2009 -0700 serial core: fix new kernel-doc warnings Fix new kernel-doc warnings in serial_core.[hc] files. Warning(include/linux/serial_core.h:485): No description found for parameter 'uport' Warning(include/linux/serial_core.h:485): Excess function parameter 'port' description in 'uart_handle_dcd_change' Warning(include/linux/serial_core.h:511): No description found for parameter 'uport' Warning(include/linux/serial_core.h:511): Excess function parameter 'port' description in 'uart_handle_cts_change' Warning(drivers/serial/serial_core.c:2437): No description found for parameter 'uport' Warning(drivers/serial/serial_core.c:2437): Excess function parameter 'port' description in 'uart_add_one_port' Warning(drivers/serial/serial_core.c:2509): No description found for parameter 'uport' Warning(drivers/serial/serial_core.c:2509): Excess function parameter 'port' description in 'uart_remove_one_port' Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds commit 5224ee086321fec78970e2f2805892d2b34e8957 Author: Eric Paris Date: Sun Sep 20 21:21:10 2009 -0400 SELinux: do not destroy the avc_cache_nodep The security_ops reset done when SELinux is disabled at run time is done after the avc cache is freed and after the kmem_cache for the avc is also freed. This means that between the time the selinux disable code destroys the avc_node_cachep another process could make a security request and could try to allocate from the cache. We are just going to leave the cachep around, like we always have. SELinux: Disabled at runtime. BUG: unable to handle kernel NULL pointer dereference at (null) IP: [] kmem_cache_alloc+0x9a/0x185 PGD 0 Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC last sysfs file: CPU 1 Modules linked in: Pid: 12, comm: khelper Not tainted 2.6.31-tip-05525-g0eeacc6-dirty #14819 System Product Name RIP: 0010:[] [] kmem_cache_alloc+0x9a/0x185 RSP: 0018:ffff88003f9258b0 EFLAGS: 00010086 RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000078c0129e RDX: 0000000000000000 RSI: ffffffff8130b626 RDI: ffffffff81122528 RBP: ffff88003f925900 R08: 0000000078c0129e R09: 0000000000000001 R10: 0000000000000000 R11: 0000000078c0129e R12: 0000000000000246 R13: 0000000000008020 R14: ffff88003f8586d8 R15: 0000000000000001 FS: 0000000000000000(0000) GS:ffff880002b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b CR2: 0000000000000000 CR3: 0000000001001000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: ffffffff827bd420 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process khelper (pid: 12, threadinfo ffff88003f924000, task ffff88003f928000) Stack: 0000000000000246 0000802000000246 ffffffff8130b626 0000000000000001 <0> 0000000078c0129e 0000000000000000 ffff88003f925a70 0000000000000002 <0> 0000000000000001 0000000000000001 ffff88003f925960 ffffffff8130b626 Call Trace: [] ? avc_alloc_node+0x36/0x273 [] avc_alloc_node+0x36/0x273 [] ? avc_latest_notif_update+0x7d/0x9e [] avc_insert+0x51/0x18d [] avc_has_perm_noaudit+0x9d/0x128 [] avc_has_perm+0x45/0x88 [] current_has_perm+0x52/0x6d [] selinux_task_create+0x2f/0x45 [] security_task_create+0x29/0x3f [] copy_process+0x82/0xdf0 [] ? register_lock_class+0x2f/0x36c [] ? mark_lock+0x2e/0x1e1 [] do_fork+0x16e/0x382 [] ? register_lock_class+0x2f/0x36c [] ? probe_workqueue_execution+0x57/0xf9 [] ? mark_lock+0x2e/0x1e1 [] ? probe_workqueue_execution+0x57/0xf9 [] kernel_thread+0x82/0xe0 [] ? ____call_usermodehelper+0x0/0x139 [] ? child_rip+0x0/0x20 [] ? __call_usermodehelper+0x65/0x9a [] run_workqueue+0x171/0x27e [] ? run_workqueue+0x11d/0x27e [] ? __call_usermodehelper+0x0/0x9a [] worker_thread+0xe8/0x10f [] ? autoremove_wake_function+0x0/0x63 [] ? worker_thread+0x0/0x10f [] kthread+0x91/0x99 [] child_rip+0xa/0x20 [] ? restore_args+0x0/0x30 [] ? kthread+0x0/0x99 [] ? child_rip+0x0/0x20 Code: 0f 85 99 00 00 00 9c 58 66 66 90 66 90 49 89 c4 fa 66 66 90 66 66 90 e8 83 34 fb ff e8 d7 e9 26 00 48 98 49 8b 94 c6 10 01 00 00 <48> 8b 1a 44 8b 7a 18 48 85 db 74 0f 8b 42 14 48 8b 04 c3 ff 42 RIP [] kmem_cache_alloc+0x9a/0x185 RSP CR2: 0000000000000000 ---[ end trace 42f41a982344e606 ]--- Reported-by: Ingo Molnar Signed-off-by: Eric Paris Signed-off-by: James Morris commit 0e442afd92fcdde2cc63b6f25556b8934e42b7d2 Author: Roland Dreier Date: Wed Sep 23 11:10:15 2009 -0700 IB/mad: Fix lock-lock-timer deadlock in RMPP code Holding agent->lock across cancel_delayed_work() (which does del_timer_sync()) in ib_cancel_rmpp_recvs() leads to lockdep reports of possible lock-timer deadlocks if a consumer ever does something that connects agent->lock to a lock taken in IRQ context (cf http://marc.info/?l=linux-rdma&m=125243699026045). Fix this by changing the list items to a new state "CANCELING" while holding the lock, and then canceling the delayed work without holding the lock. If the delayed work runs after the lock is dropped, it will see the state is CANCELING and return immediately, so the list will stay stable while we traverse it with the lock not held. Reviewed-by: Sean Hefty Signed-off-by: Roland Dreier commit 606531c316d30e9639473a6da09ee917125ab467 Author: David Howells Date: Wed Sep 16 15:54:14 2009 +0100 KEYS: Have the garbage collector set its timer for live expired keys The key garbage collector sets a timer to start a new collection cycle at the point the earliest key to expire should be considered garbage. However, it currently only does this if the key it is considering hasn't yet expired. If the key being considering has expired, but hasn't yet reached the collection time then it is ignored, and won't be collected until some other key provokes a round of collection. Make the garbage collector set the timer for the earliest key that hasn't yet passed its collection time, rather than the earliest key that hasn't yet expired. Signed-off-by: David Howells Signed-off-by: James Morris commit f4edeeb3937d5f9953b5722f1cca9573d5ffe8a0 Author: Abhishek Kulkarni Date: Tue Sep 22 11:34:04 2009 -0500 9p: Update documentation to add fscache related bits Update the documentation to describe FS-Cache related caching parameters. This patch also updates the pointers to 9p-related papers and adds pointer to the Wiki. Signed-off-by: Abhishek Kulkarni Signed-off-by: Eric Van Hensbergen commit 60e78d2c993e58d890596d951fff77d5965adcd6 Author: Abhishek Kulkarni Date: Wed Sep 23 13:00:27 2009 -0500 9p: Add fscache support to 9p This patch adds a persistent, read-only caching facility for 9p clients using the FS-Cache caching backend. When the fscache facility is enabled, each inode is associated with a corresponding vcookie which is an index into the FS-Cache indexing tree. The FS-Cache indexing tree is indexed at 3 levels: - session object associated with each mount. - inode/vcookie - actual data (pages) A cache tag is chosen randomly for each session. These tags can be read off /sys/fs/9p/caches and can be passed as a mount-time parameter to re-attach to the specified caching session. Signed-off-by: Abhishek Kulkarni Signed-off-by: Eric Van Hensbergen commit 637d020a02cd734bf27acfc56c6d942cddd9eb80 Author: Abhishek Kulkarni Date: Tue Sep 22 11:34:05 2009 -0500 9p: Fix the incorrect update of inode size in v9fs_file_write() When using the cache=loose flags, the inode's size was not being updated correctly on a remote write. Thus subsequent reads of the whole file resulted in a truncated read. Fix it. Signed-off-by: Abhishek Kulkarni Signed-off-by: Eric Van Hensbergen commit 7549ae3e81cc45908cbeee54a52b24f247fb0a2d Author: Abhishek Kulkarni Date: Tue Sep 22 11:34:05 2009 -0500 9p: Use the i_size_[read, write]() macros instead of using inode->i_size directly. Change all occurrence of inode->i_size with i_size_read() or i_size_write() as appropriate. Signed-off-by: Abhishek Kulkarni Signed-off-by: Eric Van Hensbergen commit 0afd9056f1b43c9fcbfdf933b263d72023d382fe Author: Jason Gunthorpe Date: Fri Sep 18 12:54:24 2009 -0700 tpm-fixup-pcrs-sysfs-file-update Signed-off-by: Jason Gunthorpe Cc: Debora Velarde Cc: Rajiv Andrade Cc: Marcel Selhorst Cc: James Morris Signed-off-by: Andrew Morton Signed-off-by: James Morris commit 764db03fee50f7a3de91de80ef4a943f0d720801 Author: Randy Dunlap Date: Fri Sep 18 11:06:47 2009 -0700 creds_are_invalid() needs to be exported for use by modules: ERROR: "creds_are_invalid" [fs/cachefiles/cachefiles.ko] undefined! Signed-off-by: Randy Dunlap Cc: David Howells Cc: James Morris Cc: Serge Hallyn Signed-off-by: Andrew Morton Signed-off-by: James Morris commit 74908a0009eb36054190ab80deb9671014efed96 Author: Andrew Morton Date: Thu Sep 17 17:47:12 2009 -0700 include/linux/cred.h: fix build mips allmodconfig: include/linux/cred.h: In function `creds_are_invalid': include/linux/cred.h:187: error: `PAGE_SIZE' undeclared (first use in this function) include/linux/cred.h:187: error: (Each undeclared identifier is reported only once include/linux/cred.h:187: error: for each function it appears in.) Fixes commit b6dff3ec5e116e3af6f537d4caedcad6b9e5082a Author: David Howells AuthorDate: Fri Nov 14 10:39:16 2008 +1100 Commit: James Morris CommitDate: Fri Nov 14 10:39:16 2008 +1100 CRED: Separate task security context from task_struct I think. It's way too large to be inlined anyway. Dunno if this needs an EXPORT_SYMBOL() yet. Cc: David Howells Cc: James Morris Cc: Serge Hallyn Signed-off-by: Andrew Morton Acked-by: David Howells Signed-off-by: James Morris commit 7043078630bbc9eb908a56e08077c5abe7f2d311 Author: David Howells Date: Wed Sep 23 10:40:24 2009 +0100 MN10300: Handle removal of struct uart_info Commit ebd2c8f6d2ec4012c267ecb95e72a57b8355a705 removed struct uart_info and commit bdc04e3174e18f475289fa8f4144f66686326b7e further moved delta_msr_wait. Fix up the MN10300 on-chip serial port drivers to comply with this. Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit a70770998c1d99e86eea97294ae3cce059a18d7e Author: Christoph Hellwig Date: Wed Sep 23 10:04:02 2009 +0100 FRV: Use asm/generic-hardirq.h Use asm/generic-hardirq.h to build asm/hardirq.h and also remove the unused idle_timestamp field in irq_cpustat whilst we're at it. Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit d19110baaf20d5183689287bdbcf91e26e40cb79 Merge: 433c24e b60e714 Author: Linus Torvalds Date: Wed Sep 23 10:11:26 2009 -0700 Merge branch 'x86/ptrace-syscall-exit' of git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-roland * 'x86/ptrace-syscall-exit' of git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-roland: x86: ptrace: sysret path should reach syscall_trace_leave commit 433c24ed7ff378b22c4d6531a4ce1ffc62642395 Merge: 85afd82 f056878 Author: Linus Torvalds Date: Wed Sep 23 10:11:08 2009 -0700 Merge git://git.infradead.org/battery-2.6 * git://git.infradead.org/battery-2.6: power_supply: Add driver for the PMU on WM831x PMICs ds2760_battery: Fix integer overflow for time_to_empty_now wm97xx_battery: Convert to dev_pm_ops wm97xx_battery: Use irq to detect charger state wm97xx_battery: Use platform_data wm97xx-core: Pass platform_data to battery ds2760_battery: implement set_charged() feature power_supply: get_by_name and set_charged functionality power_supply: EXPORT_SYMBOL cleanups ds2760_battery: add current_accum module parameter ds2760_battery: handle full_active_uAh == 0 case correctly ds2760_battery: add rated_capacity module parameter ds2760_battery: export more features ds2760_battery: delay power supply registration wm8350_power: Implement charge type property power_supply: Add a charge_type property, and use it for olpc driver olpc_battery: Add an 'error' sysfs device that displays raw errors Revert "power: remove POWER_SUPPLY_PROP_CAPACITY_LEVEL" commit 85afd82780df133f03185aec7943ee3e0ed56a7b Merge: a7c367b 5b31aee Author: Linus Torvalds Date: Wed Sep 23 10:09:18 2009 -0700 Merge branch 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm/radeon/r600: set correct pitch for 4 byte copy drm/radeon: consolidate family flags used in pciids. commit a7c367b95a9d8e65e0f0e7da31f700a556794efb Merge: 15f964b e107021 Author: Linus Torvalds Date: Wed Sep 23 10:07:49 2009 -0700 Merge git://git.infradead.org/mtd-2.6 * git://git.infradead.org/mtd-2.6: (58 commits) mtd: jedec_probe: add PSD4256G6V id mtd: OneNand support for Nomadik 8815 SoC (on NHK8815 board) mtd: nand: driver for Nomadik 8815 SoC (on NHK8815 board) m25p80: Add Spansion S25FL129P serial flashes jffs2: Use SLAB_HWCACHE_ALIGN for jffs2_raw_{dirent,inode} slabs mtd: sh_flctl: register sh_flctl using platform_driver_probe() mtd: nand: txx9ndfmc: transfer 512 byte at a time if possible mtd: nand: fix tmio_nand ecc correction mtd: nand: add __nand_correct_data helper function mtd: cfi_cmdset_0002: add 0xFF intolerance for M29W128G mtd: inftl: fix fold chain block number mtd: jedec: fix compilation problem with I28F640C3B definition mtd: nand: fix ECC Correction bug for SMC ordering for NDFC driver mtd: ofpart: Check availability of reg property instead of name property driver/Makefile: Initialize "mtd" and "spi" before "net" mtd: omap: adding DMA mode support in nand prefetch/post-write mtd: omap: add support for nand prefetch-read and post-write mtd: add nand support for w90p910 (v2) mtd: maps: add mtd-ram support to physmap_of mtd: pxa3xx_nand: add single-bit error corrections reporting ... commit 15f964bed054821d6d940d3752508c5f96a9ffd3 Merge: b09a75f 7c32928 Author: Linus Torvalds Date: Wed Sep 23 10:07:24 2009 -0700 Merge branch 'vgaarb-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'vgaarb-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: vgaarb: make client interface config invariant. commit b09a75fc5e77b7c58d097236f89b1ff72dcdb562 Merge: cf63ff5 b94996c Author: Linus Torvalds Date: Wed Sep 23 10:06:10 2009 -0700 Merge git://git.infradead.org/iommu-2.6 * git://git.infradead.org/iommu-2.6: (23 commits) intel-iommu: Disable PMRs after we enable translation, not before intel-iommu: Kill DMAR_BROKEN_GFX_WA option. intel-iommu: Fix integer wrap on 32 bit kernels intel-iommu: Fix integer overflow in dma_pte_{clear_range,free_pagetable}() intel-iommu: Limit DOMAIN_MAX_PFN to fit in an 'unsigned long' intel-iommu: Fix kernel hang if interrupt remapping disabled in BIOS intel-iommu: Disallow interrupt remapping if not all ioapics covered intel-iommu: include linux/dmi.h to use dmi_ routines pci/dmar: correct off-by-one error in dmar_fault() intel-iommu: Cope with yet another BIOS screwup causing crashes intel-iommu: iommu init error path bug fixes intel-iommu: Mark functions with __init USB: Work around BIOS bugs by quiescing USB controllers earlier ia64: IOMMU passthrough mode shouldn't trigger swiotlb init intel-iommu: make domain_add_dev_info() call domain_context_mapping() intel-iommu: Unify hardware and software passthrough support intel-iommu: Cope with broken HP DC7900 BIOS iommu=pt is a valid early param intel-iommu: double kfree() intel-iommu: Kill pointless intel_unmap_single() function ... Fixed up trivial include lines conflict in drivers/pci/intel-iommu.c commit cf63ff5fa4399e215cc5ef322ccd8bddfff9afa6 Author: Rusty Russell Date: Wed Sep 23 10:33:54 2009 +0100 misc: remove redundant start_kernel prototypes Impact: cleanup No need for redeclaration. Signed-off-by: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit fd8b327ee46593ccc5230bfd053287fbf7c38a69 Merge: 0c9af28 63209a7 Author: Linus Torvalds Date: Wed Sep 23 10:04:37 2009 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6: (41 commits) regulator: Add some brief design documentation regulator: fix voltage range in da9034 ldo12 regulator/driver: be more specific in nanodoc for is_enabled regulator/lp3971: drop unnecessary initialization regulator: drop 'default n' regulator: fix typos regulator: fix calculation of voltage range in da9034_set_ldo12_voltage() regulator: update a filename in documentation drivers/regulator/Kconfig: fix typo (s/Usersapce/Userspace/) in REGULATOR_USERSPACE_CONSUMER description REGULATOR Handle positive returncode from enable regulator: tps650xx - build fixes for x86_64 Fix some regulator documentation Regulator: Adding TPS65023 and TPS6507x in Kconfig and Makefile Regulator: Add TPS6507x regulator driver Regulator: Add TPS65023 regulator driver regulator: userspace: use sysfs_create_group regulator: Add GPIO enable control to fixed voltage regulator driver Regulator: Implement list_voltage for pcf50633 regulator driver. regulator: regulator_enable() permission checking regulator: Push locking for regulator_is_enabled() out ... commit 0c9af2807490cc5f4d2833799482c391a3a3fee4 Merge: fe61c99 8fdc9e8 Author: Linus Torvalds Date: Wed Sep 23 10:04:14 2009 -0700 Merge branch 'fix/misc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'fix/misc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: lx6464es - remove unused struct member ALSA: lx6464es - cleanup of rmh message bus function ALSA: pcm - Simplify snd_pcm_drain() implementation commit fe61c99a1227aeb5a4324e39cecf465a4b2052d3 Merge: 9fd815b 877ae70 Author: Linus Torvalds Date: Wed Sep 23 10:02:43 2009 -0700 Merge branch 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ASoC: wm8753: fix mapping when MONOMIX is set to Stereo ASoC: some minor changes for AD1836 and AD1938 codec drivers ASoC: DaVinci: Fixes to McASP configuration ASoC: Blackfin I2S: fix resuming when device hasn't been used ASoC: Blackfin I2S: add lost platform_device parameter to resume function ASoC: fix typos in Blackfin headers ASoC: bf5xx-sport: the irq save/restore funcs take an unsigned long ASoC: Blackfin AC97: add a few missing multichannel define handling commit 9fd815b55f31be48dbb3dd23922587d247a4e497 Merge: 31bbb9b ed87b27 Author: Linus Torvalds Date: Wed Sep 23 10:02:14 2009 -0700 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: (22 commits) [S390] Update default configuration. [S390] hibernate: Do real CPU swap at resume time [S390] dasd: tolerate devices that have no feature codes [S390] zcrypt: Do not add/remove devices in s/r callbacks [S390] hibernate: make sure pfn_is_nosave handles lowcore pages [S390] smp: introduce LC_ORDER and simplify lowcore handling [S390] ptrace: use common code for simple peek/poke operations [S390] fix disabled_wait inline assembly clobber list [S390] Change kernel_page_present coding style. [S390] hibernation: reset system after resume [S390] hibernation: fix guest page hinting related crash [S390] Get rid of init_module/delete_module compat functions. [S390] Convert sys_execve to function with parameters. [S390] Convert sys_clone to function with parameters. [S390] qdio: change state of all primed input buffers [S390] qdio: reduce per device debug messages [S390] cio: introduce consistent subchannel scanning [S390] cio: idset use actual number of ssids [S390] cio: dont kfree vmalloced memory [S390] cio: introduce css_settle ... commit 31bbb9b58d1e8ebcf2b28c95c2250a9f8e31e397 Merge: ff830b8 3f0a525 Author: Linus Torvalds Date: Wed Sep 23 09:46:15 2009 -0700 Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: itimers: Add tracepoints for itimer hrtimer: Add tracepoint for hrtimers timers: Add tracepoints for timer_list timers cputime: Optimize jiffies_to_cputime(1) itimers: Simplify arm_timer() code a bit itimers: Fix periodic tics precision itimers: Merge ITIMER_VIRT and ITIMER_PROF Trivial header file include conflicts in kernel/fork.c commit ff830b8e5f999d1ccbd0282a666520f0b557daa4 Merge: 746942d 625f085 Author: Linus Torvalds Date: Wed Sep 23 09:43:22 2009 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: ieee1394: sbp2: remove a workaround for Momobay FX-3A firewire: sbp2: remove a workaround for Momobay FX-3A firewire: sbp2: fix status reception firewire: core: fix topology map response handler firewire: core: fix race with parallel PCI device probe firewire: core: header file cleanup firewire: ohci: fix Self ID Count register mask (safeguard against buffer overflow) ieee1394: raw1394: Do not leak memory on failed trylock. commit 746942d06acdb4dd78d16baa5f3728a48a033bdd Merge: c11f6c8 c602c65 Author: Linus Torvalds Date: Wed Sep 23 09:34:07 2009 -0700 Merge branch 'sfi-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-sfi-2.6 * 'sfi-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-sfi-2.6: SFI: remove unneeded includes sfi: Remove unused code SFI: Hook PCI MMCONFIG x86: add arch-specific SFI support SFI: add capability to parse ACPI tables SFI: add platform-independent core support SFI: create linux/sfi.h SFI: Simple Firmware Interface - MAINTAINERS, Kconfig commit c11f6c82581e8be4e1829c677db54e7f55cebece Merge: 40aba21 193a6de Author: Linus Torvalds Date: Wed Sep 23 09:32:11 2009 -0700 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (119 commits) ACPI: don't pass handle for fixed hardware notifications ACPI: remove null pointer checks in deferred execution path ACPI: simplify deferred execution path acerhdf: additional BIOS versions acerhdf: convert to dev_pm_ops acerhdf: fix fan control for AOA150 model thermal: add missing Kconfig dependency acpi: switch /proc/acpi/{debug_layer,debug_level} to seq_file hp-wmi: fix rfkill memory leak on unload ACPI: remove unnecessary #ifdef CONFIG_DMI ACPI: linux/acpi.h should not include linux/dmi.h hwmon driver for ACPI 4.0 power meters topstar-laptop: add new driver for hotkeys support on Topstar N01 thinkpad_acpi: fix rfkill memory leak on unload thinkpad-acpi: report brightness events when required thinkpad-acpi: don't poll by default any of the reserved hotkeys thinkpad-acpi: Fix procfs hotkey reset command thinkpad-acpi: deprecate hotkey_bios_mask thinkpad-acpi: hotkey poll fixes thinkpad-acpi: be more strict when detecting a ThinkPad ... commit 40aba218969914d1b225e742617adb921cf94eae Merge: b64ada6 cfd550e Author: Linus Torvalds Date: Wed Sep 23 09:30:48 2009 -0700 Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging * 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: i2c: Clearly mark ACPI drivers as such i2c: Add driver for SMBus Control Method Interface i2c-pnx: Correct use of request_region/request_mem_region MAINTAINERS: Add maintainer for AT24 and PCA9564/PCA9665 i2c-piix4: Add AMD SB900 SMBus device ID i2c/chips: Remove deprecated pcf8574 driver i2c/chips: Remove deprecated pca9539 driver i2c/chips: Remove deprecated pcf8575 driver gpio/pcf857x: Copy i2c_device_id from old pcf8574 driver i2c/scx200_acb: Provide more information on bus errors i2c: Provide compatibility links for i2c adapters i2c: Convert i2c adapters to bus devices i2c: Convert i2c clients to a device type i2c/tsl2550: Use combined SMBus transactions i2c-taos-evm: Switch echo off to improve performance i2c: Drop unused i2c_driver.id field commit b64ada6b23d4a305fb3ca59b79dd38707fc53b69 Merge: be90a49 b80474b Author: Linus Torvalds Date: Wed Sep 23 09:29:20 2009 -0700 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2 * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2: (85 commits) ocfs2: Use buffer IO if we are appending a file. ocfs2: add spinlock protection when dealing with lockres->purge. dlmglue.c: add missed mlog lines ocfs2: __ocfs2_abort() should not enable panic for local mounts ocfs2: Add ioctl for reflink. ocfs2: Enable refcount tree support. ocfs2: Implement ocfs2_reflink. ocfs2: Add preserve to reflink. ocfs2: Create reflinked file in orphan dir. ocfs2: Use proper parameter for some inode operation. ocfs2: Make transaction extend more efficient. ocfs2: Don't merge in 1st refcount ops of reflink. ocfs2: Modify removing xattr process for refcount. ocfs2: Add reflink support for xattr. ocfs2: Create an xattr indexed block if needed. ocfs2: Call refcount tree remove process properly. ocfs2: Attach xattr clusters to refcount tree. ocfs2: Abstract ocfs2 xattr tree extend rec iteration process. ocfs2: Abstract the creation of xattr block. ocfs2: Remove inode from ocfs2_xattr_bucket_get_name_value. ... commit be90a49ca22a95f184d9f32d35b5247b44032849 Merge: 1f0918d a87371b Author: Linus Torvalds Date: Wed Sep 23 09:25:16 2009 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (142 commits) USB: Fix sysfs paths in documentation USB: skeleton: fix coding style issues. USB: O_NONBLOCK in read path of skeleton USB: make usb-skeleton honor O_NONBLOCK in write path USB: skel_read really sucks royally USB: Add hub descriptor update hook for xHCI USB: xhci: Support USB hubs. USB: xhci: Set multi-TT field for LS/FS devices under hubs. USB: xhci: Set route string for all devices. USB: xhci: Fix command wait list handling. USB: xhci: Change how xHCI commands are handled. USB: xhci: Refactor input device context setup. USB: xhci: Endpoint representation refactoring. USB: gadget: ether needs to select CRC32 USB: fix USBTMC get_capabilities success handling USB: fix missing error check in probing USB: usbfs: add USBDEVFS_URB_BULK_CONTINUATION flag USB: support for autosuspend in sierra while online USB: ehci-dbgp,ehci: Allow dbpg to work with suspend/resume USB: ehci-dbgp,documentation: Documentation updates for ehci-dbgp ... commit 1f0918d03ff4b5c94540c71ce889672abdbc2f4a Merge: 4266c97 ca60a42 Author: Linus Torvalds Date: Wed Sep 23 09:23:45 2009 -0700 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: don't force VIRTIO_F_NOTIFY_ON_EMPTY lguest: cleanup for map_switcher() lguest: use PGDIR_SHIFT for PAE code to allow different PAGE_OFFSET lguest: use set_pte/set_pmd uniformly for real page table entries lguest: move panic notifier registration to its expected place. virtio_blk: add support for cache flush virtio: add virtio IDs file virtio: get rid of redundant VIRTIO_ID_9P definition virtio: make add_buf return capacity remaining virtio_pci: minor MSI-X cleanups commit 4266c97a3ef4604561a22212eb0eab8a3c338971 Author: Hugh Dickins Date: Wed Sep 23 17:05:53 2009 +0100 nommu: fix two build breakages My 58fa879e1e640a1856f736b418984ebeccee1c95 "mm: FOLL flags for GUP flags" broke CONFIG_NOMMU build by forgetting to update nommu.c foll_flags type: mm/nommu.c:171: error: conflicting types for `__get_user_pages' mm/internal.h:254: error: previous declaration of `__get_user_pages' was here make[1]: *** [mm/nommu.o] Error 1 My 03f6462a3ae78f36eb1f0ee8b4d5ae2f7859c1d5 "mm: move highest_memmap_pfn" broke CONFIG_NOMMU build by forgetting to add a nommu.c highest_memmap_pfn: mm/built-in.o: In function `memmap_init_zone': (.meminit.text+0x326): undefined reference to `highest_memmap_pfn' mm/built-in.o: In function `memmap_init_zone': (.meminit.text+0x32d): undefined reference to `highest_memmap_pfn' Fix both breakages, and give myself 30 lashes (ouch!) Reported-by: Michal Simek Signed-off-by: Hugh Dickins Signed-off-by: Linus Torvalds commit 4fd8da8d62416d0dae05603ab5990a498d9aeb12 Author: Heiko Carstens Date: Wed Sep 23 17:49:55 2009 +0200 fs: change sys_truncate length parameter type For this system call user space passes a signed long length parameter, while the kernel side takes an unsigned long parameter and converts it later to signed long again. This has led to bugs in compat wrappers see e.g. dd90bbd5 "powerpc: Add compat_sys_truncate". The s390 compat wrapper for this functions is broken as well since it also performs zero extension instead of sign extension for the length parameter. In addition if hpa comes up with an automated way of generating compat wrappers it would generate a wrong one here. So change the length parameter from unsigned long to long. Cc: "H. Peter Anvin" Cc: Al Viro Cc: Christoph Hellwig Signed-off-by: Heiko Carstens Signed-off-by: Linus Torvalds commit 11868a2dc4f5e4f2f652bfd259e1360193fcee62 Author: Ingo Molnar Date: Wed Sep 23 17:49:55 2009 +0200 x86: mce: Use safer ways to access MCE registers Use rdmsrl_safe() when accessing MCE registers. While in theory we always 'know' which ones are safe to access from the capability bits, there's a lot of hardware variations and reality might differ from theory, as it did in this case: http://bugzilla.kernel.org/show_bug.cgi?id=14204 [ 0.010016] mce: CPU supports 5 MCE banks [ 0.011029] general protection fault: 0000 [#1] [ 0.011998] last sysfs file: [ 0.011998] Modules linked in: [ 0.011998] [ 0.011998] Pid: 0, comm: swapper Not tainted (2.6.31_router #1) HP Vectra [ 0.011998] EIP: 0060:[] EFLAGS: 00010246 CPU: 0 [ 0.011998] EIP is at mce_rdmsrl+0x19/0x60 [ 0.011998] EAX: 00000000 EBX: 00000001 ECX: 00000407 EDX: 08000000 [ 0.011998] ESI: 00000000 EDI: 8c000000 EBP: 00000405 ESP: c17d5eac So WARN_ONCE() instead of crashing the box. ( also fix a number of stylistic inconsistencies in the code. ) Note, we might still crash in wrmsrl() if we get that far, but we shouldnt if the registers are truly inaccessible. Reported-by: GNUtoo Cc: Hidetoshi Seto Cc: Huang Ying Cc: Andi Kleen LKML-Reference: Signed-off-by: Ingo Molnar commit b37fa870c7ccb500c7bf6aabc72cefa757da9791 Author: Vivek Natarajan Date: Wed Sep 23 16:27:27 2009 +0530 ath9k: Initialize txgain and rxgain for newer AR9287 chipsets. Signed-off-by: Vivek Natarajan Signed-off-by: John W. Linville commit 6c6a22e26868285dc3dac280e0e57de029bfae1b Author: Stanislaw Gruszka Date: Wed Sep 23 10:51:34 2009 +0200 iwlagn: fix panic in iwl{5000,4965}_rx_reply_tx In some cases firmware can give us bad value of index in transmit buffers array. This patch add sanity check for such values and return from processing function instantly when it happens. https://bugzilla.redhat.com/show_bug.cgi?id=521931 Patch was tested by reporter on iwl5000. I think check can be also helpful for 4965. Signed-off-by: Stanislaw Gruszka Signed-off-by: John W. Linville commit e31f7b96f0252e8da06df1bc7fd0f6dbc8cbec42 Author: Sujith Date: Wed Sep 23 13:49:12 2009 +0530 ath9k: Fix RFKILL bugs This patch fixes 2 issues in RFKILL: * Calling wiphy_rfkill_stop_polling() in ath9k_stop would mean that the driver cannot report HW status when the radio is re-enabled. Move this to ath_detach(). * Calling ath_radio_{enable/disable} without checking the current state results in ath_radio_enable() being called repeatedly for every invocation of rfkill_poll(). This is not needed in any case since wiphy_rfkill_set_hw_state() would call ->stop() if the radio has been disabled. Signed-off-by: Sujith Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: John W. Linville commit 33e2fb2f2b5d3b2f491fccab0ead256e34447cc6 Author: Julia Lawall Date: Tue Sep 22 13:45:16 2009 +0200 drivers/net/wireless: Use usb_endpoint_dir_out Use the usb_endpoint_dir_out API function. Note that the use of USB_TYPE_MASK in the original code is incorrect; it results in a test that is always false. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ struct usb_endpoint_descriptor *endpoint; expression E; @@ - (endpoint->bEndpointAddress & E) == USB_DIR_OUT + usb_endpoint_dir_out(endpoint) // Signed-off-by: Julia Lawall Signed-off-by: John W. Linville commit 94f85853324e02c3a32bc3101f090dc9a3f512b4 Author: Johannes Berg Date: Thu Sep 17 17:15:31 2009 -0700 cfg80211: don't overwrite privacy setting When cfg80211 is instructed to connect, it always uses the default WEP key for the privacy setting, which clearly is wrong when using wpa_supplicant. Don't overwrite the setting, and rely on it being false when wpa_supplicant is not running, instead set it to true when we have keys. Signed-off-by: Johannes Berg Signed-off-by: John W. Linville commit 018ae37292dd391494172495142b87e816a841c0 Author: Randy Dunlap Date: Thu Sep 17 14:17:56 2009 -0700 wl12xx: fix kconfig/link errors "boolean" converts a module dependency (MAC80211=m) to YES, then the WL12XX driver can be built-in instead of only modular, which leads to linker errors: wl1271_main.c:(.text+0x11177d): undefined reference to `ieee80211_frequency_to_channel' wl1271_main.c:(.text+0x111adc): undefined reference to `ieee80211_stop_queues' wl1271_main.c:(.text+0x112005): undefined reference to `ieee80211_scan_completed' (.text+0x1139c8): undefined reference to `ieee80211_scan_completed' (.text+0x113bb0): undefined reference to `ieee80211_tx_status' (.text+0x113e53): undefined reference to `ieee80211_stop_queues' (.text+0x113e8d): undefined reference to `ieee80211_wake_queues' (.text+0x113f3b): undefined reference to `ieee80211_tx_status' (.text+0x113f60): undefined reference to `ieee80211_tx_status' (.text+0x1140f0): undefined reference to `ieee80211_channel_to_frequency' (.text+0x114153): undefined reference to `ieee80211_rx' wl1271_main.c:(.devinit.text+0xca08): undefined reference to `ieee80211_alloc_hw' wl1271_main.c:(.devinit.text+0xccf5): undefined reference to `ieee80211_register_hw' wl1271_main.c:(.devinit.text+0xcd6b): undefined reference to `ieee80211_free_hw' wl1271_main.c:(.devexit.text+0x1353): undefined reference to `ieee80211_unregister_hw' wl1271_main.c:(.devexit.text+0x13c9): undefined reference to `ieee80211_free_hw' Signed-off-by: Randy Dunlap Signed-off-by: John W. Linville commit fe2475633676b0a976400dfc53f8d7006f56543e Author: Andrew Price Date: Thu Sep 17 21:15:48 2009 +0100 rt2x00: fix the definition of rt2x00crypto_rx_insert_iv Remove the redundant l2pad parameter from the definition of rt2x00crypto_rx_insert_iv which is used when only CONFIG_RT2500PCI but none of the other rt2x00 family drivers is configured. Signed-off-by: Andrew Price Signed-off-by: John W. Linville commit f82a924cc88a5541df1d4b9d38a0968cd077a051 Author: Reinette Chatre Date: Thu Sep 17 10:43:56 2009 -0700 iwlwifi: reduce noise when skb allocation fails Replenishment of receive buffers is done in the tasklet handling received frames as well as in a workqueue. When we are in the tasklet we cannot sleep and thus attempt atomic skb allocations. It is generally not a big problem if this fails since iwl_rx_allocate is always followed by a call to iwl_rx_queue_restock which will queue the work to replenish the buffers at a time when sleeping is allowed. We thus add the __GFP_NOWARN to the skb allocation in iwl_rx_allocate to reduce the noise if such an allocation fails while we still have enough buffers. We do maintain the warning and the error message when we are low on buffers to communicate to the user that there is a potential problem with memory availability on system This addresses issue reported upstream in thread "iwlagn: order 2 page allocation failures" in http://thread.gmane.org/gmane.linux.kernel.wireless.general/39187 Signed-off-by: Reinette Chatre Acked-by: Mel Gorman Signed-off-by: John W. Linville commit bba98871c6c5f1f086086ccf13836a02e0f27e77 Author: Reinette Chatre Date: Thu Sep 17 10:43:55 2009 -0700 iwlwifi: do not send sync command while holding spinlock commit 10c994ca70e8e94bbc85a5bf13de5911ee8de4d2 "iwlwifi: fix remove key error" fixed an error reported by mac80211 during interface down. The fix involved changing an async command to synchronous. Unfortunately this was inside a spinlock section in which we cannot sleep. Modify the sending of the command back to async. This causes the mac80211 error "mac80211-phy0: failed to remove key (0, ff:ff:ff:ff:ff:ff) from hardware (-16)." to return. This error is not serious since this occurs during interface down and the keys will be cleared anyway when ucode is unloaded. Having this error message is thus less serious than a potential deadlock introduced when sleeping while holding a spinlock. We will have to find another fix for that error. This is a revert of the abovementioned commit. Signed-off-by: Reinette Chatre Signed-off-by: John W. Linville commit 6a211bf1fc63891bfbc510d9caa751c4dee4bc37 Author: Johannes Berg Date: Thu Sep 17 10:19:23 2009 -0700 mac80211: fix DTIM setting When the DTIM setting is read from beacons, mac80211 will assume it is 1 if the TIM IE is not present or the value is 0. This sounds fine, but the same function processes probe responses as well, which don't have a TIM IE. This leads to overwriting any values previously parsed out of beacon frames. Thus, instead of checking for the presence of the TIM IE when setting the default, simply check whether the DTIM period value is valid already. If the TIM IE is not there then the value cannot be valid (it is initialised to 0) and probe responses received after beacons will not lead to overwriting an already valid value. Signed-off-by: Johannes Berg Signed-off-by: John W. Linville commit fe9f6342c86292aee1941447f22dc5470735e5a1 Author: Christian Lamparter Date: Thu Sep 17 13:46:53 2009 +0200 ar9170usb: add usbid for TP-Link TL-WN821N v2 This patch adds the usbid for TP-Link TL-WN821N v2. Cc: stable@kernel.org Reported-by: Fabian Lenz Signed-off-by: Christian Lamparter Signed-off-by: John W. Linville commit a3ca95fbe488b9cc6edd4903c609b19ba0365efc Author: Vivek Natarajan Date: Thu Sep 17 09:29:07 2009 +0530 ath9k: Disable autosleep feature by default. Autosleep needs to be disabled for AR9287 chipsets also. Since autosleep is not used for any of the currently supported chipsets, disable it by default and can be enabled if needed for any of the future chipsets. Signed-off-by: Vivek Natarajan Signed-off-by: John W. Linville commit edbf51f65eefb952a03c00eadefa9aa48580fcc6 Author: Sujith Date: Thu Sep 17 09:28:41 2009 +0530 ath9k: Fix regression in PA calibration The commit "ath9k: Fix bugs in programming registers during PA CAL" removed a REG_READ of 0x7834. This resulted in incorrect computation of the subsequent value to be written in RF2G6. This patch fixes the regression by re-adding the REG_READ. Signed-off-by: Sujith Signed-off-by: John W. Linville commit d865ca6c147552a1c38161e2e262c4ab59e762d6 Author: Senthil Balasubramanian Date: Thu Sep 17 09:28:21 2009 +0530 ath9k: Fix bug in chain handling * This patch fixes a bug in calculating the scaled power for three chain chipsets. * Also, a delay is needed after setting DAC low-power mode in TOP1 RF register (Top Level Register Bits). Signed-off-by: Senthil Balasubramanian Signed-off-by: John W. Linville commit 42abfbee23bf86e2c74d569b7ddd040d29782c5a Author: Vivek Natarajan Date: Thu Sep 17 09:27:59 2009 +0530 ath9k: Fix AHB reset for AR9280 The commit "ath9k: Do an AHB reset before doing RTC reset" fixed RTC reset issue for AR9280 2.0 chipsets and above. The fix is valid for all AR9280 chipsets. Signed-off-by: Vivek Natarajan Signed-off-by: John W. Linville commit ce143bb04491a586ec95798711dee7fd43fbe042 Author: Senthil Balasubramanian Date: Thu Sep 17 09:27:33 2009 +0530 ath9k: Adjust the chainmasks properly This is needed to account for the number of chains in use, not just the number of chains present. Signed-off-by: Senthil Balasubramanian Signed-off-by: John W. Linville commit 0a475cc6a0ac8e38ac3587cff87026551800b7fe Author: Vasanthakumar Thiagarajan Date: Thu Sep 17 09:27:10 2009 +0530 ath9k: Do a full reset for AR9280 AR9280 requires a full reset during channel change and HW reset. Currently, a fast channel change is done. This patch fixes this bug. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: John W. Linville commit 9ebef7997d0c131a8d53c045bff68becddd58124 Author: Vasanthakumar Thiagarajan Date: Thu Sep 17 09:26:44 2009 +0530 ath9k: Don't read NF when chip has gone through full sleep mode NF value may be incorrect when we read it just after the chip has gone through a full sleep mode. Reading incorrect NF values affects RX throughput. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: John W. Linville commit 204d794086f26a7b191d9a9c3483af8b81362b16 Author: Vasanthakumar Thiagarajan Date: Thu Sep 17 09:26:14 2009 +0530 ath9k: Fix rx data corruption Setting bit 20 and 25 of 0x8344 can cause occasional rx data corruption, clear them to fix this issue. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: John W. Linville commit d8caa83967d62c05f406d34abaaf2e1baa172c6c Author: Sujith Date: Thu Sep 17 09:25:45 2009 +0530 ath9k: Fix chip wakeup issue Waking up the chip after powering it down fails sometimes. In this case the CPU is locked for 200ms. Reduce this interval to 10ms to avoid excessive busy looping. Signed-off-by: Sujith Signed-off-by: John W. Linville commit 46fe782c97f5e54a02485ad97b2e6256386a8c8f Author: Sujith Date: Thu Sep 17 09:25:25 2009 +0530 ath9k: Restore TSF after RESET For chips requiring RTC reset, TSF has to be restored after power on reset. Signed-off-by: Sujith Signed-off-by: John W. Linville commit 93b1b37f6a4de8bce17f55d9cfa10ef5c8c04e8a Author: Vivek Natarajan Date: Thu Sep 17 09:24:58 2009 +0530 ath9k: Revamp PCIE workarounds * Disable L1 state ONLY when device is in D3 mode. * Clear bit 22 of register 0x4004. * Handle power on/off properly Not setting the workarounds properly resulted in the disappearance of the card in certain cases. Signed-off-by: Vivek Natarajan Signed-off-by: Sujith Signed-off-by: John W. Linville commit 6170cd5c72399f8536412ac75cba29cddc9919fb Author: Vivek Natarajan Date: Thu Sep 17 09:24:24 2009 +0530 ath9k: Set default noise floor value for AR9287 The default noise floor was never initialized for AR9287.This patch helps in reporting the correct RSSI for this version of chipset. Signed-off-by: Vivek Natarajan Signed-off-by: John W. Linville commit 692e565e4b07ed872e6de5e1e3a6ae5b950e0369 Author: Larry Finger Date: Mon Sep 21 17:59:27 2009 -0500 b43: Implement RFKILL status for LP PHY The LP (and probably N) PHY has the same radio disabled bit as the higher-revision A and G PHYs. Signed-off-by: Larry Finger Signed-off-by: John W. Linville commit 4963cceea830f6afa65f0b921cfaff6765ac7748 Author: Michael Buesch Date: Wed Sep 16 01:13:57 2009 +0200 b43: Remove BROKEN attribute from SDIO SDIO works (more or less), so remove the BROKEN dependency and let people test it. Signed-off-by: Michael Buesch Signed-off-by: John W. Linville commit 82905ace22614fe220875fc5748b1afbac868a76 Author: Albert Herranz Date: Wed Sep 16 00:26:19 2009 +0200 b43: fix build error if !CONFIG_B43_LEDS Fix the following build error when CONFIG_B43_LEDS is not selected: drivers/net/wireless/b43/main.c: In function 'b43_remove': drivers/net/wireless/b43/main.c:4990: error: 'struct b43_leds' has no member named 'stop' drivers/net/wireless/b43/main.c:4991: error: 'struct b43_leds' has no member named 'work' make[4]: *** [drivers/net/wireless/b43/main.o] Error 1 Signed-off-by: Albert Herranz Signed-off-by: Michael Buesch Signed-off-by: John W. Linville commit e899a3f232125c393cdf7f7bf6533501ef8808fb Author: Michael Buesch Date: Mon Sep 14 23:22:08 2009 +0200 b43: Don't abuse wl->current_dev in the led work Don't abuse wl->current_dev in the LED work for checking whether we're going down. Add an explicit variable. This fixes a crash on rmmod dereferencing the wl->current_dev NULL pointer in various other places of the driver. Signed-off-by: Michael Buesch Signed-off-by: John W. Linville commit 9308779aad721cab8434fd5f98d3c85d3716fdec Author: Thomas Ilnseher Date: Mon Sep 14 23:01:33 2009 +0200 b43: Add LP PHY Analog Switch Support The current verison of b43 uses "b43_phyop_switch_analog_generic" for A, G and LP phys. According to the spec, this is the wrong behaviour for the LP PHY (see: http://bcm-v4.sipsolutions.net/802.11/PHY/Anacore ) While no problems on the x86 plattform where seen, this leads to a crash on the BCM5354 SoC (MIPS 32 LE plattform). This patch implements the analog switch for LP PHYs according to the specs. It fixes the crash signed-off-by: Thomas Ilnseher Signed-off-by: John W. Linville commit 09ebe2f94373e95952ed6340b0a5d21739eb99da Author: Michael Buesch Date: Sat Sep 12 00:52:48 2009 +0200 b43: Disable PMQ mechanism This reduces IRQ pressure by about one third on a saturated link by disabling the PMQ mechanism. We currently don't use that mechanism. Signed-off-by: Michael Buesch Signed-off-by: John W. Linville commit 990b86f4f9c54f83085d4136498ac44719b17654 Author: Michael Buesch Date: Sat Sep 12 00:48:03 2009 +0200 b43: Add optional verbose runtime statistics This adds support for verbose runtime statistics. It defaults to off and must be enabled in debugfs, if desired. The first measurement may be incorrect, because statistics are not cleared after they got enabled through debugfs. Signed-off-by: Michael Buesch Signed-off-by: John W. Linville commit 176e9f6a4cf4b1bf66d18243ede0938a35c81541 Author: Michael Buesch Date: Fri Sep 11 23:04:04 2009 +0200 b43: Fix IRQ sync for SDIO synchronize_irq is meaningless for SDIO. sdio_release_irq will sync the IRQ thread for us. Signed-off-by: Michael Buesch Signed-off-by: John W. Linville commit a8696c800b8154e27b359866f7b837079cdb513a Author: Michael Buesch Date: Fri Sep 11 16:00:19 2009 +0200 b43: Fix SDIO interrupt handler deadlock We need to release the SDIO host before locking the driver mutex. Signed-off-by: Michael Buesch Signed-off-by: John W. Linville commit ce6c4a13927bc0418169fe543c6614abfab051eb Author: Michael Buesch Date: Thu Sep 10 20:22:02 2009 +0200 b43: Do not use _irqsafe callbacks We don't need to call the irqsafe callbacks. Signed-off-by: Michael Buesch Signed-off-by: John W. Linville commit 3dbba8e281552da640080f08a0f127d48456669f Author: Albert Herranz Date: Thu Sep 10 19:34:49 2009 +0200 b43: Add Soft-MAC SDIO device support This adds support for Soft-MAC SDIO devices to b43. The driver still lacks some fixes for SDIO devices, so it's currently marked as BROKEN. Signed-off-by: Albert Herranz Signed-off-by: Michael Buesch Signed-off-by: John W. Linville commit a78b3bb2f3ab9afcf78dbcff18fd7bf900c7c27e Author: Michael Buesch Date: Fri Sep 11 21:44:05 2009 +0200 b43: Rewrite suspend/resume code This removes most of the b43 suspend/resume code (it's handled by mac80211) and moves the registration of devices to the attachment phase. This is required, because we must not register/unregister devices on suspend/resume. Signed-off-by: Michael Buesch Signed-off-by: John W. Linville commit 90c215c47675be42f164a4bac282666753e09225 Author: Johannes Berg Date: Wed Sep 16 09:04:26 2009 -0700 cfg80211: fix SME connect There's a check saying /* we're good if we have both BSSID and channel */ if (wdev->conn->params.bssid && wdev->conn->params.channel) { but that isn't true -- we need the BSS struct. This leads to errors such as Trying to associate with 00:1b:53:11:dc:40 (SSID='TEST' freq=2412 MHz) ioctl[SIOCSIWFREQ]: No such file or directory ioctl[SIOCSIWESSID]: No such file or directory Association request to the driver failed Associated with 00:1b:53:11:dc:40 in wpa_supplicant, as reported by Holger. Instead, we really need to have the BSS struct, and if we don't, then we need to initiate a scan for it. But we may already have the BSS struct here, so hang on to it if we do and scan if we don't. Signed-off-by: Johannes Berg Tested-by: Holger Schurig Signed-off-by: John W. Linville commit 909a203566a75d26c65370d7dd933fa513d47990 Author: Pavel Roskin Date: Tue Sep 15 22:24:30 2009 -0400 rc80211_minstrel: fix contention window calculation The contention window is supposed to be a power of two minus one, i.e. 15, 31, 63, 127... minstrel_rate_init() forgets to subtract 1, so the sequence becomes 15, 32, 66, 134... Bug reported by Dan Halperin Signed-off-by: Pavel Roskin Signed-off-by: John W. Linville commit 71702bc13efd3238e02197780d6e62c51c196a9d Author: Randy Dunlap Date: Tue Sep 15 14:52:40 2009 -0700 ssb/sdio: fix printk format warnings Fix printk format warnings: drivers/ssb/sdio.c:336: warning: format '%u' expects type 'unsigned int', but argument 7 has type 'size_t' drivers/ssb/sdio.c:443: warning: format '%u' expects type 'unsigned int', but argument 7 has type 'size_t' Signed-off-by: Randy Dunlap Signed-off-by: John W. Linville commit c3de943ad6e535ceb5238b3b7d3903c6e294061a Author: Christian Lamparter Date: Mon Sep 14 23:08:43 2009 +0200 p54usb: add Zcomax XG-705A usbid This patch adds a new usbid for Zcomax XG-705A to the device table. Cc: stable@kernel.org Reported-by: Jari Jaakola Signed-off-by: Christian Lamparter Signed-off-by: John W. Linville commit d45b90ddee58db8caa3b06c3709b73dd0444559c Author: Larry Finger Date: Sun Sep 13 15:55:13 2009 -0500 ssb: Fix error when V1 SPROM extraction is forced When an SPROM revision is not recognized, the code falls back to a V1 SPROM; however, that revision is not forced in the appropriate structure. Signed-off-by: Larry Finger Signed-off-by: John W. Linville commit 96d8c6af24bcacb16f18fc88fb7f2de1a59c09d6 Author: Johannes Berg Date: Fri Sep 11 10:50:37 2009 -0700 iwlwifi: disable powersave for 4965 There's a bug in 4965 powersave that appears to be related to the way it keeps track of its data during sleep, but we haven't found it yet. Due to that, using powersave may spontaneously cause the device to SYSASSERT when transitioning from sleep to wake. Therefore, disable powersave for 4965, until (if ever, unfortunately) we can identify and fix the problem. Cf. http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=1982 which was closed, but now has re-appeared with IDLE mode, which probably means we never really fixed it. Signed-off-by: Johannes Berg Signed-off-by: Reinette Chatre Signed-off-by: John W. Linville commit 4a86eaa46dbaf26498bcf0bb3535d4fd36a32858 Author: Wey-Yi Guy Date: Fri Sep 11 10:38:18 2009 -0700 iwlwifi: find the correct first antenna We can not assume antenna "A" is the first valid anttena for all the NIC. Need to make sure choice the correct antenna based on h/w configuration for transmit to avoid sending frame on invalid antenna Signed-off-by: Wey-Yi Guy Signed-off-by: Reinette Chatre Signed-off-by: John W. Linville commit de0bd50845eb5935ce3d503c5d2f565d6cb9ece1 Author: Reinette Chatre Date: Fri Sep 11 10:38:12 2009 -0700 iwlwifi: fix potential rx buffer loss RX handling maintains a few lists that keep track of the RX buffers. Buffers move from one list to the other as they are used, replenished, and again made available for usage. In one such instance, when a buffer is used it enters the "rx_used" list. When buffers are replenished an skb is attached to the buffer and it is moved to the "rx_free" list. The problem here is that the buffer is first removed from the "rx_used" list _before_ the skb is allocated. Thus, if the skb allocation fails this buffer remains removed from the "rx_used" list and is thus lost for future usage. Fix this by first allocating the skb before trying to attach it to a list. We add an additional check to not do this unnecessarily. Reported-by: Rick Farrington Signed-off-by: Reinette Chatre Signed-off-by: John W. Linville commit c929c5a1281b666fabc9aa94c607932ec6d28c6d Author: Daniel C Halperin Date: Fri Sep 11 10:38:08 2009 -0700 iwlwifi: fix HT operation in 2.4 GHz band When we cleaned up the driver to properly tell mac80211 about HT rates ("iwlwifi: use iwl_hwrate_get_mac80211_idx where appropriate"), we broke internal rate indexing in 2.4 GHz band. Signed-off-by: Daniel C Halperin Tested-by: Wey-Yi Guy Signed-off-by: Reinette Chatre Signed-off-by: John W. Linville commit 91d372c0afc55faf44c1b763693f089b5dad31ec Author: Michael Buesch Date: Fri Sep 11 18:31:32 2009 +0200 b43: Fix resume failure This fixes a resume failure where a signal is pending on resume so the firmware upload fails. This removes the interruptible sleep, because we don't really need it. In the worst case (with broken firmware) the sleep loop will take 1 second. In the common case (working firmware), it will only take a few milliseconds. So we don't really need to be interruptible. Signed-off-by: Michael Buesch Signed-off-by: John W. Linville commit 44fdd375cd8bb3544f9832b4a42df497d180feb2 Author: Michael Buesch Date: Fri Sep 11 16:08:06 2009 +0200 ssb: Disable verbose SDIO coreswitch Disable SDIO coreswitch debugging. Signed-off-by: Michael Buesch Signed-off-by: John W. Linville commit 7ab44f17bc5b16ab1b4fc4dad4a0667c21e727b5 Author: Luis R. Rodriguez Date: Fri Sep 11 04:43:29 2009 -0400 wireless: default CONFIG_WLAN to y When this was added no defaults were set and it seems this implies n. Default this to y. Reported-by: Jouni Malinen Signed-off-by: Luis R. Rodriguez Signed-off-by: John W. Linville commit 012a1b3e5e3561376dacf07efee15688284302c6 Author: Holger Schurig Date: Fri Sep 11 10:13:55 2009 +0200 cfg80211: minimal error handling for wext-compat freq scanning Signed-off-by: Holger Schurig Signed-off-by: John W. Linville commit 50425b0977c53c6ac608f0b2c8a562a5c7cd5602 Author: Holger Schurig Date: Fri Sep 11 10:13:53 2009 +0200 cfg80211: use cfg80211_wext_freq() for freq conversion WEXT's "struct iw_freq" can also be used to handle a channel. This patch now uses cfg80211_wext_freq() instead of hand-converting the frequency. That allows user-space to specify channels as well, like with SIOCSIWFREQ. Signed-off-by: Holger Schurig Signed-off-by: John W. Linville commit 10a01bfd4e077ff03a4ace76a6d9b81272f91678 Author: Sujith Date: Fri Sep 11 08:30:03 2009 +0530 ath9k: Fix bug in ANI channel handling When processing MIB interrupts, OFDM and CCK error handling routines for low RSSI values have to be invoked only when the channel mode is 11G/11B. Since HT channels will also fall under the bands 2Ghz/5Ghz, check appropriately. Signed-off-by: Sujith Signed-off-by: John W. Linville commit 5ab9549a64c77b6975b079b27e95fc2c115f613b Author: Michael Buesch Date: Thu Sep 10 20:31:46 2009 +0200 b43: Force-wake queues on init Force wake the mac80211 queues on init. Under rare circumstances they may be stopped, if a DMA error or something else causes a device reset while a queue was stopped. Signed-off-by: Michael Buesch Signed-off-by: John W. Linville commit 05f57195ab5a232afd773328f00784e79c60e64e Author: Martin Decky Date: Thu Sep 10 03:44:47 2009 +0200 hostap: Revert a toxic part of the conversion to net_device_ops As the hostap driver was converted to use net_device_ops, a mistake was made in hostap_main.c (commit 5ae4efbcd2611562a8b93596be034e63495706a5). Originally, the tx_queue_len was set to 0 for every other interface than HOSTAP_INTERFACE_MASTER, but the new fragment of code sets tx_queue_len to 0 only for HOSTAP_INTERFACE_MASTER. The opposite of the previous behavior makes the driver to drop all packets in AP mode. Change the way 0 is assigned to tx_queue_len according to the original logic. Signed-off-by: Martin Decky Signed-off-by: John W. Linville commit a6e995ad7409403c5bbd6fe8f666a280e086bb22 Merge: 547ad5a 7e48386 Author: Linus Torvalds Date: Wed Sep 23 08:32:05 2009 -0700 Merge branch 'for-linus' of git://gitserver.sunplusct.com/linux-2.6-score * 'for-linus' of git://gitserver.sunplusct.com/linux-2.6-score: score: update email address in MAINTAINERS. score: Cleanup linker script using new macros. score: Make THREAD_SIZE available to assembly files. score: Make PAGE_SIZE available to assembly. commit 547ad5ac665234953e32678f6a32385b58edefc3 Merge: 4fefce9 8cb3ed1 Author: Linus Torvalds Date: Wed Sep 23 08:29:57 2009 -0700 Merge branch 'x86/orig_ax' of git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-roland * 'x86/orig_ax' of git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-roland: x86: ptrace: set TS_COMPAT when 32-bit ptrace sets orig_eax>=0 x86: ptrace: do not sign-extend orig_ax on write x86: syscall_get_nr returns int asm-generic: syscall_get_nr returns int commit 4fefce9abaeef0d6ec45e06a882db23a65135272 Author: H Hartley Sweeten Date: Tue Sep 22 16:48:02 2009 -0700 jbd.h: bitfields should be unsigned bitfields should be unsigned. This fixes sparse noise: error: dubious one-bit signed bitfield Signed-off-by: H Hartley Sweeten Cc: Jan Kara Cc: Theodore Ts'o Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a4255e4c1c41f906488ae4d3fa328a66695cf200 Author: Heiko Carstens Date: Tue Sep 22 16:48:01 2009 -0700 ext2: fix format string compile warning (ino_t) Unlike on most other architectures ino_t is an unsigned int on s390. So add an explicit cast to avoid this compile warning: fs/ext2/namei.c: In function 'ext2_lookup': fs/ext2/namei.c:73: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' Signed-off-by: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9f6c1333938c5d93da8be8f29f3b5469a3c00f95 Author: Doug Graham Date: Tue Sep 22 16:48:00 2009 -0700 V3 minixfs: add missing directory type checking There are a few places in the Minix FS code where the "inode" field of a minix_dir_entry is used without checking first to see if the dirent is really a minix3_dir_entry. The inode number in a V1/V2 dirent is 16 bits, whereas that in a V3 dirent is 32 bits. Accessing it as a 16 bit field when it really should be accessed as a 32 bit field probably kinda sorta works on a little-endian machine, but leads to some rather odd behaviour on big-endian machines. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Doug Graham Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 532f649f148bf70e6a5816d95fe55e6a065e8754 Author: Aaro Koskinen Date: Tue Sep 22 16:47:58 2009 -0700 sisfb: change SiS_DDC_Port type to SISIOADDRESS The patch enables the driver to be used on platforms such as ARM where an I/O address is a 32-bit memory address. The patch avoids the following kernel oops: debian:~# modprobe sisfb [ 73.070000] sisfb: Video ROM found [ 73.080000] sisfb: Video RAM at 0x80000000, mapped to 0xe0a00000, size 1024k [ 73.090000] sisfb: MMIO at 0x84080000, mapped to 0xe0b80000, size 256k [ 73.090000] sisfb: Memory heap starting at 800K, size 32K [ 73.360000] Unable to handle kernel paging request at virtual address 6e000844 [ 73.380000] pgd = df230000 [ 73.380000] [6e000844] *pgd=00000000 [ 73.380000] Internal error: Oops: 8f5 [#1] [ 73.380000] Modules linked in: sisfb(+) fb cfbcopyarea cfbimgblt cfbfillrect [ 73.380000] CPU: 0 Not tainted (2.6.31-iop32x #1) [ 73.380000] PC is at SiS_SetRegANDOR+0x10/0x38 [sisfb] [ 73.380000] LR is at SiS_SetSCLKHigh+0x38/0x94 [sisfb] [ 73.380000] pc : [] lr : [] psr: 60000013 [ 73.380000] sp : df38fd00 ip : 6e000000 fp : 00000002 [ 73.380000] r10: 00000108 r9 : 00000000 r8 : 00000108 [ 73.380000] r7 : df064258 r6 : 00000110 r5 : 6e000844 r4 : 0000010a [ 73.380000] r3 : 00000001 r2 : 0000000e r1 : 00000011 r0 : 00000844 [ 73.380000] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user [ 73.380000] Control: 0000397f Table: bf230000 DAC: 00000015 [ 73.380000] Process modprobe (pid: 1849, stack limit = 0xdf38e270) [ 73.380000] Stack: (0xdf38fd00 to 0xdf390000) [ 73.380000] fd00: 0000010a 00000108 df064258 df064258 df064258 00000000 00000000 bf02c4e0 [ 73.380000] fd20: 00000114 bf02c50c 00000013 00000114 0000010a df064258 00000000 bf02c980 [ 73.380000] fd40: 00009c66 00000004 00000001 df064250 a0010000 a6a2a0a0 df064250 00000003 [ 73.380000] fd60: df064250 00000000 df064258 0000fffd 00000000 00000000 00000000 bf033948 [ 73.380000] fd80: 00000000 00000000 00000000 bf019e2c 00000000 df064a70 bf03b470 00010000 [ 73.380000] fda0: 00000000 df064250 00000000 df831c00 00000012 bf039f70 00000000 c00abed8 [ 73.380000] fdc0: 000008a6 000008a4 df0649b0 df064878 df064258 df064000 00000000 00000000 [ 73.380000] fde0: 00000001 00008000 00000001 00030000 df81c930 bf049f88 df831c00 00000000 [ 73.380000] fe00: bf049f58 df3952a0 c0447708 bf049f88 bf049fe0 c0191980 df831c00 c0191b10 [ 73.380000] fe20: df831c58 bf049f58 df831c00 bf04aca8 df3952a0 df831c58 df831c58 bf049f88 [ 73.380000] fe40: c01ba1b4 c01ba0a0 df831c58 df831c8c bf049f88 c01ba1b4 df3952a0 00000000 [ 73.380000] fe60: c03e265c c01ba240 00000000 df38fe78 bf049f88 c01b990c df812938 df81b8d0 [ 73.380000] fe80: df3952a0 df807780 00000000 00000060 bf049f88 c01b9224 bf0429c8 00000000 [ 73.380000] fea0: bf049f58 00000000 bf049f88 00000000 00000000 bf04aea8 00000000 c01ba4e4 [ 73.380000] fec0: e09861a0 bf049f58 00000000 bf049f88 00000000 c0191f20 00000000 00000000 [ 73.380000] fee0: c03f7bac bf04d418 0000fff2 0000fff1 bf04ad08 0002f260 0002f260 e0986038 [ 73.380000] ff00: e0986150 e098568b df143340 e0990280 00000036 c03d8b00 fffffffd 00000000 [ 73.380000] ff20: bf04acfc 00000000 fffffffc 0003cf4b 00018098 c03f7bac 00000000 bf04d000 [ 73.380000] ff40: df38e000 00000000 bedc0984 c00272a4 ffffffff c005bc88 00000000 00000000 [ 73.380000] ff60: 0003cf4b 0003cf4b 00018098 bf04acfc 00000000 c0027fe8 df38e000 00000000 [ 73.380000] ff80: bedc0984 c006882c 00001000 00000003 00000000 00009064 00000000 00008edc [ 73.380000] ffa0: 00000080 c0027e20 00009064 00000000 4014e000 0003cf4b 00018098 0003cf4b [ 73.380000] ffc0: 00009064 00000000 00008edc 00000080 00000000 00000000 40025000 bedc0984 [ 73.380000] ffe0: 00000000 bedc08fc 0000b6b0 400e8f34 60000010 4014e000 00000000 00000000 [ 73.380000] [] (SiS_SetRegANDOR+0x10/0x38 [sisfb]) from [] (0xdf064258) [ 73.380000] Code: e92d0030 e20110ff e280546e e3a0c46e (e5c51000) [ 73.680000] ---[ end trace 62a93e01df37a5f2 ]--- Signed-off-by: Aaro Koskinen Cc: Thomas Winischhofer Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3163eaba34943967aebb1eefa0d4bdc4e5dc197c Author: Peter Korsgaard Date: Tue Sep 22 16:47:55 2009 -0700 video: s3c_fb.c: fix build with CONFIG_HOTPLUG=n Fixes `s3c_fb_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o With CONFIG_HOTPLUG=n, functions marked with __devexit gets removed, so make sure we use __devexit_p when referencing pointers to them. Signed-off-by: Peter Korsgaard Acked-by: Ben Dooks Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a9672c4b861afcf547bfe2cafeec4ca85a63da67 Author: Andrew Morton Date: Tue Sep 22 16:47:54 2009 -0700 drivers/video/tmiofb.c: fix uninitialised return value drivers/video/tmiofb.c: In function 'tmiofb_resume': drivers/video/tmiofb.c:977: warning: 'retval' may be used uninitialized in this function Acked-by: Dmitry Eremin-Solenikov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f0c7d2b72ad1a694c0c886a14cc708841181e9bd Author: Francisco Jerez Date: Tue Sep 22 16:47:53 2009 -0700 vgacon: prevent vgacon_deinit from touching the hardware for inactive consoles. fbcon makes the (reasonable) assumption that it only needs to program the hardware once, when fbcon_init() is called for the foreground console. This doesn't always play well with vgacon because vgacon_deinit() is only doing its job when the last console it owns is closed (when switching from vgacon to fbcon, that's usually *after* fbcon_init() has set the new mode). Depending on the hardware this can cause the wrong framebuffer location to be scanned out (e.g. reproduced on nv05 with the nouveau framebuffer driver). Signed-off-by: Francisco Jerez Cc: "H. Peter Anvin" Cc: Alan Cox Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2ddce3fd0acbdc1be684fb5f919ae3d2e9518aac Author: Ian Armstrong Date: Tue Sep 22 16:47:52 2009 -0700 fbcon: only unbind from console if successfully registered Attempting to unload a framebuffer module calls unregister_framebuffer() which in turn gets fbcon to release it. If fbcon has no framebuffers linked to a console, it will also unbind itself from the console driver. However, if fbcon never registered itself as a console driver, the unbind will fail causing the framebuffer device entry to persist. In most cases this failure will result in an oops when attempting to access the now non-existent device. This patch ensures that the fbcon unbind request will succeed even if a bind was never done. It tracks if a successful bind ever occurred & will only attempt to unbind if needed. If there never was a bind, it simply returns with no error. Signed-off-by: Ian Armstrong Cc: Krzysztof Helt Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a690606d1f54845b018d033ac32e91df25cb2680 Author: Jean Delvare Date: Tue Sep 22 16:47:50 2009 -0700 matroxfb: get rid of CONFIG_FB_MATROX_32MB CONFIG_FB_MATROX_32MB is always enabled, so there is no point in having ifdefs all around. And it is bad practice to use CONFIG_* as a name for something which is not a Kconfig option. Signed-off-by: Jean Delvare Acked-by: Petr Vandrovec Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ee5a27497957e55a520788f88536401e7b12bf41 Author: Jean Delvare Date: Tue Sep 22 16:47:50 2009 -0700 matroxfb: get rid of unneeded macro MINFO_FROM With multihead support always enabled, macros MINFO_FROM and MINFO_FROM_INFO are no longer needed and make the code harder to read. Signed-off-by: Jean Delvare Acked-by: Petr Vandrovec Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 316b4d644caceb2cf7432d8a27e45b88f57ef2a0 Author: Jean Delvare Date: Tue Sep 22 16:47:49 2009 -0700 matroxfb: get rid of unneeded macros WPMINFO and friends With multihead support always enabled, these macros are no longer needed and make the code harder to read. Signed-off-by: Jean Delvare Acked-by: Petr Vandrovec Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fc2d10ddfc8989e82f74d2a38c7d6bfa45bcaba9 Author: Jean Delvare Date: Tue Sep 22 16:47:48 2009 -0700 matroxfb: get rid of unneeded macros ACCESS_FBINFO and MINFO With multihead support always enabled, these macros are no longer needed and make the code harder to read. Signed-off-by: Jean Delvare Acked-by: Petr Vandrovec Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0728bacbba3b0267fa8ca8be69aa43d81b57ab51 Author: Jean Delvare Date: Tue Sep 22 16:47:47 2009 -0700 matroxfb: make CONFIG_FB_MATROX_MULTIHEAD=y mandatory I would like to get rid of option CONFIG_FB_MATROX_MULTIHEAD and just always enable it. There are many reasons for doing this: * CONFIG_FB_MATROX_MULTIHEAD=y is what all x86 distributions do, so it definitely works or we would know by now. * Building the matroxfb driver with CONFIG_FB_MATROX_MULTIHEAD not set results in the following build warning: drivers/video/matrox/matroxfb_crtc2.c: In function 'matroxfb_dh_open': drivers/video/matrox/matroxfb_crtc2.c:265: warning: the address of 'matroxfb_global_mxinfo' will always evaluate as 'true' drivers/video/matrox/matroxfb_crtc2.c: In function 'matroxfb_dh_release': drivers/video/matrox/matroxfb_crtc2.c:285: warning: the address of 'matroxfb_global_mxinfo' will always evaluate as 'true' This is nothing to be worried about, the driver will work fine, but build warnings are still annoying. * The trick to get multihead support without CONFIG_FB_MATROX_MULTIHEAD, which is described in the config help text, no longer works: you can't load the same kernel module more than once. * I fail to see how CONFIG_FB_MATROX_MULTIHEAD=y would make the code significantly slower, contrary to what the help text says. A few extra parameters on the stack here and there can't really slow things down in comaprison to the rest of the code, and register access. * The driver built without CONFIG_FB_MATROX_MULTIHEAD is larger than the driver build with CONFIG_FB_MATROX_MULTIHEAD=y by 8%. * One less configuration option makes things simpler. We add options all the time, being able to remove one for once is nice. It improves testing coverage. And I don't think the Matrox adapters are still popular enough to warrant overdetailed configuration settings. * We should be able to unobfuscate the driver code quite a bit after this change (patches follow.) Signed-off-by: Jean Delvare Acked-by: Petr Vandrovec Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0fcf6ada2b8eb42d132c0846384f1299889609e3 Author: Florian Tobias Schandinat Date: Tue Sep 22 16:47:44 2009 -0700 fb: do not ignore fb_set_par errors At the moment about half of the framebuffer drivers can return an error code in fb_set_par. Until now it would be silently ignored by fbmem.c and fbcon.c. This patch fixes fbmem.c to return the error code and restore var on error. But it is not clear in which video mode the device is when fb_set_par fails. It would be good and reasonable if it were in the old state but there is no guarantee that this is true for all existing drivers. Additionally print a message if a failing fb_set_par is detected in fbmem.c or fbcon.c. Although most errors should be caught by the previous fb_check_var some errors can't as they are dynamic (memory allocations, ...) and can only be detected while performing the operations which is forbidden in fb_check_var. This patch shouldn't have a negative impact on normal operation as all drivers return 0 on success. The impact in case of error depends heavily on the driver and caller but it's expected to be better than before. Signed-off-by: Florian Tobias Schandinat Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 360fa58828784f307c3977d5ff4c8e400f074a56 Author: Ben Dooks Date: Tue Sep 22 16:47:43 2009 -0700 s3c2410fb: fix clockrate calculation In the final part of the calculation for the tft display clockrate we divide the output pf s3c2410fb_calc_pixclk() by 2 which leaves us with a rounding error if the result is odd. Change to using DIV_ROUND_UP() to ensure that we always choose a higher divisor and thus a lower frequency. Signed-off-by: Ben Dooks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9a4a83d2ed83da0c4b45289ca72f10205aa96589 Author: Jiri Slaby Date: Tue Sep 22 16:47:41 2009 -0700 video: console, use DIV_ROUND_UP Use DIV_ROUND_UP explicitly instead of manual shifts and adds. It makes the code more readable and consistent (sometimes there were shifts, sometimes divs). There is no change on the assembly level (compilers should do the right job). Signed-off-by: Jiri Slaby Cc: Sergey Senozhatsky Cc: Andi Kleen Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 99e9e7d62becd6c7413a9e8fbda7f5b66adb5cbf Author: Florian Tobias Schandinat Date: Tue Sep 22 16:47:41 2009 -0700 fb: fix fb_pan_display range check Fix the range check for panning. The current code fails to detect some invalid values (very high ones that can occur if an app tries to move further up/left than 0,0) as the check uses the unknown values for calculation so that an overflow can occur. To fix this it is sufficient to move the calculation to the right side to use only trusted values. Kai Jiang detected this problem and proposed an initial patch. Signed-off-by: Florian Tobias Schandinat Cc: Kai Jiang Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ff8147fe71246b81a48de5f37041b026b57d60ca Author: Julia Lawall Date: Tue Sep 22 16:47:39 2009 -0700 drivers/video: add kmalloc NULL tests Check that the result of kmalloc is not NULL before passing it to other functions. The semantic match that finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @@ expression *x; identifier f; constant char *C; @@ x = \(kmalloc\|kcalloc\|kzalloc\)(...); ... when != x == NULL when != x != NULL when != (x || ...) ( kfree(x) | f(...,C,...,x,...) | *f(...,x,...) | *x->f ) // [akpm@linux-foundation.org: convert to kstrdup() as well] Signed-off-by: Julia Lawall Cc: Ming Lei Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f7a595e98c3140f1271957aa742a6b84407620d4 Author: Roel Kluin Date: Tue Sep 22 16:47:38 2009 -0700 drivers/video/console/newport_con.c: fix read outside array bounds It reads linetable[] before checking bounds of index, and ARRAY_SIZE is required because linetable[] are unsigned shorts. Signed-off-by: Roel Kluin Cc: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit db8df7b0622cc6ddad993da2e4dfaf3b5d98ee30 Author: Harald Welte Date: Tue Sep 22 16:47:38 2009 -0700 viafb: pass reference to pci device when calling framebuffer_alloc() Signed-off-by: Harald Welte Signed-off-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2d280f758b2044151cb77fdd9c59d1903bbb6a19 Author: Harald Welte Date: Tue Sep 22 16:47:37 2009 -0700 viafb: make viafb a first-class citizen using pci_driver Signed-off-by: Harald Welte Signed-off-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3a32456909380150a92ed207c160a3a0bd687e14 Author: Florian Tobias Schandinat Date: Tue Sep 22 16:47:36 2009 -0700 viafb: choose acceleration engine for VX855 Enable 2D hardware acceleration on VX855 for copyarea, imageblit and fillrect by selecting the correct engine which is the same as in VX800. Signed-off-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0306ab11c396f93056009152464ff104e4721817 Author: Harald Welte Date: Tue Sep 22 16:47:35 2009 -0700 viafb: add support for the VX855 chipset Add support for a new VIA integrated graphics chipset, the VX855. Signed-off-by: HaraldWelte Signed-off-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5ff32f69e75deca5ee1a2f421ca8a3e43cfaa339 Author: Florian Tobias Schandinat Date: Tue Sep 22 16:47:34 2009 -0700 viafb: use read-only mode parsing viafb: use read-only mode parsing The previous method of mode parsing wrote to the strings resulting in truncated mode strings in the sysfs. Signed-off-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Harald Welte Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 837b0abba19a0ac7840f41debe267da2e2add6a7 Author: Harald Welte Date: Tue Sep 22 16:47:33 2009 -0700 viafb: remove unused structure member Remove a structure member 'on_slot' in the chip_info structure which is completely unused. Signed-off-by: Harald Welte Signed-off-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 93967bee6f8b5f5bfbab0e8d6cab13f45d1ace75 Author: Harald Welte Date: Tue Sep 22 16:47:32 2009 -0700 viafb: make module parameters visible in sysfs Signed-off-by: Harald Welte Signed-off-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 31de59d5e1cd6968ea9d1a19cceefb7a037e46bf Author: Florian Tobias Schandinat Date: Tue Sep 22 16:47:31 2009 -0700 viafb: hardware acceleration initialization cleanup The main motivation of this patch was to merge the three initialization functions in one and clean it up. However as some changes in other code areas where needed to do it right some small other changes were made. Changes to viafb_par: io_virt renamed as engine_mmio and moved to shared VQ_start renamed as vq_vram_addr and moved to shared VQ_end removed as it is easily recalculatable vq_vram_addr is not strictly needed but keep it to track where we allocated video memory. The memory allocated for the virtual queue was shrunk to VQ_SIZE as VQ_SIZE+CURSOR_SIZE looked like a bug to me. But to be honest I don't have the faintest idea what virtual queues are for in the graphic hardware and whether the driver needs them in any way. I only know that they aren't directly accessed by the driver and so the only potential current use would be as hardware internal buffers. For now keep them to avoid regressions and only remove the double cursor allocation. The most changes were caused by renames and the mentioned structure changes so the chance of regressions is pretty low. The meaning of viafb_accel changed slightly as previously it was changed back and forth in the code and allowed to enable the hardware acceleration by software if previously disabled. The new behaviour is that viafb_accel=0 always prevents hardware acceleration. With viafb_accel!=0 the acceleration can be freely choosen by set_var. This means viafb_accel is a diagnostic tool and if someone has to use viafb_accel=0 the driver needs to be fixed. As this is mostly a code cleanup no regressions beside the slightly change of viafb_accel is expected. Signed-off-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Harald Welte Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2d6e8851f608bd0c811f2df83eeff4ad8631e723 Author: Florian Tobias Schandinat Date: Tue Sep 22 16:47:29 2009 -0700 viafb: improve pitch handling Split the pitch handling up and replaces the calculation from virtual xres and bpp with fix.line_length which already contains the pitch and does not add any constrains for the virtual resolution. Also add a bit to the second pitch which the documentation mentions but which was ignored by the driver. Although it is a bit unclear what the right pitch for some LCD modes is this patch should have no negative runtime impact. Signed-off-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Harald Welte Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5016af53ebbd1450c2656c94dfbd1dad15c19f60 Author: Florian Tobias Schandinat Date: Tue Sep 22 16:47:28 2009 -0700 viafb: cleanup viafb_cursor Clean the hardware cursor handling up. The most notable change is that it no longer buffers the values in viacursor but uses the ones in cursor instead as they are guaranteed to be always valid. Furthermore it uses local instead global variables where possible, moves the cursor variable in shared as only one hardware cursor is supported and returns an error if memory allocation fails. Last but not least it fixes a too small buffer (as u32 has only 4 and not 32 bytes) but this did not produce any known problems. This is mostly a code cleanup, no negative runtime changes are expected. Signed-off-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Harald Welte Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit afbd3c12aca5a29f1627c0c68e6bc77f32459935 Author: Alexey Dobriyan Date: Tue Sep 22 16:47:27 2009 -0700 viafb: switch to seq_file Signed-off-by: Alexey Dobriyan Acked-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Harald Welte Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c3e25673843153ea75fda79a47cf12f10a25ca37 Author: Florian Tobias Schandinat Date: Tue Sep 22 16:47:26 2009 -0700 viafb: 2D engine rewrite This patch is a completly rewritten 2D engine. The engine is no longer in a default state but reinitialized every time to allow usage for both framebuffers regardless of their settings. The whole engine handling is concentrated in a big function which takes 16 parameters. Although the number of parameters is worryingly it is good to have a single funtion to deal with this stuff as it allows to easily support different engines and avoids some code duplication. On the way support for the new 2D engine in VX800 was added. As the with less code duplication but it is probably better to duplicate the code as this way is easier to walk if VIA ever decides to release a new engine which changes anything the driver touches. The engine support for VX800 gives a notable boost in speed. There are no known regressions but as this patch changes paths I do neither have the hardware nor documentation to check and has the possibility to put the system in a critical state heavy testing is appreciated. Signed-off-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Harald Welte Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c4df5489e40e55f2962b9e8100ebc0d4d1374415 Author: Florian Tobias Schandinat Date: Tue Sep 22 16:47:24 2009 -0700 viafb: improve viafb_par This patch introduces viafb_shared and is the beginning of a smooth transition to use it. viafb_shared should contain all general, non-surface specific data that should be shared along all viafb framebuffers while viafb_par should only contain things that are specific to each surface or in other words extend fb_info. This change is intended to clean the dual/multi framebuffer handling up. This removes the annoyance that viafbinfo1->par points to a different structure than viaparinfo1. As the last change is fundamental it is difficult to ensure that all parts of the driver do not depend on the previous brokenness but the chance of regressions is very low. Signed-off-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Harald Welte Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 68fa92082ffda84adcbae06fdd307fca53469c25 Author: Florian Tobias Schandinat Date: Tue Sep 22 16:47:23 2009 -0700 viafb: another small cleanup of viafb_par This removes the completly useless io variable as well as the temporary used variables mmio_base and mmio_len in favor to use directly the fb_info variables. This is a code cleanup only, no runtime change expected. Signed-off-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Harald Welte Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8594ac33450e6d66460230e5d07f5515b51476c9 Author: Florian Tobias Schandinat Date: Tue Sep 22 16:47:22 2009 -0700 viafb: remove LVDS initialization At least for VX800 this initialization is not very good as some parts of the register are written with reserved values. This makes the display go white in some configurations and not usable until the framebuffer is removed. It's better to not initialize it as it allows to use a previously (by BIOS) correctly configured display. This patch makes some displays work but might cause problems on others. This is bad but can not be easily avoided. If this causes some regressions it's probably the best to fix it in the 'active' display setup code. Signed-off-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Harald Welte Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b852abc263519e89a364dc81e697cba0d4371cf3 Author: Florian Tobias Schandinat Date: Tue Sep 22 16:47:21 2009 -0700 viafb: remove unused video device stuff Remove everything related to video devices from the driver as it did not influence the driver operation. This patch does change the userspace behaviour as it removes two IOCTLs and one module parameter. But this is good as it removes useless stuff and helps the user to figure out the options that do affect the driver behaviour (which are still too many). Signed-off-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Harald Welte Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit db88e382a043bf288a6257dc5069f19c5ae67df6 Author: Florian Tobias Schandinat Date: Tue Sep 22 16:47:20 2009 -0700 viafb: clean up virtual memory handling Clean the handling of ioremapped video memory up. The following changes were made: info->screen_base - viafb_FB_MM (VRAM offset calculation) was replaced by info->fix.smem_start - viafbinfo->fix.smem_start which is essentially the same calculation but done with physical instead virtual addresses. *->fbmem_virt was replaced by viafbinfo->screen_base This is true for viafbinfo and viafbinfo1 as the par pointers are equal. An early initialization of viafbinfo1->fix.smem* was removed as done later in viafb_setup_fixinfo. This patch highlights that the only usage of the ioremapped video memory in the driver is for hardware cursor handling. Even if it has to hold the used virtual screen mapped for old-fashioned read/write calls (vs. mmap'ed) a lot virtual memory could be saved by only ioremapping on demand. Code cleanup, no runtime changes expected. Signed-off-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Harald Welte Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b008c64b5dfe37ac14928668da60132e9c8361ff Author: Florian Tobias Schandinat Date: Tue Sep 22 16:47:18 2009 -0700 viafb: clean up duoview Clean the duoview handling up by replacing the varible with the funtion in the only place where it is used. This is a code cleanup only, no runtime change expected. Signed-off-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Harald Welte Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 13147f291cb18489cbaa550b100dee6f9defd007 Author: Florian Tobias Schandinat Date: Tue Sep 22 16:47:17 2009 -0700 viafb: remove duplicated mode information Remove the mode information from viafbdev.c and uses the one of viamode.c instead. This is possible because horizontal and vertical address are the same as horizontal and vertical resolution. The reduced blanking modes in the table are no problem because they have a higher index than the normal modes and therefore always the normal modes are selected just as the old behaviour. Signed-off-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Harald Welte Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit deb7aab6379502fd173cd34efa005108eb0b111b Author: Florian Tobias Schandinat Date: Tue Sep 22 16:47:16 2009 -0700 viafb: clean up viamode.h Remove unneeeded declarations from the header and makes it more maintainable by evaluating the array size in the file the array exist in and exporting it via variables. This removes the need to keep the array size in the header in sync with the real array size. Signed-off-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Harald Welte Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bc6932bb4a25ced97c4f201874573e6097237b78 Author: Florian Tobias Schandinat Date: Tue Sep 22 16:47:15 2009 -0700 viafb: fix ioremap_nocache error handling Correct the returned error code for remapping the video framebuffer. Introduce error handling for remapping MMIO register address space to avoid a NULL pointer dereference. Disable hardware acceleration if remapping MMIO register address space failed as those registers are only used for hardware acceleration. Signed-off-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Harald Welte Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 09cf11806e4b4be92af76253ff9834c48b416129 Author: Florian Tobias Schandinat Date: Tue Sep 22 16:47:14 2009 -0700 viafb: split viafb_set_start_addr up Move individual start address setting to viafb_set_primary_address and viafb_set_secondary_address and make it more flexible to reuse it for panning. Using central functions makes it easier to follow HW manipulations. Remove crt locking as it should be only needed for timing manipulation. Move iga_path manipulation to via_pci_probe. Remove memset for screen cleaning as it is currently done only for the second screen. This is not needed for normal operation but has a little chance of causing unwanted display artifacts. This can be fixed later more consistent and more efficient (using viafb_fillrect) if needed. This is a code clenup, no notable runtime changes expected. Signed-off-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Harald Welte Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 81228a36a5d05181fff990c852a9abdf03c75593 Author: Florian Tobias Schandinat Date: Tue Sep 22 16:47:13 2009 -0700 viafb: merge viafb_update_viafb_par in viafb_update_fix Shrink and merge viafb_update_viafb_par. This removes a lot of duplicated data in viafb_par. Use the relevant data of fb_info instead. On the way it removes an inconsistency in handling a second framebuffer which only worked because viafbinfo1->par is modified to point to the same viafb_par as viafbinfo->par. Code cleanup only, no runtime change expected. Signed-off-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Harald Welte Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3915a927aaed8d158cba5ad6466e237ae0d84aab Author: Florian Tobias Schandinat Date: Tue Sep 22 16:47:12 2009 -0700 viafb: remove temporary start address setting Currently the start address is set to an initial value every time viafb_setmode is called. This is not done consistently along graphic cores and not even the whole address but often only parts of it. On top of that it seems useless as the real/final address will be set by viafb_set_start_addr a few lines later. Remove this superfluous initalization to shrink register initalization and as a start to decouple primary and secondary display. Code cleanup, no notable runtime change expected. Signed-off-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Harald Welte Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0e3ca33ac7aa88ac2f28d4ec99f0bfeaf2a2318d Author: Florian Tobias Schandinat Date: Tue Sep 22 16:47:10 2009 -0700 viafb: remove duplicated CX700 register init The current code initializes the register for CX700 chips 2 times due to a missing break as discovered by Harald Welte. As CX700 and VX800 have exactly the same register initialization we can use one for both to avoid duplicated code. As this is a pure code cleanup no measurable runtime effects are expected. Signed-off-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Harald Welte Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 88017bda96a5fd568a982b01546c8fb1782dda62 Author: Ryan Mallon Date: Tue Sep 22 16:47:09 2009 -0700 ep93xx video driver EP93xx video driver plus documentation. Signed-off-by: Ryan Mallon Acked-by: H Hartley Sweeten Cc: Daniele Venzano Cc: Russell King Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c6012189a40d33213ead5d15769fab615443206f Author: Ryan Mallon Date: Tue Sep 22 16:47:09 2009 -0700 ep93xx video driver platform support Signed-off-by: Ryan Mallon Acked-by: H Hartley Sweeten Cc: Daniele Venzano Cc: Russell King Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d63870db3c41086d7f13ec8b41def4331db32327 Author: Roel Kluin Date: Tue Sep 22 16:47:07 2009 -0700 sisfb: read buffer overflow If called with mode_idx = 1, rate = 68, a read occurs from sisfb_vrate[-1].refresh. Signed-off-by: Roel Kluin Cc: Krzysztof Helt Cc: Thomas Winischhofer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2f93e8f4822fdd48fa9c4c901eea87ab1c902f87 Author: Sudhakar Rajashekhara Date: Tue Sep 22 16:47:06 2009 -0700 davinci-fb-frame-buffer-driver-for-ti-da8xx-omap-l1xx-v4 Since the previous version, return values in ioctl() function have been modified. [akpm@linux-foundation.org: simplify lcd_disable_raster()] Signed-off-by: Sudhakar Rajashekhara Signed-off-by: Pavel Kiryukhin Signed-off-by: Steve Chen Acked-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4ed824d9aead77a6a4eb1e89c3b3d270ba386fad Author: Sudhakar Rajashekhara Date: Tue Sep 22 16:47:06 2009 -0700 davinci: fb: Frame Buffer driver for TI DA8xx/OMAP-L1xx Add LCD controller (LCDC) driver for TI's DA8xx/OMAP-L1xx architecture. LCDC specifications can be found at http://www.ti.com/litv/pdf/sprufm0a. LCDC on DA8xx consists of two independent controllers, the Raster Controller and the LCD Interface Display Driver (LIDD) controller. LIDD further supports character and graphic displays. This patch adds support for the graphic display (Sharp LQ035Q3DG01) found on the DA830 based EVM. The EVM details can be found at: http://support.spectrumdigital.com/boards/dskda830/revc/. Signed-off-by: Sudhakar Rajashekhara Signed-off-by: Pavel Kiryukhin Signed-off-by: Steve Chen Acked-by: Krzysztof Helt DESC davinci-fb-frame-buffer-driver-for-ti-da8xx-omap-l1xx-fix EDESC From: Andrew Morton fix kconfig indenting Cc: Krzysztof Helt Cc: Pavel Kiryukhin Cc: Steve Chen Cc: Sudhakar Rajashekhara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6e3658f0df6f708202159302b4f3915d9b97b8dc Author: Roel Kluin Date: Tue Sep 22 16:47:04 2009 -0700 platinumfb: fix misplaced parenthesis Since `+' has a higher precedence than the trinary operator `?', this added `hres * (1 << color_mode)' to the boolean testing videomode and depth. Signed-off-by: Roel Kluin Cc: Geert Uytterhoeven Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Ville Syrjala Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d480ace08d5b59133575e672a0bd1c97b0f8400f Author: Pavel Machek Date: Tue Sep 22 16:47:03 2009 -0700 fbdev: framebuffer support for HTC Dream Add a framebuffer driver for Qualcomm MSM/QSD SoCs, tested on HTC Dream smartphone (aka T-Mobile G1, aka ADP1). Brian said: I did the original quick and dirty version for bringup. Rebecca took over and (re)wrote the bulk of the driver, getting things stable for production ship of Dream and Sapphire, and Dima is currently adding support for later Qualcomm chipsets (QSD8x50, etc). Signed-off-by: Pavel Machek Cc: Brian Swetland Cc: Krzysztof Helt Cc: Rebecca Schultz Zavin Cc: Dima Zavin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 689620100172e24fdf0981e9978a9559e8769258 Author: Ville Syrjala Date: Tue Sep 22 16:47:01 2009 -0700 atyfb: coding style cleanup Fix a bunch of coding style problems in atyfb_base.c. Signed-off-by: Ville Syrjala Cc: "H Hartley Sweeten" Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 366ec51ba9622c44191fcf4d77ed4dc84acbdeec Author: Imre Deak Date: Tue Sep 22 16:47:00 2009 -0700 omapfb: HWA742: fix pointer to be const Fixes the following: warning: assignment discards qualifiers from pointer target type Signed-off-by: Imre Deak Acked-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b1d51dbb79c6398c88b45d4211545621b4d1a11c Author: Imre Deak Date: Tue Sep 22 16:47:00 2009 -0700 omapfb: add FB manual update option to Kconfig Also move the controller specific options up in the menu, to a more logical spot. Signed-off-by: Imre Deak Acked-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5910d35cd6c0122a490000a6de0774ac7ebcc2de Author: arun c Date: Tue Sep 22 16:46:59 2009 -0700 omapfb: fix coding style / remove dead line - use __iomem type attribute where appropriate - expand (a ? : b) to (a ? a : b) As suggested by Russel King - remove a dead line from omapfb_main.c Signed-off-by: Arun C Signed-off-by: Tony Lindgren Signed-off-by: Imre Deak Acked-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b6c2b66d353dba229ce167acef49639b9ddf90d9 Author: Jouni Hogander Date: Tue Sep 22 16:46:58 2009 -0700 omapfb: suspend/resume only if FB device is already initialized Check wether fbdev is NULL in suspend / resume functions. Fbdev is NULL, if there is no lcd or it is not enabled in configuration. Signed-off-by: Jouni Hogander Signed-off-by: Tony Lindgren Signed-off-by: Imre Deak Acked-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4c88ef170f0f9b1f26923b43af526c973c5a74da Author: Daniel Stone Date: Tue Sep 22 16:46:57 2009 -0700 omapfb: dispc: allow multiple external IRQ handlers Previously, the only external (to dispc.c) IRQ handler was RFBI's frame done handler. dispc's IRQ framework was very dumb: you could only have one handler, and the semantics of {request,free}_irq were odd, to say the least. The new framework allows multiple consumers to register arbitrary IRQ masks. Signed-off-by: Daniel Stone Signed-off-by: Tony Lindgren Signed-off-by: Imre Deak Acked-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 48a00e7fe9a6abeedb62c99ca7b7860754aae3d8 Author: Jouni Hogander Date: Tue Sep 22 16:46:56 2009 -0700 omapfb: dispc: enable wake up capability Without wakeup enable omap doesn't wake up on dispc interrupts. This causes problems in a case where mpu is in sleep state and dispc interrupt fires. Signed-off-by: Jouni Hogander Signed-off-by: Tony Lindgren Signed-off-by: Imre Deak Acked-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f9e2bc8d7b8c2d9dd05a6702fce77aca3d4f2320 Author: Jouni Hogander Date: Tue Sep 22 16:46:55 2009 -0700 omapfb: dispc: disable iface clocks along with func clocks Leaving interface clocks enabled causes dss pwrdm to stay in active state when mpu is in active state. This fix puts dss to sleep state when it is not needed. Earlier version broke framebuffer on 24xx. This is fixed by enabling clocks before trying to access DISPC_IRQSTATUS register. Signed-off-by: Jouni Hogander Signed-off-by: Tony Lindgren Signed-off-by: Imre Deak Acked-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fd0eecbdfbb61076e75d34034cc5cd5ca1321a81 Author: Imre Deak Date: Tue Sep 22 16:46:54 2009 -0700 omapfb: dispc: various typo fixes - value and register offset was swapped in a dispc write - DISPC_CONTROL register was used instead of DISPC_SYSCONFIG - FIFO size bit field had incorrect length for OMAP3 Fixed-by: arun Fixed-by: Kalle Jokiniemi Fixed-by: Andrzej Zaborowski Signed-off-by: Tony Lindgren Signed-off-by: Imre Deak Acked-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c8f1c1b9e120223ab5b619ff0fc1f32c635248ad Author: Imre Deak Date: Tue Sep 22 16:46:54 2009 -0700 N770: enable LCD MIPI-DCS in Kconfig Signed-off-by: Imre Deak Acked-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2f21a62f16136f369788795a98aa5c313261f07b Author: Rodrigo Vivi Date: Tue Sep 22 16:46:53 2009 -0700 omapfb: add support for rotation on the Blizzard LCD ctrl The LCD controller (EPSON S1D13744) supports rotation (0, 90, 180 and 270 degrees) on hardware just setting the bits 0 and 1 of 0x28 register (LCD Panel Configuration Register). Now it is possible to use this caps only setting the angle degree on var rotate of fb_var_screeninfo using the FBIOPUT_VSCREENINFO ioctl. Fixed-by: Siarhei Siamashka Signed-off-by: Rodrigo Vivi Signed-off-by: Tony Lindgren Signed-off-by: Imre Deak Acked-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8fea8844a72f95ef22b108f5dc5c4237019771dd Author: Stanley.Miao Date: Tue Sep 22 16:46:52 2009 -0700 omapfb: add support for the ZOOM MDK LCD Add glue to control the OMAP_LDP LCD as a frame buffer device using the existing dispc.c driver under omapfb. Patch updated for mainline kernel. Note that the drivers/video/omap should be updated to pass omap_lcd_config in platform_data. The patch should also be updated to compile if twl4030 is not selected, and eventually to use the regulator framework. Fixed-by: Jarkko Nikula Fixed-by: Tony Lindgren Signed-off-by: Stanley.Miao Signed-off-by: Tony Lindgren Signed-off-by: Imre Deak Acked-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit be481941c6ddfe96e5c17a5d6f077b00e7b7bdf1 Author: Steve Sakoman Date: Tue Sep 22 16:46:51 2009 -0700 omapfb: add support for the Gumstix Overo LCD Signed-off-by: Steve Sakoman Signed-off-by: Tony Lindgren Signed-off-by: Imre Deak Acked-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 27969ccc2840c42bfbe4f55d08f0c7ec254d4e93 Author: Koen Kooi Date: Tue Sep 22 16:46:50 2009 -0700 omapfb: add support for the OMAP3 Beagle DVI output The default resolution is 1024x768@24bit This version addresses the comments from Felipe Balbi adn Arun Edarath Fixed-by: Felipe Contreras Fixed-by: Steve Sakoman Fixed-by: Jarkko Nikula Fixed-by: David Brownell Signed-off-by: Koen Kooi Signed-off-by: Tony Lindgren Signed-off-by: Imre Deak Acked-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2a8729c47a9dfe5c8ba55883b86b719b33e6e099 Author: Steve Sakoman Date: Tue Sep 22 16:46:49 2009 -0700 omapfb: add support for the OMAP3 EVM LCD Add LCD support for OMAP3 EVM Backlight support by Arun C Fixed-by: Jarkko Nikula Fixed-by: David Brownell Signed-off-by: Steve Sakoman Acked-by: Syed Mohammed Khasim Signed-off-by: Tony Lindgren Signed-off-by: Imre Deak Acked-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fb49b78452503f6cdf8b243ccb40cda81aae9998 Author: Kevin Hilman Date: Tue Sep 22 16:46:48 2009 -0700 omapfb: add support for the 3430SDP LCD The 3430SDP uses the same panel as the 2430SDP. The main difference are in the GPIO lines used for panel enable and backlight, and the VAUX register/commands sent to the TWL4030 power subsystem. Also, some misc. whitespace cleanups. Fixed-by: Tony Lindgren Signed-off-by: Kevin Hilman Signed-off-by: Tony Lindgren Signed-off-by: Imre Deak Acked-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 42acff34f85c5892c8c762145441e993a5596a13 Author: arun c Date: Tue Sep 22 16:46:47 2009 -0700 omapfb: add support for the OMAP2EVM LCD omap2evm LCD supports VGA and QVGA resolution, by default its in VGA mode. Fixed-by: Jarkko Nikula Fixed-by: David Brownell Signed-off-by: Arun C Signed-off-by: Tony Lindgren Signed-off-by: Imre Deak Acked-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3a76a819dda9a6de0ab83d04b48b3735a4d10b89 Author: Hunyue Yau Date: Tue Sep 22 16:46:45 2009 -0700 omapfb: add support for the 2430SDP LCD Add glue to control the 2430SDP LCD as a frame buffer device using the existing dispc.c driver under omapfb. Fixed-by: Kevin Hilman Fixed-by: Sergio Aguirre Fixed-by: Francisco Alecrim Fixed-by: Tony Lindgren Fixed-by: David Brownell Signed-off-by: Hunyue Yau Signed-off-by: Kevin Hilman Signed-off-by: Tony Lindgren Signed-off-by: Imre Deak Acked-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 92e0ed074a4f134084bef47a44e948b6c6429a89 Author: Jonathan McDowell Date: Tue Sep 22 16:46:44 2009 -0700 omapfb: add support for the Amstrad Delta LCD This is an updated version of the LCD driver for the Amstrad Delta to take into account the recent changes to the omapfb infrastructure. The Delta features a 480x320 12 bit DSTN panel. Signed-off-by: Jonathan McDowell Signed-off-by: Tony Lindgren Signed-off-by: Imre Deak Acked-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 66d2f99d0bb5a2972fb5c1d88b61169510e540d6 Author: Imre Deak Date: Tue Sep 22 16:46:41 2009 -0700 omapfb: add support for MIPI-DCS compatible LCDs Fixed-by: Mike Wege Fixed-by: Arnaud Patard Fixed-by: Timo Savola Fixed-by: Hiroshi DOYU Fixed-by: Trilok Soni Signed-off-by: Imre Deak Signed-off-by: Juha Yrjola Acked-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 28ff0c12b7069f076f08a936df66f1d5052e9121 Author: Kyungmin Park Date: Tue Sep 22 16:46:40 2009 -0700 omapfb: add support for the Apollon LCD Signed-off-by: Kyungmin Park Signed-off-by: Imre Deak Acked-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ef72af408259f0ff26a733dfa2088d570a111550 Author: Michael Hennerich Date: Tue Sep 22 16:46:39 2009 -0700 gpio: gpio support for ADP5520/ADP5501 MFD PMICs Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu Signed-off-by: Mike Frysinger Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ff77c352ae17768c61cfc36357f0a3904552f11c Author: Daniel Glöckner Date: Tue Sep 22 16:46:38 2009 -0700 gpiolib: allow poll() on value Many gpio chips allow to generate interrupts when the value of a pin changes. This patch gives usermode application the opportunity to make use of this feature by calling poll(2) on the /sys/class/gpio/gpioN/value sysfs file. The edge to trigger can be set in the edge file in the same directory. Possible values are "none", "rising", "falling", and "both". Using level triggers is not possible with current sysfs since nothing changes the GPIO value (and the IRQ keeps triggering). Edge triggering will "just work". Note that if there was an event between read() and poll(), the poll() returns immediately. Also note that this version only supports true GPIO interrupts. Some later patch might be able to synthesize this behavior by timer-driven polling; some systems seem to need that. [dbrownell@users.sourceforge.net: align ids to 16 bit ids; whitespace] Signed-off-by: Daniel Glöckner Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d120c17faeb391f5b4b99af8b1e190619934ecdd Author: H Hartley Sweeten Date: Tue Sep 22 16:46:37 2009 -0700 gpio: include not Drivers should be including not . Signed-off-by: H Hartley Sweeten Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 61e0671c6740273663f35357987a2f7aa27479ca Author: Alek Du Date: Tue Sep 22 16:46:36 2009 -0700 gpio: pca953x: add support for MAX7315 MAX7315 is pin and software compatible with PCA9534, so add it to the I2C device ID table of pca953x driver. http://www.datasheetcatalog.org/datasheet/maxim/MAX7315.pdf Signed-off-by: Alek Du Acked-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8bf026177000c5bb566cafe2528a96f8380f38bd Author: Alek Du Date: Tue Sep 22 16:46:36 2009 -0700 gpio: add Intel Moorestown Platform Langwell chip gpio driver The Langwell chip is the IO hub for Intel Moorestown platform which has a 64-pin gpio block device inside. It is exposed as a dedicated PCI device. We use it to control outside peripheral as well as to do IRQ demuxing. The gpio block uses MSI to send level type interrupt to IOAPIC. Signed-off-by: Alek Du Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4cf8e53b3b55fa2f9b2a6b9c3e557b649adf7c6a Author: Marek Vasut Date: Tue Sep 22 16:46:35 2009 -0700 mfd/gpio: add a GPIO interface to the UCB1400 MFD chip driver via gpiolib Cc: Eric Miao Cc: Russell King Cc: David Brownell Cc: Samuel Ortiz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1e5db00687c1ebd93a902caf1d3694209013cb3e Author: Richard Röjfors Date: Tue Sep 22 16:46:34 2009 -0700 gpio: add MC33880 driver A GPIO driver for the Freescale MC33880 High/Low side switch Signed-off-by: Richard Röjfors Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a4177ee7f1a83eecb1d75e85d32664b023ef65e9 Author: Jani Nikula Date: Tue Sep 22 16:46:33 2009 -0700 gpiolib: allow exported GPIO nodes to be named using sysfs links Commit 926b663ce8215ba448960e1ff6e58b67a2c3b99b (gpiolib: allow GPIOs to be named) already provides naming on the chip level. This patch provides more flexibility by allowing multiple names where ever in sysfs on a per GPIO basis. Adapted from David Brownell's comments on a similar concept: http://lkml.org/lkml/2009/4/20/203. [randy.dunlap@oracle.com: fix build for CONFIG_GENERIC_GPIO=n] Signed-off-by: Jani Nikula Acked-by: David Brownell Cc: Daniel Silverstone Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d8c1acb1664d17dd995e34507533321e986d9215 Author: Matthew Garrett Date: Tue Sep 22 16:46:32 2009 -0700 rtc: add boot_timesource sysfs attribute CONFIG_RTC_HCTOSYS allows the kernel to read the system time from the RTC at boot and resume, avoiding the need for userspace to do so. Unfortunately userspace currently has no way to know whether this configuration option is enabled and thus cannot sensibly choose whether to run hwclock itself or not. Add a hctosys sysfs attribute which indicates whether a given RTC set the system clock. Signed-off-by: Matthew Garrett Acked-by: Alessandro Zummo Cc: Mark Brown Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ea3d1606fd32059461309099e8856c6652888a79 Author: Matthew Garrett Date: Tue Sep 22 16:46:31 2009 -0700 rtc: document the sysfs interface The sysfs interface to the RTC class drivers is currently undocumented. Add some basic documentation defining the semantics of the fields. Signed-off-by: Matthew Garrett Cc: Mark Brown Acked-by: Alessandro Zummo Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dac94d9ec98517e8fe3f980e38f29ea3ac712168 Author: David Brownell Date: Tue Sep 22 16:46:31 2009 -0700 rtc: at91rm9200 fixes Fix two new-ish runtime warnings in the at91rm9200 (etc) RTC: Platform driver 'at91_rtc' needs updating - please use dev_pm_ops ... by just switching IRQ 1/at91_rtc: IRQF_DISABLED is not guaranteed on shared IRQs ... no longer needed now that rtc_update_irq() changed Signed-off-by: David Brownell Acked-by: Alessandro Zummo Cc: Andrew Victor Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 971370cc18ae13e87b68ba1769cbad497fa4ab98 Author: Julia Lawall Date: Tue Sep 22 16:46:30 2009 -0700 drivers/rtc: introduce missing kfree Error handling code following a kzalloc should free the allocated data. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @r exists@ local idexpression x; statement S; expression E; identifier f,f1,l; position p1,p2; expression *ptr != NULL; @@ x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...); ... if (x == NULL) S <... when != x when != if (...) { <+...x...+> } ( x->f1 = E | (x->f1 == NULL || ...) | f(...,x->f1,...) ) ...> ( return \(0\|<+...x...+>\|ptr\); | return@p2 ...; ) @script:python@ p1 << r.p1; p2 << r.p2; @@ print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line) // Signed-off-by: Julia Lawall Cc: David Brownell Cc: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 72445af880dbcd41cffd0d7b78a8c74da093e9eb Author: Julia Lawall Date: Tue Sep 22 16:46:29 2009 -0700 drivers/rtc: correct error-handling code This code is not executed before ds1307->rtc has been successfully initialized to the result of calling rtc_device_register. Thus the test that ds1307->rtc is not NULL is always true. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @match exists@ expression x, E; statement S1, S2; @@ x = rtc_device_register(...) ... when != x = E ( * if (x == NULL || ...) S1 else S2 | * if (x == NULL && ...) S1 else S2 ) // Signed-off-by: Julia Lawall Acked-by: Wolfram Sang Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d3c7a3f71a103abb7af5bdaf1adf6f693913a4a9 Author: Daniel Ribeiro Date: Tue Sep 22 16:46:27 2009 -0700 rtc: driver for PCAP2 PMIC [ospite@studenti.unina.it: get pcap data from the parent device] Signed-off-by: guiming zhuo Signed-off-by: Daniel Ribeiro Acked-by: Alessandro Zummo Signed-off-by: Antonio Ospite Cc: Mark Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 88413e1eeb2cccc721cd5568544f32f4234700fb Author: Alessandro Zummo Date: Tue Sep 22 16:46:26 2009 -0700 rtc: reorder Makefile Signed-off-by: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit df17f63173bcfcc8b4b90f63bf88f54ca0dd2dd7 Author: dmitry pervushin Date: Tue Sep 22 16:46:26 2009 -0700 rtc: add Freescale stmp37xx/378x driver Add support for RTC on the Freescale STMP37xx/378x platform. Signed-off-by: dmitry pervushin Signed-off-by: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6bff5fb80b86b461a233eaea4da769ba1b349cbe Author: Michael Hennerich Date: Tue Sep 22 16:46:25 2009 -0700 rtc-bfin: do not share RTC IRQ The Blackfin RTC IRQ is an internal interrupt, so it makes no sense to have it be shared. Signed-off-by: Michael Hennerich Signed-off-by: Mike Frysinger Signed-off-by: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ad91fd854f08d1795b58addc09752de3351644f3 Author: Mike Frysinger Date: Tue Sep 22 16:46:24 2009 -0700 rtc: update documentation wrt RTC_PIE/irq_set_state Signed-off-by: Mike Frysinger Cc: David Brownell Signed-off-by: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aa958f571ec9492b8100302ee70ac0ab2598bf19 Author: Linus Walleij Date: Tue Sep 22 16:46:24 2009 -0700 rtc: U300 COH 901 331 RTC driver v3 This adds a driver for the RTC COH 901 331 found in the ST-Ericsson U300 series mobile platforms to the RTC subsystem. It integrates to the ARM kernel support recently added to RMKs ARM tree and will be enabled in the U300 defconfig in due time. Signed-off-by: Linus Walleij Signed-off-by: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d00ed3cf6e54312fb59cd1fd6300d787d22373c7 Author: Daniel Mack Date: Tue Sep 22 16:46:23 2009 -0700 rtc: add driver for MXC's internal RTC module This adds a driver for Freescale's MXC internal real time clock modules. The code is taken from Freescale's BSPs, but modified to fit the current kernel coding mechanisms. Also, the PMIC external clock function was removed for now to not add dead bits and keep the code as simple as possible. [akpm@linux-foundation.org: make PIE_BIT_DEF[] static] Signed-off-by: Daniel Mack Cc: Sascha Hauer Signed-off-by: Alessandro Zummo Cc: Alessandro Zummo Cc: Daniel Mack Cc: Sascha Hauer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f3d2570a1482a6d897ba29276964965f6fe970d8 Author: Chris Verges Date: Tue Sep 22 16:46:22 2009 -0700 rtc-philips-pcf2123-rtc-spi-driver-updates Signed-off: Chris Verges Cc: Christian Pellegrin Cc: Alessandro Zummo Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7f3923a184bb8e7ede5e5f58f1114bf7b8c611ea Author: Chris Verges Date: Tue Sep 22 16:46:20 2009 -0700 rtc: Philips PCF2123 RTC SPI driver Add support for the Philips/NXP PCF2123 RTC. Signed-off: Chris Verges Tested-by: Chris Verges Signed-off: Christian Pellegrin Tested-by: Christian Pellegrin Cc: Alessandro Zummo Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 568d0697f42771425ae9f1e9a3db769fef7e10b6 Author: David Brownell Date: Tue Sep 22 16:46:18 2009 -0700 spi: handle TX-only/RX-only Support two new half-duplex SPI implementation restrictions, for links that talk to TX-only or RX-only devices. (Existing half-duplex flavors support both transfer directions, just not at the same time.) Move spi_async() into the spi.c core, and stop inlining it. Then make that function perform error checks and reject messages that demand more than the underlying controller can support. Based on a patch from Marek Szyprowski which did this only for the bitbanged GPIO driver. Cc: Marek Szyprowski Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7869c0b9ed44404bbc675ef76f8ccb3be5496f39 Author: Syed Rafiuddin Date: Tue Sep 22 16:46:18 2009 -0700 spi: McSPI support for OMAP4 tAdd adds McSPI support for OMAP4430 SDP platform. All the base addresses are changed between OMAP1/2/3 and OMAP4. The fields of the resource structures are filled at runtime to have McSPI support on OMAP4. Signed-off-by: Syed Rafiuddin Acked-by: Kevin Hilman Acked-by: Tony Lindgren Acked-by: Santosh Shilimkar Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 89c05372d08f3982eeb94d1ea22a60a5eaa8cd6d Author: Tero Kristo Date: Tue Sep 22 16:46:17 2009 -0700 spi: McSPI saves CHCONFx too Previous restore was lazy and only restored CHxCONF when it was needed by a specific chip select. This could cause occasional errors on an SPI bus where multiple chip selects are in use. Signed-off-by: Tero Kristo Signed-off-by: Kevin Hilman Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a41ae1ad907655b2efbb9b1a97736ab1451e1649 Author: Hemanth V Date: Tue Sep 22 16:46:16 2009 -0700 spi: McSPI off-mode support Add context save/restore feature to McSPI driver. Signed-off-by: Hemanth V Reviewed-by: Aaro Koskinen Signed-off-by: Kevin Hilman Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0644c48672a3146c01bf7314d440edecf8742d62 Author: dmitry pervushin Date: Tue Sep 22 16:46:15 2009 -0700 spi: Freescale STMP driver Add SPI driver for Freescale STMP 3xxx-based boards [dbrownell@users.sourceforge.net: cleanup sequence, spi_unregister_master] Signed-off-by: dmitry pervushin Signed-off-by: David Brownell Cc: Kumar Gala Cc: Timur Tabi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 570327d9f48b0be5ca626bcfd80266b7ee2001aa Author: Ben Dooks Date: Tue Sep 22 16:46:14 2009 -0700 spi_s3c24xx: cache device setup data With the update to the spi_bitbang driver, the transfer setup code is being called more often, and thus is often re-doing calculations that have been done before. The SPI layer allows our driver to add its own data to each device so add a result cache to each device. This should also remove the problem where we where directly setting up registers in the setup call which meant we might overwrite the state of an extant transfer., Signed-off-by: Ben Dooks Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6d61320707ac2960bc820616bd5921885b874780 Author: Ben Dooks Date: Tue Sep 22 16:46:13 2009 -0700 spi_s3c24xx: use dev_pm_ops Change the spi_s3c24xx driver to use dev_pm_ops to avoid the following warning during probe: Platform driver 's3c2410-spi' needs updating - please use dev_pm_ops Signed-off-by: Ben Dooks Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b5e3afb5e32c9acf69fcc17961c3fddc47e9cc06 Author: Ben Dooks Date: Tue Sep 22 16:46:13 2009 -0700 spi_s3c24xx: use resource_size() to get resource size Change the use of (res->end - res->start) to use resource_size() to get the size of the resource. Signed-off-by; Ben Dooks Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1a0c220f791be9e15fd897adee257e72ed4134f8 Author: Ben Dooks Date: Tue Sep 22 16:46:12 2009 -0700 spi_s3c24xx: fix header includes The driver includes where it should be including and also includes and without using anything from these. Signed-off-by: Ben Dooks Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9ed7ef526ade622cdc22ac365a95197ddd1e09fb Author: Ben Dooks Date: Tue Sep 22 16:46:11 2009 -0700 spi: fix spelling of `automatically' in documentation Fix spelling of `automatically' in Documentation/spi/spi-summary. Signed-off-by: Ben Dooks Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5b61a749e8fd0a45a5e37c267d20a43ef0590d68 Author: Antonio Ospite Date: Tue Sep 22 16:46:10 2009 -0700 pxa2xx_spi: register earlier Register pxa2xx_spi earlier so it can be used with cpufreq Signed-off-by: Daniel Ribeiro Acked-by: Mark Brown Cc: David Brownell Cc: Eric Miao Cc: Mark Brown Cc: Daniel Ribeiro Cc: Samuel Ortiz Cc: Liam Girdwood Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e0626e3844e8f430fc1a4417f523a00797df7ca6 Author: Anton Vorontsov Date: Tue Sep 22 16:46:08 2009 -0700 spi: prefix modalias with "spi:" This makes it consistent with other buses (platform, i2c, vio, ...). I'm not sure why we use the prefixes, but there must be a reason. This was easy enough to do it, and I did it. Signed-off-by: Anton Vorontsov Cc: David Brownell Cc: David Woodhouse Cc: Grant Likely Cc: Jean Delvare Cc: Ben Dooks Cc: Benjamin Herrenschmidt Cc: Dmitry Torokhov Cc: Samuel Ortiz Cc: "John W. Linville" Acked-by: Mike Frysinger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8cec03eee4a771f949c70cff07775c9bb21d4642 Author: Anton Vorontsov Date: Tue Sep 22 16:46:07 2009 -0700 hwmon: lm70: convert to device table matching Make the code a little bit nicer, and shorter. Signed-off-by: Anton Vorontsov Cc: Kaiwan N Billimoria Cc: David Brownell Cc: David Woodhouse Cc: Grant Likely Cc: Jean Delvare Cc: Ben Dooks Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d2a5c10f806b089a6e6f10deefd01dc4ce67940d Author: Anton Vorontsov Date: Tue Sep 22 16:46:05 2009 -0700 hwmon: adxx: convert to device table matching Make the code a little bit nicer, and shorter. Signed-off-by: Anton Vorontsov Cc: Marc Pignat Cc: David Brownell Cc: David Woodhouse Cc: Grant Likely Cc: Jean Delvare Cc: Ben Dooks Cc: Benjamin Herrenschmidt Acked-by: Marc Pignat Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 225d8b248843d1b3fbcf616d5e7d9544463aca3e Author: Anton Vorontsov Date: Tue Sep 22 16:46:04 2009 -0700 of: remove "stm,m25p40" alias The alias isn't needed any longer since the m25p80 driver converted to the module device table matching. Signed-off-by: Anton Vorontsov Cc: David Brownell Cc: David Woodhouse Cc: Grant Likely Cc: Jean Delvare Cc: Ben Dooks Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 75368bf6c2876d8f33abfe77aa3864869a3893eb Author: Anton Vorontsov Date: Tue Sep 22 16:46:04 2009 -0700 spi: add support for device table matching With this patch spi drivers can use standard spi_driver.id_table and MODULE_DEVICE_TABLE() mechanisms to bind against the devices. Just like we do with I2C drivers. This is useful when a single driver supports several variants of devices but it is not possible to detect them in run-time (like non-JEDEC chips probing in drivers/mtd/devices/m25p80.c), and when platform_data usage is overkill. This patch also makes life a lot easier on OpenFirmware platforms, since with OF we extensively use proper device IDs in modaliases. Signed-off-by: Anton Vorontsov Cc: David Brownell Cc: David Woodhouse Cc: Grant Likely Cc: Jean Delvare Cc: Ben Dooks Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b5f3294f0be5496aec01e5aa709a5fab8bb2f225 Author: Sascha Hauer Date: Tue Sep 22 16:46:02 2009 -0700 spi: add SPI driver for most known i.MX SoCs This driver has been tested on i.MX1/i.MX27/i.MX35 with an AT25 type EEPROM and on i.MX27/i.MX31 with a Freescale MC13783 PMIC. Signed-off-by: Sascha Hauer Tested-by: Guennadi Liakhovetski Acked-by: David Brownell Cc: Andrea Paterniani Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f33b29ee3309ba2cd56ade8e905b3640a7dea909 Author: linus.walleij@stericsson.com Date: Tue Sep 22 16:46:01 2009 -0700 spi: add default selection of PL022 for ARM reference platforms This makes the PL022 driver a default choice for any RealView and Versatile boards plus the integrator IMPD1 which all contain the PL022 PrimeCell. This will make it a default choice if and only if a user selects SPI support for their board. Signed-off-by: Linus Walleij Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b73b255956119111dc18fa063d1e3a0bb3f06328 Author: Randy Dunlap Date: Tue Sep 22 16:46:00 2009 -0700 spi.h: add missing kernel-doc for struct spi_master Add missing kernel-doc notation in spi.h for struct spi_master: Warning(include/linux/spi/spi.h:289): No description found for parameter 'mode_bits' Warning(include/linux/spi/spi.h:289): No description found for parameter 'flags' Signed-off-by: Randy Dunlap Acked-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 44dab88e7cc99d1d2caa9a8936e09d9a98a6761a Author: Steven A. Falco Date: Tue Sep 22 16:45:58 2009 -0700 spi: add spi_ppc4xx driver This adds a SPI driver for the SPI controller found in the IBM/AMCC 4xx PowerPC's. Signed-off-by: Stefan Roese Signed-off-by: Wolfgang Ocker Acked-by: Josh Boyer Signed-off-by: Steven A. Falco Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7a8fa725b21ae19a3d9a2de196a440da8c9085a6 Author: Jouni Hogander Date: Tue Sep 22 16:45:58 2009 -0700 spi: omap2_mcspi use BIT(n) Convert bit shifted values into BIT format Signed-off-by: Jouni Hogander Signed-off-by: Tony Lindgren Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 07fcaa2486ca4f5c67bebedfa56e705c4dd23fc2 Author: Sascha Hauer Date: Tue Sep 22 16:45:56 2009 -0700 spi: remove i.MX SPI driver This driver is in a non working state at the moment and will be replaced by a bitbang driver which can also handle the newer i.MX variants Signed-off-by: Sascha Hauer Cc: Guennadi Liakhovetski Acked-by: David Brownell Acked-by: Andrea Paterniani Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8b2feb10c907b610bf8a739792c6b967c65445b0 Author: Bartlomiej Zolnierkiewicz Date: Tue Sep 22 16:45:55 2009 -0700 ncpfs: fix wrong check in __ncp_ioctl() We want to check for s_inode's existence, not inode's one (inode is always valid in this function). This takes care of the following entry from Dan's list: fs/ncpfs/ioctl.c +445 __ncp_ioctl(180) warning: variable derefenced before check 'inode' Reported-by: Dan Carpenter Cc: Julia Lawall Signed-off-by: Bartlomiej Zolnierkiewicz Cc: Petr Vandrovec Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1b83df308f69a5a3cc59be03bd7fb23e4bcebd8e Author: Bartlomiej Zolnierkiewicz Date: Tue Sep 22 16:45:54 2009 -0700 ncpfs: remove dead URL from documentation Noticed-by: Joe Perches Cc: Petr Vandrovec Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c5df59136a55fe08c21d39321679cbb008479edf Author: Roel Kluin Date: Tue Sep 22 16:45:54 2009 -0700 ncpfs: read buffer overflow This function uses signed integers for the unix_date and local variables - if a negative number is supplied and the leap-year condition is not met, month will be 0, leading to a later read of day_n[-1] Signed-off-by: Roel Kluin Cc: Petr Vandrovec Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a7e3108cca54c105f496919040f00df56767ec00 Author: maximilian attems Date: Tue Sep 22 16:45:53 2009 -0700 ramfs: move RAMFS_MAGIC to include/linux/magic.h initramfs userspace likes to use this magic number. Cc: Hugh Dickins Signed-off-by: maximilian attems Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0d4c36a9b6ab6b15851f60956d901a3c53574ea8 Author: KAMEZAWA Hiroyuki Date: Tue Sep 22 16:45:52 2009 -0700 /proc/kcore: update stat.st_size after memory hotplug After memory hotplug (or other events in future), kcore size can be modified. To update inode->i_size, we have to know inode/dentry but we can't get it from inside /proc directly. But considerinyg memory hotplug, kcore image is updated only when it's opened. Then, updating inode->i_size at open() is enough. Signed-off-by: KAMEZAWA Hiroyuki Acked-by: WANG Cong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 678ad5d8aaf8925cb8465f84e1e47d9b1284666a Author: KAMEZAWA Hiroyuki Date: Tue Sep 22 16:45:51 2009 -0700 /proc/kcore: fix stat.st_size Presently the size of /proc/kcore which can be read by 'ls -l' is 0. But it's not the correct value. On x86-64, ls -l shows ... root root 140737486266368 2009-09-17 10:29 /proc/kcore Then, 7FFFFFFE02000. This comes from vmalloc area's size. (*) This shows "core" size, not memory size. This patch shows the size by updating "size" field in struct proc_dir_entry. Later, lookup routine will create inode and fill inode->i_size based on this value. Then, this has a problem. - Once inode is cached, inode->i_size will never be updated. Then, this patch is not memory-hotplug-aware. To update inode->i_size, we have to know dentry or inode. But there is no way to lookup them by inside kernel. Hmmm.... Next patch will try it. Signed-off-by: KAMEZAWA Hiroyuki Acked-by: WANG Cong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 90396f96b7da0e2305ffe0266d22b6f8221f28ba Author: KAMEZAWA Hiroyuki Date: Tue Sep 22 16:45:50 2009 -0700 kcore: more fixes for init proc_kcore_init() doesn't check NULL case. fix it and remove unnecessary comments. Signed-off-by: KAMEZAWA Hiroyuki Acked-by: WANG Cong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 81ac3ad9061dd9cd490ee92f0c5316a14d77ce18 Author: KAMEZAWA Hiroyuki Date: Tue Sep 22 16:45:49 2009 -0700 kcore: register module area in generic way Some archs define MODULED_VADDR/MODULES_END which is not in VMALLOC area. This is handled only in x86-64. This patch make it more generic. And we can use vread/vwrite to access the area. Fix it. Signed-off-by: KAMEZAWA Hiroyuki Cc: Jiri Slaby Cc: Ralf Baechle Cc: Benjamin Herrenschmidt Cc: WANG Cong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 26562c59fa9111ae3ea7b78045889662aac9e5ac Author: KAMEZAWA Hiroyuki Date: Tue Sep 22 16:45:49 2009 -0700 kcore: register vmemmap range Benjamin Herrenschmidt pointed out that vmemmap range is not included in KCORE_RAM, KCORE_VMALLOC .... This adds KCORE_VMEMMAP if SPARSEMEM_VMEMMAP is used. By this, vmemmap can be readable via /proc/kcore Because it's not vmalloc area, vread/vwrite cannot be used. But the range is static against the memory layout, this patch handles vmemmap area by the same scheme with physical memory. This patch assumes SPARSEMEM_VMEMMAP range is not in VMALLOC range. It's correct now. [akpm@linux-foundation.org: fix typo] Signed-off-by: KAMEZAWA Hiroyuki Cc: Jiri Slaby Cc: Ralf Baechle Cc: Benjamin Herrenschmidt Cc: WANG Cong Cc: Benjamin Herrenschmidt Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3089aa1b0c07fb7c48f9829c619f50198307789d Author: KAMEZAWA Hiroyuki Date: Tue Sep 22 16:45:48 2009 -0700 kcore: use registerd physmem information For /proc/kcore, each arch registers its memory range by kclist_add(). In usual, - range of physical memory - range of vmalloc area - text, etc... are registered but "range of physical memory" has some troubles. It doesn't updated at memory hotplug and it tend to include unnecessary memory holes. Now, /proc/iomem (kernel/resource.c) includes required physical memory range information and it's properly updated at memory hotplug. Then, it's good to avoid using its own code(duplicating information) and to rebuild kclist for physical memory based on /proc/iomem. Signed-off-by: KAMEZAWA Hiroyuki Signed-off-by: Jiri Slaby Cc: Ralf Baechle Cc: Benjamin Herrenschmidt Cc: WANG Cong Cc: KOSAKI Motohiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 908eedc6168bd92e89f90d89fa389065a36358fa Author: KAMEZAWA Hiroyuki Date: Tue Sep 22 16:45:46 2009 -0700 walk system ram range Originally, walk_memory_resource() was introduced to traverse all memory of "System RAM" for detecting memory hotplug/unplug range. For doing so, flags of IORESOUCE_MEM|IORESOURCE_BUSY was used and this was enough for memory hotplug. But for using other purpose, /proc/kcore, this may includes some firmware area marked as IORESOURCE_BUSY | IORESOUCE_MEM. This patch makes the check strict to find out busy "System RAM". Note: PPC64 keeps their own walk_memory_resouce(), which walk through ppc64's lmb informaton. Because old kclist_add() is called per lmb, this patch makes no difference in behavior, finally. And this patch removes CONFIG_MEMORY_HOTPLUG check from this function. Because pfn_valid() just show "there is memmap or not* and cannot be used for "there is physical memory or not", this function is useful in generic to scan physical memory range. Signed-off-by: KAMEZAWA Hiroyuki Cc: Ralf Baechle Cc: Benjamin Herrenschmidt Cc: WANG Cong Cc: Américo Wang Cc: David Rientjes Cc: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9492587cf35d370db33ef4b38375dfb35a105b61 Author: KAMEZAWA Hiroyuki Date: Tue Sep 22 16:45:45 2009 -0700 kcore: register text area in generic way Some 64bit arch has special segment for mapping kernel text. It should be entried to /proc/kcore in addtion to direct-linear-map, vmalloc area. This patch unifies KCORE_TEXT entry scattered under x86 and ia64. I'm not familiar with other archs (mips has its own even after this patch) but range of [_stext ..._end) is a valid area of text and it's not in direct-map area, defining CONFIG_ARCH_PROC_KCORE_TEXT is only a necessary thing to do. Note: I left mips as it is now. Signed-off-by: KAMEZAWA Hiroyuki Cc: Ralf Baechle Cc: Benjamin Herrenschmidt Cc: WANG Cong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a0614da88b67ffa3dbcc0d40b817e682c7c4a0ee Author: KAMEZAWA Hiroyuki Date: Tue Sep 22 16:45:44 2009 -0700 kcore: register vmalloc area in generic way For /proc/kcore, vmalloc areas are registered per arch. But, all of them registers same range of [VMALLOC_START...VMALLOC_END) This patch unifies them. By this. archs which have no kclist_add() hooks can see vmalloc area correctly. Signed-off-by: KAMEZAWA Hiroyuki Cc: Ralf Baechle Cc: Benjamin Herrenschmidt Cc: WANG Cong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c30bb2a25fcfde6157e6154a32c14686fb0bedbe Author: KAMEZAWA Hiroyuki Date: Tue Sep 22 16:45:43 2009 -0700 kcore: add kclist types Presently, kclist_add() only eats start address and size as its arguments. Considering to make kclist dynamically reconfigulable, it's necessary to know which kclists are for System RAM and which are not. This patch add kclist types as KCORE_RAM KCORE_VMALLOC KCORE_TEXT KCORE_OTHER This "type" is used in a patch following this for detecting KCORE_RAM. Signed-off-by: KAMEZAWA Hiroyuki Cc: Ralf Baechle Cc: Benjamin Herrenschmidt Cc: WANG Cong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2ef43ec772551e975a6ea7cf22b59c84955aadf9 Author: KAMEZAWA Hiroyuki Date: Tue Sep 22 16:45:41 2009 -0700 kcore: use usual list for kclist This patchset is for /proc/kcore. With this, - many per-arch hooks are removed. - /proc/kcore will know really valid physical memory area. - /proc/kcore will be aware of memory hotplug. - /proc/kcore will be architecture independent i.e. if an arch supports CONFIG_MMU, it can use /proc/kcore. (if the arch uses usual memory layout.) This patch: /proc/kcore uses its own list handling codes. It's better to use generic list codes. No changes in logic. just clean up. Signed-off-by: KAMEZAWA Hiroyuki Cc: Ralf Baechle Cc: Benjamin Herrenschmidt Cc: WANG Cong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d899bf7b55f503ba7d3d07ed27c3a37e270fa7db Author: Stefani Seibold Date: Tue Sep 22 16:45:40 2009 -0700 procfs: provide stack information for threads A patch to give a better overview of the userland application stack usage, especially for embedded linux. Currently you are only able to dump the main process/thread stack usage which is showed in /proc/pid/status by the "VmStk" Value. But you get no information about the consumed stack memory of the the threads. There is an enhancement in the /proc//{task/*,}/*maps and which marks the vm mapping where the thread stack pointer reside with "[thread stack xxxxxxxx]". xxxxxxxx is the maximum size of stack. This is a value information, because libpthread doesn't set the start of the stack to the top of the mapped area, depending of the pthread usage. A sample output of /proc//task//maps looks like: 08048000-08049000 r-xp 00000000 03:00 8312 /opt/z 08049000-0804a000 rw-p 00001000 03:00 8312 /opt/z 0804a000-0806b000 rw-p 00000000 00:00 0 [heap] a7d12000-a7d13000 ---p 00000000 00:00 0 a7d13000-a7f13000 rw-p 00000000 00:00 0 [thread stack: 001ff4b4] a7f13000-a7f14000 ---p 00000000 00:00 0 a7f14000-a7f36000 rw-p 00000000 00:00 0 a7f36000-a8069000 r-xp 00000000 03:00 4222 /lib/libc.so.6 a8069000-a806b000 r--p 00133000 03:00 4222 /lib/libc.so.6 a806b000-a806c000 rw-p 00135000 03:00 4222 /lib/libc.so.6 a806c000-a806f000 rw-p 00000000 00:00 0 a806f000-a8083000 r-xp 00000000 03:00 14462 /lib/libpthread.so.0 a8083000-a8084000 r--p 00013000 03:00 14462 /lib/libpthread.so.0 a8084000-a8085000 rw-p 00014000 03:00 14462 /lib/libpthread.so.0 a8085000-a8088000 rw-p 00000000 00:00 0 a8088000-a80a4000 r-xp 00000000 03:00 8317 /lib/ld-linux.so.2 a80a4000-a80a5000 r--p 0001b000 03:00 8317 /lib/ld-linux.so.2 a80a5000-a80a6000 rw-p 0001c000 03:00 8317 /lib/ld-linux.so.2 afaf5000-afb0a000 rw-p 00000000 00:00 0 [stack] ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso] Also there is a new entry "stack usage" in /proc//{task/*,}/status which will you give the current stack usage in kb. A sample output of /proc/self/status looks like: Name: cat State: R (running) Tgid: 507 Pid: 507 . . . CapBnd: fffffffffffffeff voluntary_ctxt_switches: 0 nonvoluntary_ctxt_switches: 0 Stack usage: 12 kB I also fixed stack base address in /proc//{task/*,}/stat to the base address of the associated thread stack and not the one of the main process. This makes more sense. [akpm@linux-foundation.org: fs/proc/array.c now needs walk_page_range()] Signed-off-by: Stefani Seibold Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Alexey Dobriyan Cc: "Eric W. Biederman" Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cba8aafe1e07dfc8bae5ba78be8e02883bd34d31 Author: Vincent Li Date: Tue Sep 22 16:45:38 2009 -0700 fs/proc/base.c: fix proc_fault_inject_write() input sanity check Remove obfuscated zero-length input check and return -EINVAL instead of -EIO error to make the error message clear to user. Add whitespace stripping. No functionality changes. The old code: echo 1 > /proc/pid/make-it-fail (ok) echo 1foo > /proc/pid/make-it-fail (-bash: echo: write error: Input/output error) The new code: echo 1 > /proc/pid/make-it-fail (ok) echo 1foo > /proc/pid/make-it-fail (-bash: echo: write error: Invalid argument) This patch is conservative in changes to not breaking existing scripts/applications. Signed-off-by: Vincent Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fb92a4b068be96799da3748c11cbd69760e44d7b Author: Vincent Li Date: Tue Sep 22 16:45:36 2009 -0700 fs/proc/task_mmu.c v1: fix clear_refs_write() input sanity check Andrew Morton pointed out similar string hacking and obfuscated check for zero-length input at the end of the function, David Rientjes suggested to use strict_strtol to replace simple_strtol, this patch cover above suggestions, add removing of leading and trailing whitespace from user input. It does not change function behavious. Signed-off-by: Vincent Li Acked-by: David Rientjes Cc: Matt Mackall Cc: Amerigo Wang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit acef82b873b6899d80e639317228f2104dae79a2 Author: Amerigo Wang Date: Tue Sep 22 16:45:35 2009 -0700 kcore: fix /proc/kcore's stat.st_size In 9063c61fd5cbd ("x86, 64-bit: Clean up user address masking") Linus fixed the wrong size of /proc/kcore problem. But its size still looks insane, since it never equals the size of physical memory. Signed-off-by: WANG Cong Cc: "Eric W. Biederman" Cc: Tao Ma Cc: Acked-by: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9b4d1cbef8f41aff2b3e4ca31f566c071fe601de Author: Oleg Nesterov Date: Tue Sep 22 16:45:34 2009 -0700 proc_flush_task: flush /proc/tid/task/pid when a sub-thread exits The exiting sub-thread flushes /proc/pid only, but this doesn't buy too much: ps and friends mostly use /proc/tid/task/pid. Remove "if (thread_group_leader())" checks from proc_flush_task() path, this means we always remove /proc/tid/task/pid dentry on exit, and this actually matches the comment above proc_flush_task(). The test-case: static void* tfunc(void *arg) { char name[256]; sprintf(name, "/proc/%d/task/%ld/status", getpid(), gettid()); close(open(name, O_RDONLY)); return NULL; } int main(void) { pthread_t t; for (;;) { if (!pthread_create(&t, NULL, &tfunc, NULL)) pthread_join(t, NULL); } } slabtop shows that pid/proc_inode_cache/etc grow quickly and "indefinitely" until the task is killed or shrink_slab() is called, not good. And the main thread needs a lot of time to exit. The same can happen if something like "ps -efL" runs continuously, while some application spawns short-living threads. Reported-by: "James M. Leddy" Signed-off-by: Oleg Nesterov Cc: Alexey Dobriyan Cc: "Eric W. Biederman" Cc: Dominic Duval Cc: Frank Hirtz Cc: "Fuller, Johnray" Cc: Larry Woodman Cc: Paul Batkowski Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cff4edb591c153a779a27a3fd8e7bc1217f2f6b8 Author: Kees Cook Date: Tue Sep 22 16:45:32 2009 -0700 proc: fix reported unit for RLIMIT_CPU /proc/$pid/limits should show RLIMIT_CPU as seconds, which is the unit used in kernel/posix-cpu-timers.c: unsigned long psecs = cputime_to_secs(ptime); ... if (psecs >= sig->rlim[RLIMIT_CPU].rlim_max) { ... __group_send_sig_info(SIGKILL, SEND_SIG_PRIV, tsk); Signed-off-by: Kees Cook Acked-by: WANG Cong Acked-by: Neil Horman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 27f6cb160b71b342b7a47d28a4b6c422ea74ccd1 Author: Chris Ball Date: Tue Sep 22 16:45:31 2009 -0700 sdhci: increase timeout for internal clock stabilization. On an OLPC XO-1.5 development board with Via VX855 chipset, the sdhci controller can take up to 12ms to stabilize its clock, but the current timeout at which we give up on the controller is 10ms. The patch increases the timeout delay rather than using a device-specific quirk -- since we exit the loop when the clock comes up, increasing the timeout value will only make us mdelay() longer in the errant case of a device with a clock that is not stabilizing, which it seems worth waiting a little longer for in general. Signed-off-by: Chris Ball Cc: Harald Welte Acked-by: Pierre Ossman Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a13abc7b0814da7733c531453a207729b542ecf8 Author: Richard Röjfors Date: Tue Sep 22 16:45:30 2009 -0700 sdhci: support for ADMA only hosts Add support for ADMA on SDHCI hosts, not supporting SDMA. According to the SDHCI specifications a host can support ADMA but not SDMA Signed-off-by: Richard Röjfors Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 996ad5686c5f868e67557cc1bfcb2cfdde1a18b4 Author: Nicolas Pitre Date: Tue Sep 22 16:45:30 2009 -0700 mmc: make SDIO device/driver struct accessors public Especially with the PM framework, those are quite handy to have in driver code too. Signed-off-by: Nicolas Pitre Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 95cdfb72b9bc568803f395c266152c71b034b461 Author: Nicolas Pitre Date: Tue Sep 22 16:45:29 2009 -0700 mmc: propagate error codes back from bus drivers' suspend/resume methods Especially for SDIO drivers which may have special conditions/errors to report, it is a good thing to relay the returned error code back to upper layers. This also allows for the rationalization of the resume path where code to "remove" a no-longer-existing or replaced card was duplicated into the MMC, SD and SDIO bus drivers. In the SDIO case, if a function suspend method returns an error, then all previously suspended functions are resumed and the error returned. An exception is made for -ENOSYS which the core interprets as "we don't support suspend so just kick the card out for suspend and return success". When resuming SDIO cards, the core code only validates the manufacturer and product IDs to make sure the same kind of card is still present before invoking functions resume methods. It's the function driver's responsibility to perform further tests to confirm that the actual same card is present (same MAC address, etc.) and return an error otherwise. Signed-off-by: Nicolas Pitre Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 17d33e14f7ffc05f8c81e4a3bdb9a8003a05dcce Author: Nicolas Pitre Date: Tue Sep 22 16:45:28 2009 -0700 mmc: core SDIO suspend/resume support Currently, all SDIO cards are virtually removed upon a suspend, and completely reprobed upon a resume. This adds the suspend and resume methods to the SDIO bus driver so to be able to dispatch those events to the actual SDIO function drivers for real suspend/resume instead. All active functions on a card must have a driver with both a suspend and a resume method though. Failing that, we fall back to the current behavior of simply "removing" the card when suspending. When resuming, we make sure the same card is still inserted by comparing the vendor and product IDs. If there is a mismatch, or if there is simply no card anymore in the slot, then the previous card is "removed" and the new card is detected. This is further enhanced with the next patch. [akpm@linux-foundation.org: fix warnings] Signed-off-by: Nicolas Pitre Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d08ebeddfb3293fa4bdfca9c610daf1e8ec8b233 Author: Wolfgang Muees Date: Tue Sep 22 16:45:26 2009 -0700 mmc_spi: fail gracefully if host or card do not support the switch command Some time ago, I have send a patch to the mmc_spi subsystem changing the error codes. This was after a discussion with Pierre about using EINVAL only for non-recoverable errors. This patch was accepted as http://git.kernel.org/linus/fdd858db7113ca64132de390188d7ca00701013d Unfortunately, several weeks later, I realized that this patch has opened a little can of worms because there are SD cards on the market which a) claim that they support the switch command AND b) refuse to execute this command if operating in SPI mode. So, such a card would get unusuable in an embedded linux system in SPI mode, because the init sequence terminates with an error. This patch adds the missing error codes to the caller of the switch command and restores the old behaviour to fail gracefully if these commands can not execute. Signed-off-by: Wolfgang Muees Cc: Cc: [2.6.31.x] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 82cf818d54f0a415a031eabd0949a81946445198 Author: kishore kadiyala Date: Tue Sep 22 16:45:25 2009 -0700 omap4: mmc driver support on OMAP4 Add basic support for all 5 MMC controllers on OMAP4. This patch doesn't include mmc-regulator support Signed-off-by: Kishore Kadiyala Cc: Jarkko Lavinen Acked-by: Madhusudhan Chikkature Cc: Russell King Acked-by: Tony Lindgren Cc: Hiroshi DOYU Cc: Sakari Ailus Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c99436fb7505ca2427780d7ae49ebb427bb6f374 Author: Chris Ball Date: Tue Sep 22 16:45:22 2009 -0700 sdhci: add no-card-no-reset quirk for Ricoh R5C822/Sony Z11 Card insertion detection is broken without this quirk on a Sony Vaio Z11, as discussed on linux-mmc here: http://marc.info/?t=125017355000008 Signed-off-by: Chris Ball Tested-by: Norbert Preining Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 864f38ebdcb1f7dc4138b7ccb801f16f1696eb8e Author: Rob Emanuele Date: Tue Sep 22 16:45:22 2009 -0700 AT91: atmel-mci: Platform configuration to the the atmel-mci driver Created a modified version of the at91sam9g20 evaluation kit platform (board-sam9g20ek-2slot-mmc.c) and device support to make use of the updated atmel-mci driver. As the use of two slots modify GPIO pin allocation, we create another board file. This requires getting the most updated arch/arm/tools/mach-types from http://www.arm.linux.org.uk/developer/machines/download.php to have the machine type for the at91sam9g20ek-2slot-mmc board. [nicolas.ferre@atmel.com: printk, slot_count modification in at91sam9260_devices.c file] [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Rob Emanuele Signed-off-by: Nicolas Ferre Cc: Haavard Skinnemoen Cc: Andrew Victor Cc: Russell King Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 04d699c3643fbf75dd72c03a4eacec87149c4aca Author: Rob Emanuele Date: Tue Sep 22 16:45:19 2009 -0700 atmel-mci: unified Atmel MCI drivers (AVR32 & AT91) Unification of the atmel-mci driver to support the AT91 processors MCI interface. The atmel-mci driver currently supports the AVR32 and this patch adds AT91 support. Add read/write proof selection switch dependent on chip availability of this feature. To use this new driver on a at91 the platform driver for your board needs to be updated. [nicolas.ferre@atmel.com indent, Kconfig comment and one printk modification] Signed-off-by: Rob Emanuele Signed-off-by: Nicolas Ferre Cc: Haavard Skinnemoen Cc: Andrew Victor Cc: Russell King Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7c979ec7135d96bbff34790bf4b85a8508ede7fc Author: Ohad Ben-Cohen Date: Tue Sep 22 16:45:18 2009 -0700 sdio: add MMC_QUIRK_LENIENT_FN0 Normally writes to SDIO function 0 outside the vendor specific CCCR registers are prohibited. To support embedded devices that require writes to SDIO function 0 outside this range (e.g. TI WL127x embedded sdio wifi device), MMC_QUIRK_LENIENT_FN0 is introduced. A card quirks field is added to `struct mmc_card' to support non-standard devices (e.g. embedded sdio devices). [akpm@linux-foundation.org: code in C, not cpp!] Signed-off-by: Ohad Ben-Cohen Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ad1e597d4199ffcdee04b9fb402e45c5be6a5052 Author: Anton Vorontsov Date: Tue Sep 22 16:45:16 2009 -0700 sdhci-of: cleanup eSDHC's set_clock() a little bit - Get rid of incomprehensible "if { for { if } }" construction for the exponential divisor calculation. The first if statement isn't correct at all, since it should check for "host->max_clk / pre_div / 16 > clock". The error doesn't cause any bugs because the check in the for loop does the right thing, and so the outer check becomes useless; - For the linear divisor do the same: a single while statement is more readable than for + if construction; - Add dev_dbg() that prints desired and actual clock frequency. Signed-off-by: Anton Vorontsov Cc: Pierre Ossman Cc: Kumar Gala Cc: David Vrabel Cc: Ben Dooks Cc: Sascha Hauer Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8226a219254bbcd20492df185f191a11a7a81dcd Author: Anton Vorontsov Date: Tue Sep 22 16:45:15 2009 -0700 sdhci-of: don't hard-code inverted write-protect quirk MPC85xx SOCs have normal write-protect state reporting, so we shouldn't hard-code the quirk. Instead, look for "sdhci,wp-inverted" property, plus check for mpc837x_{rdb,mds} machines since older device trees don't specify the new property. Signed-off-by: Anton Vorontsov Cc: Pierre Ossman Cc: Kumar Gala Cc: David Vrabel Cc: Ben Dooks Cc: Sascha Hauer Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 50dfe70fe9e216cf356830194630f9a39e498d76 Author: Anton Vorontsov Date: Tue Sep 22 16:45:14 2009 -0700 powerpc: introduce and document sdhci,wp-inverted property for eSDHC eSDHC block in MPC837x SOCs reports inverted write-protect state, soon sdhci-of driver will look for sdhci,wp-inverted properties to decide whether apply a specific quirk. So, document the property and add it to device tree source files. Signed-off-by: Anton Vorontsov Cc: Pierre Ossman Cc: Kumar Gala Cc: David Vrabel Cc: Ben Dooks Cc: Sascha Hauer Cc: Benjamin Herrenschmidt Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 81b39802468fe4bf5c6b038837319b608acfdd3e Author: Anton Vorontsov Date: Tue Sep 22 16:45:13 2009 -0700 sdhci-of: fix high-speed cards recognition eSDHC fails to recognize some SDHS cards, throwing timeout errors: mmc0: error -110 whilst initialising SD card That's because we calculate timeout value in a wrong way: on eSDHC hosts the timeout clock is derivied from the SD clock, which is set dynamically. As David Vrabel suggested, deriving timeout clock from SD clock is a common scheme, so let's implement DATA_TIMEOUT_USES_SDCLK quirk and use it for eSDHC hosts. Also, from now on we don't need esdhc_get_timeout_clock() callback, so remove it. Signed-off-by: Anton Vorontsov Cc: Pierre Ossman Cc: Kumar Gala Cc: David Vrabel Cc: Ben Dooks Cc: Sascha Hauer Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c08592698534f390afe726c38301aa8f1620c361 Author: Anton Vorontsov Date: Tue Sep 22 16:45:11 2009 -0700 sdhci-of: avoid writing reserved bits into host control register SDHCI core tries to write HISPD bit into the host control register, but the eSDHC controllers don't have that bit, and that causes all sorts of misbehaviour when using 4-bit mode capable SD cards. Signed-off-by: Anton Vorontsov Cc: Pierre Ossman Cc: Kumar Gala Cc: David Vrabel Cc: Ben Dooks Cc: Sascha Hauer Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1e5df7525d0705dfbfded0c10a7b87b0a754a35d Author: Anton Vorontsov Date: Tue Sep 22 16:45:10 2009 -0700 sdhci-of: fix SD clock calculation Linear divisor's values in a register start at 0 (zero means "divide by 1"). Before this patch the code didn't account that fact, so SD cards were running underclocked. Signed-off-by: Anton Vorontsov Cc: Pierre Ossman Cc: Kumar Gala Cc: David Vrabel Cc: Ben Dooks Cc: Sascha Hauer Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4245c0256da0784b1f96d01ff263a71a4ca3894e Author: Roel Kluin Date: Tue Sep 22 16:45:09 2009 -0700 sdio: fix read buffer overflow Avoid buffer underrun when parsing an invalid CISTPL_VERS_1. Signed-off-by: Roel Kluin Cc: David Vrabel Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e9510176ff728135383f0cdfc9c90cfe57f9e162 Author: Anton Vorontsov Date: Tue Sep 22 16:45:08 2009 -0700 sdhci: be more strict with get_min_clock() usage get_min_clock() makes sense only with NONSTANDARD_CLOCK quirk and when set_clock() callback is specified. The patch should cause no functional changes, it just makes the code self-documented and avoids any possible misuse of get_min_clock(). Suggested-by: Pierre Ossman Signed-off-by: Anton Vorontsov Cc: Ian Molton Cc: Matt Fleming Cc: Philip Langdale Cc: Pierre Ossman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 006ebd5de13854d6250eecc76866bbfad1ff7daf Author: Ohad Ben-Cohen Date: Tue Sep 22 16:45:07 2009 -0700 sdio: add CD disable support Add support to disconnect the pull-up resistor on CD/DAT[3] (pin 1) of the card. This may be desired on certain setups of boards, controllers and embedded sdio devices which do not need the card's pull-up. As a result, card detection is disabled and power is saved. [akpm@linux-foundation.org: simplify sdio_disable_cd() a bit] Signed-off-by: Ohad Ben-Cohen Acked-by: Matt Fleming Cc: Ian Molton Cc: "Roberto A. Foglietta" Cc: Philip Langdale Cc: Pierre Ossman Cc: David Vrabel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 653f41b52dfc63fecf4a2333f13be28b159a918c Author: Madhusudhan Chikkature Date: Tue Sep 22 16:45:06 2009 -0700 MAINTAINERS: update for TI OMAP hsmmc driver Update maintainers entry for TI OMAP HS MMC support. Signed-off-by: Madhusudhan Chikkature Acked-by: Kevin Hilman Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5e763d2968148efafc352748b0ed598b1a695dad Author: Adrian Hunter Date: Tue Sep 22 16:45:05 2009 -0700 ARM: OMAP: RX51: set MMC capabilities and power-saving flag Specify MMC capabilities and set the power-saving flag for RX51. Signed-off-by: Adrian Hunter Acked-by: Matt Fleming Cc: Ian Molton Cc: "Roberto A. Foglietta" Cc: Jarkko Lavinen Cc: Denis Karpov Cc: Pierre Ossman Cc: Philip Langdale Cc: "Madhusudhan" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e2bf08d643a244ccb9d9b70aff655340a0d98626 Author: Adrian Hunter Date: Tue Sep 22 16:45:03 2009 -0700 omap_hsmmc: set a large data timeout for commands with busy signal Commands like SWITCH (CMD6) send a response and then signal busy while the operation is completed. These commands are expected to always succeed (otherwise the response would have indicated an error). Set an arbitrarily large data timeout value (100ms) for these commands to ensure that premature timeouts do not occur. Signed-off-by: Adrian Hunter Acked-by: Matt Fleming Cc: Ian Molton Cc: "Roberto A. Foglietta" Cc: Jarkko Lavinen Cc: Denis Karpov Cc: Pierre Ossman Cc: Philip Langdale Cc: "Madhusudhan" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2bec08937e3cdf6828d29421c7f870dca84f3b02 Author: Adrian Hunter Date: Tue Sep 22 16:45:02 2009 -0700 omap_hsmmc: ensure all clock enables and disables are paired [madhu.cr@ti.com: fix for the db clock failure message] Signed-off-by: Adrian Hunter Acked-by: Matt Fleming Cc: Ian Molton Cc: "Roberto A. Foglietta" Cc: Jarkko Lavinen Cc: Denis Karpov Cc: Pierre Ossman Cc: Philip Langdale Cc: "Madhusudhan" Cc: Signed-off-by: Madhusudhan Chikkature Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b62f622812c5aaacad217fd8f4445562b917df6d Author: Adrian Hunter Date: Tue Sep 22 16:45:01 2009 -0700 omap_hsmmc: protect the card when the cover is open Depending on the manufacturer, there is a small possibility that removing a card while it is being written to, can render the card permanently unusable. To prevent that, the card is made inaccessible when the cover is open. Signed-off-by: Adrian Hunter Acked-by: Matt Fleming Cc: Ian Molton Cc: "Roberto A. Foglietta" Cc: Jarkko Lavinen Cc: Denis Karpov Cc: Pierre Ossman Cc: Philip Langdale Cc: "Madhusudhan" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 70a3341a711f27ae77714ae7dd360a4e7e2d5e7c Author: Denis Karpov Date: Tue Sep 22 16:44:59 2009 -0700 omap_hsmmc: code refactoring Functions', structures', variables' names are changed to start with omap_hsmmc_ prefix. Signed-off-by: Denis Karpov Signed-off-by: Adrian Hunter Acked-by: Matt Fleming Cc: Ian Molton Cc: "Roberto A. Foglietta" Cc: Jarkko Lavinen Cc: Denis Karpov Cc: Pierre Ossman Cc: Philip Langdale Cc: "Madhusudhan" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4dffd7a251172d78a157ff45ec1207012f44774a Author: Adrian Hunter Date: Tue Sep 22 16:44:58 2009 -0700 omap_hsmmc: prevent races with irq handler If an unexpected interrupt occurs while preparing the next request, an oops can occur. For example, a new request is setting up DMA for data transfer so host->data is not NULL. An unexpected transfer complete (TC) interrupt comes along and the interrupt handler sets host->data to NULL. Oops! Prevent that by adding a spinlock. Signed-off-by: Adrian Hunter Acked-by: Matt Fleming Cc: Ian Molton Cc: "Roberto A. Foglietta" Cc: Jarkko Lavinen Cc: Denis Karpov Cc: Pierre Ossman Cc: Philip Langdale Cc: "Madhusudhan" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 23050103c21d4d5314b7c978187e6e4305a00495 Author: Adrian Hunter Date: Tue Sep 22 16:44:57 2009 -0700 omap_hsmmc: cater for weird CMD6 behaviour Sometimes the controller unexpectedly produces a TC (transfer complete) interrupt before the CC (command complete) interrupt for command 6 (SWITCH). This is a problem because the CC interrupt can get mixed up with the next request. Add a hack for CMD6. Signed-off-by: Adrian Hunter Acked-by: Matt Fleming Cc: Ian Molton Cc: "Roberto A. Foglietta" Cc: Jarkko Lavinen Cc: Denis Karpov Cc: Pierre Ossman Cc: Philip Langdale Cc: "Madhusudhan" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c653a6d4d18be5213d0e910cee75ebf089f8ba9d Author: Adrian Hunter Date: Tue Sep 22 16:44:56 2009 -0700 omap_hsmmc: clear interrupt status after init sequence Clear the interrupt status after sending the initialization sequence, as specified in the TRM. Signed-off-by: Adrian Hunter Acked-by: Matt Fleming Cc: Ian Molton Cc: "Roberto A. Foglietta" Cc: Jarkko Lavinen Cc: Denis Karpov Cc: Pierre Ossman Cc: Philip Langdale Cc: "Madhusudhan" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 191d1f1de158cf4dee3a5595e845a498364c061f Author: Denis Karpov Date: Tue Sep 22 16:44:55 2009 -0700 omap_hsmmc: cleanup macro usage Use macro mmc_slot() in omap_hsmmc. Signed-off-by: Denis Karpov Signed-off-by: Adrian Hunter Acked-by: Matt Fleming Cc: Ian Molton Cc: "Roberto A. Foglietta" Cc: Jarkko Lavinen Cc: Denis Karpov Cc: Pierre Ossman Cc: Philip Langdale Cc: "Madhusudhan" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0a40e64786933fb04be37af0a19aa320bc3414a8 Author: Jarkko Lavinen Date: Tue Sep 22 16:44:54 2009 -0700 omap_hsmmc: fix NULL pointer dereference Do not call 'mmc_omap_xfer_done()' if the request is already done. Signed-off-by: Jarkko Lavinen Signed-off-by: Adrian Hunter Acked-by: Matt Fleming Cc: Ian Molton Cc: "Roberto A. Foglietta" Cc: Jarkko Lavinen Cc: Denis Karpov Cc: Pierre Ossman Cc: Philip Langdale Cc: "Madhusudhan" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 13189e78caa824f0285b1823519c020591641207 Author: Jarkko Lavinen Date: Tue Sep 22 16:44:53 2009 -0700 omap_hsmmc: add mmc card sleep and awake support After 1 second of inactivity, put card and/or regulator to sleep. After 8 seconds of inactivity, turn off the power. Signed-off-by: Jarkko Lavinen Signed-off-by: Adrian Hunter Acked-by: Matt Fleming Cc: Ian Molton Cc: "Roberto A. Foglietta" Cc: Jarkko Lavinen Cc: Denis Karpov Cc: Pierre Ossman Cc: Philip Langdale Cc: "Madhusudhan" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 623821f71bb40f9972630eb1f779817d462ef0ee Author: Adrian Hunter Date: Tue Sep 22 16:44:51 2009 -0700 omap_hsmmc: put MMC regulator to sleep When a card is not in use, the voltage regulator can be put to sleep. This is an alternative to powering the card off, when powering off is not safe because the card might be replaced without the driver being aware of it. That situation happens if: - the card is removable i.e. not eMMC - and there is no card detect - and there is a cover switch but the cover is open Signed-off-by: Adrian Hunter Acked-by: Matt Fleming Cc: Ian Molton Cc: "Roberto A. Foglietta" Cc: Jarkko Lavinen Cc: Denis Karpov Cc: Pierre Ossman Cc: Philip Langdale Cc: "Madhusudhan" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9b7c18e070d59ba0acfdb936fd613dfa1d2a4e7d Author: Adrian Hunter Date: Tue Sep 22 16:44:50 2009 -0700 ARM: OMAP: mmc-twl4030: add regulator sleep / wake function Add the ability for the driver to put the card power regulators to sleep and wake them up again. Signed-off-by: Adrian Hunter Acked-by: Matt Fleming Cc: Ian Molton Cc: "Roberto A. Foglietta" Cc: Jarkko Lavinen Cc: Denis Karpov Cc: Pierre Ossman Cc: Philip Langdale Cc: "Madhusudhan" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dd498effcfa6a196ba097adae3c5aa641115df88 Author: Denis Karpov Date: Tue Sep 22 16:44:49 2009 -0700 omap_hsmmc: support for deeper power saving states Support for multi-level dynamic power saving states in omap_hsmmc (ENABLED->DISABLED->OFF). In the "deepest" state (OFF) we switch off the voltage regulators. Signed-off-by: Denis Karpov Signed-off-by: Adrian Hunter Acked-by: Matt Fleming Cc: Ian Molton Cc: "Roberto A. Foglietta" Cc: Jarkko Lavinen Cc: Denis Karpov Cc: Pierre Ossman Cc: Philip Langdale Cc: "Madhusudhan" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 23d99bb923fc23aeb1086d60eb1c70602b4e2036 Author: Adrian Hunter Date: Tue Sep 22 16:44:48 2009 -0700 omap_hsmmc: make use of new MMC_CAP_NONREMOVABLE host capability Let the board specify that a card is nonremovable e.g. eMMC Signed-off-by: Adrian Hunter Acked-by: Matt Fleming Cc: Ian Molton Cc: "Roberto A. Foglietta" Cc: Jarkko Lavinen Cc: Denis Karpov Cc: Pierre Ossman Cc: Philip Langdale Cc: "Madhusudhan" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a3f406f861456987c9fce8cfa0a00d07b16cdec0 Author: Jarkko Lavinen Date: Tue Sep 22 16:44:46 2009 -0700 omap_hsmmc: fix scatter-gather list sanity checking Do not use host->dma_len when it is uninitialzed. Finish the request with an error if the mmc_omap_prepare_data() fails. Signed-off-by: Jarkko Lavinen Signed-off-by: Adrian Hunter Acked-by: Matt Fleming Cc: Ian Molton Cc: "Roberto A. Foglietta" Cc: Jarkko Lavinen Cc: Denis Karpov Cc: Pierre Ossman Cc: Philip Langdale Cc: "Madhusudhan" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a6b2240da2b090874095832afc7eb9ed2968b27f Author: Adrian Hunter Date: Tue Sep 22 16:44:45 2009 -0700 omap_hsmmc: ensure workqueues are empty before suspend Signed-off-by: Adrian Hunter Acked-by: Matt Fleming Cc: Ian Molton Cc: "Roberto A. Foglietta" Cc: Jarkko Lavinen Cc: Denis Karpov Cc: Pierre Ossman Cc: Philip Langdale Cc: "Madhusudhan" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit abb28e731a751f0b6c293a67b3e564eb0e336d53 Author: Denis Karpov Date: Tue Sep 22 16:44:44 2009 -0700 omap_hsmmc: set open drain bit correctly The code could set the bit to 1 but not reset it to 0. Signed-off-by: Denis Karpov Signed-off-by: Adrian Hunter Acked-by: Matt Fleming Cc: Ian Molton Cc: "Roberto A. Foglietta" Cc: Jarkko Lavinen Cc: Denis Karpov Cc: Pierre Ossman Cc: Philip Langdale Cc: "Madhusudhan" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 11dd62a741047b9fd1faf37620e2b58595f04ce5 Author: Denis Karpov Date: Tue Sep 22 16:44:43 2009 -0700 omap_hsmmc: context save/restore support Keep the context over PM dynamic OFF states. Signed-off-by: Denis Karpov Signed-off-by: Adrian Hunter Acked-by: Matt Fleming Cc: Ian Molton Cc: "Roberto A. Foglietta" Cc: Jarkko Lavinen Cc: Denis Karpov Cc: Pierre Ossman Cc: Philip Langdale Cc: "Madhusudhan" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a3621465b4fd91b7f8560f394afc494a57b77501 Author: Adrian Hunter Date: Tue Sep 22 16:44:42 2009 -0700 omap_hsmmc: keep track of power mode This patch is preparation for adding context save and restore support. Keep track of the current power mode so that the context restore function can avoid restoring the context for a card if the power has been switched off. If the power is off, the card must be reinitialized anyway which will re-establish the context. Signed-off-by: Adrian Hunter Acked-by: Matt Fleming Cc: Ian Molton Cc: "Roberto A. Foglietta" Cc: Jarkko Lavinen Cc: Denis Karpov Cc: Pierre Ossman Cc: Philip Langdale Cc: "Madhusudhan" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1887bde391a3216789c9a03ac111d5f6ebfb0c00 Author: Denis Karpov Date: Tue Sep 22 16:44:40 2009 -0700 ARM: OMAP: mmc-twl4030: add context loss counter support PM dynamic OFF state results in context loss. That is, the host controller has been powered off at some point, which means the registers have been reset. The driver must detect when this happens, and restore the context. This patch adds the means to detect context loss. Note, the PM side is not yet implemented. Signed-off-by: Denis Karpov Signed-off-by: Adrian Hunter Acked-by: Matt Fleming Cc: Ian Molton Cc: