commit 39d3520c92cf7a28c07229ca00cc35a1e8026c77 Author: Linus Torvalds Date: Sun Aug 12 21:25:24 2007 -0700 Linux 2.6.23-rc3 commit cc75b92d11384ba14f93828a2a0040344ae872e7 Author: Thomas Gleixner Date: Sun Aug 12 15:46:36 2007 +0000 genirq: mark io_apic level interrupts to avoid resend Level type interrupts do not need to be resent. It was also found that some chipsets get confused in case of the resend. Mark the ioapic level type interrupts as such to avoid the resend functionality in the generic irq code. Signed-off-by: Thomas Gleixner Signed-off-by: Linus Torvalds commit 2464286ace55b3abddfb9cc30ab95e2dac1de9a6 Author: Thomas Gleixner Date: Sun Aug 12 15:46:35 2007 +0000 genirq: suppress resend of level interrupts Level type interrupts are resent by the interrupt hardware when they are still active at irq_enable(). Suppress the resend mechanism for interrupts marked as level. Signed-off-by: Thomas Gleixner Signed-off-by: Linus Torvalds commit 496634217e5671ed876a0348e9f5b7165e830b20 Author: Thomas Gleixner Date: Sun Aug 12 15:46:34 2007 +0000 genirq: cleanup mismerge artifact Commit 5a43a066b11ac2fe84cf67307f20b83bea390f83: "genirq: Allow fasteoi handler to retrigger disabled interrupts" was erroneously applied to handle_level_irq(). This added the irq retrigger / resend functionality to the level irq handler. Revert the offending bits. Signed-off-by: Thomas Gleixner Signed-off-by: Linus Torvalds commit de0cf899bbf06b6f64a5dce9c59d74c41b6b4232 Author: Oleg Nesterov Date: Sun Aug 12 18:08:19 2007 +0200 sched: run_rebalance_domains: s/SCHED_IDLE/CPU_IDLE/ rebalance_domains(SCHED_IDLE) looks strange (typo), change it to CPU_IDLE. the effect of this bug was slightly more agressive idle-balancing on SMP than intended. Signed-off-by: Oleg Nesterov Signed-off-by: Ingo Molnar commit 5d2b3d3695a841231b65b5536a70dc29961c5611 Author: Ingo Molnar Date: Sun Aug 12 18:08:19 2007 +0200 sched: fix sleeper bonus Peter Ziljstra noticed that the sleeper bonus deduction code was not properly rate-limited: a task that scheduled more frequently would get a disproportionately large deduction. So limit the deduction to delta_exec. Signed-off-by: Ingo Molnar commit 6707de00fdec3e3225192fe3dcd21323a8936b1f Author: Adrian Bunk Date: Sun Aug 12 18:08:19 2007 +0200 sched: make global code static This patch makes the following needlessly global code static: - arch_reinit_sched_domains() - struct attr_sched_mc_power_savings - struct attr_sched_smt_power_savings Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Ingo Molnar commit c1502e28346fd3b9955ce654c96212c4748d900d Author: Linus Torvalds Date: Sun Aug 12 02:23:16 2007 -0700 i386: Fix broken mmiocfg accesses Commit 3320ad994afb2c44ad34b3b34c3c5cf0da297331 broke mmio config space accesses totally on i386 - it dropped the "reg" offset to the address. Cc: dean gaudet Cc: Andi Kleen Signed-off-by: Linus Torvalds commit b8d3f2448b8f4ba24f301e23585547ba1acc1f04 Author: Petr Vandrovec Date: Sun Aug 12 10:12:52 2007 +0200 Do not replace whole memcpy in apply alternatives apply_alternatives uses memcpy() to apply alternatives. Which has the unfortunate effect that while applying memcpy alternative to memcpy itself it tries to overwrite itself with nops - which causes #UD fault as it overwrites half of an instruction in copy loop, and from this point on only possible outcome is triplefault and reboot. So let's overwrite only first two instructions of memcpy - as long as the main memcpy loop is not in first two bytes it will work fine. Signed-off-by: Petr Vandrovec Signed-off-by: Linus Torvalds commit 0b5bfa1cbefdc6e4c60f30ed545389b5ffe0f75f Author: Len Brown Date: Sun Aug 12 00:13:02 2007 -0400 ACPI: thermal: add DMI hooks to handle AOpen's broken Award BIOS Use DMI to: 1. enable polling (BIOS thermal events are broken) 2. disable active trip points (BIOS fan control is broken) 3. disable passive trip point (BIOS hard-codes it too low) The actual temperature reading does work, and with the aid of polling, the critical trip point should work too. http://bugzilla.kernel.org/show_bug.cgi?id=8842 Signed-off-by: Len Brown commit f8707ec9643769957065405b5090e4aa64fd8214 Author: Len Brown Date: Sun Aug 12 00:12:54 2007 -0400 ACPI: thermal: create "thermal.act=" to disable or override active trip point thermal.act=-1 disables all active trip points in all ACPI thermal zones. thermal.act=C, where C > 0, overrides all lowest temperature active trip points in all thermal zones to C degrees Celsius. Raising this trip-point may allow you to keep your system silent up to a higher temperature. However, it will not allow you to raise the lowest temperature trip point above the next higher trip point (if there is one). Lowering this trip point may kick in the fan sooner. Note that overriding this trip-point will disable any BIOS attempts to implement hysteresis around the lowest temperature trip point. This may result in the fan starting and stopping frequently if temperature frequently crosses C. WARNING: raising trip points above the manufacturer's defaults may cause the system to run at higher temperature and shorten its life. Signed-off-by: Len Brown commit f54871456162aff557d57bec51639b1288d4a84b Author: Len Brown Date: Sun Aug 12 00:12:44 2007 -0400 ACPI: thermal: create "thermal.nocrt" to disable critical actions thermal.nocrt=1 disables actions on _CRT and _HOT ACPI thermal zone trip-points. They will be marked as in /proc/acpi/thermal_zone/*/trip_points. There are two cases where this option is used: 1. Debugging a hot system crossing valid trip point. If your system fan is spinning at full speed, be sure that the vent is not clogged with dust. Many laptops have very fine thermal fins that are easily blocked. Check that the processor fan-sink is properly seated, has the proper thermal grease, and is really spinning. Check for fan related options in BIOS SETUP. Sometimes there is a performance vs quiet option. Defaults are generally the most conservative. If your fan is not spinning, yet /proc/acpi/fan/ has files in it, please file a Linux/ACPI bug. WARNING: you risk shortening the lifetime of your hardware if you use this parameter on a hot system. Note that this refers to all system components, including the disk drive. 2. Working around a cool system crossing critical trip point due to erroneous temperature reading. Try again with CONFIG_HWMON=n There is known potential for conflict between the the hwmon sub-system and the ACPI BIOS. If this fixes it, notify lm-sensors@lm-sensors.org and linux-acpi@vger.kernel.org Otherwise, file a Linux/ACPI bug, or notify just linux-acpi@vger.kernel.org. Signed-off-by: Len Brown commit a70cdc5200b0eb9fc3ef64efb29baac9b2cf2431 Author: Len Brown Date: Sun Aug 12 00:12:35 2007 -0400 ACPI: thermal: create "thermal.psv=" to override passive trip points "thermal.psv=-1" disables passive trip points for all ACPI thermal zones. "thermal.psv=C", where 'C' is degrees Celsius, overrides all existing passive trip points for all ACPI thermal zones. thermal.psv is checked at module load time, and in response to trip-point change events. Note that if the system does not deliver thermal zone temperature change events near the new trip-point, then it will not be noticed. To force your custom trip point to be noticed, you may need to enable polling: eg. thermal.tzp=3000 invokes polling every 5 minutes. Note that once passive thermal throttling is invoked, it has its own internal Thermal Sampling Period (_TSP), that is unrelated to _TZP. WARNING: disabling or raising a thermal trip point may result in increased running temperature and shorter hardware lifetime on some systems. Signed-off-by: Len Brown commit 730ff34de766a6fddee25ac1c32bc49c1a2fd758 Author: Len Brown Date: Sun Aug 12 00:12:26 2007 -0400 ACPI: thermal: expose "thermal.tzp=" to set global polling frequency Thermal Zone Polling frequency (_TZP) is an optional ACPI object recommending the rate that the OS should poll the associated thermal zone. If _TZP is 0, no polling should be used. If _TZP is non-zero, then the platform recommends that the OS poll the thermal zone at the specified rate. The minimum period is 30 seconds. The maximum period is 5 minutes. (note _TZP and thermal.tzp units are in deci-seconds, so _TZP = 300 corresponds to 30 seconds) If _TZP is not present, ACPI 3.0b recommends that the thermal zone be polled at an "OS provided default frequency". However, common industry practice is: 1. The BIOS never specifies any _TZP 2. High volume OS's from this century never poll any thermal zones Ie. The OS depends on the platform's ability to provoke thermal events when necessary, and the "OS provided default frequency" is "never":-) There is a proposal that ACPI 4.0 be updated to reflect common industry practice -- ie. no _TZP, no polling. The Linux kernel already follows this practice -- thermal zones are not polled unless _TZP is present and non-zero. But thermal zone polling is useful as a workaround for systems which have ACPI thermal control, but have an issue preventing thermal events. Indeed, some Linux distributions still set a non-zero thermal polling frequency for this reason. But rather than ask the user to write a polling frequency into all the /proc/acpi/thermal_zone/*/polling_frequency files, here we simply document and expose the already existing module parameter to do the same at system level, to simplify debugging those broken platforms. Note that thermal.tzp is a module-load time parameter only. Signed-off-by: Len Brown commit 72b33ef8bb1ac7f6c5a16d23304ab25ddc73d93d Author: Len Brown Date: Sun Aug 12 00:12:17 2007 -0400 ACPI: thermal: create "thermal.off=1" to disable ACPI thermal support "thermal.off=1" disables all ACPI thermal support at boot time. CONFIG_ACPI_THERMAL=n can do this at build time. "# rmmod thermal" can do this at run time, as long as thermal is built as a module. WARNING: On some systems, disabling ACPI thermal support will cause the system to run hotter and reduce the lifetime of the hardware. Signed-off-by: Len Brown commit 9de1cc4a1724adda84101912e8ba51460f110044 Author: Henrique de Moraes Holschuh Date: Sat Aug 11 00:08:33 2007 -0300 ACPI: thinkpad-acpi: fix sysfs paths in documentation The documentation used "thinkpad-acpi" to refer to the directories in sysfs, while it should have been using "thinkpad_acpi". Thanks to Hugh Dickins for the error report. I wish I could just call the module and everything else by the proper name with the "-", instead of using these ugly translations to "_". Signed-off-by: Henrique de Moraes Holschuh Cc: Hugh Dickins Signed-off-by: Len Brown commit e13d87473284131a7ead8121d5d29345101f68a4 Author: Adrian Bunk Date: Fri Aug 10 13:45:18 2007 -0700 ACPI: static Make the needlessly global "acpi_event_seqnum" static. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Len Brown commit 199e9e7d1106686a85ee9fdf6a824051aa82682e Author: Alexey Starikovskiy Date: Fri Aug 10 13:45:18 2007 -0700 ACPI EC: remove potential deadlock from EC Signed-off-by: Alexey Starikovskiy Signed-off-by: Andrew Morton Signed-off-by: Len Brown commit 66b568218ab73be161dc109b913e6fa7dda44e16 Author: Holger Macht Date: Fri Aug 10 13:10:32 2007 -0700 ACPI: dock: Send key=value pair instead of plain value Send key=value pair along with the uevent instead of a plain value so that userspace (udev) can handle it like common environment variables. Signed-off-by: Holger Macht Acked-by: Kristen Carlson Accardi Cc: Stephan Berberig Signed-off-by: Andrew Morton Acked-by: Greg Kroah-Hartman Signed-off-by: Len Brown commit 7aa763cb56b6efdfa5c1b83c336abf1be914afcd Author: Stephan Berberig Date: Fri Aug 10 13:10:31 2007 -0700 ACPI: bay: send envp with uevent - fix There must not be a new-line character in the uevent. Otherwise, udev gets confused. Thanks to Kay Sievers for pointing it out. Signed-off-by: Stephan Berberig Cc: Kristen Carlson Accardi Signed-off-by: Andrew Morton Acked-by: Greg Kroah-Hartman Signed-off-by: Len Brown commit 3dab307e527f2a9bbb4f9d00240374bb93d1945f Author: Chuck Ebbert Date: Fri Aug 10 22:31:11 2007 +0200 i386: Fix double fault handler The new percpu code has apparently broken the doublefault handler when CONFIG_DEBUG_SPINLOCK is set. Doublefault is handled by a hardware task, making the check SPIN_BUG_ON(lock->owner == current, lock, "recursion"); fault because it uses the FS register to access the percpu data for current, and that register is zero in the new TSS. (The trace I saw was on 2.6.20 where it was GS, but it looks like this will still happen with FS on 2.6.22.) Initializing FS in the doublefault_tss should fix it. AK: Also fix broken ptr_ok() and turn printks into KERN_EMERG AK: And add a PANIC prefix to make clear the system will hang AK: (e.g. x86-64 will recover) Signed-off-by: Chuck Ebbert Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds commit 5fe4486c79cdc8dbbb2a9c3f884a5ad0830a5a23 Author: Andi Kleen Date: Fri Aug 10 22:31:10 2007 +0200 i386: Fix start_kernel warning Fix WARNING: vmlinux.o(.text+0x183): Section mismatch: reference to .init.text:start_kernel (between 'is386' and 'check_x87') Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds commit 1f1014896d0ddf26ae03c12c21f73706e8461013 Author: Pete Zaitcev Date: Fri Aug 10 22:31:09 2007 +0200 x86_64: vdso.lds in arch/x86_64/vdso/.gitignore Create arch/x86_64/vdso/.gitignore and put vdso.lds into it. Signed-off-by: Pete Zaitcev Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds commit 43fb2387d0774a36f450b50d538cee84cf83858e Author: Andi Kleen Date: Fri Aug 10 22:31:08 2007 +0200 i386: Add warning in Documentation that zero-page is not a stable ABI Some people writing boot loaders seem to falsely belief the 32bit zero page is a stable interface for out of tree code like the real mode boot protocol. Add a comment clarifying that is not true. Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds commit d3f7eae182b04997be19343a23f7009170f4f7a5 Author: Andi Kleen Date: Fri Aug 10 22:31:07 2007 +0200 i386: Use global flag to disable broken local apic timer on AMD CPUs. The Averatec 2370 and some other Turion laptop BIOS seems to program the ENABLE_C1E MSR inconsistently between cores. This confuses the lapic use heuristics because when C1E is enabled anywhere it seems to affect the complete chip. Use a global flag instead of a per cpu flag to handle this. If any CPU has C1E enabled disabled lapic use. Thanks to Cal Peake for debugging. Cc: tglx@linutronix.de Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds commit d2d0251f6faa2cf341500a44310bbaa815a8a972 Author: Adrian Bunk Date: Fri Aug 10 22:31:06 2007 +0200 i386: really stop MCEs during code patching It's CONFIG_X86_MCE, not CONFIG_MCE. Signed-off-by: Adrian Bunk Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds commit 08da5a2ca479c5e8805dc3f77fd77176c4293399 Author: Zachary Amsden Date: Fri Aug 10 22:31:05 2007 +0200 x86_64: Early segment setup for VT VT is very picky about when it can enter execution. Get all segments setup and get LDT and TR into valid state to allow VT execution under VMware and KVM (untested). This makes the boot decompression run under VT, which makes it several orders of magnitude faster on 64-bit Intel hardware. Before, I was seeing times up to a minute or more to decompress a 1.3MB kernel on a very fast box. Signed-off-by: Zachary Amsden Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds commit ab144f5ec64c42218a555ec1dbde6b60cf2982d6 Author: Andi Kleen Date: Fri Aug 10 22:31:03 2007 +0200 i386: Make patching more robust, fix paravirt issue Commit 19d36ccdc34f5ed444f8a6af0cbfdb6790eb1177 "x86: Fix alternatives and kprobes to remap write-protected kernel text" uses code which is being patched for patching. In particular, paravirt_ops does patching in two stages: first it calls paravirt_ops.patch, then it fills any remaining instructions with nop_out(). nop_out calls text_poke() which calls lookup_address() which calls pgd_val() (aka paravirt_ops.pgd_val): that call site is one of the places we patch. If we always do patching as one single call to text_poke(), we only need make sure we're not patching the memcpy in text_poke itself. This means the prototype to paravirt_ops.patch needs to change, to marshal the new code into a buffer rather than patching in place as it does now. It also means all patching goes through text_poke(), which is known to be safe (apply_alternatives is also changed to make a single patch). AK: fix compilation on x86-64 (bad rusty!) AK: fix boot on x86-64 (sigh) AK: merged with other patches Signed-off-by: Rusty Russell Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds commit d3f3c9346979bfa074c64eac5fc3ed5bba4f40ed Author: Andi Kleen Date: Fri Aug 10 22:31:02 2007 +0200 x86: Disable CLFLUSH support again It turns out CLFLUSH support is still not complete; we flush the wrong pages. Again disable it for the release. Noticed by Jan Beulich who then also noticed a stupid typo later. Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds commit 3f3f7b74a7749c3a669ca146270c07568b548665 Author: Andi Kleen Date: Fri Aug 10 22:31:01 2007 +0200 x86_64: Don't mark __exitcall as __cold gcc currently doesn't support attributes on types, so we can't use it function pointers. This avoids some warnings on a gcc 4.3 build. Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds commit f055a0619aae795832ef6a783021184925758b67 Author: Murillo Fernandes Bernardes Date: Fri Aug 10 22:31:00 2007 +0200 x86_64: Calgary - Fix mis-handled PCI topology Current code assumed that devices were directly connected to a Calgary bridge, as it tried to get the iommu table directly from the parent bus controller. When we have another bridge between the Calgary/CalIOC2 bridge and the device we should look upwards until we get to the top (Calgary/CalIOC2 bridge), where the iommu table resides. Signed-off-by: Murillo Fernandes Bernardes Signed-off-by: Muli Ben-Yehuda Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds commit 3320ad994afb2c44ad34b3b34c3c5cf0da297331 Author: dean gaudet Date: Fri Aug 10 22:30:59 2007 +0200 x86: Work around mmio config space quirk on AMD Fam10h Some broken devices have been discovered to require %al/%ax/%eax registers for MMIO config space accesses. Modify mmconfig.c to use these registers explicitly (rather than modify the global readb/writeb/etc inlines). AK: also changed i386 to always use eax AK: moved change to extended space probing to different patch AK: reworked with inlines according to Linus' requirements. AK: improve comments. Signed-off-by: dean gaudet Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds commit 9535239f6bc99f68e0cfae44505ad402b53ed24c Author: Greg Ungerer Date: Fri Aug 10 13:01:20 2007 -0700 changing include/asm-generic/pgtable.h for non-mmu There are some parts of include/asm-generic/pgtable.h that are relevant to the non-mmu architectures. To make it easier to include this from them I would like to ifdef the relevant parts. Without this there is a handful of functions that are referenced in here that are not defined on many non-mmu architectures. They could be defined out of course, as an alternative approach. Cc: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 73c59afc65cfa50c3362b9ce1ec151a79c41dd8e Author: Muli Ben-Yehuda Date: Fri Aug 10 13:01:19 2007 -0700 finish i386 and x86-64 sysdata conversion This patch finishes the i386 and x86-64 ->sysdata conversion and hopefully also fixes Riku's and Andy's observed bugs. It is based on Yinghai Lu's and Andy Whitcroft's patches (thanks!) with some changes: - introduce pci_scan_bus_with_sysdata() and use it instead of pci_scan_bus() where appropriate. pci_scan_bus_with_sysdata() will allocate the sysdata structure and then call pci_scan_bus(). - always allocate pci_sysdata dynamically. The whole point of this sysdata work is to make it easy to do root-bus specific things (e.g., support PCI domains and IOMMU's). I dislike using a default struct pci_sysdata in some places and a dynamically allocated pci_sysdata elsewhere - the potential for someone indavertantly changing the default structure is too high. - this patch only makes the minimal changes necessary, i.e., the NUMA node is always initialized to -1. Patches to do the right thing with regards to the NUMA node can build on top of this (either add a 'node' parameter to pci_scan_bus_with_sysdata() or just update the node when it becomes known). The patch was compile tested with various configurations (e.g., NUMAQ, VISWS) and run-time tested on i386 and x86-64. Unfortunately none of my machines exhibited the bugs so caveat emptor. Andy, could you please see if this fixes the NUMA issues you've seen? Riku, does this fix "pci=noacpi" on your laptop? Signed-off-by: Muli Ben-Yehuda Cc: Yinghai Lu Cc: Andi Kleen Cc: Chuck Ebbert Cc: Cc: Andy Whitcroft Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f0b85c0cfdad8977d82fed88e846fc2245585d0e Author: Stephen Hemminger Date: Fri Aug 10 13:01:16 2007 -0700 readahead: docbook fix Minor docbook error since argument name in comment doesn't match function Signed-off-by: Stephen Hemminger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f6901e639800e745457b1dcd99c52647981438d7 Author: Jay Estabrook Date: Fri Aug 10 13:01:12 2007 -0700 alpha: -Werror fixes for sys_titan.c This code corrects the usage of the request_irq() routine. Signed-off-by: Jay Estabrook Signed-off-by: Ivan Kokshaysky Cc: Richard Henderson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b1a47190a6000d0e75ee4ffa75f3f6b16dd60a0b Author: Jes Sorensen Date: Fri Aug 10 13:01:11 2007 -0700 lguest files should explicitly include asm/paravirt.h Files using bits from paravirt.h should explicitly include it rather than relying on it being pulled in by something else. Signed-off-by: Jes Sorensen Cc: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cd5bfea278987ebfe60f3ff92a01696b17c4f978 Author: Peter Chubb Date: Fri Aug 10 13:01:10 2007 -0700 fix compilation with gcc 4.2 gcc-4.2 is a lot more picky about its symbol handling. EXPORT_SYMBOL no longer works on symbols that are undefined or defined with static scope. For example, with CONFIG_PROFILE off, I see: kernel/profile.c:206: error: __ksymtab_profile_event_unregister causes a section type conflict kernel/profile.c:205: error: __ksymtab_profile_event_register causes a section type conflict This patch moves the EXPORTs inside the #ifdef CONFIG_PROFILE, so we only try to export symbols that are defined. Also, in kernel/kprobes.c there's an EXPORT_SYMBOL_GPL() for jprobes_return, which if CONFIG_JPROBES is undefined is a static inline and gives the same error. And in drivers/acpi/resources/rsxface.c, there's an ACPI_EXPORT_SYMBOPL() for a static symbol. If it's static, it's not accessible from outside the compilation unit, so should bot be exported. These three changes allow building a zx1_defconfig kernel with gcc 4.2 on IA64. [akpm@linux-foundation.org: export jpobe_return properly] Signed-off-by: Peter Chubb Cc: Prasanna S Panchamukhi Cc: Ananth N Mavinakayanahalli Cc: Anil S Keshavamurthy Cc: "Luck, Tony" Cc: Len Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6ddfca9548d8ecc26096a30667423ba919109533 Author: Miao Xie Date: Fri Aug 10 13:01:09 2007 -0700 timer: remove clockevents_unregister_notifier I find a function(clockevents_unregister_notifier) which is not called by anything in tree. Signed-off-by: Miao Xie Acked-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 96ddbf504a05502800e7cbeb4d08abbcc206c51c Author: David Brownell Date: Fri Aug 10 13:01:09 2007 -0700 spidev warning fix Git rid of "warning: passing arg 2 of `access_ok' makes pointer from integer without a cast" reported on SH ... most architectures use macros in that test, SH uses inlined functions. Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4a2a4da43995864786d59f5f0ebf42c0c1e2cdd1 Author: Adrian Bunk Date: Fri Aug 10 13:01:08 2007 -0700 cris: drivers/cdrom/Kconfig no longer exists scripts/kconfig/conf -d arch/cris/Kconfig arch/cris/Kconfig:183: can't open file "drivers/cdrom/Kconfig" Signed-off-by: Adrian Bunk Cc: Mikael Starvik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 844add7abca0d10e9733fc16119e53cb4c1987b4 Author: Josh Triplett Date: Fri Aug 10 13:01:07 2007 -0700 RCU: Remove prototype for nonexistent function synchronize_idle() synchronize_idle() sounds like an interesting function, but we don't actually have it, so don't prototype it. Introduced in commit 9b06e818985d139fd9e82c28297f7744e1b484e1, in 2005. Signed-off-by: Josh Triplett Acked-by: Paul E. McKenney Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eb9a9a56316f4fea98ee32873ccbf7098b7bd69b Author: Alan Stern Date: Fri Aug 10 13:01:07 2007 -0700 hex_dump: add missing "const" qualifiers Add missing "const" qualifiers to the print_hex_dump_bytes() library routines. (akpm: rumoured to fix some compile warning somewhere) Signed-off-by: Alan Stern Cc: Artem Bityutskiy Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0c1eafdb063a3701eff24d21eb245e3b1d4ac7df Author: Andrew Morton Date: Fri Aug 10 13:01:06 2007 -0700 mtdchar build fix sh: drivers/mtd/mtdchar.c: In function `mtd_mmap': drivers/mtd/mtdchar.c:817: error: dereferencing pointer to incomplete type drivers/mtd/mtdchar.c:817: error: `VM_SHARED' undeclared (first use in this function) drivers/mtd/mtdchar.c:817: error: (Each undeclared identifier is reported only once Cc: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 42fd552e8647316757ded0176466c41d17934dcf Author: Alan Cox Date: Fri Aug 10 13:01:05 2007 -0700 fix serial buffer memory leak Patch c5c34d4862e18ef07c1276d233507f540fb5a532 (tty: flush flip buffer on ldisc input queue flush) introduces a race condition which can lead to memory leaks. The problem can be triggered when tcflush() is called when data are being pushed to the line discipline driver by flush_to_ldisc(). flush_to_ldisc() releases tty->buf.lock when calling the line discipline receive_buf function. At that poing tty_buffer_flush() kicks in and sets both tty->buf.head and tty->buf.tail to NULL. When flush_to_ldisc() finishes, it restores tty->buf.head but doesn't touch tty->buf.tail. This corrups the buffer queue, and the next call to tty_buffer_request_room() will allocate a new buffer and overwrite tty->buf.head. The previous buffer is then lost forever without being released. (Thanks to Laurent for the above text, for finding, disgnosing and reporting the bug) - Use tty->flags bits for the flush status. - Wait for the flag to clear again before returning - Fix the doc error noted - Fix flush of empty queue leaving stale flushpending [akpm@linux-foundation.org: cleanup] Signed-off-by: Alan Cox Acked-by: Paul Fulghum Cc: Laurent Pinchart Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f8a745942b1b7f052cb76bb8a893d12cb6329c84 Author: Jarek Poplawski Date: Fri Aug 10 13:01:04 2007 -0700 docs: note about select in kconfig-language.txt A warning note from Sam Ravnborg about kconfig's select evilness, dependencies and the future (slightly corrected). Signed-off-by: Jarek Poplawski Cc: Sam Ravnborg Cc: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 09736bd36a19aa8c0630e626563e447213c372b5 Author: Jesper Juhl Date: Fri Aug 10 13:01:04 2007 -0700 Documentation: sysrq, description of 'h' slightly inaccurate In Documentation/sysrq.txt, the description of 'h' says that any key not listed *above* will generate help. That's obviously not true since all the keys listed below 'h' will do what they are described to do, not display help. So change the text so that it says that any key not listed in the table will generate help, which is what really happens. Signed-off-by: Jesper Juhl Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 22f2a2ef9b468569cb34a7a056e54d56fdac0b9d Author: Andy Whitcroft Date: Fri Aug 10 13:01:03 2007 -0700 update checkpatch.pl to version 0.09 This version brings a number of new checks, and a number of bug fixes. Of note: - checks for spacing on round and square bracket combinations - loosening of the single statement brace checks, to allow them when they contain comments or where other blocks in a compound statement have them. - parks the multple declaration support - allows architecture defines in architecture specific headers Andy Whitcroft (21): Version: 0.09 loosen single statement brace checks fix up multiple declaration to avoid function arguments add some function space parenthesis check exceptions handle EXPORT_'s with parentheses in their names clean up some warnings in multi-line macro bracketing support park the multiple declaration checks make block brace checks count comments as a statement __volatile__ and __extension__ are not functions allow architecture specific defined within architecture includes check spacing on square brackets check spacing on parentheses ensure we apply checks to the part before start comment check #ifdef conditional spacing handle __init_refok and __must_check add noinline to inline checks prevent email addresses from tripping spacing checks handle typed initialiser spacing handle line contination as end of line add bool to the type matcher refine EXPORT_SYMBOL checks to handle pointers Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a44648b057f5331fe6c0e863dc693ed335490e7a Author: Anton Vorontsov Date: Fri Aug 10 13:01:02 2007 -0700 spi_mpc83xx: fix prescale modulus calculation Long ago I've noticed (but didn't pay much attention) that spi_mpc83xx using PM calculations that differs from what specs describe. I.e. u8 pm = mpc83xx_spi->spibrg / (spi->max_speed_hz * 4); While specs says: "The SPI baud rate generator clock source (either system clock or system clock divided by 16, depending on DIV16 bit) is divided by 4 * ([PM] + 1), a range from 4 to 64.". Thus " - 1" is missing in the spi_mpc83xx's formula. Why nobody noticed that bug? Probably because sysclk usually less then user expects, e.g. you expect 200 MHz, but real clock is 198 MHz, and integer rounding helps when this formula is used. Suppose it's SPI in QE, SYSCLK at 198 MHz, thus SPIBRG at 99MHz, 25 MHz requested. PM = (99MHz / ( 25 MHz * 4 )), PM == 0, output SPICLK will be 24.75 MHz At lower frequencies this bug is more noticeable, though. And this bug shows itself in all its beauty if SYSCLK is equal or a bit more than you expect (200 MHz SYSCLK, 100 MHz SPIBRG): PM = (100MHz / ( 25 MHz * 4 )), PM == 1, output SPICLK will be 12.625 MHz! Signed-off-by: Anton Vorontsov Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e24a4d1ee337e3a67a502f3f19cdec3ffc45ad05 Author: Anton Vorontsov Date: Fri Aug 10 13:01:01 2007 -0700 spi_mpc83xx: in "QE mode", use sysclk/2 For MPC8349E input to the SPI Baud Rate Generator is SYSCLK, but it's SYSCLK/2 for MPC8323E (SPI in QE). Fix this, and remove confusion by renaming the mpc83xx_spi->sysclk member as mpc83xx_spi->spibrg. Signed-off-by: Anton Vorontsov Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8dfe9c21a890e0c1214b85d3d90a84187638bf5b Author: Gabriel C Date: Fri Aug 10 13:01:00 2007 -0700 kernel-parameters.txt : watchdog.txt should be wdt.txt Documentation/watchdog/watchdog.txt does not exist, it is Documentation/watchdog/wdt.txt Signed-off-by: Gabriel Craciunescu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6867c9310d5dab6897638a89c7e31addfcb22043 Author: Yasunori Goto Date: Fri Aug 10 13:00:59 2007 -0700 Memory hotplug document This is add a document for memory hotplug to describe "How to use" and "Current status". Signed-off-by: KAMEZAWA Hiroyuki Signed-off-by: Yasunori Goto Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 925796e0ed6fe529770ba71454c58c8d4d8a5ac4 Author: Daniel Ritz Date: Fri Aug 10 13:00:58 2007 -0700 drivers/char/pcmcia/cm40x0_cs.c: fix release function call cm4000_cs.c and cm4040_cs.c call the internal release function with an argument of wrong type. this fixes bug #8485 Signed-off-by: Daniel Ritz Cc: Bill McConnaughey Cc: Natalie Protasevich Cc: Harald Welte Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c5a69adff920ddf138c3ea9886574b195d9e3d52 Author: Rafael J. Wysocki Date: Fri Aug 10 13:00:57 2007 -0700 Hibernation: do not try to mark invalid PFNs as nosave On some systems some PFNs reported by the early initialization code as 'nosave' may be invalid. If we try to set the corresponding bits in the hibernation bitmap, BUG_ON() in memory_bm_find_bit() will be triggered and the system won't be able to boot (cf. https://bugzilla.novell.com/show_bug.cgi?id=296242). Prevent this from happening by verifying if the 'nosave' PFNs are valid in mark_nosave_pages(). Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a75de1b3799f8933d6d2b64bdf31194368ec98ab Author: Ryusuke Konishi Date: Fri Aug 10 13:00:56 2007 -0700 eCryptfs: fix error handling in ecryptfs_init ecryptfs_init() exits without doing any cleanup jobs if ecryptfs_init_messaging() fails. In that case, eCryptfs leaves sysfs entries, leaks memory, and causes an invalid page fault. This patch fixes the problem. Signed-off-by: Ryusuke Konishi Acked-by: Michael Halcrow Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b9a0620779d3714abd63dfc28284f5fa2c1fc091 Author: Gabriel C Date: Fri Aug 10 13:00:56 2007 -0700 linux-audit list is subscribers-only Signed-off-by: Gabriel Craciunescu Cc: David Woodhouse Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 76ceb2f90f6efb6d1f3d88f855428bff947a3483 Author: Alexey Dobriyan Date: Fri Aug 10 13:00:55 2007 -0700 Remove unused struct proc_dir_entry::set After /proc/sys rewrite it was left unused. Signed-off-by: Alexey Dobriyan Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8daec965e7035bbf8d364fe7585bffac7222b87a Author: Lee Schermerhorn Date: Fri Aug 10 13:00:51 2007 -0700 Fix missing numa_zonelist_order sysctl Misplaced #endif is hiding the numa_zonelist_order sysctl when !SECURITY. Signed-off-by: Lee Schermerhorn Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 202a21d6914369c1362f1ab50f0cbe92b9c38718 Author: Ryusuke Konishi Date: Fri Aug 10 13:00:51 2007 -0700 eCryptfs: fix lookup error for special files When ecryptfs_lookup() is called against special files, eCryptfs generates the following errors because it tries to treat them like regular eCryptfs files. Error opening lower file for lower_dentry [0xffff810233a6f150], lower_mnt [0xffff810235bb4c80], and flags [0x8000] Error opening lower_file to read header region Error attempting to read the [user.ecryptfs] xattr from the lower file; return value = [-95] Valid metadata not found in header region or xattr region; treating file as unencrypted For instance, the problem can be reproduced by the steps below. # mkdir /root/crypt /mnt/crypt # mount -t ecryptfs /root/crypt /mnt/crypt # mknod /mnt/crypt/c0 c 0 0 # umount /mnt/crypt # mount -t ecryptfs /root/crypt /mnt/crypt # ls -l /mnt/crypt This patch fixes it by adding a check similar to directories and symlinks. Signed-off-by: Ryusuke Konishi Acked-by: Michael Halcrow Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 60c9834238482f805b1d9e4dc2a780405ddab80f Author: David Howells Date: Fri Aug 10 13:00:50 2007 -0700 FRV: connect up fallocate Connect up the fallocate() system call. Signed-off-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e798bd95b61918e653f3d28f9176237236f2d103 Author: Paul A. Clarke Date: Fri Aug 10 13:00:49 2007 -0700 matroxfb: rectify jitter (G450/G550) This builds upon my previous attempts to resolve some jitter problems seen with the Matrox G450 and G550 -based cards, including odd disparities observed between x86 and Power -based machines in a somewhat less hackish way (removing the hacked ifdefs). Apparently, preference should be given to use the DVI PLL when frequencies permit, the Standard PLL otherwise. The max pixel clock for the panellink interface is extracted from the PInS information on the card and used as a limit to determine which PLL to use. Signed-off-by: Paul A. Clarke Acked-by: Petr Vandrovec Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit acb73865328bd6211a1452f39a4f660d26658918 Author: Adrian McMenamin Date: Fri Aug 10 13:00:48 2007 -0700 pvr2fb: update Documentation/fb/pvr2fb.txt The current version is very old and does not correctly specify how to set the video mode. Signed-off by: Adrian McMenamin Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 306c869c237a66fe85580f60558f105e3305d465 Author: Adrian McMenamin Date: Fri Aug 10 13:00:48 2007 -0700 pvr2fb: Consolidated cleanup of pvr2fb.c - better handling of the pvr2 registers based on more up to date information. Testing shows that it seems to work pretty well at 16bpp, 24bpp and 32bpp - including proper rendering of the boot logo at all levels (previously this was a bit broken even at 16bpp) and giving white against black text. Really detailed testing (eg with X11) requires support for the maple bus - which isn't (currently - next project assuming this is okay) available, but I have no reason to think this is broken. Signed-off by: Adrian McMenamin Acked-by: Paul Mundt Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9cd1c67434544b1d9a4fb4a4cdec15608167a233 Author: Antonino A. Daplas Date: Fri Aug 10 13:00:47 2007 -0700 pvr2fb: Fix oops when pseudo_palette is written Reported by: Adrian McMenamin This driver will oops when the pseudo_palette[] is written as u32 but not when written as u16. When written as u32, it corrupts the adjacent 'mmio_base' field of struct pvr2fb_par. Fix by using framebuffer_alloc()/release() to allocate struct fb_info and struct pvr2fb_par, and create the pseudo_palette[] as part of struct pvr2fb_par. Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4769a9a53b39f3b6a7e4d0b3c5e6b9598560818d Author: Antonino A. Daplas Date: Fri Aug 10 13:00:46 2007 -0700 fbcon: Kill compile warning Fix compile warning ('map_override unused') if fbcon is compiled as a module and CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=n. [akpm@linux-foundation.org: cleanup] Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 04a3f959f691fd3eea42be37bc7a8cf32c1bd899 Author: Helge Deller Date: Fri Aug 10 13:00:45 2007 -0700 stifb: detect cards in double buffer mode more reliably Visualize-EG, Graffiti and A4450A graphics cards on PARISC can be configured in double-buffer and standard mode, but the stifb driver supports standard mode only. This patch detects double-buffered cards more reliable. It is a real bugfix for a very nasty problem for all parisc users which have wrongly configured their graphic card. The problem: The stifb graphics driver will not detect that the card is wrongly configured and then nevertheless just enables the graphics mode, which it shouldn't. In the end, the user will see no further updates / boot messages on the screen. We had documented this problem already on our FAQ (http://parisc-linux.org/faq/index.html#viseg "Why do I get corrupted graphics with my Vis-EG/Graffiti/A4450A card?") but people still run into this problem. So having this fix in as early as possible can help us. Signed-off-by: Helge Deller Signed-off-by: Antonino Daplas Cc: Cc: Kyle McMartin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6a648fa72161d1f6468dabd96c5d3c0db04f598a Author: Badari Pulavarty Date: Fri Aug 10 13:00:44 2007 -0700 direct-io: fix error-path crashes Need to initialize map_bh.b_state to zero. Otherwise, in case of a faulty user-buffer its possible to go into dio_zero_block() and submit a page by mistake - since it checks for buffer_new(). http://marc.info/?l=linux-kernel&m=118551339032528&w=2 akpm: Linus had a (better) patch to just do a kzalloc() in there, but it got lost. Probably this version is better for -stable anwyay. Signed-off-by: Badari Pulavarty Acked-by: Joe Jin Acked-by: Zach Brown Cc: gurudas pai Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b291aa7a6564e859af144e1bd14ffa463519b198 Author: Robin Holt Date: Fri Aug 10 13:00:43 2007 -0700 x86_64: fix HPET init race I have had four seperate system lockups attributable to this exact problem in two days of testing. Instead of trying to handle all the weird end cases and wrap, how about changing it to look for exactly what we appear to want. The following patch removes a couple races in setup_APIC_timer. One occurs when the HPET advances the COUNTER past the T0_CMP value between the time the T0_CMP was originally read and when COUNTER is read. This results in a delay waiting for the counter to wrap. The other results from the counter wrapping. This change takes a snapshot of T0_CMP at the beginning of the loop and simply loops until T0_CMP has changed (a tick has happened). I have one small concern about the patch. I am not sure it meets the intent as well as it should. I think we are trying to match APIC timer interrupts up with the hpet counter increment. The event which appears to be disturbing this loop in our test environment is the NMI watchdog. What we believe has been happening with the existing code is the setup_APIC_timer loop has read the CMP value, and the NMI watchdog code fires for the first time. This results in a series of icache miss slowdowns and by the time we get back to things it has wrapped. I think this code is trying to get the CMP as close to the counter value as possible. If that is the intent, maybe we should really be testing against a "window" around the CMP. Something like COUNTER = CMP+/2. It appears COUNTER should get advanced every 89nSec (IIRC). The above seems like an unreasonably small window, but may be necessary. Without documentation, I am not sure of the original intent with this code. In summary, this code fixes my boot hangs, but since I am not certain of the intent of the existing code, I am not certain this has not introduced new bugs or unexpected behaviors. Signed-off-by: Robin Holt Acked-by: Andi Kleen Cc: Vojtech Pavlik Cc: "Aaron Durbin" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d31c5ab147e0b17b9ec0daa5e4d1fc0bd6b19974 Author: Bryan Wu Date: Fri Aug 10 13:00:42 2007 -0700 Blackfin arch: after removing fs.h from mm.h, fix the broken on Blackfin arch Cc: Alexey Dobriyan Signed-off-by: Bryan Wu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 02a5e0acb3cb85d80d0fe834e366d38a92bbaa22 Author: David Howells Date: Sat Aug 11 22:34:32 2007 +0200 BLOCK: Hide the contents of linux/bio.h if CONFIG_BLOCK=n Hide the contents of linux/bio.h if CONFIG_BLOCK=n as there shouldn't be compiled code that uses it. Signed-off-by: David Howells Cc: James Bottomley Signed-off-by: Andrew Morton Signed-off-by: Jens Axboe commit a6b3a93e15b2925a151e9ae13dcb93ad7b3e48aa Author: Christoph Hellwig Date: Sat Aug 11 22:34:31 2007 +0200 sysace: HDIO_GETGEO has it's own method for ages The way this driver tries to implement HDIO_GETGEO it'll never be called. Then again on ppc it probably will never be called anyway because it's utterly pointless. Signed-off-by: Christoph Hellwig Cc: Grant Likely Signed-off-by: Andrew Morton Signed-off-by: Jens Axboe commit 2e4934aa4586832c35e077191849a06f93e4a9a0 Author: Mariusz Kozlowski Date: Sat Aug 11 22:34:30 2007 +0200 drivers/block/cpqarray.c: better error handling and kmalloc + memset conversion to k[cz]alloc This patch removes some redundant casts, does the kmalloc + memset to k[cz]alloc conversion and it changes the error path to use goto (to avoid code duplication). drivers/block/cpqarray.c | 49567 -> 48623 (-944 bytes) drivers/block/cpqarray.o | 178820 -> 178288 (-532 bytes) Signed-off-by: Mariusz Kozlowski Acked-by: Mike Miller Signed-off-by: Andrew Morton Signed-off-by: Jens Axboe commit 1aebe18787ca2e915eb8204d365ba2484d53223b Author: Mariusz Kozlowski Date: Sat Aug 11 22:34:29 2007 +0200 drivers/block/cciss.c: kmalloc + memset conversion to kzalloc drivers/block/cciss.c | 104285 -> 104168 (-117 bytes) drivers/block/cciss.o | 277400 -> 277124 (-276 bytes) Signed-off-by: Mariusz Kozlowski Acked-by: Mike Miller Signed-off-by: Andrew Morton Signed-off-by: Jens Axboe commit 9b99628f8e9e0b5f5ecacce558defe529a6e00c1 Author: Jesper Juhl Date: Sat Aug 11 22:34:27 2007 +0200 Clean up duplicate includes in drivers/block/ This patch cleans up duplicate includes in drivers/block/ Signed-off-by: Jesper Juhl Acked-by: Stephen Rothwell Cc: Satyam Sharma Signed-off-by: Andrew Morton Signed-off-by: Jens Axboe commit c7149d6bce2561aeaa48caaa1700aa8b3b22008f Author: Alan D. Brunelle Date: Tue Aug 7 15:30:23 2007 +0200 Fix remap handling by blktrace This patch provides more information concerning REMAP operations on block IOs. The additional information provides clearer details at the user level, and supports post-processing analysis in btt. o Adds in partition remaps on the same device. o Fixed up the remap information in DM to be in the right order o Sent up mapped-from and mapped-to device information Signed-off-by: Alan D. Brunelle Signed-off-by: Jens Axboe commit ec05b297f91a443aa26b74059b573bfad49c9ebb Author: Adrian Bunk Date: Mon Jul 30 08:24:27 2007 +0200 [PATCH] remove mm/filemap.c:file_send_actor() This patch removes the no longer used file_send_actor(). Signed-off-by: Adrian Bunk Signed-off-by: Jens Axboe commit 5167e75f4d2d10bff6afee1f358313e87b4df246 Author: Ingo Molnar Date: Fri Aug 10 23:05:11 2007 +0200 sched debug: dont print kernel address in /proc/sched_debug Arjan van de Ven pointed out that we should not print kernel addresses in world-readable /proc files - fix that. Signed-off-by: Ingo Molnar Signed-off-by: Arjan van de Ven commit e56f31aad9d8c0102bc074cdab4e3ee76b38600d Author: Ingo Molnar Date: Fri Aug 10 23:05:11 2007 +0200 sched: fix typo in the FAIR_GROUP_SCHED branch while there's no in-tree way to turn group scheduling at the moment, fix a typo in it nevertheless. Signed-off-by: Ingo Molnar commit 529c77261bccd9d37f110f58b0753d95beaa9fa2 Author: Ingo Molnar Date: Fri Aug 10 23:05:11 2007 +0200 sched: improve rq-clock overflow logic improve the rq-clock overflow logic: limit the absolute rq->clock delta since the last scheduler tick, instead of limiting the delta itself. tested by Arjan van de Ven - whole laptop was misbehaving due to an incorrectly calibrated cpu_khz confusing sched_clock(). Signed-off-by: Ingo Molnar Signed-off-by: Arjan van de Ven commit cbea66d9788a344e16e161f22a6e0c4deef2c0ed Author: Melissa Howland Date: Fri Aug 10 14:32:35 2007 +0200 [S390] monwriter: Serialization bug for multithreaded applications. Locking added so that multithreaded applications can now do writes from different threads without the risk of storage corruption. Signed-off-by: Melissa Howland Signed-off-by: Martin Schwidefsky commit 3eed13cc3beaa9ee07b126a662def88f7281394e Author: Michael Holzheu Date: Fri Aug 10 14:32:34 2007 +0200 [S390] vmur: diag14 only works with buffers below 2GB If memory buffers above 2GB are used, diagnose 14 raises a specification exception. This fix ensures that buffer allocation is done below the 2GB boundary. Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky commit 4eac34529bce2b4cca9be90a6903c965baa8193c Author: Michael Holzheu Date: Fri Aug 10 14:32:33 2007 +0200 [S390] vmur: add "top of queue" sanity check for reader open If the z/VM reader is already open, it can happen that after opening the Linux reader device, not the topmost file is processed. According the semantics of the Linux z/VM unit record device driver, always the topmost file has to be processed. With this fix an error is returned if that is not the case. Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky commit f2405598e0678e9c93dd780f2a12fc562ece3d13 Author: Michael Holzheu Date: Fri Aug 10 14:32:32 2007 +0200 [S390] vmur: reject open on z/VM reader files with status HOLD If a reader file with HOLD status is at the top of the reader queue, currently all read requests will return data of the second file in the queue. But the semantics of vmur is that always the topmost file is read. With this fix -EPERM is returned on open, if the topmost reader file is in HOLD status. Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky commit 278bc68c4bfcd1af97972f5c4458acf3b9b19c37 Author: Heiko Carstens Date: Fri Aug 10 14:32:31 2007 +0200 [S390] vmur: use DECLARE_COMPLETION_ONSTACK to keep lockdep happy INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. 000000000ff9fb08 000000000ff9fb18 0000000000000002 0000000000000000 000000000ff9fbb8 000000000ff9fb30 000000000ff9fb30 0000000000104198 0000000000000000 0000000000000002 0000000000000000 0000000000000000 000000000ff9fb18 000000000000000c 000000000ff9fb18 000000000ff9fb88 0000000000448db0 0000000000104198 000000000ff9fb18 000000000ff9fb68 Call Trace: ([<00000000001040ea>] show_trace+0x12e/0x170) [<00000000001041f2>] show_stack+0xc6/0xf8 [<0000000000104252>] dump_stack+0x2e/0x3c [<0000000000155f9c>] __lock_acquire+0x460/0x1048 [<0000000000156c16>] lock_acquire+0x92/0xb8 [<000000000043f406>] _spin_lock_irqsave+0x62/0x80 [<0000000000121382>] complete+0x32/0x78 [<000000001082b468>] ur_int_handler+0xc8/0xec [vmur] [<0000000000313216>] ccw_device_call_handler+0xae/0xd4 [<0000000000310da4>] ccw_device_irq+0x5c/0x130 [<0000000000312c84>] io_subchannel_irq+0x8c/0x118 [<000000000030a88c>] do_IRQ+0x16c/0x194 [<0000000000111a62>] io_no_vtime+0x16/0x1c [<0000000080001394>] 0x80001394 Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 1eade380c5f3e69348531ade5e9f9c5ae6485874 Author: Michael Holzheu Date: Fri Aug 10 14:32:30 2007 +0200 [S390] vmur: allocate single record buffers instead of one big data buffer vmur allocates one contiguous kernel buffer to copy user data when creating ccw programs for punch or printer. If big block sizes are used, under memory pressure it can happen, that we do not get memory in one chunk. Now we allocate memory for each single record to avoid high order allocations. Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky commit 6d740a438fcb8775008dfd3fc18df7f7a0ca2e12 Author: Heiko Carstens Date: Fri Aug 10 14:32:29 2007 +0200 [S390] remove DEFAULT_MIGRATION_COST 0437e109e1841607f2988891eaa36c531c6aa6ac removes the migration cost init code. Remove the s390 leftovers as well. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit c6d0e8014a59b641c0669cf5df151667144f220e Author: Heiko Carstens Date: Fri Aug 10 14:32:28 2007 +0200 [S390] qdio: make sure data structures are correctly aligned. The slsb structure contained at the beginning of the qdio_q structure must start on a 256 byte boundary. To make sure this is the case even if slab debugging is turned on create an own slab cache for qdio_q structures. Besides that don't use the slab allocator to allocate whole pages. Use the page allocator instead. Also fix a few memory leaks in error handling code. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit b01af5ba9105094ba4f1af60da8f7be44321a0c7 Author: Michael Holzheu Date: Fri Aug 10 14:32:27 2007 +0200 [S390] hypfs: implement show_options Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky commit 5693ce6f9b9f08942e55e3825db014f8b1205772 Author: Cornelia Huck Date: Fri Aug 10 14:32:26 2007 +0200 [S390] cio: avoid memory leak on error in css_alloc_subchannel(). sch->lock has been allocated in cio_validate_subchannel(), it must be freed if cio_modify() fails. Signed-off-by: Cornelia Huck Signed-off-by: Martin Schwidefsky commit d1f5a77f2c9db5b8a565eabdf8b534b02e32cc44 Author: Benjamin Herrenschmidt Date: Wed Aug 8 15:44:15 2007 +1000 [POWERPC] Fix size check for hugetlbfs My "slices" address space management code that was added in the 2.6.22 implementation of get_unmapped_area() doesn't properly check that the size is a multiple of the requested page size. This allows userland to create VMAs that aren't a multiple of the huge page size with hugetlbfs (since hugetlbfs entirely relies on get_unmapped_area() to do that checking) which leads to a kernel BUG() when such areas are torn down. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit 8f2ea1fd3f97ab7a809e939b5b9005a16f862439 Author: Benjamin Herrenschmidt Date: Tue Aug 7 08:05:10 2007 +1000 [POWERPC] Fix initialization and usage of dma_mask powerpc has a couple of bugs in the usage of dma_masks that tend to break when drivers explicitly try to set a 32-bit mask for example. First, the code that generates the pci devices from the OF device-tree doesn't initialize the mask properly, then our implementation of set_dma_mask() was trying to validate the -previous- mask value, not the one passed in as an argument. This fixes these problems. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit 939e60f6808a9ffd3a4e5f145057379c138c89aa Author: Stephen Rothwell Date: Tue Jul 31 16:44:13 2007 +1000 [POWERPC] Fix more section mismatches in head_64.S WARNING: vmlinux.o(.text+0x8174): Section mismatch: reference to .init.text:.prom_init (between '.__boot_from_prom' and '.__after_prom_start') WARNING: vmlinux.o(.text+0x8498): Section mismatch: reference to .init.text:.early_setup (between '.start_here_multiplatform' and '.start_here_common') WARNING: vmlinux.o(.text+0x8514): Section mismatch: reference to .init.text:.setup_system (between '.start_here_common' and 'system_call_common') WARNING: vmlinux.o(.text+0x8530): Section mismatch: reference to .init.text:.start_kernel (between '.start_here_common' and 'system_call_common') Signed-off-by: Stephen Rothwell Acked-by: Geert Uytterhoeven Signed-off-by: Paul Mackerras commit 3c5ede8cc6c75c3d85e46a5c20f106bcec933347 Author: Kim Phillips Date: Thu Jul 26 17:25:12 2007 -0500 [POWERPC] Revert "[POWERPC] Add 'mdio' to bus scan id list for platforms with QE UEC" This reverts commit 3baee955953957be5496cd28e9c544d9db214262. That commit was a mistake from the start; I added mdio type to the bus scan list early on in my ucc_geth migrate to phylib development, which is just pure wrong (the ucc_geth_mii driver creates the mii bus and the PHY layer handles PHY enumeration without translation). This follows on from commit 77926826f301fbd8ed96d3cd9ff17a5b59560dfb: Revert "[POWERPC] Don't complain if size-cells == 0 in prom_parse()" which was basically trying to hide a symptom of the original mistake this revert fixes. Signed-off-by: Kim Phillips Signed-off-by: Paul Mackerras commit bd948b0377e7ab93559a80f68d38749bcc2e9a77 Author: geoffrey.levand@am.sony.com Date: Tue Aug 7 20:31:22 2007 -0700 [POWERPC] PS3: Update ps3_defconfig Update ps3_defconfig. Signed-off-by: Geoff Levand Signed-off-by: Paul Mackerras commit 332a7b3e93c6521219be0a72ebfe2eee795a8345 Author: Geoff Levand Date: Wed Aug 8 09:39:02 2007 -0700 [POWERPC] PS3: Remove text saying PS3 support is incomplete Remove the Kconfig message that indicates the PS3 platform support is incomplete. Signed-off-by: Geoff Levand Signed-off-by: Paul Mackerras commit edd2a9d185799354db255de62c3ed1f2b1c6b0f4 Author: Geert Uytterhoeven Date: Wed Aug 8 11:01:21 2007 -0700 [POWERPC] PS3: Fix storage probe logic Fix the PS3 storage probe logic to properly find device regions on cold startup. o Change the storage probe event mask from notify_device_ready to notify_region_update. o Improve the storage probe error handling. o Change ps3_storage_wait_for_device() to use a temporary variable to hold the buffer address. Signed-off-by: Geert Uytterhoeven Signed-off-by: Geoff Levand Signed-off-by: Paul Mackerras commit f5996449e3244524cab0ba709a4bd87047a8175f Author: Andre Detsch Date: Fri Aug 3 18:53:46 2007 -0700 [POWERPC] cell: Move SPU affinity init to spu_management_of_ops This patch moves affinity initialization code from spu_base.c to a new spu_management_of_ops function (init_affinity), which is empty in the case of PS3. This fixes a linking problem that was happening when compiling for PS3. Also, some small code style changes were made. Signed-off-by: Andre Detsch Signed-off-by: Geoff Levand Acked-by: Arnd Bergmann Signed-off-by: Paul Mackerras commit edd0622bd2e8f755c960827e15aa6908c3c5aa94 Author: Paul Mackerras Date: Fri Aug 10 21:04:07 2007 +1000 [POWERPC] Fix potential duplicate entry in SLB shadow buffer We were getting a duplicate entry in the SLB shadow buffer in slb_flush_and_rebolt() if the kernel stack was in the same segment as PAGE_OFFSET, which on POWER6 causes the hypervisor to terminate the partition with an error. This fixes it. Also we were not creating an SLB entry (or an SLB shadow buffer entry) for the kernel stack on secondary CPUs when starting the CPU. This isn't a major problem, since an appropriate entry will be created on demand, but this fixes that also for consistency. Signed-off-by: Paul Mackerras commit ac07860264bd2b18834d3fa3be47032115524cea Author: Jesper Juhl Date: Wed Aug 8 16:31:30 2007 -0700 SLUB: Fix format specifier in Documentation/vm/slabinfo.c There's a little problem in Documentation/vm/slabinfo.c The code is using "%d" in a printf() call to print an 'unsigned long'. This patch corrects it to use "%lu" instead. Signed-off-by: Jesper Juhl Signed-off-by: Christoph Lameter commit 1ceef40249f21eceabf8633934d94962e7d8e1d7 Author: Christoph Lameter Date: Tue Aug 7 15:11:48 2007 -0700 SLUB: Fix dynamic dma kmalloc cache creation The dynamic dma kmalloc creation can run into trouble if a GFP_ATOMIC allocation is the first one performed for a certain size of dma kmalloc slab. - Move the adding of the slab to sysfs into a workqueue (sysfs does GFP_KERNEL allocations) - Do not call kmem_cache_destroy() (uses slub_lock) - Only acquire the slub_lock once and--if we cannot wait--do a trylock. This introduces a slight risk of the first kmalloc(x, GFP_DMA|GFP_ATOMIC) for a range of sizes failing due to another process holding the slub_lock. However, we only need to acquire the spinlock once in order to establish each power of two DMA kmalloc cache. The possible conflict is with the slub_lock taken during slab management actions (create / remove slab cache). It is rather typical that a driver will first fill its buffers using GFP_KERNEL allocations which will wait until the slub_lock can be acquired. Drivers will also create its slab caches first outside of an atomic context before starting to use atomic kmalloc from an interrupt context. If there are any failures then they will occur early after boot or when loading of multiple drivers concurrently. Drivers can already accomodate failures of GFP_ATOMIC for other reasons. Retries will then create the slab. Signed-off-by: Christoph Lameter commit fcda3d89bf1366f6801447eab2d8a75ac5b9c4ce Author: Christoph Lameter Date: Mon Jul 30 13:06:46 2007 -0700 SLUB: Remove checks for MAX_PARTIAL from kmem_cache_shrink The MAX_PARTIAL checks were supposed to be an optimization. However, slab shrinking is a manually triggered process either through running slabinfo or by the kernel calling kmem_cache_shrink. If one really wants to shrink a slab then all operations should be done regardless of the size of the partial list. This also fixes an issue that could surface if the number of partial slabs was initially above MAX_PARTIAL in kmem_cache_shrink and later drops below MAX_PARTIAL through the elimination of empty slabs on the partial list (rare). In that case a few slabs may be left off the partial list (and only be put back when they are empty). Signed-off-by: Christoph Lameter commit e0dceaf0a4b8c55076a4dbcba7ac8b05755f5cc6 Author: Mark Fasheh Date: Thu Aug 9 16:52:30 2007 -0700 ocfs2: set non-default s_time_gran during mount We need to manually set this to '1' during mount, otherwise inode_setattr() will chop off the nanosecond portion of our timestamps. Signed-off-by: Mark Fasheh commit ce17204ae633001ef41318d487282730e96b9522 Author: Sunil Mushran Date: Mon Jul 30 11:02:50 2007 -0700 ocfs2: Retry sendpage() if it returns EAGAIN Instead of treating EAGAIN, returned from sendpage(), as an error, this patch retries the operation. Signed-off-by: Sunil Mushran Signed-off-by: Mark Fasheh commit 480214d71f1972756473415d31953647952400fb Author: Sunil Mushran Date: Mon Aug 6 15:11:56 2007 -0700 ocfs2: Fix rename/extend race If one process is extending a file while another is renaming it, there exists a window when rename could flush the old inode's stale i_size to disk. This patch recognizes the fact that rename is only updating the old inode's ctime, so it ensures only that value is flushed to disk. Signed-off-by: Sunil Mushran Signed-off-by: Mark Fasheh commit 6a18380e7ddd7d1a0493efe3be6475dd92323364 Author: Adrian Bunk Date: Mon Jul 23 10:01:21 2007 +0200 [2.6 patch] ocfs2_insert_extent(): remove dead code This patch removes some now dead code. Spotted by the Coverity checker. Signed-off-by: Adrian Bunk Signed-off-by: Mark Fasheh commit 5a25403175b8a945e93fc9c64ae9cf54f5730add Author: Mark Fasheh Date: Fri Jul 20 12:56:16 2007 -0700 ocfs2: Fix max offset calculations ocfs2_max_file_offset() was over-estimating the largest file size for several cases. This wasn't really a problem before, but now that we support sparse files, it needs to be more accurate. Signed-off-by: Mark Fasheh commit ce76fd30ce98cdaeb38dca0dfbb3fa6d2801c5ce Author: Mark Fasheh Date: Fri Jul 20 12:02:14 2007 -0700 ocfs2: check ia_size limits in setattr We have to manually check the requested truncate size as the check in vmtruncate() comes too late for Ocfs2. Signed-off-by: Mark Fasheh commit 7c08d70c69150148c14f02633855f1591219c37c Author: Mark Fasheh Date: Fri Jul 20 11:58:36 2007 -0700 ocfs2: Fix some casting errors related to file writes ocfs2_align_clusters_to_page_index() needs to cast the clusters shift to pgoff_t and ocfs2_file_buffered_write() needs loff_t when calculating destination start for memcpy. Signed-off-by: Mark Fasheh commit a00cce356b5592208e761525a48a25902322cce9 Author: Mark Fasheh Date: Fri Jul 20 11:28:30 2007 -0700 ocfs2: use s_maxbytes directly in ocfs2_change_file_space() There's no need to recalculate things via ocfs2_max_file_offset() as we've already done that to fill s_maxbytes, so use that instead. We can also un-export ocfs2_max_file_offset() then. Signed-off-by: Mark Fasheh commit c11e9fafb398411af7558fca913c2fa4a10b1f48 Author: Mark Fasheh Date: Fri Jul 20 11:24:53 2007 -0700 ocfs2: Restrict inode changes in ocfs2_update_inode_atime() ocfs2_update_inode_atime() calls ocfs2_mark_inode_dirty() to push changes from the struct inode into the ocfs2 disk inode. The problem is, ocfs2_mark_inode_dirty() might change other fields, depending on what happened to the struct inode. Since we don't always have locking to serialize changes to other fields (like i_size, etc), just fix things up to only touch the atime field. Signed-off-by: Mark Fasheh commit b3e5f2634ad64dac43638d3d9d449bb432aa9e73 Author: Dan Williams Date: Tue Aug 7 10:26:35 2007 -0700 async_tx: update MAINTAINERS for async_tx and iop-adma Also, rename the dma engine entry since it is now a generic offload engine subsystem, not just memcpy. Signed-off-by: Dan Williams Signed-off-by: Shannon Nelson commit 6adb31c90c47262c8a25bf5097de9b3426caf3ae Author: Alan Cox Date: Thu Aug 9 00:57:54 2007 +0100 remove dubious legal statment from uio-howto UIO currently contains a rather dubious statement which wants removing. The actual questions around whether user space code that depends tightly on kernel GPL code designed to co-work with it are derivative works of the kernel is extremely complex, and since we don't have space for either a masters length essay on legal issues or need to start flamewars lets simply remove the comment and leave law to lawyers Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 620b5e68ee89ba1d3f017056857459dc21be8c7b Author: Richard Henderson Date: Wed Aug 8 13:17:08 2007 -0700 Fix Alpha O_CLOEXEC definition The default definition in asm-generic conflicts with Alpha's O_DIRECT, so, like several other arches, it needs to be redefined. Signed-off-by: Richard Hendersion Signed-off-by: Linus Torvalds commit 6a0ed91e361a93ee1efb4c20c4967024ed2a8dd7 Author: Artem Bityutskiy Date: Tue Aug 7 23:43:14 2007 +0300 hexdump: use const notation Trivial fix: mark the buffer to hexdump as const so callers could avoid casting their const buffers when calling print_hex_dump(). The patch is really trivial and I suggest to consider it as a fix (it fixes GCC warnings) and push it to current tree. Signed-off-by: Artem Bityutskiy Signed-off-by: Linus Torvalds commit e3bcf5e2785aa49f75f36a8d27d601891a7ff12b Author: Ronald G. Minnich Date: Thu Aug 9 21:07:24 2007 +1000 lguest: avoid shared libraries mapped over guest memory Some versions of ld.so mmap the shared libraries right in over guest memory, so compile lguest statically by default. [ FC7 maps shared libraries very low, where the launcher maps guest's physical memory. Quick fix is to link Launcher static, real fix is for 2.6.24. ] -static is a simple fix. I expect this problem will be more common than we like, as different distro's make different "improvements" to ld.so Signed-off-by: Ronald G. Minnich Signed-off-by: Rusty Russell Signed-off-by: Linus Torvalds commit 0d027c01cd36b8cff727c78d2e40d334ba9895a8 Author: Rusty Russell Date: Thu Aug 9 20:57:13 2007 +1000 lguest: Fix Malicious Guest GDT Host Crash If a Guest makes hypercall which sets a GDT entry to not present, we currently set any segment registers using that GDT entry to 0. Unfortunately, this is not sufficient: there are other ways of altering GDT entries which will cause a fault. The correct solution to do what Linux does: let them set any GDT value they want and handle the #GP when popping causes a fault. This has the added benefit of making our Switcher slightly more robust in the case of any other bugs which cause it to fault. We kill the Guest if it causes a fault in the Switcher: it's the Guest's responsibility to make sure it's not using segments when it changes them. Signed-off-by: Rusty Russell Signed-off-by: Linus Torvalds commit 37250097e1b730c30da1790e354c0da65e617043 Author: Rusty Russell Date: Thu Aug 9 20:52:35 2007 +1000 Fix non-TSC guest clocksource lockup lguest uses a host-supplied wallclock-based clocksource when the TSC is not reliable. As this is already in nanoseconds, I naively used a multiplier of 1 and a shift of 0. But update_wall_time() in its infinite wisdom decides to adjust the clock a little (where does it think it's getting a more accurate time from?) It will happily tweak the multiplier... to 0, then -1. So the "fix" is to use a shift of 22 like everyone else, and a multiplier of 1 << 22. Signed-off-by: Rusty Russell Signed-off-by: Linus Torvalds commit 88ffc3505988196ef5cfdc0278ad89025c2a7b1a Author: Linus Torvalds Date: Thu Aug 9 08:10:16 2007 -0700 Revert "genirq: temporary fix for level-triggered IRQ resend" This reverts commit 0fc4969b866671dfe39b1a9119d0fdc7ea0f63e5. It was always meant to be temporary, but it's generating more useless noise than anything else, and we probably should never have done it in the generic kernel (only had the people involved test it on their own). Signed-off-by: Linus Torvalds commit 37b758e8bcf705a1bc6fd94bfc53ded2d506116c Author: Nicolas Ferre Date: Wed Aug 8 12:01:44 2007 +0200 mmc: at91_mci: remove whitespace at the end of lines Some cleanup with whitespace/tab at the end of lines. Signed-off-by: Nicolas Ferre Signed-off-by: Pierre Ossman commit aafabfab26bf4968b5c6423a3c53e920ae8fa406 Author: Pierre Ossman Date: Thu Aug 9 14:28:02 2007 +0200 mmc: reorganize bounce buffer init Reorganize the code that initializes mmc_block's bounce buffer in order to avoid warnings when MMC_BLOCK_BOUNCE isn't used. Signed-off-by: Pierre Ossman commit b3627bb19f8f0ca12136d985d4d73c437cba0e14 Author: Gabriel C Date: Thu Aug 2 20:20:44 2007 +0200 wbsd: fix section mismatch warnings This patch fixes the following section mismatch warnings ... WARNING: vmlinux.o(.init.text+0x29d40): Section mismatch: reference to .exit.text:wbsd_release_resources (between 'wbsd_init' and 'wbsd_probe') WARNING: vmlinux.o(.init.text+0x29d49): Section mismatch: reference to .exit.text:wbsd_free_mmc (between 'wbsd_init' and 'wbsd_probe') WARNING: vmlinux.o(.init.text+0x29f28): Section mismatch: reference to .exit.text:wbsd_free_mmc (between 'wbsd_init' and 'wbsd_probe') ... Signed-off-by: Gabriel Craciunescu Acked-by: Sam Ravnborg Signed-off-by: Pierre Ossman commit 7cff8cf61cac15fa29a1ca802826d2bcbca66152 Author: Ingo Molnar Date: Thu Aug 9 11:16:52 2007 +0200 sched: refine negative nice level granularity refine the granularity of negative nice level tasks: let them reschedule more often to offset the effect of them consuming their wait_runtime proportionately slower. (This makes nice-0 task scheduling smoother in the presence of negatively reniced tasks.) Signed-off-by: Ingo Molnar commit a69edb55605117cc0f20aa36c49c20b96590774d Author: Ingo Molnar Date: Thu Aug 9 11:16:52 2007 +0200 sched: fix update_stats_enqueue() reniced codepath the key has to be rescaled to /weight even if it has a positive value. (this change only affects the scheduling of reniced tasks) Signed-off-by: Ingo Molnar commit 194081ebfaa8c7d16133e08dd79254910c20c6ff Author: Ingo Molnar Date: Thu Aug 9 11:16:51 2007 +0200 sched: round a bit better round a tiny bit better in high-frequency rescheduling scenarios, by rounding around zero instead of rounding down. (this is pretty theoretical though) Signed-off-by: Ingo Molnar commit 254753dc321ea2b753ca9bc58ac329557a20efac Author: Ingo Molnar Date: Thu Aug 9 11:16:51 2007 +0200 sched: make the multiplication table more accurate do small deltas in the weight and multiplication constant table so that the worst-case numeric error is better than 1:100000000. (8 digits) the current error table is: nice mult * inv_mult error ------------------------------------------ -20: 88761 * 48388 -0.0000000065 -19: 71755 * 59856 -0.0000000037 -18: 56483 * 76040 0.0000000056 -17: 46273 * 92818 0.0000000042 -16: 36291 * 118348 -0.0000000065 -15: 29154 * 147320 -0.0000000037 -14: 23254 * 184698 -0.0000000009 -13: 18705 * 229616 -0.0000000037 -12: 14949 * 287308 -0.0000000009 -11: 11916 * 360437 -0.0000000009 -10: 9548 * 449829 -0.0000000009 -9: 7620 * 563644 -0.0000000037 -8: 6100 * 704093 0.0000000009 -7: 4904 * 875809 0.0000000093 -6: 3906 * 1099582 -0.0000000009 -5: 3121 * 1376151 -0.0000000058 -4: 2501 * 1717300 0.0000000009 -3: 1991 * 2157191 -0.0000000035 -2: 1586 * 2708050 0.0000000009 -1: 1277 * 3363326 0.0000000014 0: 1024 * 4194304 0.0000000000 1: 820 * 5237765 0.0000000009 2: 655 * 6557202 0.0000000033 3: 526 * 8165337 -0.0000000079 4: 423 * 10153587 0.0000000012 5: 335 * 12820798 0.0000000079 6: 272 * 15790321 0.0000000037 7: 215 * 19976592 -0.0000000037 8: 172 * 24970740 -0.0000000037 9: 137 * 31350126 -0.0000000079 10: 110 * 39045157 -0.0000000061 11: 87 * 49367440 -0.0000000037 12: 70 * 61356676 0.0000000056 13: 56 * 76695844 -0.0000000075 14: 45 * 95443717 -0.0000000072 15: 36 * 119304647 -0.0000000009 16: 29 * 148102320 -0.0000000037 17: 23 * 186737708 -0.0000000028 18: 18 * 238609294 -0.0000000009 19: 15 * 286331153 -0.0000000002 Signed-off-by: Ingo Molnar commit 6e82a3befe91423e501c2124312bd805be0048eb Author: Ingo Molnar Date: Thu Aug 9 11:16:51 2007 +0200 sched: optimize update_rq_clock() calls in the load-balancer optimize update_rq_clock() calls in the load-balancer: update them right after locking the runqueue(s) so that the pull functions do not have to call it. Signed-off-by: Ingo Molnar commit 2daa357705bfe68788132cf9079930ca948a90af Author: Ingo Molnar Date: Thu Aug 9 11:16:51 2007 +0200 sched: optimize activate_task() optimize activate_task() by removing update_rq_clock() from it. (and add update_rq_clock() to all callsites of activate_task() that did not have it before.) Signed-off-by: Ingo Molnar commit c3b64f1e4f772418a649bb8e3b39fcea6c358330 Author: Ingo Molnar Date: Thu Aug 9 11:16:51 2007 +0200 sched: clean up set_curr_task_fair() clean up set_curr_task_fair(). ( identity transformation that causes no change in functionality. ) text data bss dec hex filename 39170 3750 36 42956 a7cc sched.o.before 39170 3750 36 42956 a7cc sched.o.after Signed-off-by: Ingo Molnar commit d9e0e6aa6d72df21ff190962c842e027fca0e009 Author: Ingo Molnar Date: Thu Aug 9 11:16:51 2007 +0200 sched: remove __update_rq_clock() call from entity_tick() remove __update_rq_clock() call from entity_tick(). no change in functionality because scheduler_tick() already calls __update_rq_clock(). Signed-off-by: Ingo Molnar commit 546fe3c909b0a4235c7237c210da483eaaac1edc Author: Ingo Molnar Date: Thu Aug 9 11:16:51 2007 +0200 sched: move the __update_rq_clock() call to scheduler_tick() move the __update_rq_clock() call from update_cpu_load() to scheduler_tick(). ( identity transformation that causes no change in functionality. ) this allows the direct use of rq->clock in ->task_tick() functions. Signed-off-by: Ingo Molnar commit a48da48b403319918a587be8b5d46fe1d186c2ac Author: Ingo Molnar Date: Thu Aug 9 11:16:51 2007 +0200 sched debug: remove the 'u64 now' parameter from print_task()/_rq() remove the 'u64 now' parameter from sched_debug.c:print_task()/_rq(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit bdd4dfa89c1e3e1379729b9edec1526b3ecc25ec Author: Ingo Molnar Date: Thu Aug 9 11:16:51 2007 +0200 sched: remove the 'u64 now' local variables final step: remove all (now superfluous) 'u64 now' variables. ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit 2e1cb74a501c4b1bca5e55dabff24f267349193c Author: Ingo Molnar Date: Thu Aug 9 11:16:49 2007 +0200 sched: remove the 'u64 now' parameter from deactivate_task() remove the 'u64 now' parameter from deactivate_task(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit 69be72c13db0e9165796422b544f989033146171 Author: Ingo Molnar Date: Thu Aug 9 11:16:49 2007 +0200 sched: remove the 'u64 now' parameter from dequeue_task() remove the 'u64 now' parameter from dequeue_task(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit 8159f87e2bfeeba8887b8ef34f7b523958910132 Author: Ingo Molnar Date: Thu Aug 9 11:16:49 2007 +0200 sched: remove the 'u64 now' parameter from enqueue_task() remove the 'u64 now' parameter from enqueue_task(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit db53181e41728cfd58336925422dc17f1d2c655c Author: Ingo Molnar Date: Thu Aug 9 11:16:49 2007 +0200 sched: remove the 'u64 now' parameter from dec_nr_running() remove the 'u64 now' parameter from dec_nr_running(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit e5fa2237b53d751c59f773a68e1b12c411f0b19b Author: Ingo Molnar Date: Thu Aug 9 11:16:49 2007 +0200 sched: remove the 'u64 now' parameter from inc_nr_running() remove the 'u64 now' parameter from inc_nr_running(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit 79b5dddf831b4719b7ec8dfcfb9bf9c619805b9c Author: Ingo Molnar Date: Thu Aug 9 11:16:49 2007 +0200 sched: remove the 'u64 now' parameter from dec_load() remove the 'u64 now' parameter from dec_load(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit 29b4b623fe8163ca3c1da125da81234d41c8a3db Author: Ingo Molnar Date: Thu Aug 9 11:16:49 2007 +0200 sched: remove the 'u64 now' parameter from inc_load() remove the 'u64 now' parameter from inc_load(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit 84a1d7a2f91d2f26d21026973dbf3023d17c701f Author: Ingo Molnar Date: Thu Aug 9 11:16:49 2007 +0200 sched: remove the 'u64 now' parameter from update_curr_load() remove the 'u64 now' parameter from update_curr_load(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit ee0827d8b5271094380410cf21d8c48c109a773a Author: Ingo Molnar Date: Thu Aug 9 11:16:49 2007 +0200 sched: remove the 'u64 now' parameter from ->task_new() remove the 'u64 now' parameter from ->task_new(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit 31ee529cc2254e8b62880535ec8f21a4c5e1c091 Author: Ingo Molnar Date: Thu Aug 9 11:16:49 2007 +0200 sched: remove the 'u64 now' parameter from ->put_prev_task() remove the 'u64 now' parameter from ->put_prev_task(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit ff95f3df54609d9d4b9572f8a67d09922a645043 Author: Ingo Molnar Date: Thu Aug 9 11:16:49 2007 +0200 sched: remove the 'u64 now' parameter from pick_next_task() remove the 'u64 now' parameter from pick_next_task(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit fb8d47240246e20f864f0724a23a7220cd1c59ac Author: Ingo Molnar Date: Thu Aug 9 11:16:48 2007 +0200 sched: remove the 'u64 now' parameter from ->pick_next_task() remove the 'u64 now' parameter from ->pick_next_task(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit f02231e51a280f1a0fee4d03ad8f50048e06cced Author: Ingo Molnar Date: Thu Aug 9 11:16:48 2007 +0200 sched: remove the 'u64 now' parameter from ->dequeue_task() remove the 'u64 now' parameter from ->dequeue_task(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit fd390f6a04f22fb457d6fd1855964f79536525de Author: Ingo Molnar Date: Thu Aug 9 11:16:48 2007 +0200 sched: remove the 'u64 now' parameter from ->enqueue_task() remove the 'u64 now' parameter from ->enqueue_task(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit f1e14ef64d3e1bdcb3437f1e926fe5a7f861aa0a Author: Ingo Molnar Date: Thu Aug 9 11:16:48 2007 +0200 sched: remove the 'u64 now' parameter from update_curr_rt() remove the 'u64 now' parameter from update_curr_rt(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit ab6cde2692c76b88ea430aa188ea50303216a955 Author: Ingo Molnar Date: Thu Aug 9 11:16:48 2007 +0200 sched: remove the 'u64 now' parameter from put_prev_entity() remove the 'u64 now' parameter from put_prev_entity(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit 9948f4b2a728e9ca4928a9a97eb09df955f5b17c Author: Ingo Molnar Date: Thu Aug 9 11:16:48 2007 +0200 sched: remove the 'u64 now' parameter from pick_next_entity() remove the 'u64 now' parameter from pick_next_entity(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit 8494f412edecbdbc36105e0a08f80d05a14dde2c Author: Ingo Molnar Date: Thu Aug 9 11:16:48 2007 +0200 sched: remove the 'u64 now' parameter from set_next_entity() remove the 'u64 now' parameter from set_next_entity(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit 525c2716a41d3e87387b32c5b0868acb52cbb559 Author: Ingo Molnar Date: Thu Aug 9 11:16:48 2007 +0200 sched: remove the 'u64 now' parameter from dequeue_entity() remove the 'u64 now' parameter from dequeue_entity(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit 668031ca8fa2cc565f325f4fb69f131af449b7a7 Author: Ingo Molnar Date: Thu Aug 9 11:16:48 2007 +0200 sched: remove the 'u64 now' parameter from enqueue_entity() remove the 'u64 now' parameter from enqueue_entity(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit 2396af69bec0ba3274383c20de7a31acf7c74b7a Author: Ingo Molnar Date: Thu Aug 9 11:16:48 2007 +0200 sched: remove the 'u64 now' parameter from enqueue_sleeper() remove the 'u64 now' parameter from enqueue_sleeper(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit dfdc119e54f44cba70ebe1f565767d3d0640d19f Author: Ingo Molnar Date: Thu Aug 9 11:16:48 2007 +0200 sched: remove the 'u64 now' parameter from __enqueue_sleeper() remove the 'u64 now' parameter from __enqueue_sleeper(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit c7e9b5b293106c8dd6b1ca968d24f10fa919f6fd Author: Ingo Molnar Date: Thu Aug 9 11:16:48 2007 +0200 sched: remove the 'u64 now' parameter from update_stats_curr_end() remove the 'u64 now' parameter from update_stats_curr_end(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit 19b6a2e3706675eea4d74729114e36968fa43577 Author: Ingo Molnar Date: Thu Aug 9 11:16:48 2007 +0200 sched: remove the 'u64 now' parameter from update_stats_dequeue() remove the 'u64 now' parameter from update_stats_dequeue(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit 79303e9e0219a23f8757af99393b21ecb35231bf Author: Ingo Molnar Date: Thu Aug 9 11:16:47 2007 +0200 sched: remove the 'u64 now' parameter from update_stats_curr_start() remove the 'u64 now' parameter from update_stats_curr_start(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit 9ef0a9615b0d9cd29c6bc0e8898f1bc3145e44c6 Author: Ingo Molnar Date: Thu Aug 9 11:16:47 2007 +0200 sched: remove the 'u64 now' parameter from update_stats_wait_end() remove the 'u64 now' parameter from update_stats_wait_end(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit eac55ea37642163e6bdd899ac319c413c1f1b7cd Author: Ingo Molnar Date: Thu Aug 9 11:16:47 2007 +0200 sched: remove the 'u64 now' parameter from __update_stats_wait_end() remove the 'u64 now' parameter from __update_stats_wait_end(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit d2417e5a3e6c79e79f982c7553301dc3539873b0 Author: Ingo Molnar Date: Thu Aug 9 11:16:47 2007 +0200 sched: remove the 'u64 now' parameter from update_stats_enqueue() remove the 'u64 now' parameter from update_stats_enqueue(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit 5870db5b83932bea0deac3c68e3c40f377d0b8f7 Author: Ingo Molnar Date: Thu Aug 9 11:16:47 2007 +0200 sched: remove the 'u64 now' parameter from update_stats_wait_start() remove the 'u64 now' parameter from update_stats_wait_start(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit b7cc089657c12340077fe937380f9e54bbd6b300 Author: Ingo Molnar Date: Thu Aug 9 11:16:47 2007 +0200 sched: remove the 'u64 now' parameter from update_curr() remove the 'u64 now' parameter from update_curr(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit 5cef9eca3837a8dcf605a360e213c4179a07c41a Author: Ingo Molnar Date: Thu Aug 9 11:16:47 2007 +0200 sched: remove the 'u64 now' parameter from print_cfs_rq() remove the 'u64 now' parameter from print_cfs_rq(). ( identity transformation that causes no change in functionality. ) Signed-off-by: Ingo Molnar commit d281918d7c135c555d9cebcf73d4320efa8177dc Author: Ingo Molnar Date: Thu Aug 9 11:16:47 2007 +0200 sched: remove 'now' use from assignments change all 'now' timestamp uses in assignments to rq->clock. ( this is an identity transformation that causes no functionality change: all such new rq->clock is necessarily preceded by an update_rq_clock() call. ) Signed-off-by: Ingo Molnar commit eb59449400f1e5984509e502711141302a2867ab Author: Ingo Molnar Date: Thu Aug 9 11:16:47 2007 +0200 sched: remove __rq_clock() remove the (now unused) __rq_clock() function. Signed-off-by: Ingo Molnar commit c1b3da3ecdbf9e9f377474c11ba988b8821f86c8 Author: Ingo Molnar Date: Thu Aug 9 11:16:47 2007 +0200 sched: eliminate __rq_clock() use eliminate __rq_clock() use by changing it to: __update_rq_clock(rq) now = rq->clock; identity transformation - no change in behavior. Signed-off-by: Ingo Molnar commit 2ab81159fa426bd09c21faf7c25fba13bc9d2902 Author: Ingo Molnar Date: Thu Aug 9 11:16:47 2007 +0200 sched: remove rq_clock() remove the now unused rq_clock() function. Signed-off-by: Ingo Molnar commit a8e504d2a57ecd3f905b402072cdd1903f963bef Author: Ingo Molnar Date: Thu Aug 9 11:16:47 2007 +0200 sched: eliminate rq_clock() use eliminate rq_clock() use by changing it to: update_rq_clock(rq) now = rq->clock; identity transformation - no change in behavior. Signed-off-by: Ingo Molnar commit b04a0f4c1651a553ee1a03dc70297d66ec74db5c Author: Ingo Molnar Date: Thu Aug 9 11:16:46 2007 +0200 sched: add [__]update_rq_clock(rq) add the [__]update_rq_clock(rq) functions. (No change in functionality, just reorganization to prepare for elimination of the heavy 64-bit timestamp-passing in the scheduler.) Signed-off-by: Ingo Molnar commit a4ac01c36e286dd1b9a1d5cd7422c5af51dc55f8 Author: Peter Williams Date: Thu Aug 9 11:16:46 2007 +0200 sched: fix bug in balance_tasks() There are two problems with balance_tasks() and how it used: 1. The variables best_prio and best_prio_seen (inherited from the old move_tasks()) were only required to handle problems caused by the active/expired arrays, the order in which they were processed and the possibility that the task with the highest priority could be on either. These issues are no longer present and the extra overhead associated with their use is unnecessary (and possibly wrong). 2. In the absence of CONFIG_FAIR_GROUP_SCHED being set, the same this_best_prio variable needs to be used by all scheduling classes or there is a risk of moving too much load. E.g. if the highest priority task on this at the beginning is a fairly low priority task and the rt class migrates a task (during its turn) then that moved task becomes the new highest priority task on this_rq but when the sched_fair class initializes its copy of this_best_prio it will get the priority of the original highest priority task as, due to the run queue locks being held, the reschedule triggered by pull_task() will not have taken place. This could result in inappropriate overriding of skip_for_load and excessive load being moved. The attached patch addresses these problems by deleting all reference to best_prio and best_prio_seen and making this_best_prio a reference parameter to the various functions involved. load_balance_fair() has also been modified so that this_best_prio is only reset (in the loop) if CONFIG_FAIR_GROUP_SCHED is set. This should preserve the effect of helping spread groups' higher priority tasks around the available CPUs while improving system performance when CONFIG_FAIR_GROUP_SCHED isn't set. Signed-off-by: Peter Williams Signed-off-by: Ingo Molnar commit aea25401c3347d9f3a64ebdc81043be246a9f631 Author: Ingo Molnar Date: Thu Aug 9 11:16:46 2007 +0200 sched: document nice levels Document the design thinking behind nice levels. Signed-off-by: Ingo Molnar commit e0361851e5647cdd62fd5c367df5d7e145769d04 Author: Alexey Dobriyan Date: Thu Aug 9 11:16:46 2007 +0200 sched: remove binary sysctls from kernel.sched_domain kernel.sched_domain hierarchy is under CTL_UNNUMBERED and thus unreachable to sysctl(2). Generating .ctl_number's in such situation is not useful. Signed-off-by: Alexey Dobriyan Signed-off-by: Ingo Molnar commit fd8bb43e27bbba1b6d49552c3d588cf741dd44af Author: Ingo Molnar Date: Thu Aug 9 11:16:46 2007 +0200 sched: delta_exec accounting fix small delta_exec accounting fix: increase delta_exec and increase sum_exec_runtime even if the task is not on the runqueue anymore. Signed-off-by: Ingo Molnar commit c5dcfe72aa8d26e924cccca9725a9f7be0d4ab01 Author: Ingo Molnar Date: Thu Aug 9 11:16:46 2007 +0200 sched: clean up delta_mine cleanup: delta_mine is an unsigned value. no code impact: text data bss dec hex filename 27823 2726 16 30565 7765 sched.o.before 27823 2726 16 30565 7765 sched.o.after Signed-off-by: Ingo Molnar commit 8e717b194ce3f3ac9e6acc63f66fe274cdf9cde1 Author: Ingo Molnar Date: Thu Aug 9 11:16:46 2007 +0200 sched: schedule() speedup speed up schedule(): share the 'now' parameter that deactivate_task() was calculating internally. ( this also fixes the small accounting window between the deactivate call and the pick_next_task() call. ) Signed-off-by: Ingo Molnar commit 7bfd0485871df01764ca89d5679f128d870aef1a Author: Ingo Molnar Date: Thu Aug 9 11:16:46 2007 +0200 sched: uninline rq_clock() uninline rq_clock() to save 263 bytes of code: text data bss dec hex filename 39561 3642 24 43227 a8db sched.o.before 39298 3642 24 42964 a7d4 sched.o.after Signed-off-by: Ingo Molnar commit 291ae5a12088e1aa87aae4899a818498be3d18eb Author: Josh Triplett Date: Thu Aug 9 11:16:46 2007 +0200 sched: mark print_cfs_stats static sched_fair.c defines print_cfs_stats, and sched_debug.c uses it, but sched.c includes both sched_fair.c and sched_debug.c, so all the references to print_cfs_stats occur in the same compilation unit. Thus, mark print_cfs_stats static. Eliminates a sparse warning: warning: symbol 'print_cfs_stats' was not declared. Should it be static? Signed-off-by: Josh Triplett Signed-off-by: Ingo Molnar commit 9531b62f5ebf2b693bf85129d20328188f685c44 Author: Ulrich Drepper Date: Thu Aug 9 11:16:46 2007 +0200 sched: clean up sched_getaffinity() here's another tiny cleanup. The generated code is not affected (gcc is smart enough) but for people looking over the code it is just irritating to have the extra conditional. Signed-off-by: Ulrich Drepper Signed-off-by: Ingo Molnar commit 5f5d3aa15bb24a4d5d195bd32d549bd725d414bc Author: Thomas Voegtle Date: Thu Aug 9 11:16:46 2007 +0200 sched: mention CONFIG_SCHED_DEBUG in documentation a little hint to switch on CONFIG_SCHED_DEBUG should be given. Signed-off-by: Ingo Molnar commit 4301065920b0cbde3986519582347e883b166f3e Author: Peter Williams Date: Thu Aug 9 11:16:46 2007 +0200 sched: simplify move_tasks() The move_tasks() function is currently multiplexed with two distinct capabilities: 1. attempt to move a specified amount of weighted load from one run queue to another; and 2. attempt to move a specified number of tasks from one run queue to another. The first of these capabilities is used in two places, load_balance() and load_balance_idle(), and in both of these cases the return value of move_tasks() is used purely to decide if tasks/load were moved and no notice of the actual number of tasks moved is taken. The second capability is used in exactly one place, active_load_balance(), to attempt to move exactly one task and, as before, the return value is only used as an indicator of success or failure. This multiplexing of sched_task() was introduced, by me, as part of the smpnice patches and was motivated by the fact that the alternative, one function to move specified load and one to move a single task, would have led to two functions of roughly the same complexity as the old move_tasks() (or the new balance_tasks()). However, the new modular design of the new CFS scheduler allows a simpler solution to be adopted and this patch addresses that solution by: 1. adding a new function, move_one_task(), to be used by active_load_balance(); and 2. making move_tasks() a single purpose function that tries to move a specified weighted load and returns 1 for success and 0 for failure. One of the consequences of these changes is that neither move_one_task() or the new move_tasks() care how many tasks sched_class.load_balance() moves and this enables its interface to be simplified by returning the amount of load moved as its result and removing the load_moved pointer from the argument list. This helps simplify the new move_tasks() and slightly reduces the amount of work done in each of sched_class.load_balance()'s implementations. Further simplification, e.g. changes to balance_tasks(), are possible but (slightly) complicated by the special needs of load_balance_fair() so I've left them to a later patch (if this one gets accepted). NB Since move_tasks() gets called with two run queue locks held even small reductions in overhead are worthwhile. [ mingo@elte.hu ] this change also reduces code size nicely: text data bss dec hex filename 39216 3618 24 42858 a76a sched.o.before 39173 3618 24 42815 a73f sched.o.after Signed-off-by: Peter Williams Signed-off-by: Ingo Molnar commit f1a438d813d416fa9f4be4e6dbd10b54c5938d89 Author: Ingo Molnar Date: Thu Aug 9 11:16:45 2007 +0200 sched: reorder update_cpu_load(rq) with the ->task_tick() call Peter Williams suggested to flip the order of update_cpu_load(rq) with the ->task_tick() call. This is a NOP for the current scheduler (the two functions are independent of each other), ->task_tick() might create some state for update_cpu_load() in the future (or in PlugSched). Signed-off-by: Ingo Molnar commit 0915c4e89d311948b67cdd4c183a2efbcafcc9f9 Author: Ingo Molnar Date: Thu Aug 9 11:16:45 2007 +0200 sched: batch sleeper bonus batch up the sleeper bonus sum a bit more. Anything below sched-granularity is too small to make a practical difference anyway. this optimization reduces the math in high-frequency scheduling scenarios. Signed-off-by: Ingo Molnar commit b434e71933aa0519ee042c01419db76b7dcc058e Author: David S. Miller Date: Wed Aug 8 17:32:33 2007 -0700 [SPARC64]: Fix memory leak when cpu hotplugging. Every time a cpu is added via hotplug, we allocate the per-cpu MONDO queues but we never free them up. Freeing isn't easy since the first cpu gets this memory from bootmem. Therefore, the simplest thing to do to fix this bug is to allocate the queues for all possible cpus at boot time. Signed-off-by: David S. Miller commit 6c70b6fc7b6fc321636a014082d9e32333da1f80 Author: David S. Miller Date: Wed Aug 8 17:11:39 2007 -0700 [SPARC64]: Do not assume sun4v chips have load-twin/store-init support. Check the cpu type in the OBP device tree before committing to using the optimized Niagara memcpy and memset implementation. If we don't recognize the cpu type, use a completely generic version. Signed-off-by: David S. Miller commit 175fc484256e9c85e043f599ec2f6bc0d2e6c443 Author: Al Viro Date: Wed Aug 8 00:01:46 2007 +0100 fix oops in __audit_signal_info() The check for audit_signals is misplaced and the check for audit_dummy_context() is missing; as the result, if we send a signal to auditd from task with NULL ->audit_context while we have audit_signals != 0 we end up with an oops. Signed-off-by: Al Viro Acked-by: James Morris Signed-off-by: Linus Torvalds commit 68c9f9fd336dc7e793cecad25f8ac40ccaa7a256 Author: David S. Miller Date: Tue Aug 7 19:09:29 2007 -0700 [SPARC64]: Fix hard-coding of cpu type output in /proc/cpuinfo on sun4v. Signed-off-by: David S. Miller commit 46bcea7751efc867ae4b073c99ad1d137a475bc0 Author: David S. Miller Date: Tue Aug 7 18:46:36 2007 -0700 [SPARC]: Centralize find_in_proplist() instead of duplicating N times. Signed-off-by: David S. Miller commit f34d1955dff5a5769d24614d137003f0316406f3 Author: Stephen Hemminger Date: Tue Aug 7 18:29:05 2007 -0700 [TCP]: H-TCP maxRTT estimation at startup Small patch to H-TCP from Douglas Leith. Fix estimation of maxRTT. The original code ignores rtt measurements during slow start (via the check tp->snd_ssthresh < 0xFFFF) yet this is probably a good time to try to estimate max rtt as delayed acking is disabled and slow start will only exit on a loss which presumably corresponds to a maxrtt measurement. Second, the original code (via the check htcp_ccount(ca) > 3) ignores rtt data during what it estimates to be the first 3 round-trip times. This seems like an unnecessary check now that the RCV timestamp are no longer used for rtt estimation. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 591e620693e71e24fb3450a4084217e44b7a60b6 Author: Patrick McHardy Date: Tue Aug 7 18:12:01 2007 -0700 [NETFILTER]: nf_nat: add symbolic dependency on IPv4 conntrack Loading nf_nat causes the conntrack core to be loaded, but we need IPv4 as well. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit ff4ca8273eafbba875a86d333e059e78f292107f Author: Pablo Neira Ayuso Date: Tue Aug 7 18:11:26 2007 -0700 [NETFILTER]: ctnetlink: return EEXIST instead of EINVAL for existing nat'ed conntracks ctnetlink must return EEXIST for existing nat'ed conntracks instead of EINVAL. Only return EINVAL if we try to update a conntrack with NAT handlings (that is not allowed). Decadence:libnetfilter_conntrack/utils# ./conntrack_create_nat TEST: create conntrack (0)(Success) Decadence:libnetfilter_conntrack/utils# ./conntrack_create_nat TEST: create conntrack (-1)(Invalid argument) Signed-off-by: Pablo Neira Ayuso Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 3af8e31cf57646284b5f77f9d57d2c22fa77485a Author: Jesper Juhl Date: Tue Aug 7 18:10:54 2007 -0700 [NETFILTER]: ipt_recent: avoid a possible NULL pointer deref in recent_seq_open() If the call to seq_open() returns != 0 then the code calls kfree(st) but then on the very next line proceeds to dereference the pointer - not good. Problem spotted by the Coverity checker. Signed-off-by: Jesper Juhl Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 14ae856645dba5b9ba56b2d0627b3b9825fa37b2 Author: Johannes Berg Date: Tue Aug 7 18:02:43 2007 -0700 [NET] net/core/utils: fix sparse warning net_msg_warn is not defined because it is in net/sock.h which isn't included. Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit 3482fd9099e8aab8b8096eb6da93571ea5a0b4c2 Author: Paul Moore Date: Tue Aug 7 17:53:10 2007 -0700 [NetLabel]: add missing rcu_dereference() calls in the LSM domain mapping hash table The LSM domain mapping head table pointer was not being referenced via the RCU safe dereferencing function, rcu_dereference(). This patch adds those missing calls to the NetLabel code. This has been tested using recent linux-2.6 git kernels with no visible regressions. Signed-off-by: Paul Moore Signed-off-by: David S. Miller commit 501092929ccb8a1d2eb0ed700e38df4ae0de7108 Author: Fenghua Yu Date: Tue Aug 7 18:40:30 2007 -0400 acpi-cpufreq: Fix some x86/x86-64 acpi-cpufreq driver issues This patch addresses some issues in x86/x86-64 acpi-cpufreq driver: 1. Current memory allocation for acpi_perf_data is actually open-coded alloc_percpu(). The patch defines and handles acpi_perf_data as percpu data. The code will be cleaner and easier to be maintained with this change. 2. Won't load driver in acpi_cpufreq_early_init() failure case. 3. Add __init for acpi_cpufreq_early_init(). Signed-off-by: Fenghua Yu Acked-by: Venkatesh Pallipadi Cc: Dave Jones Signed-off-by: Andrew Morton Signed-off-by: Len Brown commit 9dc83afdbefd184bf29f347e8fcbb6d8a2b5e6fe Author: Mariusz Kozlowski Date: Mon Aug 6 23:44:03 2007 +0200 drivers/net/ibmveth.c: memset fix > >> Looks like memset() is zeroing wrong nr of bytes. > > > > Good catch, however, I think we can just remove this memset altogether > > since the memory gets allocated via kzalloc. > > Correct, that memset() is superfluous. Ok. Then this should do it. Signed-off-by: Mariusz Kozlowski drivers/net/ibmveth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) Signed-off-by: Jeff Garzik commit 163642a24a44d7b1d1e1b3cb8da25a142a919e24 Author: Domen Puncer Date: Tue Aug 7 12:12:41 2007 +0200 phy layer: fix phy_mii_ioctl for autonegotiation Fix a thinko (?) in setting phydev->autoneg. Signed-off-by: Domen Puncer Signed-off-by: Jeff Garzik commit 44a5b3d539893988dc6b63054c59d031df1fd7bc Author: Thomas Klein Date: Mon Aug 6 13:55:44 2007 +0200 ehea: Eliminated some compiler warnings Fixed wrongly casted pointers Signed-off-by: Thomas Klein Signed-off-by: Jeff Garzik commit 35cf2e2e3b96c070a615d699bf514ffec6afd19e Author: Thomas Klein Date: Mon Aug 6 13:55:14 2007 +0200 ehea: Simplify resource usage check Use shorter method to determine whether adapter has configured ports Signed-off-by: Thomas Klein Signed-off-by: Jeff Garzik commit f46f6ba99bad942963cc4b4cc4aabcc55a567b4a Author: Thomas Klein Date: Mon Aug 6 13:54:29 2007 +0200 ehea: Fix workqueue handling Fix: Workqueue ehea_driver_wq was not destroyed Signed-off-by: Thomas Klein Signed-off-by: Jeff Garzik commit 76b9cfccb39f542ce48a79b9ad50af25e422506c Author: Brian King Date: Fri Aug 3 13:55:19 2007 +1000 ibmveth: Fix rx pool deactivate oops This fixes the following oops which can occur when trying to deallocate receive buffer pools using sysfs with the ibmveth driver. NIP: d00000000024f954 LR: d00000000024fa58 CTR: c0000000000d7478 REGS: c00000000ffef9f0 TRAP: 0300 Not tainted (2.6.22-ppc64) MSR: 8000000000009032 CR: 24242442 XER: 00000010 DAR: 00000000000007f0, DSISR: 0000000042000000 TASK = c000000002f91360[2967] 'bash' THREAD: c00000001398c000 CPU: 2 GPR00: 0000000000000000 c00000000ffefc70 d000000000262d30 c00000001c4087a0 GPR04: 00000003000000fe 0000000000000000 000000000000000f c000000000579d80 GPR08: 0000000000365688 c00000001c408998 00000000000007f0 0000000000000000 GPR12: d000000000251e88 c000000000579d80 00000000200957ec 0000000000000000 GPR16: 00000000100b8808 00000000100feb30 0000000000000000 0000000010084828 GPR20: 0000000000000000 000000001014d4d0 0000000000000010 c00000000ffefeb0 GPR24: c00000001c408000 0000000000000000 c00000001c408000 00000000ffffb054 GPR28: 00000000000000fe 0000000000000003 d000000000262700 c00000001c4087a0 NIP [d00000000024f954] .ibmveth_remove_buffer_from_pool+0x38/0x108 [ibmveth] LR [d00000000024fa58] .ibmveth_rxq_harvest_buffer+0x34/0x78 [ibmveth] Call Trace: [c00000000ffefc70] [c0000000000280a8] .dma_iommu_unmap_single+0x14/0x28 (unreliable) [c00000000ffefd00] [d00000000024fa58] .ibmveth_rxq_harvest_buffer+0x34/0x78 [ibmveth] [c00000000ffefd80] [d000000000250e40] .ibmveth_poll+0xd8/0x434 [ibmveth] [c00000000ffefe40] [c00000000032da8c] .net_rx_action+0xdc/0x248 [c00000000ffefef0] [c000000000068b4c] .__do_softirq+0xa8/0x164 [c00000000ffeff90] [c00000000002789c] .call_do_softirq+0x14/0x24 [c00000001398f6f0] [c00000000000c04c] .do_softirq+0x68/0xac [c00000001398f780] [c000000000068ca0] .irq_exit+0x54/0x6c [c00000001398f800] [c00000000000c8e4] .do_IRQ+0x170/0x1ac [c00000001398f890] [c000000000004790] hardware_interrupt_entry+0x18/0x1c Exception: 501 at .plpar_hcall_norets+0x24/0x94 LR = .veth_pool_store+0x15c/0x298 [ibmveth] [c00000001398fb80] [d000000000250b2c] .veth_pool_store+0x5c/0x298 [ibmveth] (unreliable) [c00000001398fc30] [c000000000145530] .sysfs_write_file+0x140/0x1d8 [c00000001398fcf0] [c0000000000de89c] .vfs_write+0x120/0x208 [c00000001398fd90] [c0000000000df2c8] .sys_write+0x4c/0x8c [c00000001398fe30] [c0000000000086ac] syscall_exit+0x0/0x40 Instruction dump: fba1ffe8 fbe1fff8 789d0022 f8010010 f821ff71 789c0020 1d3d00a8 7b8a1f24 38000000 7c7f1b78 7d291a14 e9690128 <7c0a592a> e8030000 e9690120 80a90100 Signed-off-by: Brian King Signed-off-by: Paul Mackerras Signed-off-by: Jeff Garzik commit 8eb7ad68bd10d858066ca51713ca5645996e77a5 Author: Ne