Summary of changes from v2.6.10 to v2.6.11 ============================================ [PATCH] r8169: add ethtool_ops.{get_regs_len/get_regs} - ethtool_ops.{get_regs_len/get_regs} for r8169; - fix a dubious check: datasheet v1.21 claims on p.44 that io/memory space is exactly 256 bytes wide; - use SET_ETHTOOL_OPS(). Signed-off-by: Francois Romieu [PATCH] r8169: per device receive buffer size Turn the Rx receive buffer size into a per device variable. Signed-off-by: Francois Romieu [PATCH] r8169: code cleanup Cleanup/code removal: - MAX_ETH_FRAME_SIZE is not used; - removal of assertion for impossible condition (if it happens, it will _not_ take long to notice anyway) - introduce rtl8169_release_board() to factor out some code; - rtl8169_init_board: - some variables are not really needed nor do they help read the code; - more explicit name for label; - tp->{Rx/Tx}DescArray: no need to zeroize coherent DMA mapping. Signed-off-by: Francois Romieu [PATCH] r8169: enable MWI - enable Memory Write and Invalidate (disabled after reset); - fix wrong goto. Signed-off-by: Francois Romieu [PATCH] r8169: bump version number Help reviewers realize that the in-kernel driver has evolved lately. Signed-off-by: Francois Romieu [PATCH] r8169: sync the names of a few bits with the 8139cp driver Sync the names of the descriptor with these which are used in the 8139cp driver. Though not exactly identical the descriptors are forward compatible. Signed-off-by: Francois Romieu [PATCH] r8169: comment a gcc 2.95.x bug gcc 2.95.3 bug has been experienced on gcc 2.95.4. Signed-off-by: Francois Romieu [PATCH] r8169: Tx checksum offload SG and IP checksumming support on output. Signed-off-by: Francois Romieu [PATCH] r8169: advertise DMA to high memory Advertise the ability to DMA to high memory. Signed-off-by: Francois Romieu [PATCH] r8169: Rx checksum support Rx IP checksumming support. Signed-off-by: Francois Romieu [PATCH] r8169: vlan support 802.1Q support. Mostly stolen from the 8139cp.c driver. The relevant registers and descriptors bits are identical for both chipsets. Signed-off-by: Francois Romieu [PATCH] eepro100.c iomap conversion [PATCH] r8169: miscalculation of available Tx descriptors The count of available entries in the Tx descriptors ring is badly wrong. Signed-off-by: Francois Romieu [PATCH] r8169: hint for Tx flow control return 1 in start_xmit() when the required descriptors are not available and wait for more room. Signed-off-by: Francois Romieu [PATCH] r8169: TSO support. TSO support. Suggestion of Jeff Garzik. Signed-off-by: Francois Romieu [PATCH] r8169: Mac identifier extracted from Realtek's driver v2.2 Mac identifier extracted from Realtek's driver v2.2. Signed-off-by: Francois Romieu [netdrvr eepro100] fix pci_iomap() args and info msg that follows input: Joydump depends on gameport Signed-off-by: Vojtech Pavlik Patch-by: Olaf Hering [PATCH] r8169: default on disabling PCIDAC Default to disabling PCI DAC as this option appears unsafe on amd64 (original suggestion by Hans-Frieder Vogt ). The driver will typically report PCI System error when something goes wrong. The relevant interrupt is not masked any more and the driver can thus be disabled. Signed-off-by: Francois Romieu [PATCH] mc_filter on big-endian arch On Sat, 19 Jun 2004 17:37:37 -0400, Jeff Garzik wrote: > you would be kind enough to resend the non-via-rhine patches WRT mc_filter? Sure. Patch is for 2.6 (not rediffed, yell if it doesn't apply anymore). Btw, did you pick up the mc_filter patch for 2.4 via-rhine? This untested patch fixes hardware mc filters for tulip_core, winbond, and atp. Hopefully :-). Please review and test. Signed-off-by: Roger Luethi input: Fix oops in gamecon Signed-off-by: Vojtech Pavlik Patch-by: Peter Nelson input: Some HID devices have problems returning the HID class descriptor. Try a few times before giving up. Signed-off-by: Vojtech Pavlik input: Add support for Kensington ThinkingMouse PS/2 protocol. Signed-off-by: Vojtech Pavlik Patch-by: Peter Maydell input: Add ALPS touchpad driver, driver by Neil Brown, Peter Osterlund and Dmitry Torokhov, some fixes by Vojtech Pavlik. Signed-off-by: Vojtech Pavlik Patch-by: Peter Osterlund input: Add AT-compatible rawmode generation for ARM. Signed-off-by: Vojtech Pavlik Patch-by: Woody Suwalski Input: pull common code from psmouse and atkbd into libps2 module Signed-off-by: Dmitry Torokhov Input: add serio_[un]pin_driver() functions so attribute handlers can safely access driver bound to a serio port. Signed-off-by: Dmitry Torokhov Input: atkbd - export extra, scroll, set, softrepeat and softraw as individual keyboard attributes (sysfs) and allow them to be set/changed independently for each keyboard: echo -n "2" > /sys/bus/serio/devices/serio1/set echo -n "1" > /sys/bus/serio/devices/serio1/softrepeat Signed-off-by: Dmitry Torokhov input: More IOWarrior blacklist entries in hid.c, rearranging the blacklist back to alphabetic order. Signed-off-by: Vojtech Pavlik Input: clean up ALPS DualPoint logic Signed-off-by: Dmitry Torokhov input: Tidy up & fix the hid-input.c driver. Dual-wheel A4 mice don't report the phantom button anymore, D-Pads are mapped to Hat-switches, debug can print HID->Input mappings, more mappings added, devices with reports larger than MaxPacketSize work again. Signed-off-by: Vojtech Pavlik input: Remove calls to pm_access() and pm_dev_idle() from input.c, as they're empty functions anyway. Signed-off-by: Vojtech Pavlik Patch-by: Patrick Mochel input: Add LED definitions for PDAs. Signed-off-by: Vojtech Pavlik Signed-off-by: John Lenz Input: correct the the wrong use of "DB9" to the correct name, "DE9". Also, some comments/debugging output is fixed up. Signed-off-by: Jan-Benedict Glaw Signed-off-by: Andrew Morton Signed-off-by: Vojtech Pavlik Input: Add ACPI-based i8042 keyboard and aux controller enumeration; can be disabled by passing i8042.noacpi as a boot parameter. Original code by Bjorn Helgaas , reworked by Dmitry Torokhov , FixedIO support from Hans-Frieder Vogt Signed-off-by: Bjorn Helgaas Signed-off-by: Dmitry Torokhov Signed-off-by: Andrew Morton Signed-off-by: Vojtech Pavlik input: More comment fixes in lkkbd.c Signed-off-by: Jan-Benedict Glaw Signed-off-by: Vojtech Pavlik Input: add a new signature for ALPS DualPoint found in Dell Inspiron 8500 Signed-off-by: Dmitry Torokhov Input: psmouse - add set_rate and set_resolution handlers to make adding new protocols easier and remove special knowledge from psmouse-base.c Signed-off-by: Dmitry Torokhov Input: synaptics - not only switch to 4-byte client protocol but also revert to 3-byte mode if client selected lower protocol. Signed-off-by: Dmitry Torokhov Input: psmouse - reset mouse before doing intellimouse/explorer probes in case it got confused by earlier probes; switch to streaming mode before setting scale and resolution, otherwise some KVMs get confused. Patch-by: Marko Macek Signed-off-by: Dmitry Torokhov Input: psmouse - export rate, resolution, resetafter and smartscroll (Logitech only) as individual mouse attributes (sysfs) and allow them to be set/changed independently for each mouse: echo -n "100" > /sys/bus/serio/devices/serio0/rate echo -n "200" > /sys/bus/serio/devices/serio0/resolution Signed-off-by: Dmitry Torokhov Input: psmouse - drop PS2TPP protocol (it is handled exactly like PS2PP) to free spot for THINKPS protocol and keep old protocol numbers for binary compatibility with Synaptics/ALPS touchpad driver for X. Signed-off-by: Dmitry Torokhov Input: psmouse - make logips2pp fully decode its protocol packets and not rely on generic handler to finish job. Signed-off-by: Dmitry Torokhov Input: psmouse - explicitely specify packet size instead of relying on protocol numbering scheme. Make protocol detection routines return -1 on failure to keep them consistent with ther rest of the code. Set mouse parameters right in detection routines instead of doing it in psmouse_extensions. Signed-off-by: Dmitry Torokhov [PATCH] r8169: Tx timeout rework Tx timeout rework: - the ring descriptors of the chipset and the ring index of the driver are synced during a reset of the device; - rtl8169_interrupt: rtl8169_hw_reset() replaces the previous stop code. An implicit reset of the device is added but it makes no noticeable difference with the former behavior (i.e.: stop the chipset). Signed-off-by: Francois Romieu [PATCH] r8169: wrong advertisement of VLAN features Removal of an advertisement for VLAN features which is redundant with rtl8169_init_one(). Signed-off-by: Jon Mason [PATCH] r8169: automatic pci dac step down Automatic adjustement of highmem dma feature. The first interruption encountered on systems where the 8169 does not perform PCI DAC correctly seems to always be a PCI error one. When DAC is enabled, the driver tries to issue a complete down/up sequence as an addition to the usual halt of the device. Signed-off-by: Francois Romieu [PATCH] r8169: rtl8169_close() races - close the race with rtl8169_interrupt() which appears when rtl8169_close() uses synchronize_irq()/free_irq(); - netif_poll_disable() allows rtl8169_close() to wait for any pending rtl8169_poll() to complete so it can safely clear the rings. Signed-off-by: Francois Romieu [PATCH] r8169: cleanup Cleanup - timeout message is redundant with net/sched/sch_generic::dev_watchdog; - anti-bloat in rtl8169_get_rx_csum; - format fix. Signed-off-by: Francois Romieu Signed-off-by: Jon Mason [PATCH] iomem annotations in r8169 Signed-off-by: Al Viro [PATCH] r8169: use module_param Use module_param instead of deprecated MDOULE_PARM Signed-off-by: Stephen Hemminger [PATCH] r8169: use netdev_priv Use netdev_priv in a couple of places in realtek 8169 Signed-off-by: Stephen Hemminger [PATCH] via-rhine: use module_param Signed-off-by: Stephen Hemminger [PATCH] via-rhine: free_ring should be static free_ring is a local function Signed-off-by: Stephen Hemminger input: Fix ssize_t prototype mismatch in psmouse and atkbd. Signed-off-by: Vojtech Pavlik [PATCH] ac3200 iomem annotations and fixes annotated, killed isa_... uses by making ioremap() unconditional, fixed the use of isa_... on already remapped address. Signed-off-by: Al Viro [PATCH] ne3210 iomem annotations Signed-off-by: Al Viro Input: i8042 ACPI enumeration - add PNP IDs found in AMD64 laptops. Signed-off-by: Dmitry Torokhov Signed-off-by: Andrew Morton Signed-off-by: Vojtech Pavlik [PATCH] r8169: always clean Tx desc rtl8169_unmap_tx_skb() can not assume that a Tx ring descriptor belongs to the host as it can be issued during rtl8169_tx_clear() as a part of a recovery process (during Tx timeout for instance). Simple fix: always clean the relevant descriptor entry. Acked-by: Francois Romieu Signed-off-by: Jon Mason [PATCH] r8169: unneeded synchronize_irq() synchronize_irq() is not needed as it is already issued by free_irq(). Signed-off-by: Francois Romieu [PATCH] r8169: netconsole support netconsole support. Signed-off-by: John W. Linville [PATCH] starfire iomem annotations Signed-off-by: Al Viro [PATCH] killed isa_... in 3c507 switched to ioremap() + normal read../write.. Signed-off-by: Al Viro [PATCH] depca iomem annotations Signed-off-by: Al Viro [PATCH] 3c359 iomem annotations Signed-off-by: Al Viro [PATCH] e2100 iomem annotations and fixes added mission ioremap(); driver was using readw() et.al. on non-remapped addresses. Signed-off-by: Al Viro [PATCH] (25/32) lanstreamer iomem annotations Signed-off-by: Al Viro [PATCH] netdev_priv() in arlan Signed-off-by: Al Viro [PATCH] netdev_priv() in netwave_cs Signed-off-by: Al Viro [PATCH] arlan iomem annotations and cleanups iomem annotations + couple of bad implementations of offsetof() replaced with the real thing. Signed-off-by: Al Viro [PATCH] netwave iomem annotations Signed-off-by: Al Viro [PATCH] net/pcmcia iomem annotations Signed-off-by: Al Viro input: Increase ACK timeouts in libps2 in case the RESET_BAT command is used. This should fix most Synaptics "reset failed" cases. Thanks to Keith Packard for the report. Also add some more keyboard IDs, so that unusual keyboards are accepted by libps2 and atkbd. Signed-off-by: Vojtech Pavlik [PATCH] via-rhine iomem annotations, switch to io{read,write} Signed-off-by: Al Viro [PATCH] sundance iomem annotations, switch to io{read,write} Signed-off-by: Al Viro [PATCH] olympic_open() cleanup and fixes Signed-off-by: Al Viro [PATCH] skfp iomem annotations, switch to io{read,write} Signed-off-by: Al Viro [PATCH] lne390 iomem annotations and fixes annotated, killed isa_... uses by making ioremap() unconditional, fixed the use of isa_... on already remapped address. Signed-off-by: Al Viro [PATCH] wavelan_cs iomem annotations Signed-off-by: Al Viro [PATCH] airo iomem annotations Signed-off-by: Al Viro [PATCH] mace iomem annotations - trivial part Signed-off-by: Al Viro Input: couple of whitespace fixes. Signed-off-by: Dmitry Torokhov Input: evdev, joydev, mousedev, tsdev - remove class device and devfs entry when hardware driver disconnects instead of waiting for the last user to drop off. This way hardware drivers can be unloaded at any time. Signed-off-by: Dmitry Torokhov Input: when creating input devices for hardware attached to a serio port properly set input_device->dev pointer so when corresponding class device is created it will show proper links to parent device and driver in sysfs hierarchy. Signed-off-by: Dmitry Torokhov Input: i8042 - allow turning debugging on and off "on-fly" so people do not have to recompile their kernels to provide debug info. Adds new parameter i8042.debug also accessible through sysfs. Signed-off-by: Dmitry Torokhov Input: i8042 - get rid of old style power management handler since APM calls both pm_send and device_suspend. Signed-off-by: Dmitry Torokhov Input: i8042 - get rid of reboot notifier as suspend method should do the job. Signed-off-by: Dmitry Torokhov Input: get rid of pm_dev in input core as it is deprecated and nothing uses it anyway. Signed-off-by: Dmitry Torokhov Input: gscps2 - remove unused statically allocated gscps2_serio_port variable as the port is allocated dynamically. Signed-off-by: Dmitry Torokhov drm: initial core move infrastructure change Initial infrastructure - move old H files to C files also Kconfig and Makefile changes Signed-off-by: Dave Airlie drm: memory allocation patch This removes some unnecessary macros for allocating DRM memory. It doesn't change any functionality. From: Jon Smirl Signed-off-by: Dave Airlie scsi_debug v 1.75 From: Douglas Gilbert - fix highmem data transfers - fix kunmap_atomic() argument - disable clustering - allow every_nth < 0 for error continuously once count is reached - minor sense buffer handling cleanup Signed-off-by: James Bottomley [PATCH] r8169 module_param build fix Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik [PATCH] ray_cs export cleanup From: Arjan van de Ven The ray_cs driver author seemed to have assumed that he needs to exports functions he registers with the core kernel via function pointers, that of course isn't the case so the cleanup below removes this; these functions aren't used anywhere else nor meant to be (they're even static). Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik Input: parkbd - switch to using module_param. Parameter names are parkbd.port and parkbd.mode Signed-off-by: Dmitry Torokhov drm: device minor fixups and /proc fixups This patch fixes up the DRM to do better minor number accounting and /proc directory creation, the old code was buggy in a number of situations with multiple cards, and rather ugly. It is also a step on the way to the drm_core module. From: Jon Smirl and Dave Airlie Signed-off-by: Dave Airlie [PATCH] via-velocity: get rid of unused global Get rid of unused global variable, name the enum instead. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik [PATCH] IBM EMAC Kconfig changes In trying to build for IBM 440GP Eval with CRC32=n, I noticed two things. First, all of the IBM EMAC Kconfig bits are space, not tab indented, and that IBM EMAC doesn't select CRC32 like all of the other enet drivers that need it do. Fix spacing of IBM EMAC Kconfig options. Signed-off-by: Tom Rini Signed-off-by: Jeff Garzik [PATCH] IBM EMAC Kconfig changes: Add 'select CRC32' On Mon, Oct 25, 2004 at 09:12:03AM -0700, Tom Rini wrote: > In trying to build for IBM 440GP Eval with CRC32=n, I noticed two > things. First, all of the IBM EMAC Kconfig bits are space, not tab > indented, and that IBM EMAC doesn't select CRC32 like all of the other > enet drivers that need it do. Add a 'select CRC32' Signed-off-by: Tom Rini Signed-off-by: Jeff Garzik [ACPI] Provide core hotplug support in ACPI Create acpi_bus_trim(), acpi_bus_remove() and acpi_pci_unbind(), The reverse of of acpi_bus_scan(), acpi_bus_add() and acpi_pci_bind() Signed-off-by: Anil S Keshavamurthy Signed-off-by: Len Brown [ACPI] create ACPI hotplug eject interface The kernel when it receives an hardware sci eject request it simply passes this to user mode agent and the agent in turn will offline all the child devices and then echo's 1 onto the eject file for that acpi device. This patch provides the sysfs "eject" interface for the user mode agent to notify the core acpi so that the core acpi can trim its bus which causes .remove function to be called for all child devices. For example for LSB0 which is an ejectable device, we will see /sys/firmware/acpi/namespace/ACPI/_SB/LSB/eject. Signed-off-by: Anil S Keshavamurthy Signed-off-by: Len Brown [ACPI] IA64-specific support for mapping lsapic to cpu array. analogous i386 and x86_64 code TBD Signed-off-by: Anil S Keshavamurthy Signed-off-by: Len Brown IA64 CPU hotplug topology Extend support for dynamic registration and unregistration of the cpu, by implementing and exporting arch_register_cpu()/arch_unregister_cpu(). Also combine multiple implementation of topology_init() functions to single topology_init() in case of ia64 architecture. Signed-off-by: Anil S Keshavamurthy Signed-off-by: Len Brown [ACPI] Extend processor driver to support ACPI-based Physical CPU hotplug Signed-off-by Anil S Keshavamurthy Signed-off-by: Len Brown [ACPI] Initial container driver to support hotplug notifications on ACPI0004, PNP0A05 and PNP0A06 devices. Signed-off-by: Anil S Keshavamurthy Signed-off-by: Len Brown [ALSA] use blacklist/whitelist for (non-)audio Bt878 cards Documentation,PCI drivers,BT87x driver Some Bt87x cards use PCI function 1 for MPEG data instead of audio data, so we blacklist those in the audio driver. Further add a whitelist for cards where audio is known to work (many other cards do not implement the audio connection). Unknown cards can be enabled manually. Signed-off-by: Clemens Ladisch [ALSA] fix sequencer sleeping in interrupt context ALSA sequencer,ALSA<-OSS sequencer Signed-off-by: Clemens Ladisch [ALSA] rearrange OSS SPARC dependencies Sound Core rearrange the SPARC symbols in the OSS dependencies to prevent alsa-driver's mod-deps from throwing up Signed-off-by: Clemens Ladisch [ALSA] snd-usb-usx2y - crash fix for OHCI USB-HCDs USB USX2Y Version: 0.8.6 Work on this started, when rumors spread that OHCI equipped machines would crash. This was due to me missing two facts: 1) Ohci has a bigger usb frame number wrap around. 2) It only supports URB_ISO_ASAP when submitting iso urbs. These issues are fixed now. Signed-off-by: Karsten Wiese Signed-off-by: Jaroslav Kysela [ALSA] au88x0: add resetup dma au88x0 driver Add adbdma_resetup for refreshing the hw page table on pcm start Signed-off-by: Jeff Muizelaar Signed-off-by: Jaroslav Kysela [ALSA] au88x0: fix is-quad oops au88x0 driver Fixes an oops on module removal caused by dereferencing the codec pointer. This is not the best solution, but it is the easiest and fixes things for now. Signed-off-by: Jeff Muizelaar Signed-off-by: Jaroslav Kysela [ALSA] au88x0: set-levels cleanup au88x0 driver Cleanup vortex_EqHw_SetLevels and add a bit of documentation Signed-off-by: Jeff Muizelaar Signed-off-by: Jaroslav Kysela [ALSA] au88x0: sign_invert cleanup au88x0 driver Remove unecessary ' & 0xffff'ing of the result of sign_invert Signed-off-by: Jeff Muizelaar Signed-off-by: Jaroslav Kysela [ALSA] au88x0: name typo au88x0 driver Fix the spelling of my name Signed-off-by: Jeff Muizelaar Signed-off-by: Jaroslav Kysela [ALSA] au88x0: comment and whitespace cleanup au88x0 driver Remove an obsolete comment and cleanup up some whitespace a bit Signed-off-by: Jeff Muizelaar Signed-off-by: Jaroslav Kysela [ALSA] fix data type mismatch in sign_invert au88x0 driver the last sign_invert cleanup introduced a data type mismatch (an unsigned value can never be negative) Signed-off-by: Clemens Ladisch [ALSA] remove old compatibility code USB USX2Y Signed-off-by: Clemens Ladisch [ALSA] remove dead exports ALSA Core,Instrument layer,AD1848 driver,ES1688 driver Alsa currently has tons of dead exports, often with totally unused functions behind them. This removes some of them. Signed-off-by: Christoph Hellwig Signed-off-by: Clemens Ladisch [ALSA] Limit parity error messages BT87x driver Some systems generate tons of PCI parity errors, so shut up when more than 20 have been detected. Signed-off-by: Clemens Ladisch [ALSA] remove kernel version info from proc file ALSA Core The kernel version information isn't necessary for the driver in the kernel tree, so move it to the alsa-driver package. This removes a dependency to . Signed-off-by: Clemens Ladisch [ALSA] fixed emu10k1_fx8010_code_t structure to be less than 8192 bytes EMU10K1/EMU10K2 driver This patch fixes emu10k1_fx8010_code_t structure using indirect pointers to be less than 8192 bytes to follow the ioctl semantics. Signed-off-by: Jaroslav Kysela [PATCH] net/wan/n2.c: remove an unused function Signed-off-by: Adrian Bunk Signed-off-by: Jeff Garzik [PATCH] net/wan/n2.c: remove an unused function Adrian Bunk writes: > The patch below removes an unused function from drivers/net/wan/n2.c A similar thing, for C101 card. Signed-off-by: Krzysztof Halasa Signed-off-by: Jeff Garzik [PATCH] net/typhoon.c: use previously-unused function A response to Adrian Bunk's "remove unused function" cleanup patch. Signed-off-by: Jeff Garzik [PATCH] bonding: remove an unused function Signed-off-by: Adrian Bunk Signed-off-by: Jeff Garzik [PATCH] net/3c505.c: remove unused functions Signed-off-by: Adrian Bunk Signed-off-by: Jeff Garzik [PATCH] net/skfp/smt.c: remove an unused function The patch below removes an unused function from drivers/net/skfp/smt.c Signed-off-by: Adrian Bunk Signed-off-by: Jeff Garzik [PATCH] Add Altimata PHY to sis900 driver The attached patch fixes a long standing detection problem with the sis900 driver. This PHY chip is used on some Pentium 4 with SiS chipset and on the Acer Aspire 1705SMi (at least) notebook. Signed-Off-By: Daniele Venzano Signed-off-by: Jeff Garzik [PATCH] unexport ei_tx_timeout not used by any module Signed-off-by: Jeff Garzik [ALSA] emu10k1 - fixes against the last emufx changes EMU10K1/EMU10K2 driver The indirect pointers are allocated correctly now for default DSP code. Also, one bug in emu10k1_fx8010_code_t has been fixed as well. Signed-off-by: Jaroslav Kysela [PATCH] r8169: endian-swap return of rtl8169_tx_vlan_tag() Endian-swap return of rtl8169_tx_vlan_tag() in rtl8169_start_xmit() Signed-off-by: John W. Linville Signed-off-by: Jeff Garzik [PATCH] r8169: fix RxVlan bit manipulation Fix manipulation of RxVlan bit in rtl8169_vlan_rx_register(), and remove it from rtl8169_vlan_rx_kill_vid(). Signed-off-by: John W. Linville Signed-off-by: Jeff Garzik [PATCH] r8169: simplify trick if() expression Simplify tricky if() expression in rtl8169_vlan_rx_register(). Signed-off-by: John W. Linville Signed-off-by: Jeff Garzik [PATCH] 3c59x: Add MODULE_VERSION Add MODULE_VERSION to 3c59x driver. Signed-off-by: John W. Linville Signed-off-by: Jeff Garzik [PATCH] 8139too: Add MODULE_VERSION Add MODULE_VERSION to 8139too driver. Signed-off-by: John W. Linville Signed-off-by: Jeff Garzik [PATCH] r8169: Add MODULE_VERSION Add MODULE_VERSION to r8169 driver. Signed-off-by: John W. Linville Signed-off-by: Jeff Garzik [PATCH] e100: Add MODULE_VERSION Add MODULE_VERSION to e100 driver. Signed-off-by: John W. Linville Signed-off-by: Jeff Garzik [PATCH] tulip: Add MODULE_VERSION Add MODULE_VERSION to the tulip-based drivers Signed-off-by: John W. Linville Signed-off-by: Jeff Garzik [PATCH] hp100: use netdev_priv (rev 2) Here is a revised version of the hp100 patch sequence. First one just does netdev_priv. Worked with Jean to get these patches tested. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik [PATCH] hp100: use inline for comple usage of dev->priv Make a separate function for the one more complex usage of netdev_priv. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik [PATCH] tlan: use netdev_priv (rev 2) Use netdev_priv Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik [PATCH] tlan: get rid of unneeded global vars (rev 2) The global variable media_map is never used. And the media table media can be static. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik [PATCH] tlan: make inline's static (rev2) Make inline functions static to avoid polluting global namespace. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik [PATCH] tlan: enable faster hash function Cleanout dead code, and use better hash function. The faster hash function was already there, but not turned on by default. Tested hash function for 10 million random addresses. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik [PATCH] xircom_tulip_cb: convert to using module_param Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik [PATCH] prism54 fix resume processing * We need to enable the device on resume. Signed-off-by: Jeff Garzik [PATCH] prism54 sparse fixes * On top of Linus's sparse changes, here is a * fix that further reduces sparse warnings. We are still left with 2 warnings caused by the member "data.pointer" in struct "iwreq_data" being "__user" (from wireless.h). Signed-off-by: Jeff Garzik [ACPI] fix mis-merge in processor.c drm: core/personality split for 2.6 kernel This changeset gets rid of the DRM() macros and implements a core DRM module linked to a per graphics card personality module.. Remove old 2.4 module parameters and switch to 2.6 module parameters From: Jon Smirl and Dave Airlie Signed-off-by: Dave Airlie drm: drm_memory.c missing from build Add drm_memory.c to build. Signed-off-by: Dave Airlie drm: rename fn_tbl to driver as it is no longer a function table This renames the drm_driver_fn to drm_driver and fn_tbl to driver, this name is makes much more sense now. From: Jon Smirl and Dave Airlie Signed-off-by: Dave Airlie drm: move fops into drivers move the drm file operations into the driver. From: Jon Smirl Approved-by: Dave Airlie drm: rearrange some functions for new split This change moves some functions into different C files to align things a bit more correctly... From: Jon Smirl Approved-by: Dave Airlie drm: make pcigart functions inline with these unstatic uninline the kernel wouldn't build with both configured. Signed-off-by: Dave Airlie [PATCH] net/gt96100eth: replace gt96100_delay() with msleep_interruptible() Uses msleep_interruptible() instead of schedule_timeout() in the gt96100_delay() function. Corrects one comment to correspond to the code. Signed-off-by: Nishanth Aravamudan Signed-off-by: Jeff Garzik [PATCH] S2io: cosmetic changes 1. Indentation, change in comment styles, variable name changes etc. 2. Changed the value written to dtx_control register to force XGXS reset. 3. weight parameter(NAPI) changed to 90 for better performance. Signed-off-by: Raghavendra Koushik Signed-off-by: Ravinandan Arakali Signed-off-by: Jeff Garzik [PATCH] S2io: sw bug fixes 1. In free_rx_buffers clearing out RxDs not owned by Xena. 2. In alarm_intr_handler, when a serr error occurs, schedule a task to reset the card rather than stopping Tx queue. 3. In s2io_close freeing IRQ before calling s2io_reset also added a new call to flush queued tasks. This is not done if the s2io_close itself is called from a queued task like s2io_restart_nic. 4. read_eeprom function has been changed such that data to be returned is sent as an input argument and the return value represents a pass/fail. The previous implementation as Randy had pointed out was error prone as on failure it returned -1 which can be interpreted as all ff's, so any data area which contained ff's in the eeprom was likely to be treated as an error. 5. Added a flag "task_flag" to track if the call to s2io_close is coming from the s2io_restart_nic function or from the ifconfig down called by user. 6. Moved register_netdev call from just after setting entry points to the end of the s2io_init_nic function. 7. In s2io.h field added a new member into the s2io_nic structure called "task_flag". Signed-off-by: Raghavendra Koushik Signed-off-by: Ravinandan Arakali Signed-off-by: Jeff Garzik [PATCH] S2io: optimizations 1. Definitions of LOW and PANIC levels of the Rx buffers have changed. 2. In wait_for_cmd_complete there is no longer a writeq but just a read and wait for strobe bit to reset. 3. In s2io_isr, the isr_lock has been done away with also the NICs interrupt are no longer disabled explicitly on entering the interrupt handler and re-enabled again before leaving it. 4. Also clearing the semaphore "tasklet_status" when exiting erroneously from s2io_isr after failing fill_rx_buffer call. 5. The set/reset Tx Csum function through ethtool was added to the ethtool_ops structure. 6. Added a Rx side error code in the rx_osm_handler function. 7. No longer stopping and waking Tx queue when link state changes in s2io_link function. 8. removed the isr_lock spinlock from the s2io_nic structure. 9. changed parameters which determine thresholds(LOW and PANIC) to replenish Rx buffers. This has been found to result in better performance. Signed-off-by: Raghavendra Koushik Signed-off-by: Ravinandan Arakali Signed-off-by: Jeff Garzik [PATCH] S2io: hardware fixes 1. Xena3's with a set of subsystem IDs had Link LED problems, fixed that specifically for them. 2. To write into the Keyed Mac_Cfg register to enable broadcast, writing two 32 bit writes into it along with a write to the key register rather than a single write to key and a 64 bit write to mac_cfg. This is necessary on 32 bit systems where a writeq(64 bit write) is actually two writel (32 bit writes). 3. Writes to some special registers mentioned in UG is being done by a special macro which defines which 32 bits of the 64 bit register is to be written first. Again this applies only on 32 bit systems. 4. Configured pause frame related water marks and a shared_split value which describes the Max TXDMA related split transaction that can be used without giving room for the Rx transactions. 5. The mac_rmac_err_reg R1 register will be cleared in the interrupt handler itself rather than in the scheduled task as was being done previously. 6. Even on PCC_FB_ECC error the card will be reset by disabling adapter enable bit. Signed-off-by: Raghavendra Koushik Signed-off-by: Ravinandan Arakali Signed-off-by: Jeff Garzik [PATCH] S2io: module loadable parameters 1. Max Txds per List. 2. statistics refresh time 3. pause frame control parameters including gap between two successive frames, threshold watermarks 4. RTI and TTI configuration parameters including ranges, packet counts and timeout periods. For further information please read the section 3.5 of XFrame H/W spec. 5. PCI/PCI-X configuration variables latency_timer, MMRBC and OST. 6. OS offload features TSO (If support available) and checksum offload. 7. If NAPI is not in use, a variable indicate_max_pkts can be used to limit number of Rx side packets processed for one call to Rx Intr handler. Signed-off-by: Raghavendra Koushik Signed-off-by: Ravinandan Arakali Signed-off-by: Jeff Garzik [PATCH] S2io: new txd allocation The attached patch contains a modified scheme for allocating Tx descriptor blocks. More description follows. In the old scheme, the entire Tx descriptor space was allocated in one go. This could cause driver load to fail on systems with low(or scattered) memory. The Tx descriptor blocks are now allocated on per-page basis. A new structure (list_info) has been introduced in nic_t structure to keep track of the physical and virtual addresses of every TxD allocated this way. Signed-off-by: Raghavendra Koushik Signed-off-by: Ravinandan Arakali Signed-off-by: Jeff Garzik [PATCH] S2io: NAPI fix 1. When processing Rx packets, making sure that get offset of ring does not cross the put offset. 2. when NAPI is not in use a new spinlock(put_lock) is used to make sure accessing put offset of ring is atomic. 3. Also introduced a new vaiable put_pos in nic_t to keep track of absolute position of the put pointer of Rx ring. 4. When NAPI is used, fill_rx_buffer is not called from the interrupt handler(s2io_isr) . 5. In s2io_poll, decrementing packets processed is done inside the while loop unlike out side it as was being done last time. Signed-off-by: Raghavendra Koushik Signed-off-by: Ravinandan Arakali Signed-off-by: Jeff Garzik [PATCH] S2io: two buffer mode Attached is the patch for implementing 2-buffer mode on Rx path. On certain systems when a DMA has to happen on an un-aligned memory location performance will take a significant hit. It's standard practice to offset the Rx buffer address by 2 (as Mac header is 14 bytes) so the IP header starts from an aligned location. Obviously using a single Rx buffer both cannot be achieved. Thus XFrame supports something called 2 buffer Rx mode, where in the Rx'ed frame is split into 2 parts, one is the Ethernet header and the other is the Ethernet payload. So now we can allocate proper aligned memory for both buffers, hence the DMA is not slowed down. Also, the Ethernet payload(starting from L3 header) is on an aligned location so OS need not have to do un-aligned accesses to process IP header. To achieve this, the kernel function eth_type_trans functionality has to be partially implemented in the driver itself. Signed-off-by: Raghavendra Koushik Signed-off-by: Ravinandan Arakali Signed-off-by: Jeff Garzik [PATCH] S2io: new functions for card restart The attached patch incorporates Jeff's comments related to creating separate functions for restarting the NIC(without using close and open entry points) and few other comments. Complete list of changes are as follows: 1. Two new functions s2io_card_down() and s2io_card_up() are defined and are called during reset procedure instead of close and open routines. 2. tasklet_status field is now made as unsigned long. 3. On getting serious error, queue is stopped before resetting the card. 4. Removed the check for "queue stopped" in xmit routine. Signed-off-by: Raghavendra Koushik Signed-off-by: Ravinandan Arakali Signed-off-by: Jeff Garzik [PATCH] S2io: 2 buffer mode with copy This patch addresses the comments by Chris Leech about skb->mac.ethernet resulting in NULL dereference with the old method of implementing 2 buffer mode. The new method performs a copy of the MAC header to the head of the payload. This is a stop-gap measure till the fragmented skb receive feature in the kernel is made functional. Also, using GFP_KERNEL flag for buffer0, buffer1 memory allocation instead of GFP_ATOMIC. Signed-off-by: Raghavendra Koushik Signed-off-by: Ravinandan Arakali Signed-off-by: Jeff Garzik [PATCH] S2io: modified loadable parameters Attached is the patch to implement module loadable parameters as per new API. Following is the list of changes. 1. Used new module_param() API. 2. List of variables for tx_fifo_len and rx_ring_sz replaced with array. 3. Some of the module parameters which can be set thru setpci command have been removed, such as latency_timer, max_read_byte_cnt, max_split_transactions. 4. Other parameters which were felt to be not required, such as rx_prio, tx_prio have been removed. 5. Interrupt moderation parameters(such as tx_urange_*) are no longer module loadable parameters since they can be configured thru' a separate patch available to customers. 6. Changed default max_read_byte_count to 1024. 7. If scatter-gather is enabled, checksum is enabled too. 8. Not verifying if module loadable parameters are within valid range (verify_load_param() removed). Signed-off-by: Raghavendra Koushik Signed-off-by: Ravinandan Arakali Signed-off-by: Jeff Garzik [PATCH] S2io: styling Attached is the patch to implement comments about styling and few other changes. Following is list of changes. 1. Incorporated Randy's comment about C99 format for s2io_driver structure initialization. 2. Driver version displayed at load time. 3. If initialization failed in s2io_init_nic(), appropriate error codes are returned. 4. #ifdef SET_ETHTOOL_OPS removed in couple of places. Signed-off-by: Raghavendra Koushik Signed-off-by: Ravinandan Arakali Signed-off-by: Jeff Garzik drm: move ati_pcigart into drm core This moves the ati_pcigart code into the drm core. From: Jon Smirl Signed-off-by: Dave Airlie [PATCH] fix platform_rename_gsi related ia32 build breakage "platform_rename_gsi" does not exist unless CONFIG_ACPI_BOOT is defined. Fix the fix. Silly #endif placement problem. [ACPI] CPU hotplug, use kobject_hotplug(), kobject_register() Signed-off-by: Anil S. Keshavamurthy Signed-off-by: Len Brown drm: fix warning for missing vunmap In file included from drivers/char/drm/drmP.h:795, from drivers/char/drm/drm_dma.c:36: drivers/char/drm/drm_memory.h: In function `drm_ioremapfree': drivers/char/drm/drm_memory.h:191: warning: implicit declaration of function `vunmap' Signed-off-by: Andrew Morton Signed-off-by: Dave Airlie drm: fix Kconfig dependency fixup DRM/AGP Kconfig inter-dependency... From: Roman Zippel Signed-off-by: Dave Airlie [ALSA] replace schedule_timeout() with msleep() CS4231 driver Uses msleep() instead of schedule_timeout() to guarantee the task delays as expected. This lead to several related changes, as the current code assumes the value of HZ is 100. Use timeout as an iteration variable to count out how many 10ms delays should be used. Signed-off-by: Nishanth Aravamudan Signed-off-by: Clemens Ladisch [ALSA] replace schedule_timeout() with msleep() SPARC cs4231 driver Uses msleep() instead of schedule_timeout() to guarantee the task delays as expected. Signed-off-by: Nishanth Aravamudan Signed-off-by: Clemens Ladisch [ALSA] emu10k1 - another attempt to correct the new emufx DSP code EMU10K1/EMU10K2 driver Signed-off-by: Jaroslav Kysela [ALSA] Added SNDRV_HWDEP_IFACE_BLUETOOTH ALSA Core Signed-off-by: Marcel Holtmann Signed-off-by: Jaroslav Kysela [ALSA] remove snd_seq_simple_id Instrument layer,GUS Library,Trident driver remove uses of the snd_seq_simple_id symbol because it is no longer exported Signed-off-by: Clemens Ladisch [ALSA] Fixed the description of module_parm_array() Documentation Fixed the description about module_param_array() for the latest change. Signed-off-by: Takashi Iwai [ALSA] removes unneeded spin_lock_irqsave()s from snd-es1968 ES1968 driver spin_lock_irqsave(&chip->reg_lock) was called a second time in sequence from snd_es1968_bob_start() called from es1968_measure_clock(). While this didn't cause harm on my UP laptop with mainline kernels, it made 'insmod snd-es1968' hang on kernel 2.6.9-mm1-RT-V0.6.9. The patch assumes that 2 callpaths don't need explicit spinlock protection: 1: The trigger callback, because it is called with IRQs disabled. 2. PM's suspend/resume callbacks, because those are called while ortdinary user processes are frozen. Thus the spin_lock_irqsave(&chip->reg_lock) calls in snd_es1968_bob_start() / snd_es1968_bob_stop() are not needed. Signed-off-by: Karsten Wiese Signed-off-by: Takashi Iwai [ALSA] Add subvendor ID to the pci id table of vx222 driver Digigram VX222 driver The subsystem ID is added to the pci id table of vx222 driver to make the matching more strict since it (PLX) conflicts with other devices. Signed-off-by: Takashi Iwai [ALSA] Fixed issues with Abit AV8 VIA82xx driver Added Abit AV8 sound card to the white list to use VIA_DXS_NO_VRA by default. This resolves issues with programs wanting to use 41k streams. It also fixes gstreamer issue with alsasink module interaction. Signed-off-by: Jerone Young Signed-off-by: Takashi Iwai [ALSA] [emu10k1] add interval timer support EMU10K1/EMU10K2 driver Signed-off-by: Lee Revell Signed-off-by: Takashi Iwai [ALSA] emu10k1 - fixed remaining problems with new DSP code loading EMU10K1/EMU10K2 driver Signed-off-by: Jaroslav Kysela [ALSA] handle missing control bitmap when parsing MUDs USB generic driver The AudioTrak Maya44 USB has a mixer unit descriptor without a bmControl field; handle this as if all bits are zero. Signed-off-by: Clemens Ladisch [ALSA] read bmControls array in correct order USB generic driver The driver used some code from audio.c that reads the bmControl array backwards; this would not work here as we get a pointer to the beginning of the array. Signed-off-by: Clemens Ladisch [ALSA] fix parsing of mixer unit descriptors USB generic driver MU descriptor parsing code completely rewritten; the old code confused the number of input audio channel clusters and the number of input channels. Furthermore, check all bmControls bits so that mixer controls are created even if the first output channel doesn't have a control. Signed-off-by: Clemens Ladisch drm: remove use of drm_agp use agp backend directly. This removes the inter module stuff between the DRM and AGP. Signed-off-by: Dave Airlie [ALSA] nonblock_open=1 by default for OSS PCM API emulation Documentation,ALSA<-OSS emulation Signed-off-by: Jaroslav Kysela drm: in-correct locking in intel drms The locking in the intel drms is incorrect it doesn't check the current context owns the lock, just that someone does. This could allow strange things to happen with multiple clients. From: Stefan Dirsch Approved-by: Dave Airlie ALSA 1.0.7 [PATCH] sk98: no explicit module ref counting needed Network driver's shouldn't be doing module reference counting on 2.6. This is a bad replication of 2.4 behaviour Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik [PATCH] sk98: local variable can be constant The table OnesHash is only used in this file, and should be made a local constant. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik [PATCH] sk98: /proc interface related changes The /proc intereface can be cleaned up a lot: + Pass the device to through the proc data/seq_private hook. + No longer needs to have a list of network devices + use seq_printf directly rather than indirection into a buffer + failure to create proc directory or interface should not be fatal. + if PROC_FS not configured, let the stubs cause the necessary code elimination rather than using #ifdef Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik [PATCH] sk98: use netdev_priv Use netdev_priv when dereferenceing net_device private Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik [PATCH] sk98: use module_param Use new format module_param rather than now deprecated MODULE_PARM Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik [PATCH] sk98: add netpoll console support Add netpoll console support From: Michal Schmidt Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik [PATCH] sk98: basic ethtool support The basic stuff comes from the newer code from SysKonnect, but I redid it using ethtool_ops and a cleaner way of doing the stats (from e100) Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik [PATCH] sk98: ethtool phy support The basic stuff comes from the newer code from SysKonnect, but I redid it using a per board timer rather than a global timer. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik [PATCH] sk98: ethtool pause param support The basic stuff comes from the newer code from SysKonnect, but there code had ugly way to find the PNMI instance. This driver seems full of places where they do unnecessary board/port bookeeping (*sigh*) Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik [PATCH] Another big 6pack patch Below another 6pack patch which I've got sitting in my repository for a while already. The patch does: o Update my callsign o Cleanup the internal for synchronization with a 6pack TNC a little bit so it won't result in heaps and piles of messages in syslogs as it used to do. o Does paranoia checks for the maximum allowable packet size on transmit. There was a slight chance this might have resulted in a crash in just the right configuration. o Verifies the address family for the SIOCSIFHWADDR network interface ioctl. o Tries to do proper locking so nothing will access dev->dev_addr in midflight while changing the layer 2 address. o Uses an intermediate buffer for the SIOCSIFHWADDR ioctl so an error in copy_from_user can't result in a half-modified MAC address. o Swaps the arguments of decode_prio_command, decode_std_command and decode_data such that for consistency the struct sixpack pointer will be the first argument like everywhere else. Signed-off-by: Jeff Garzik [PATCH] convert sis900 to new style parameters Signed-off-by: Jeff Garzik [sound/oss i810_audio] use module_param() Also, set MODULE_AUTHOR and correct module name in a macro. [sound/oss] use module_param() in soundcard.c and uart401.c [libata sata_via] minor cleanups Preparation for addition of VT6421 support. Mostly moving bits of code into discrete functions. [libata sata_via] add support for VT6421 SATA [libata sata_uli] add 5281 support, fix SATA phy setup for others Contributed by Peer Chen @ ULi and tested by a user. JFFS2: Add support for bizarre NOR flash with ECC. Signed-off-by: Josh Boyer Signed-off-by: David Woodhouse MTD: Provide XIP support for Intel flash chips. This allows for MTD support to be used on flash memory which is also used for XIP purposes, either XIP kernel or XIP userspace. The whole idea is to relocate functions actually modifying the flash state away from array mode to ram and run them with interrupt disabled. When the flash needs some time to complete a certain operation, we poll the processor for pending (but still masked) interrupts, and when they occur we suspend the flash operation in order to unmask interrupts and let the system run again. Signed-off-by: Nicolas Pitre Signed-off-by: David Woodhouse MTD: NAND driver updates - Support 2048-byte HW ECC (from Juha Yrjölä ) - Allow board drivers to provide pattern for bad block scanning Signed-off-by: Thomas Gleixner Signed-off-by: David Woodhouse JFFS2: Move very noisy debugging messages from level 1 to level 2. Signed-off-by: Artem Bityuckiy Signed-off-by: David Woodhouse update the fc_transport_class to use a workqueue instead of a timeout The amount of work that has to be done in the timeout routines is really a bit much if there's a large number of LUNS. Plus the device_for_each_child needs user context to get the bus semaphore, so the solution is to migrate them from a timer to delayed work. There's still a race here in that the timer may still be ticking when the device is destroyed ... To fix this, I think we may need to introduce a destroy callback to the transport class. Signed-off-by: James Bottomley SCSI: updates to constants.c From: Douglas Gilbert - bring opcode names, asc/ascq strings and sense format into line with SPC-3 rev 21 (22 September 2004) - drop SCSI-1 sense buffer decoding [still output it in hex] - opcode names include those that depend on service actions including variable length commands ** - decodes both fixed and descriptor sense data formats - use KERN_INFO on printk()s that start on new lines - flag vendor specific asc and acsq codes - print all bytes of a cdb after the name (previously skipped the first byte) - cleanup file, tab to 8 spaces Signed-off-by: James Bottomley SCSI: Add transport destructors From: James.Smart@Emulex.Com This patch adds host/target/sdev destructor functions to the transport template. The FC transport is updated to utilize them to cancel any outstanding timer. It slightly rearranges the slave_xxx functions so the transport is always involved prior to the LLDD. Minor rejection fixes and Signed-off-by: James Bottomley JFFS2: Add notes on inocache_lock spinlock to README.Locking Signed-off-by: Artem Bityuckiy Signed-off-by: David Woodhouse Email address update. The work address is increasingly unreliable and incompetently run. Time to remove all visible instances of it and rely only on one which isn't run by crack-monkeys. Signed-off-by: David Woodhouse [PATCH] iSCSI transport class The attached patch adds an iSCSI transport class. It was built against scsi-misc-2.6. It allows the software/virtual iSCSI driver to remove at least one of its ioctl commands. The patch also assumes the no multipath/failover rule in llds applies to iSCSI drivers, so when we remove our portal/portal_group failover support it will allow us to kill all our ioctl commands execpt the session creation one (that will take more thought). We would like to build some functions like the unblock/block capabilites into the iscsi transport class like James Smart has done with FC class. but initially we would like to begin with this smaller patch that only provides an iscsi sysfs interface. Signed-off-by: James Bottomley SCSI: descriptor sense format, mid-level - generalize sense data logic to cope with both fixed and descriptor format - use KERN_INFO on most printk()s to limit console noise - retire mid-level usage of sense_class(), sense_error() and sense_valid() macros which are SCSI-1 remnants. Now only cpqfcTSinit.c seems to use them Signed-off-by: James Bottomley SCSI: Add missing state transition BLOCK->OFFLINE From: James.Smart@Emulex.Com Signed-off-by: James Bottomley JFFS2: Remove definition of obsolete struct jffs2_scan_info We no longer use this, since we rewrote the mount code to behave entirely differently and not build up all the trees on mount. Signed-off-by: Artem Bityuckiy Signed-off-by: David Woodhouse MTD: Fix chip ident definition for AMD 29F002T devices. They were missing unlock address and command set fields. From: David Vrabel Signed-off-by: David Woodhouse [PATCH] iscsi_transport build fix drivers/scsi/scsi_transport_iscsi.c:176: structure has no member named `sin6_addr' Older gcc's dont support anonymous unions. Signed-off-by: Andrew Morton Signed-off-by: James Bottomley JFS: fix race in jfs_commit_inode There was a race that resulted in old, deleted inodes being written to disk after the inode number had been reused. jfs_commit_inode needs to verify that the inode is still linked and dirty before committing it. Signed-off-by: Dave Kleikamp [PKT_SCHED]: Allow using nfmark as key in U32 classifier. Signed-off-by: Catalin(ux aka Dino) BOIE Signed-off-by: David S. Miller [NET]: Add alloc_skb_from_cache. This serves two purposes: firstly, we like to allocate page-sized skbs as this means we zero-copy transfer of network buffers between guest operating systems. Secondly, it enables us to have a cache of pages that have been used for network buffers that we can be more lax about scrubbing when they change VM ownership (since they could be sniffed on the wire). Signed-off-by: David S. Miller [NET]: Kill drivers/net/net_init.c After the last patch only three routines are left in this file, but all of the fir into net/core/dev.c much better: - {un,}register_netdev are just wrappers around {un,}register_netdevice from dev.c - alloc_netdev's counterpart, free_netdev is in dev.c aswell. So move over the remaining contents and add some kerneldoc comments describing the functions. Signed-off-by: David S. Miller [NET]: Use local_softirq_pending instead of softirq_pending in netif_rx_ni Some architectures can optimize local_softirq_pending much better than softirq_pending(smp_processor_id()), and for all others the former is just a macro expanding to the later. Also this is the last use of softirq_pending() in common code, once this is in we can soon kill the notation of beeing able to query other cpus softirq pending count. Signed-off-by: David S. Miller MTD: Fix JEDEC probe of chips which don't require unlock sequence Signed-off-by: Thayne Harbaugh Signed-off-by: David Woodhouse JFFS2: Remove obsolete structure definitions and update comments. New eyes are looking over ancient code and comments which were put in as the design was first coming together... and which don't make even the slightest bit of sense any more. Signed-off-by: Artem Bityuckiy Signed-off-by: David Woodhouse JFFS2: Discard dirents which point to non-existent inodes. If a directory entry refers to an inode which doesn't actually exist, we weren't marking it obsolete, so it was still visible in the file system, and would give EIO if you ever tried to stat it. Once upon a time, perl -e 'unlink' and rm -f would manage to unlink such things but nowadays they both try to stat it first and stupidly refuse to even attempt the unlink if the stat fails, and this is more of a problem. So we throw it away ourselves. Signed-off-by: Artem Bityuckiy Signed-off-by: David Woodhouse JFFS2: Fix memory leak if jffs2_scan_medium() fails. We weren't releasing all the temporary dirent structures we may have built up during the first part of the scan. Signed-off-by: Artem Bityuckiy Signed-off-by: David Woodhouse JFFS2: Fix race on read access to NAND write-buffer. With SMP or preempt, we could attempt to read data from the wbuf while it was being updated. Introduce a new rwsem to prevent this, and update the documentation accordingly Signed-off-by: Artem Bityuckiy Signed-off-by: David Woodhouse MTD NOR chip drivers: use msleep() Description: Use msleep() instead of schedule_timeout() to guarantee the task delays as expected. Signed-off-by: Nishanth Aravamudan Signed-off-by: Maximilian Attems Signed-off-by: David Woodhouse MTD: Use msleep() in cfi_udelay() helper function. Signed-off-by: David Woodhouse drm: move the enable device before filling in device info This moves the pci_enable_device to before the device info is filled out as without routeirq this goes wrong.. Thanks to Ralf Gerbig for testing this. Signed-off-by: Dave Airlie [IA64] convert to use CONFIG_GENERIC_HARDIRQS Convert ia64 to use generic irq handling code. sn2 fixes and testing by Jesse Barnes Signed-off-by: Tony Luck [EBTABLES]: Add userspace logging via netlink socket. The patch below adds the ebtables ulog watcher, that sends packets to userspace. It is based on ipt_ULOG.c. The complete packet, including Ethernet header, is sent to userspace. The in and out bridge ports are also sent to userspace. Logging is of course not restricted to IP packets. An example of a userspace program that receives and parses packets sent by the ulog watcher is in the ebtables CVS tree under examples/ulog/ Signed-off-by: Bart De Schuymer Signed-off-by: David S. Miller [PKT_SCHED]: Clean up tcf_action_init memory handling Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [XFRM]: Export xfrm_policy_delete() Will be needed for DCCP. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller [ARCNET]: Fixes. As previously reported the ArcNet driver didn't work with Preempt and SMB on. They do now. I have changed the locking system from being a global arcnet lock to being a lock per device. I used the lock in dev->hard_start_xmit = arcnet_send_packet. Furthermore I added the 'CAP mode' encapsulation. As far as I see it it is the only encapsulation which actually makes ArcNet usefull over ethernet. Previously, the driver just ignored the hardware transmit status, now you can get hardware acknowledge and excessive nacks back to userspace via a raw socket. The capmode.c is nearly just a copy of arc-rawmode.c. The difference is that it inserts a ack_tx() handle into the general driver framework. Signed-off-by: Andrew Morton Signed-off-by: David S. Miller [X25]: When receiving a call, check listening sockets for matching call user data. If a listening socket sets call user data, ensure it only receives calls with matching call user data. Also ensure incoming calls with matching call user data dont go to another listening socket. Signed-off-by: Andrew Hendry Signed-off-by: Andrew Morton Signed-off-by: David S. Miller [X25]: Remove unused header files. Signed-off-by: Andrew Hendry Signed-off-by: Andrew Morton Signed-off-by: David S. Miller [NET]: __sock_create() cleanup The 'i' variable in net/socket.c::__sock_create() is not necessary. It's have been used to store error codes but there is an 'err' variable already. Signed-off-by: Luiz Capitulino Signed-off-by: Andrew Morton Signed-off-by: David S. Miller [PATCH] feed eata.c through Lindent the driver oopses on load for me currently, but to debug it I need to actually be able to read the source.. Signed-off-by: James Bottomley convert eata to pass pointers around From: Christoph Hellwig pass pointers to Scsi_Host and the private data around instead of using indices into global arrays all over the place. Signed-off-by: James Bottomley [PATCH] kill scsi_syms.c The patch below removes scsi_syms.c and moves the EXPORT_SYMBOL's to the files where the actual functions are. Signed-off-by: Adrian Bunk Signed-off-by: James Bottomley [PATCH] kill locking around scsi_done() Lets show the mid layer as a good example and remove the host lock around the scsi_done() call. Signed-off-by: Jens Axboe Signed-off-by: James Bottomley ===== drivers/scsi/scsi.c 1.148 vs edited ===== scsi: LLDD dynamic scan aids From: James.Smart@Emulex.Com With rejection fixes around the removal of scsi_syms.c Signed-off-by: James Bottomley fixup dynamic scan aids EXPORT_SYMBOL mismerge OK, so I exported the wrong symbols ... Signed-off-by: James Bottomley LSI Logic - SAS and FC PCI ID's From: Moore, Eric Dean Here are new PCI ID's for SAS and Fibre Channel LSI Logic controllers. Signed-off-by: Eric Moore Signed-off-by: James Bottomley [PATCH] SCSI aic7xxx_old.c: make a function static The patch below makes the needlessly global function aic7xxx_info static. Signed-off-by: Adrian Bunk Signed-off-by: James Bottomley [PATCH] remove bouncing email address of Deanna Bonds The patch below (applies against both 2.4 and 2.6) removes the bouncing email address of Deanna Bonds (I didn't find a nmore recent address). Signed-off-by: Adrian Bunk Signed-off-by: James Bottomley [NETFILTER]: Release dst_entry in PRE_ROUTING after NAT Fixes NAT on loopback. Signed-off-by: Patrick McHardy [NETFILTER]: Remove CONFIG_IP_NF_NAT_LOCAL config option Signed-off-by: Patrick McHardy [NETFILTER]: Save a level of indentation in icmp_reply_translation Signed-off-by: Patrick McHardy [NETFILTER]: Apply PRE_ROUTING manips in LOCAL_OUT for locally generated icmp errors Locally generated ICMP errors never hit PRE_ROUTING. Fixes invalid addressed ICMP errors for SNATed packets. Signed-off-by: Patrick McHardy [NETFILTER]: Verify NAT manips have been applied before reversing them in icmp_reply_translation ICMP errors may be generated for packets that don't have all NAT manips applied yet. Verify manips have been applied before reversing them. Signed-off-by: Patrick McHardy MTD: Fix RedBoot FIS table detection. The redboot partitioning code currently searches for a FIS table entry named "RedBoot" (including the trailing \0) in one of the first three entries to try and verify that the sector it is looking at really is a FIS partition table. Firstly it fails when RedBoot is stored in some other Flash chip such as a boot PROM, in this case there is no "RedBoot" entry in the partition table. However there will always be a "FIS directory" entry in any valid FIS directory. Secondly it can fail since the RedBoot entry is not always in the first 3 slots -- this can happen for example on an x86 based platform where the processor expects the boot device to be at the top of memory rather than the bottom and so RedBoot is at the end of the flash device. Equally when using "FIS directory" as the entry to search for it very likely is not in the first three since the directory is typically at the end of the flash. Signed-off-by: Ian Campbell Signed-off-by: David Woodhouse MTD: mtdpart_setup() is used from platform code. Remove 'static'. Signed-off-by: Jarkko Lavinen Signed-off-by: David Woodhouse MTD: Make phram work again o Add simple usage example. o Fix up unit handling (k, M. G). o Use correct size limit for setup string. o Remove pointless printk message. o Fix mtdblock to not allocate a read-modify-write buffer for CAP_RAM devices (and fail to do so, returning an error). Signed-off-by: Jörn Engel Signed-off-by: David Woodhouse MTD: Fix oops on erase in NFTL/INFTL (again). Only this time, set the field we were dereferencing _after_ we zero it not before. Signed-off-by: Kalev Lember Signed-off-by: David Woodhouse MTD: Fix timing setup for NAND flash on Samsung S3C2410. Spotted by Shannon Holland. Signed-off-by: Ben Dooks Signed-off-by: David Woodhouse MTD: Support NOR and NAND flash on Sharp SL Series PDAs. Signed-off-by: Richard Purdie Signed-off-by: David Woodhouse MTD: NAND flash simulator We want to contribute the NAND flash simulator which we successfully use when developing JFFS2. It is very useful tool which helps to develop without real flash. It supports several options which allow to select which flash type to emulate (just flash IDs which are in nand_ids.c file). See modinfo for other options. Signed-off-by: Artem B. Bityuckiy Signed-off-by: David Woodhouse JFFS2: Fix oops in read_inode. If the node with lowest version in a file was in the range 0xfffff000 onwards, we oopsed because our rounding was bogus. Signed-off-by: David Woodhouse JFFS2: Various fixes for recent RAM use reduction. We recently started trying to merge the jffs2_raw_node_ref structures for adjacent obsolete nodes. Fix a bunch of problems in that: - Free inode cache structure for a dead inode which is now completely gone. - Fix races vs. erase code which also walks the same lists. - Fix BUG() when trying to merge with a node which still belongs to an inode. Signed-off-by: David Woodhouse JFFS2: Initialise bad_count for each eraseblock correctly. Patch from Estelle Hammache Signed-off-by: David Woodhouse JFFS2: Split eraseblock refiling into separate function ...in preparation for further cleanups from Estelle Hammache which will need to call it from elsewhere. Signed-off-by: David Woodhouse JFFS2: Allow NAND driver to disable virtual eraseblocks. In order to keep the RAM usage down with large devices and smaller erase block sizes, we were using blocks in JFFS2 larger than the physical erase size. This means that bad blocks lose a lot more space though; allow it to be disabled. Signed-off-by: Thomas Gleixner Signed-off-by: David Woodhouse rslib: Spelling fixes. Some of the fixes from Joe Perches got missed out of the last update. Signed-off-by: Thomas Gleixner Signed-off-by: David Woodhouse NULL noise removal, missing __iomem in a couple of declarations, removal of bogus cast to void * in iounmap() calls. Signed-off-by: Al Viro Signed-off-by: David Woodhouse [ALSA] Fix the missing line in the patch for hdsp accurate_ptr RME HDSP driver Fixed missing line in the patch for hdsp accurate_ptr. Signed-off-by: Takashi Iwai [ALSA] Fix WM8770 Init ICE1712 driver Corrects WM8770 ADC mux initialization Signed-off-by: Peter Christensen Signed-off-by: Takashi Iwai [ALSA] AC97 quirks for Dell Intel8x0 driver Added ac97 quirks for some dell machines. Signed-off-by: Takashi Iwai [ALSA] fix sleep in atomic during prepare callback Intel8x0 driver Fixed the sleep in spinlock during prepare callback. This happened only on Nforce chips. Signed-off-by: Takashi Iwai [ALSA] Add pci_save_state() in suspend ALSA Core Added pci_save_state() in the ALSA suspend core callback since its call was removed from the PCI core driver in the recent version. Signed-off-by: Takashi Iwai [ALSA] add Line/Headphone jack detection for AD1981A/B AC97 Codec Core Line/Headphone Jack Sense mixer switches are added to AD1981A/B. HP sense is activated as default. Signed-off-by: Takashi Iwai [ALSA] fix iomem mmap PCM Midlevel The patch adds the definition vm_private_data again to snd_pcm_lib_mmap_iomem(). It got lost during the rewrite of the mmap stuff. Signed-off-by: Martin Langer Signed-off-by: Takashi Iwai [ALSA] fix MIDI GS chorus/reverb mode ALSA sequencer Fixed the parsing of MIDI GS chorus/reverb mode SYSEX messages. They were swapped. Signed-off-by: Takashi Iwai [ALSA] fix chorus/reverb FX loader EMU8000 driver Fixed the chorus/reverb FX loader callback. The header bytes must be eliminated. Signed-off-by: Takashi Iwai [ALSA] minor send routing cleanup EMU10K1/EMU10K2 driver Use snd_emu10k1_compose_audigy_fxrt* macro where appropriate. Also add a few comments to explain send routing structure. Signed-off-by: Lee Revell Signed-off-by: Takashi Iwai [ALSA] whitespace cleanup EMU10K1/EMU10K2 driver Signed-off-by: Lee Revell Signed-off-by: Takashi Iwai [ALSA] Add pci_disable_device() to removal and error paths ALS4000 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver Intel8x0-modem driver,Maestro3 driver,RME32 driver,RME96 driver SonicVibes driver,VIA82xx driver,ALI5451 driver,CS46xx driver EMU10K1/EMU10K2 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver Trident driver,Digigram VX222 driver,YMFPCI driver pci_disable_device() is called properly in the removal and error paths. Also, the pci_set_master() is added to the resume callbacks if missing (just to be sure). Signed-off-by: Takashi Iwai [ALSA] Addition of pci_disable_device() and cleanup Documentation Added pci_disable_device() in the removal and error paths. Replaced with C-style comments in many places. Signed-off-by: Takashi Iwai [ALSA] via82xx: Enable DXS on ABIT KV8 Pro VIA82xx driver From Marko Kreen : Enable DXS for via audio chip on ABIT KV8 Pro. Works for me. Signed-off-by: Takashi Iwai [ALSA] sort DXS whitelist VIA82xx driver DXS whitelist entries are sorted. Signed-off-by: Takashi Iwai [ALSA] AD18xx/19xx resume fix AC97 Codec Core Added resume callback so that the codec-specific resume code can be called properly. Moved AD-specific initialization code into it. Signed-off-by: Takashi Iwai [ALSA] fix display of send routing in /proc EMU10K1/EMU10K2 driver The emu10k1's send routing is a per channel setting. The emu10k1 has 4 sends per channel, the Audigy 8. Currently we only display the first 4 sends for the first channel. This patch updates the /proc file to display the send routing for all 64 channels, and to display the last 4 sends if present. Signed-off-by: Lee Revell Signed-off-by: Takashi Iwai [ALSA] ALSA PCI drivers: misc cleanups EMU10K1/EMU10K2 driver,Trident driver,YMFPCI driver,AZT3328 driver SonicVibes driver,AC97 Codec Core,CS46xx driver,KORG1212 driver RME HDSP driver,RME9652 driver The patch below does the following cleanups under sound/pci/ : - make some needlessly global code static - remove the following unused EXPORT_SYMBOL's: - trident/trident_main.c: snd_trident_clear_voices - trident/trident_main.c: snd_trident_synth_bzero - remove the following unused global functions: - azt3328.c: snd_azf3328_mixer_read - emu10k1/io.c: snd_emu10k1_sum_vol_attn - trident/trident_main.c: snd_trident_detach_synthesizer - trident/trident_memory.c: snd_trident_synth_bzero Signed-off-by: Adrian Bunk Signed-off-by: Takashi Iwai [ALSA] Fixes the 'It disables the right channel' bug EMU10K1/EMU10K2 driver Signed-off-by: James Courtier-Dutton Signed-off-by: Takashi Iwai [ALSA] Support for Audigy2 Value SB0400 EMU10K1/EMU10K2 driver This adds support for the SB0400 version of the Audigy2 Value, that uses the new CA0108 chip. Signed-off-by: James Courtier-Dutton Signed-off-by: Takashi Iwai [ALSA] make some code static Sound Core PDAudioCF driver The patch below makes some needlessly global code static. Signed-off-by: Adrian Bunk Signed-off-by: Takashi Iwai [ALSA] check CONFIG_COMPAT for snd-ioctl32 ALSA Core check CONFIG_COMPAT for selection of snd-ioctl32 module. Signed-off-by: Takashi Iwai [ALSA] add register dump to proc EMU10K1/EMU10K2 driver The register dump proc files are added. Enabled only when CONFIG_SND_DEBUG=y. Signed-off-by: James Courtier-Dutton Signed-off-by: Takashi Iwai [ALSA] Fixed problem with changing size of etram EMU10K1/EMU10K2 driver It doesn't work to double the etram size, because of a bad comparison statement. Signed-off-by: Mikael Magnusson Signed-off-by: Takashi Iwai [ALSA] [trivial] Fix compile warnings ALSA Core,CS46xx driver,MIXART driver Fix trivial compile warnings. Signed-off-by: Takashi Iwai [ALSA] Fix the detection of Audigy2 ZS EMU10K1/EMU10K2 driver Fix the detection of the older model of Audigy2 ZS. Signed-off-by: Takashi Iwai [ALSA] fix weird placement of static keyword in sound/core/pcm_memory.c PCM Midlevel This patch moves the 'static' keyword to the beginning of the declaration to eliminate the following warning when building with gcc -W sound/core/pcm_memory.c:40: warning: 'static' is not at beginning of declaration This has no actal imact on the code, but it's one less warning to sift through when looking for potential trouble-code with -W I have a hard time thinking of a reason to not apply this trivial patch :) Signed-off-by: Jesper Juhl Signed-off-by: Takashi Iwai [ALSA] misc clean up Intel8x0 driver Clean up the module init code after removal of midi/joystick support. Signed-off-by: Takashi Iwai [ALSA] ALSA ISA drivers: misc cleanups AD1848 driver,CS4231 driver,ES1688 driver,GUS Library,SB drivers Wavefront drivers,ES18xx driver,OPL3SA2 driver,AD1816A driver Opti9xx drivers,SB16/AWE driver,SB8 driver The patch below makes cleanups under sound/isa/ including: - make needlessly global code static - ad1816a/ad1816a_lib.c: much code was unused starting with the global function snd_ad1816a_timer - removed EXPORT_SYMBOL's: - cs423x/cs4231_lib.c: snd_cs4231_outm - es1688/es1688_lib.c: snd_es1688_mixer_read Signed-off-by: Adrian Bunk Signed-off-by: Takashi Iwai [ALSA] Disable 'IEC958 Input Monitor' switch for ALC codecs AC97 Codec Core 'IEC958 Input Monitor' switch for ALC codecs produces only the cracky noises, and KDE seems to turn this on as default in the initialization. So, better to remove this switch. Signed-off-by: Takashi Iwai [ALSA] alternate ALS0200 ident string ALS100 driver The patch adds an alternate ALS0200 ident string Signed-off-by: Pang Lih Wuei Signed-off-by: Takashi Iwai [ALSA] alternate CS4235 ident string CS4236+ driver The patch adds an alternate CS4235 ident string Signed-off-by: Pang Lih Wuei Signed-off-by: Takashi Iwai MTD: Use select in Kconfig where appropriate. Signed-off-by: Adrian Bunk Signed-off-by: David Woodhouse JFFS2: Include vmalloc.h to fix compile warning. The previous fixes to use vmalloc for the eraseblock array missed it. Signed-off-by: Artem Bityuckiy Signed-off-by: David Woodhouse JFFS2: jffs2_get_inode_nodes(): Remove gratuitous memset on new nodes. We're about to set every field in the node structure. No need to spend time filling it with zeroes. This is a fairly hot path. Signed-off-by: Artem Bityuckiy Signed-off-by: David Woodhouse [IPV4]: FIB cleanup, rtmsg_fib() Based largely upon a patch by Robert Olsson. Abstract out rtmsg_fib() so that it does not depend upon fib_hash internal datastructures, move it to fib_semantics.c Signed-off-by: David S. Miller [IPV4]: FIB cleanup, fib_find_alias() Abstract out fib_node arg usage in fib_find_alias(), move to fib_semantics.c Signed-off-by: David S. Miller [IPV4]: FIB cleanup, fib_detect_death() Remove dependancy upon fib_hash specific fn_hash_select_dflt and move it over to fib_semantics.c Signed-off-by: David S. Miller [CRYPTO]: Make some code static This patch below makes some needlessly global code static. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [CRYPTO]: Standalone VIA PadLock driver. Signed-off-by: David S. Miller [RTNETLINK]: Link attribute modification by interface name. This patch allows modification of link attributes by the interface name, avoids the requirement of translating a name to an ifindex first, and provides better atomicity to userspace. It works by setting the ifindex to a negative number and provide the interface name via the IFLA_IFNAME TLV and let the kernel lookup the device by name instead of ifindex. Changing the interface name will not work using this method because IFLA_IFNAME also transports the new interface name. The patch also fixes a possible source for bugs if IFNAMSIZ is ever changed to a number not aligned to RTA_ALIGNTO. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller JFS: add security and trusted xattrs Signed-off-by: Dave Kleikamp [PATCH] via-rhine: WOL band-aid After I disabled legacy WOL (i.e. controlled by EEPROM rather than driver) in 2.6.9, several people reported regressions. Legacy WOL had worked for them, but now it didn't anymore. The Right Way (TM) to fix this will get the driver to set up working WOL for all hardware, but a simpler solution will have to do for the time being: If a user requests magic packet WOL, the driver re-enables legacy WOL. Yeah, I know it's cheating. This version applies against -mm. I suggest to put it there for testing and into 2.6.11 if feedback is good. Thanks to Pavel Ruzicka for testing. Roger Signed-off-by: Roger Luethi Signed-off-by: Jeff Garzik JFS: speed up nointegrity mount No need to flush metadata to advance the journal's sync-point if we're not really writing to the journal Signed-off-by: Dave Kleikamp [ACPI] fix VIA IRQ issue by enabling VIA quirk http://bugzilla.kernel.org/show_bug.cgi?id=3319 Signed-off-by: David Shaohua Li Signed-off-by: Len Brown [ACPI] S3 resume using RTC http://bugzilla.kernel.org/show_bug.cgi?id=1320 By: Patrick Mochel, Karol Kozimor, Shaohua Li Signed-off-by: Len Brown [ACPI] fix "Error getting context for object" warning http://bugzilla.kernel.org/show_bug.cgi?id=3805 Signed-off-by: David Shaohua Li Signed-off-by: Len Brown [ACPI] add "acpi_fake_ecdt" workaround for Gateway: ex_access_region Region EmbeddedControl(3) has no handler http://bugzilla.kernel.org/show_bug.cgi?id=1690 Signed-off-by: David Shaohua Li Signed-off-by: Len Brown [ACPI] handle GPE sharing between button and lid http://bugzilla.kernel.org/show_bug.cgi?id=3518 Signed-off-by: David Shaohua Li Signed-off-by: Len Brown [ACPI] fixes from stack consumption audit http://bugzilla.kernel.org/show_bug.cgi?id=2901 Signed-off-by: Luming Yu Signed-off-by: Len Brown build fix [ACPI] 32-bit EC access http://bugzilla.kernel.org/show_bug.cgi?id=1744 Signed-off-by: Luming Yu Signed-off-by: Len Brown Rename SCSI ChangeLog to reflect its venarability The last time it was modified was 1997, so add the date range of applicability to its name. Signed-off-by: James Bottomley build fix [PATCH] Move MCA_bus to linux/mca.h - Move MCA_bus declaration from to - Define it in mca.c, not setup.c - EXPORT_SYMBOL it at the site of its definition. - Fix up random files to include for the use of the MCA_bus symbol - Delete some unnecessary ifdefs. - Delete some unneeded comments. Signed-off-by: James Bottomley [PATCH] i386 mca.c: small cleanups The patch below contains the following cleanups: - make spinlock mca_lock static - make struct mca_standard_resources static Signed-off-by: Adrian Bunk Signed-off-by: James Bottomley [ACPI] ACPICA 20041119 from Bob Moore Fixed a problem in acpi_ex_convert_to_integer where new integers were not truncated to 32 bits for 32-bit ACPI tables. This routine converts buffers and strings to integers. Implemented support to store a value to an Index() on a String object. This is an ACPI 2.0 feature that had not yet been implemented. Implemented new behavior for storing objects to individual package elements (via the Index() operator). The previous behavior was to invoke the implicit conversion rules if an object was already present at the index. The new behavior is to simply delete any existing object and directly store the new object. Although the ACPI specification seems unclear on this subject, other ACPI implementations behave in this manner. (This is the root of the AE_BAD_HEX_CONSTANT issue.) Modified the RSDP memory scan mechanism to support the extended checksum for ACPI 2.0 (and above) RSDPs. Note that the search continues until a valid RSDP signature is found with a valid checksum. Signed-off-by: Len Brown [ACPI] ACPICA 20041203 from Bob Moore and Alexey Starikovskiy The low-level field insertion/extraction code (exfldio) has been completely rewritten to eliminate unnecessary complexity, bugs, and boundary conditions. Fixed a problem in the ToInteger, ToBuffer, ToHexString, and ToDecimalString operators where the input operand could be inadvertently deleted if no conversion was necessary (e.g., if the input to ToInteger was an Integer object.) Fixed a problem with the ToDecimalString and ToHexString where an incorrect exception code was returned if the resulting string would be > 200 chars. AE_STRING_LIMIT is now returned. Fixed a problem with the Concatenate operator where AE_OK was always returned, even if the operation failed. Fixed a problem in oswinxf (used by AcpiExec and iASL) to allow > 128 semaphores to be allocated. Signed-off-by: Len Brown JFS: flush new iag from bd_inode's mapping This is a fix to help jfs work with grub. A new IAG is created in the bd_inode's mapping, but subsequently modified in a different mapping. We should invalidate the former page to keep grub from using that cached page. It isn't useful to have it cached anyway, since jfs will never access it again through that mapping. Signed-off-by: Dave Kleikamp drivers/block/floppy: kill #include linux/version.h Appears to be unnecessary. [ACPI] remove duplicate _PDC #defines resulting from mis-merge Signed-off-by: Zhenyu Z. Wang Signed-off-by: Len Brown [ACPI] fix polarity of CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI message Signed-off-by: Len Brown [IA64-SGI] Add support for a future SGI chipset (shub2) 1of4 This patch changes the SN macros for calulating the addresses of shub MMRs. Functionally, shub1 (current chipset) and shub2 are very similar. The primary differences are in the addresses of MMRs and in the location of the NASID (node number) in a physical address. This patch adds the basic infrastructure for running a single binary kernel image on either shub1 or shub2. Signed-off-by: Jack Steiner [IA64-SGI] Add support for a future SGI chipset (shub2) 2of4 This patch adds the addresses of shub2 MMRS to the shub_mmr header file. During boot, a SAL call is made to determine the type of the shub. Platform initialization sets the appropriate MMR addresses for the platform. A new macro (is_shub1() & is_shub2()) can be used at runtime to determine the type of the shub. Signed-off-by: Jack Steiner [IA64-SGI] Add support for a future SGI chipset (shub2) 3of4 Change the IPI & TLB flushing code so that it works on both shub1 & shub2. Signed-off-by: Jack Steiner [IA64-SGI] Add support for a future SGI chipset (shub2) 4of4 Change the code that manages the LEDs so that it works on both shub1 & shub2. Signed-off-by: Jack Steiner [IA64] Cachealign jiffies_64 to prevent unexpected aliasing in the caches. On large systems, system overhead on cpu 0 is higher than on other cpus. On a completely idle 512p system, the average amount of system time on cpu 0 is 2.4% and .15% on cpu 1-511. A second interesting data point is that if I run a busy-loop program on cpus 1-511, the system overhead on cpu 0 drops significantly. I moved the timekeeper to cpu 1. The excessive system time moved to cpu 1 and the system time on cpu 0 dropped to .2%. Further investigation showed that the problem was caused by false sharing of the cacheline containing jiffies_64. On the kernel that I was running, both jiffies_64 & pal_halt share the same cacheline. Idle cpus are frequently accessing pal_halt. Minor kernel changes (including some of the debugging code that I used to find the problem :-( ) can cause variables to move & change the false sharing - the symptoms of the problem can change or disappear. Signed-off-by: Jack Steiner Signed-off-by: Tony Luck [IA64] per cpu MCA/INIT save areas Linux currently has one MCA & INIT save area for saving stack and other data. This patch creates per cpu MCA save areas, so that each cpu can save its own MCA stack data. CPU register ar.k3 is used to hold a physical address pointer to the cpuinfo structure. The cpuinfo structure has a physical address pointer to the MCA save area. The MCA handler runs in physical mode and the physical address pointer avoids the problems associated with doing the virtual to physical translation. The per MCA save areas replace the global areas defined in arch/ia64/kernel/mca.c for MCA processor state dump, MCA stack, MCA stack frame, and MCA bspstore. The code to access those save areas is updated to use the per cpu save areas. No changes are made to the MCA flow, ie all the old locks are still in place. The point of this patch is to establish the per cpu save areas. Additional usage of the save areas, such as enabling concurrent INIT or MCA handling, will be the subject of other patches. Signed-off-by: Russ Anderson Signed-off-by: Tony Luck [IA64] hardirq.h: Add declaration for ack_bad_irq(). Cleanup a warning from my irq merge. Signed-off-by: Tony Luck SCSI: Quieten the incorrect state change message Make it a scsi logging message instead (under ERROR_RECOVERY) Signed-off-by: James Bottomley MTD: Increase nand_write_page() ECC buffer size to cope with 12-byte ECC. Signed-off-by: Jarkko Lavinen Signed-off-by: David Woodhouse JFFS2 locking fix: Don't hold references to obsolete nodes without lock. Signed-off-by: David Woodhouse MTD NAND flash simulator update. - Default to 8MiB instead of 64MiB - Use generic LP NAND command definition - Other minor cleanup Signed-off-by: Artem Bityuckiy Signed-off-by: David Woodhouse MTD: phram device cleanup. - Remove old slram-like interface - Fewer memory allocations - Saner usage example Signed-off-by: Jörn Engel Signed-off-by: David Woodhouse MTD: AMD/Fujitsu flash driver cleanup Use get_chip() helper function instead of open-coding it. Signed-off-by: David Vrabel Signed-off-by: David Woodhouse MTD: Use JEDEC probe for flash chips on Ebony board. Signed-off-by: Heikki O Lindholm Signed-off-by: David Woodhouse MTD: New mapping driver for IBM 405GP 'Walnut' board. Signed-off-by: Heikki O Lindholm Signed-off-by: David Woodhouse MTD XIP support: allyesconfig compile fix. People insist on turning stuff on which doesn't make sense. Make it compile in the case where the platform doesn't provide the necessary XIP primitives. Signed-off-by: Nicolas Pitre Signed-off-by: David Woodhouse [IA64] Add TIF_SIGDELAYED, delay a signal until it is safe Some of the work on recoverable MCA events has a requirement to send a signal to a user process. But it is not safe to send signals from MCA/INIT/NMI/PMI, because the rest of the kernel is an unknown state. This patch adds set_sigdelayed() which is called from the problem contexts to set the delayed signal. The delayed signal will be delivered from the right context on the next transition from kernel to user space. If TIF_SIGDELAYED is set when we run ia64_leave_kernel or ia64_leave_syscall then the delayed signal is delivered and cleared. All code for sigdelayed processing is on the slow paths. A recoverable MCA handler that wants to kill a user task just does set_sigdelayed(pid, signo, code, addr); Signed-off-by: Keith Owens Signed-off-by: Tony Luck [IA64] Clear all corrected records as they occur Because MCA events are not irq safe, they cannot be logged via salinfo_decode at the time that they occur. Instead kernel salinfo.c runs a timer every few minutes to check for and to clear corrected MCA records. If a second recoverable MCA occurs on the same cpu before salinfo_decode has cleared the first record then OS_MCA reads the record for the first MCA from SAL, which passes invalid data to the MCA recovery routines. This patch treats all corrected records the same way, by clearing the records from SAL as soon as they occur. CMC and CPE records are cleared as they are read. Recoverable MCA records are cleared at the time that we decide they can be corrected. If salinfo_decode is not running or is backlogged then we lose some logging, but that has always been the case for corrected errors. Signed-off-by: Keith Owens Signed-off-by: Tony Luck [IA64] Drop SALINFO_TIMER_DELAY from 5 minutes to 1 minute Experience with recoverable MCA events shows that a poll interval of 5 minutes for new MCA/INIT records is a bit too long. Drop the poll interval to one minute. Signed-off-by: Keith Owens Signed-off-by: Tony Luck [AGPGART] amd64-agp.c replace pci_find_device with pci_get_device As pci_find_device is going away soon I have converted this file to use pci_get_device instead. I have compile tested it. If anyone has this hardware and could test it that would be great. Signed-off-by: Hanna Linder Signed-off-by: Dave Jones [AGPGART] generic.c: replace pci_find_device with pci_get_device As pci_find_device is going away soon I have converted this file to use pci_get_device instead. I have compile tested it. If anyone has this hardware and could test it that would be great. Signed-off-by: Hanna Linder Signed-off-by: Dave Jones [AGPGART] intel-agp.c: replace pci_find_device with pci_get_device As pci_find_device is going away soon I have converted this file to use pci_get_device instead. I have compile tested it. If anyone has this hardware and could test it that would be great. Signed-off-by: Hanna Linder Signed-off-by: Dave Jones [AGPGART] intel-mch-agp.c: replace pci_find_device with pci_get_device As pci_find_device is going away soon I have converted this file to use pci_get_device instead. I have compile tested it. If anyone has this hardware and could test it that would be great. Signed-off-by: Hanna Linder Signed-off-by: Dave Jones [AGPGART] isoch.c: replace pci_find_device with pci_get_device As pci_find_device is going away soon I have converted this file to use pci_get_device instead. for_each_pci_dev is just a macro wrapper around pci_get_device. I have compile tested it. If anyone has this hardware and could test it that would be great. Signed-off-by: Hanna Linder Signed-off-by: Dave Jones [AGPGART] Simplify global_cache_flush on_each_cpu does the right thing in the UP case, so we can kill those ugly ifdefs. Signed-off-by: Dave Jones [AGPGART] Add support for ALI M1681/M1683 Signed-off-by: Dave Jones [AGPGART] Fix TLB flushing issues with change_page_attr() Calls to change_page_attr() need an explicit call to global_flush_tlb() afterwards. The AGP code didn't do this in a number of cases. This patch makes map_page_into_agp/unmap_page_from_agp do the calls themselves, which takes care of most of the problem. The Intel AGP driver also has some slightly different calls to what map_page_into_agp() does, as it changes 4 contiguous pages. Introduce explicit flushes afterwards there too. Thanks to Alan Cox for pointing this out. Signed-off-by: Dave Jones [PATCH] add class_device to miscdevice Currently misc_register() throws away the return from class_simple_device_add(). This makes it impossible to get to the class_device of the directories in /sys/class/misc and, for example, thus impossible to add attributes to those directories. Attached patch adds a class_device structure to the miscdevice structure and assigns to it the value returned from class_simple_device_add() in misc_register(), thus caching the value and allowing us to f.e. later call class_device_create_file(). We need this for inotify, but I can see plenty of other misc. devices wanting this and consider it missing but required functionality. Add the class_device structure to miscdevice so that we can add sysfs attributes to /sys/class/misc/foo Signed-Off-By: Robert Love Signed-off-by: Greg Kroah-Hartman [PATCH] misc: remove device.h #include from miscdevice.h Signed-off-by: Greg Kroah-Hartman Documentation: fix some grammer in the stable_api_nonsense.txt file Thanks to Andries Brouwer for pointing this out. [PATCH] select HOTPLUG The patch below changes all dependencies on HOTPLUG to selects. The help text of HOTPLUG is adjusted in a way, that manually selecting it is only required for external modules. If an option already depends on PCMCIA or selects FW_LOADER an explicit select of HOTPLUG is not required. Signed-off-by: Adrian Bunk Signed-off-by: Greg Kroah-Hartman [PATCH] misc: remove miscdevice.h from pci hotplug drivers as they do not need it. Signed-off-by: Greg Kroah-Hartman [PATCH] w1: Documentation bits for generic w1 behaviour. Documentation bits for generic w1 behaviour. Signed-off-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: use chip driver name to request regions > Trivial patch against 2.6.10-rc3-bk2. > When request_region is called name is set to "", use module name. Correct. I even think we should do the same for other chip drivers. For now they all use an arbitrary string. Using the driver's name would be both more consistent and more efficient (spares some bytes of memory). Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: i2c-algo-bit should support I2C_FUNC_I2C Signed-off-by: Ian Campbell Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: i2c-algo-bit should support I2C_FUNC_I2C > Very few drivers seem to support the I2C_FUNC_I2C functionality, is > there a reason for that? Yes, most bus drivers are for SMBus, not I2C, masters. SMBus is a subset of I2C. These SMBus master are fully I2C-capable, although in most cases it doesn't matter. Most chip drivers are for SMBus clients as well. Almost all hardware monitoring chips are SMBus devices. So it's not surprising not to see I2C_FUNC_I2C widely used. > I have an I2C bus on my platform constructed from a couple of GPIO lines > using the i2c-algo-bit driver. The device on the bus is a DS1307 I2C RTC > and the driver for that currently checks for > I2C_FUNC_SMBUS_WORD_DATA | I2C_FUNC_SMBUS_WRITE_BYTE > however the datasheet suggests it is a simple i2c device with none of > this smbus stuff, Russell King queried this here > http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=2021/1 First, note that all SMBus commands are valid I2C transfers. In fact, the SMBus specification doesn't do much except put names on specific I2C transfers, and sometimes give meanings to the data being transfered. As a result, "I2C" clients, although not specifically SMBus-compatible, may enjoy SMBus commands such as SMBUS_READ_BYTE, SMBUS_READ_BYTE_DATA and SMBUS_WRITE_BYTE_DATA. One typical example of that are EEPROMs and the eeprom driver. It relies on i2c_smbus_write_byte and i2c_smbus_read_byte (BTW I just noticed that it doesn't properly check for these functionalities... have to fix that) because it's so much easier to call these standard functions than rewrite I2C code manually. Also, this let us access the EEPROMs on SMBus (non-I2C) busses. Now, note that Russell is not quite correct in is assertion: "Do we really require SMBUS functionality, or is i2c functionality sufficient?" It's actually the other way around. SMBus puts restrictions on what a valid I2C transfer is. "Do we need the full I2C functionality or is the SMBus subset sufficient?" would make more sense. As for the exact functionality you need to check, let's just see how you access the bus. As far as I can see (providing that the code below Russell's comments is still valid), you rely on: * i2c_smbus_write_byte_data * i2c_smbus_read_byte_data * i2c_transfer So yo *need* to check for the availability of I2C_FUNC_SMBUS_BYTE_DATA on the adapter (which is part of I2C_FUNC_SMBUS_EMUL so any bus driver using that, including any relying on i2c-algo-bit, will work with your client driver) for the first two. And you also need to check for I2C_FUNC_I2C for the third one. Of course, any adapter with I2C_FUNC_I2C will be able to do SMBus byte data transfers, but since you do not use i2c_transfer to do them, you need to check the functionality separately (I think). Also, I think that what you do with i2c_transfer is similar to I2C_FUNC_SMBUS_READ_I2C_BLOCK, which is supported by some SMBus (non-I2C) masters. If you convert your code to use i2c_smbus_read_i2c_block_data, then you don't rely on the full I2C capatbilities of the bus, which means that your chip driver will be useable on more plateforms. That said, note that this feature is unimplemented on most SMBus master drivers as of now, and broken on a number of others (but I guess we would start paying more attention to them if there were more users for this function). > If I change it to a check for I2C_FUNC_I2C and change the algo-bit > driver to declare I2C_FUNC_I2C then the driver continues to work fine. You are right that i2c-algo-bit should declare itself I2C_FUNC_I2C capable. I even think that every bus being I2C_FUNC_SMBUS_EMUL capable is very likely to be I2C_FUNC_I2C capable. This means that other algorithms (ite, pcf, maybe pca) could most probably be declared I2C_FUNC_I2C capable as well. Can anyone confirm? > Given the above, is the following patch appropriate, or is there > something about the relationship between i2c and smbus that I don't > understand. I admit that the relationship between I2C and SMBus is somewhat tricky, it took me some time to get it and even then I am sometimes not sure to understand exactly what implies what ;) So we cannot blame you for not getting it at first. I hope I helped make things a little clearer. If not I welcome questions. Whether or not you change your code to use SMBus only in your driver to make it more widely useable, your patch to i2c-algo-bit is valid, I am signing it too and will apply it to the 2.4 version of the driver as well. Signed-off-by: Ian Campbell Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman [PATCH] it87: /proc/ioports fix When request_region is called name is set to "", use module name. Signed-off-by: Domen Puncer Signed-off-by: Greg Kroah-Hartman [PATCH] USB: serial driver for TI USB 3410/5052 chips (3/3) * New USB serial driver for devices based on the TI USB 3410 and 5052 chips. (3/3) Signed-off-by: Al Borchers Signed-off-by: Greg Kroah-Hartman [PATCH] USB: serial driver for TI USB 3410/5052 chips (1/3) * New USB serial driver for devices based on the TI USB 3410 and 5052 chips. (1/3) * Changed to use circ_buf.h. Signed-off-by: Al Borchers Signed-off-by: Greg Kroah-Hartman [PATCH] USB: serial driver for TI USB 3410/5052 chips (2/3) * New USB serial driver for devices based on the TI USB 3410 and 5052 chips. (2/3) Signed-off-by: Al Borchers Signed-off-by: Greg Kroah-Hartman [PATCH] USB: fix sparse and compiler warnings in ti_usb_3410_5052.c Signed-off-by: Greg Kroah-Hartman [PATCH] USB: SN9C10x driver updates SN9C10x driver updates. Changes: + new, - removed, * cleanup, @ bugfix, = sync with kernels * SN9C10x system clock fine-tuning when switching from native to compressed format and viceversa for each image sensor + Add sn9c102_i2c_try_raw_read() + Frame header available from sysfs interface + Documentation updates: new "Video frame formats" paragraph, new entries in "Credits" and frame header description + Plugin's for HV7131D and MI-0343 image sensors Signed-off-by: Luca Risolia Signed-off-by: Greg Kroah-Hartman [PATCH] USB Storage: support 'bulk32' devices This patch implements support for what we call "bulk32" devices. These are devices that use the BBB transport mechanism with the slight modification that the CBW is padded to 32 bytes (instead of the standard 31 bytes). Signed-off-by: Theodore Kilgore Signed-off-by: Phil Dibowitz Signed-off-by: Matthew Dharm Signed-off-by: Greg Kroah-Hartman USB: delete the tiglusb driver as it's not needed You can use a userspace program and libusb instead. The author asked for this driver to be removed because of this. Signed-off-by: Greg Kroah-Hartman [PATCH] USB Storage: Remove MODE_XLATE flag from unusual_devs.h This patch removes all MODE_XLATE flags from unusual_devs.h. Since the file is no longer close to in sync with the 2.4 version, Alan and I agreed it's reasonable to remove all of these now. Signed-off-by: Phil Dibowitz Signed-off-by: Greg Kroah-Hartman [PATCH] USB: update drivers/usb/README This just adds a bit more info to drivers/usb/README, mostly just pointing to where documentation is to be found (including current kerneldoc). Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB Storage: Remove old XLATE-only entries from unusual_devs.h This patch removes all entries from unusual_devs.h that appear to have only been there for the MODE_XLATE flag which was removed in my previous patch. Signed-off-by: Phil Dibowitz Signed-off-by: Greg Kroah-Hartman [PATCH] usb-serial: add tty_hangup on disconnect When a USB serial device is disconnected, user applications performing a read() now receive an error code, rather than waiting indefinitely. The included patch is originally from Al Borchers, massaged to apply to 2.6.9 and 2.6.10-rc2. I've tested it on 2.6.9, but not on 2.6.10-rc2. Al Borcher's original post: http://www.mail-archive.com/linux-usb-devel@lists.sourceforge.net/msg27475.html Signed-off-by: Edwin Olson (eolson@mit.edu) Signed-off-by: Greg Kroah-Hartman [PATCH] ftdi_sio: Add sysfs attributes for event character and latency Setting the event character and latency timer can greatly improve performance for some applications which use the ftdi_sio module (a serial->USB converter). The following patch adds sysfs attributes, exposing these configuration registers. Signed-off-by: Edwin Olson (eolson@mit.edu) Signed-off-by: Greg Kroah-Hartman [PATCH] USB: usb_dev->ep[] not usb_dev->epmaxpacket (1/15) This starts updating the usbcore interface to use endpoints in places it previously used pipes or other representations of the endpoint. - add new arrays of "struct usb_host_endpoint" pointers, matching current config and altsetting - get rid of the two epmaxpacket[] arrays; they duplicate information that's now readily accessible from the usb_host_endpoint. - resolve a FIXME by removing a function that only existed because the usb_host_endpoint wasn't readily accessible. It also removes most of an old rant about pipes, trimming it down so only the important bits remain. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: usbcore changes for usb_dev->ep[](2/15) This patch updates usbcore to match interface changes in the previous patch. - udev->ep[] arrays are updated during config change events and as needed during enumeration; - usb_epnum_to_ep_desc() vanishes; - so do the udev->epmaxpacket[] arrays. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: usbfs changes for usb_dev->ep[] (3/15) Updates usbfs to stop using usb_epnum_to_ep_desc(). In the process, it acquires better error detection on its urb submit path. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: ALSA and usb_dev->ep[] (4/15) Makes an ALSA audio driver stop referencing the udev->epmaxpacket[] arrays. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: auerswald and usb_dev->ep[] (5/15) Update the auerswald driver to stop using the now-vanished usb_epnum_to_ep_desc() function. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: CRIS HCD and usb_dev->epmaxpacket (6/15) Makes the CRIS HCD stop referencing the udev->epmaxpacket[] arrays. Also makes it stop providing device allocate/deallocate routines; this HCD doesn't need them, and a later patch will remove that API. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: EHCI HCD and usb_dev->epmaxpacket (7/15) Makes EHCI stop referencing the udev->epmaxpacket[] arrays. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: usbtest and usb_dev->epmaxpacket (8/15) Makes usbtest stop referencing the udev->epmaxpacket[] arrays. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: HCD/usb_bus interface cleanup (9/15) This changes the usbcore interfaces provided to HCDs: - Remove usb_device->hcpriv and it allocation/deallocation hooks - Replace struct hcd_dev with more appropriate per-endpoint state - Update HCD apis to use usb_host_endpoint in key places Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: remove some now-unused HCD infrastructure (10/15) This removes the code supporting usb_device->hcpriv allocation/deallocation, and hcd_dev-dev_list, from usbcore and the HCDs. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: maintain usb_host_endpoint.urb_list (11/15) This patch changes the HCD glue code to use the URB queue now kept in usb_host_endpoint, and matching HCD API changes. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: EHCI and HCD API updates (12/15) Updates the EHCI HCD to match API updates. This includes both new changes (struct hcd_dev gone) and older ones (endpoints now properly enabled/disabled, so "re"init paths aren't needed). Hmm, the ISO stuff could avoid that lookup now too. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: OHCI and HCD API changes (13/15) Updates the OHCI HCD to match API updates. This includes both new changes (struct hcd_dev gone) and older ones (endpoints now properly enabled/disabled, so "re"init paths aren't needed). Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: UHCI and HCD API change (14/15) UHCI changes to match the updated HCD glue calls. Since it's handed the relevant endpoint queue on a silver platter, the driver no longer needs to search anything to find the queue entries. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: better messages for "no-IRQ" cases (15/15) This changes the usbcore message about HCD IRQ problems so it makes sense on systems without ACPI or an APIC. It also updates the comments; the issue doesn't appiear only with PCI, and with the recent enumeration changes it doesn't happen just with set_address either. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [AGPGART] Fix up PCI posting bugs. Also remove a pointless wrapper. Signed-off-by: Dave Jones [AGPGART] More PCI Posting bugs. Signed-off-by: Dave Jones [AGPGART] Another missing PCI Posting bugfix. Signed-off-by: Dave Jones [AGPGART] Remove unnecessary parenthesis on return statements. Signed-off-by: Dave Jones [AGPGART] Add missing cache flush to the generic remove routine. It's not entirely clear whether this is needed, or it was working around the missing PCI Posting workaround. Until we know any better, make the generic routine do what the per chipset routines do. Spotted-by: Alan Cox Signed-off-by: Dave Jones [AGPGART] Announce Intel 460GX when found. Most AGP chipset drivers announce the bridge found, and i460gx used to, but it seems to have gotten dropped somewhere along the way. Signed-off-by: Bjorn Helgaas Signed-off-by: Dave Jones [AGPGART] Fix masking (causes crash on 460GX). virt_to_page(phys_to_virt(masked_addr)) still works. But the 460GX sticks bits in the middle, so the free blows up. I've tested the agp_allocate_memory() change on Intel 460GX. I don't have hardware to test the Intel MCH change, but it looks to me like the same problem. Signed-off-by: Bjorn Helgaas Signed-off-by: Dave Jones debugfs: add debugfs debugfs is a filesystem that is just for debug data. Start moving stuff out of proc and sysfs now :) Signed-off-by: Greg Kroah-Hartman USB: convert uhci-hcd driver to use debugfs. Look, we saved 24 lines of code... Signed-off-by: Greg Kroah-Hartman [PATCH] USB Storage: unusual_devs: prolific atapi controler This adds an unusual devices entry for a Prolific ATAPI-6 conmtroller that needs the FIX_CAPACITY flag. Signed-off-by: Alex Butcher Signed-off-by: Phil Dibowitz Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: Fix debug statement Make the debug of setup-irq.c compile and work again Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: arch/i386/pci/: make some code static The patch below makes some needlessly global code static. Signed-off-by: Adrian Bunk Signed-off-by: Greg Kroah-Hartman [PATCH] PCI Hotplug: drivers/pci/hotplug/ : simply use MODULE The patch below lets five files under drivers/pci/hotplug/ simply use MODULE to check whether they are compiled as part of a module. MODULE is the common idiom for checking whether a file is built as part of a module. In theory, my patch shouldn't have made any difference, but if you look closely, the previous #if's in cpcihp_generic.c and cpci_hotplug_pci.c weren't correct. Signed-off-by: Adrian Bunk Signed-off-by: Greg Kroah-Hartman [PATCH] PCI Hotplug: ibmphp_core.c: coding style this is a cleanup patch for ibmphp_core.c. It does not change anything, it only wraps long lines and removes spaces before opening braces of funtions. Signed-off-by: Rolf Eike Beer Signed-off-by: Greg Kroah-Hartman [PATCH] PCI Hotplug: ibmphp_core.c: useless casts this patch removes some useless casts to and from (void *) as well as a cast where a (struct pci_bus *) is cast to a (struct pci_bus *). Signed-off-by: Rolf Eike Beer Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: cope with duplicate bus numbers better Make pci_scan_bridge() a little more robust in the presence of broken firmware. Signed-off-by: Matthew Wilcox Signed-off-by: Greg Kroah-Hartman [PATCH] USB: HCDs and per-device state (16/15) SL811 changes getting rid of the "hcd_dev" support, using usb_host_endpoint to hold the QH. This also eliminates the "sl811h_req" data type. Compile-tested only! Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB Storage: Increase Genesys delay This is patch as436 from Alan Stern. This patch increases the delay used for Genesys devices about 10%. At least one user reports that this created a significant improvement in operation. Signed-off-by: Alan Stern Signed-off-by: Matthew Dharm Signed-off-by: Greg Kroah-Hartman [PATCH] USB: EHCI "park" mode disabled This changes the default initialization of the EHCI "park" mode so that silicon which supports it (NF2, NF3, ALI, GeneSys, ...) will not use it unless explicitly told to do so by a (new) module parameter. This is a workaround for some problems observed on some NF2 systems: - Throughput ("hdparm -tT") is lower than expected with recent high performance drives (Maxtor) ... disabling "park" increases it by about 2 MByte/sec, but it's still much slower than expected. (USB analyser traces should be informative here.) - Some data corruption observed on reads from drives using an ALI storage adapter ... disabling "park" stops the corruption. (Strongly suggestive of hardware or peripheral firmware bugs; multiple back-to-back bulk-IN packets should work just fine.) The "don't use park mode" workaround will at most reduce USB (and PCI) throughput slightly on systems that work as expected, but some of those can re-enable the "park" mode. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB Storage: unusual_devs: prolific atapi controler This adds an unusual devices entry for a Prolific ATAPI-6 conmtroller that needs the FIX_CAPACITY flag. Signed-off-by: Alex Butcher Signed-off-by: Phil Dibowitz Signed-off-by: Greg Kroah-Hartman [PATCH] USB: EHCI periodic schedule tree This implements an interrupt schedule tree for EHCI; the bug's listed in bugzilla (http://bugme.osdl.org/show_bug.cgi?id=3374) and affects the ability to handle certain devices and configurations. Now multiple interrupt transfers are supported per microframe. Scheduling prevents overcommit for reserved bandwidth and, for full/low speed devices, the relevant transaction translator's buffer. (TT-per-port hubs are already initialized into the multi-TT mode.) The interrupt transfer schedule is arranged in a sparse tree, just like OHCI. A key difference is that OHCI implements a "best fit" scheduling policy, while this implements "first fit" for EHCI. (There's no load balancing; it's not really needed in most users' configurations.) There's also logic here to handle "high bandwidth" transfers, guaranteed streaming of from 8-24 KB of data per millisecond. Also includes some related cleanups for descheduling interrupt transfers. Those will probably be split into a separate patch. Against 2.6.10-rc3-bk5 ... this hasn't recently been tested much, but the main old bug seems to be gone so it shouldn't make too much trouble. From: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: i2c-nforce2 supports the nForce3 250Gb One more PCI ID for the i2c-nforce2 driver, this time for the nForce3 250Gb variant. Tested, works. (Also cleans up a duplicate define in pci_ids.h.) Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: Make pci_set_power_state() check register version The attached patch makes pci_set_power_state() check the PM register version and ignore non-version 2 registers. Trampling on earlier version PM registers such as are sported by the Promise 20269 IDE card can cause the system to hang. Signed-Off-By: David Howells Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: Don't touch BARs of host bridges BARs of host bridges often have special meaning and AFAIK are best left to be setup by the firmware or system-specific startup code and kept intact by the generic resource handler. For example a couple of host bridges used for MIPS processors interpret BARs as target-mode decoders for accessing host memory by PCI masters (which is quite reasonable). For them it's desirable to keep their decoded address range overlapping with the host RAM for simplicity if nothing else (I can imagine running out of address space with lots of memory and 32-bit PCI with no DAC support in the participating devices). This is already the case with the i386 and ppc platform-specific PCI resource allocators. Please consider the following change for the generic allocator. Currently we have a pile of hacks implemented for host bridges to be left untouched and I'd be pleased to remove them. From: "Maciej W. Rozycki" Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: Cleanup PCI power states > > > > This is step 0 before adding type-safety to PCI layer... It introduces > > > > constants and uses them to clean driver up. I'd like this to go in > > > > now, so that I can convert drivers during 2.6.10... Please apply, Okay, here it is, slightly expanded version. It actually makes use of newly defined type for type-checking purposes; still no code changes. From: Pavel Machek Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: fix up function calls for CONFIG_PCI=N Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: add pci_choose_state() Could this go to "after 2.6.10 tree", too? It is a helper that converts system state into PCI state. We really do not want to have this copied into every driver, because it will need to change when system state gets type-checked / expanded to struct. From: Pavel Machek Signed-off-by: Greg Kroah-Hartman [PATCH] Driver Core: Add platform_get_resource_byname & platform_get_resource_byirq Adds the ability to find a resource or irq on a platform device by its resource name. This patch also tweaks how resource names get set. Before, resources names were set to pdev->dev.bus_id, now that only happens if the resource name has not been previous set. All of this allows us to find a resource without assuming what order the resources are in. Signed-off-by: Kumar Gala Signed-off-by: Greg Kroah-Hartman [PATCH] add ATA over Ethernet driver Provide support for ATA over Ethernet devices Signed-off-by: Ed L. Cashin Signed-off-by: Greg Kroah-Hartman [PATCH] AOE: fix up sparse warnings and get rid of a kmalloc in the aoe driver. Signed-off-by: Greg Kroah-Hartman [PATCH] sysfs: Allocate sysfs_dirent structures from their own slab. * Andrew Morton (akpm@osdl.org) wrote: > That's all well and good, but sysfs_new_dirent() should be using a > standalone slab cache for allocating sysfs_dirent instances. That way, we > use 36 bytes for each one rather than 64. Reasonable, here's a patch (lightly tested). Without, size-64 looks like so: size-64 4064 4108 76 52 1 : tunables 32 16 8 : slabdata 79 79 0 : globalstat 4263 4079 79 0 0 0 84 0 : cpustat 15986 337 12286 3 And with: size-64 1196 1196 76 52 1 : tunables 32 16 8 : slabdata 23 23 0 : globalstat 1297 1196 23 0 0 0 84 0 : cpustat 12418 108 11349 1 sysfs_dir_cache 2862 2916 48 81 1 : tunables 32 16 8 : slabdata 36 36 0 : globalstat 2931 2874 36 0 0 0 113 0 : cpustat 2756 216 110 0 Allocate sysfs_dirent structures from their own slab. Signed-off-by: Chris Wright Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: Discard old driver porting documentation The Documentation/i2c/i2c-old-porting file is outdated. There are no more drivers left to be ported from that old i2c model (from the times of Linux 2.2). Let's simply delete that file. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman [PATCH] USB: gadget kconfig doc updates This updates the "USB Gadget" Kconfig support: - Highlighting the the two Documentation/usb files have information about how to interoperate with MS-Windows using RNDIS or CDC-ACM; - Flagging CDC ACM and CDC Ethernet support in the config menu descriptions; - Providing a bit more description about what a "gadget driver" does, for the benefit of folk coming to this part of Linux with background in similar proprietary driver stacks. - Pointing to the Linux-USB website for this API, and the kerneldoc. In short: make important driver framework information more accessible. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: dummy_hcd: update to match the new endpoint changes Here's the patch to make dummy_hcd build properly once again. I did some quick light testing to make sure that it still works too. The patch takes the easy way out by allocating a new private data structure for each URB, just to keep a single united list of all the outstanding URBs. More extensive changes would be needed to make effective use of the per-endpoint queues now available, and it's probably not worth the effort. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] Re: garmin gps driver patch 0.23 From: Hermann Kneissel Signed-off-by: Greg Kroah-Hartman [PATCH] USB: fix up some sparse warnings in the new garmin_gps driver Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: PCI early fixup missing bits A few bits seem to be missing for PCI early fixup to work -- the pci_fixup_device() helper ignores fixups of the pci_fixup_early type. Also the local class variable needs to be refreshed after performing the fixups for they can change dev->class. Signed-off-by: Maciej W. Rozycki Signed-off-by: Greg Kroah-Hartman patch-mips-2.6.10-rc2-20041124-pci_fixup_early-1 [PATCH] Clean mct_u232 in 2.6.10-rc2 I would like to clean up mct_u232 a little bit, although primarily to make my fixes to 2.4 branch look better. The attached patch does this: - zeroes whole private structure - zaps dangling pointer (or why do we check it then) - removes unused code for FIX_WRITE_RETURN_CODE_PROBLEM - changes version - makes the diagnostic name not quite as pompous - makes debugging printouts a little more informative From: Pete Zaitcev Signed-off-by: Greg Kroah-Hartman SCSI: Add basic infrastructure for transport host statistics From: James.Smart@Emulex.Com This patch adds the basic hooks to the scsi subsystem to support transport-specific statistics to be added to a host. Its basic nature follows the way in which net devices showed their statistics. Signed-off-by: James Bottomley SCSI: Add FC transport host statistics From: James.Smart@Emulex.Com This patch updates the fc_transport with statistics for local FC ports (e.g. Hosts). The statistics are defined per HBAAPI v2.0 definitions. Caveats: ------------ - The information below is supplied by a simple test driver that does not talk to real hardware, but fully acts as a LLDD that supports the fc transport. This patch results in the following in /sys/class: ----------------------------------------------------- [jsmart@elxware class]$ cd /sys/class [jsmart@elxware class]$ ls fc_host graphics misc pci_bus scsi_host usb_host fc_transport input net scsi_device tty vc firmware mem netlink scsi_generic usb [jsmart@elxware class]$ cd fc_host [jsmart@elxware fc_host]$ ls host4 [jsmart@elxware fc_host]$ cd host4 [jsmart@elxware host4]$ ls device host_link_down_tmo statistics [jsmart@elxware host4]$ ls -ld * lrwxrwxrwx 1 root root 0 Oct 13 17:16 device -> ../../../devices/platform/host4 -rw-r--r-- 1 root root 4096 Oct 13 17:16 host_link_down_tmo drwxr-xr-x 2 root root 0 Oct 13 17:16 statistics [jsmart@elxware host4]$ cd statistics dumped_frames invalid_crc_count prim_seq_protocol_err_count error_frames invalid_tx_word_count reset_statistics fcp_control_requests link_failure_count rx_frames fcp_input_megabytes lip_count rx_words fcp_input_requests loss_of_signal_count seconds_since_last_reset fcp_output_megabytes loss_of_sync_count tx_frames fcp_output_requests nos_count tx_words Signed-off-by: James Bottomley qla2xxx: Dead code removal From: Christoph Hellwig remove dead code, add missing statics Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley qla2xxx: Tx/Rx Sensitivity additions Add support for new transmit/receive sensitivity settings when updating an ISPs serial-link options. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley qla2xxx: NVRAM updates Address several NVRAM access issues: o Add support for write-protected NVRAM chips used with ISP2322 and ISP6322. o Correct code to not perform an erase data during NVRAM update. o Correct issuance of NVRAM delay after PCI posting call. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley qla2xxx: NVRAM id-list updates Resync with latest NVRAM subsystem ID list. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley qla2xxx: Small fixes o Issue a big-hammer to recover if the driver is unable retrieve the host's loop-id. o Correct failure to not add an fc_lun_t object for lun 0. o Interrogate only the relevant bits (peripheral qualifier and device-type) of INQUIRY data. o Correct issue where driver would incorrectly fail-out of initializing an ISP if an device-discovery SNS scan failed. o Correct issue where the qla2x00_fabric_login() would return an incorrect error status during mailbox command execution. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley qla2xxx: ISR fixes Interrupt handler fixes: o Mark HBA offline in case the firmware cannot recover after and ISP system-error. o Correct issue where the loop-down-timer was not properly being cleared during a port-update event. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley qla2xxx: Code scrubbing Misc. driver-code scrubbing: o Correct qla2300 module description. o Resync with latest firmware structure definitions. o White-space cleanup. o Add additional display of driver internals when debug is enabled. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley qla2xxx: Consolidate ISP63xx support Recent ISP6312 FLX firmware can support both ISP6312 and ISP6322 chips. Consolidate ISP6322 handling into the ISP6312 firmware loader files. Remove ql6322.c file. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley qla2xxx: 23xx/63xx firmware updates From: Andrew Vasquez Resync with latest released firmware -- 3.03.08. Remove ql6322_fw.c file. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley qla2xxx: Update driver version Update version number to 8.00.02b4-k. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley SCSI:add change_queue_depth API to scsi host template Originally, the 53c700 driver implemented queue_depth changing as an attribute override, primarily as a demonstration of how it should be done. Now that a large number of drivers wish to implement this functionality, it should become an API rather than an attribute override, since the latter are supposed to be used as one off extensions rather than the de-facto API. Signed-off-by: James Bottomley SCSI: convert 53c700 driver to use change_queue_depth API Signed-off-by: James Bottomley [PATCH] aacraid 2.6: Support for new cards This patch adds support for new aacraid cards. Signed-off-by: Mark Haverkamp Signed-off-by: James Bottomley [PATCH] ipr: Allow Query Resource State adapter command to The ipr adapters support an adapter command directed at the device resource called "Query Resource State". It can be used to retrieve state information about the resource it is sent to, including the currently negotiated scsi speed. The adapter interface requires the IPR_RQTYPE_IOACMD to be set on this command, so we set it if the command code matches. Signed-off-by: Brian King Signed-off-by: James Bottomley [PATCH] ipr: PCI-X capabilities setup fix From: Andrew Vasquez While performing some PCI-X command register tuning with some of QLogic's cards, I stumbled upon some suspect code in ipr.c. It appears the two functions ipr_save_pcix_cmd_reg() and ipr_set_pcix_cmd_reg() are actually reading/updating the PCI-X capabilities register and not in fact the PCI-X command register -- some code from ipr_save_pcix_cmd_reg(): ... int pcix_cmd_reg = pci_find_capability(ioa_cfg->pdev, PCI_CAP_ID_PCIX); if (pcix_cmd_reg == 0) { dev_err(&ioa_cfg->pdev->dev, "Failed to save PCI-X command register\n"); return -EIO; } pcix_cmd_reg points to the PCI-X capabilities register. Yet, the read: if (pci_read_config_word(ioa_cfg->pdev, pcix_cmd_reg, &ioa_cfg->saved_pcix_cmd_reg) != PCIBIOS_SUCCESSFUL) { dev_err(&ioa_cfg->pdev->dev, "Failed to save PCI-X command register\n"); return -EIO; } and subsequent update of the bits: ioa_cfg->saved_pcix_cmd_reg |= PCI_X_CMD_DPERR_E | PCI_X_CMD_ERO; should actually apply to the PCI-X Command register 2 bytes further into config space. So, the following: if (pci_read_config_word(ioa_cfg->pdev, pcix_cmd_reg, should actually read as: if (pci_read_config_word(ioa_cfg->pdev, pcix_cmd_reg + PCI_X_CMD, The same is true for the 'save' case. Luckily, most devices hardwire the PCI-X capabilities register so the write is effectively a NOOP. Signed-off-by: Brian King Signed-off-by: James Bottomley [PATCH] ipr: new RAID error Adds support for logging a new RAID error that can be returned on new ipr adapters. Signed-off-by: Brian King Signed-off-by: James Bottomley [PATCH] ipr: Remove dead code Removes some unused debug code. Signed-off-by: Brian King Signed-off-by: James Bottomley [PATCH] ipr: whitespace fixes Whitespace fixes. Signed-off-by: Brian King Signed-off-by: James Bottomley [PATCH] ipr: Bump driver version to 2.0.12 Bump driver version Signed-off-by: Brian King Signed-off-by: James Bottomley USB: change warning level in ftdi_sio driver of a debug message. This keeps users happy as it really isn't an error. Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Create usb_hcd structures within usbcore [1/13] This patch changes the usbcore routines, making them fully responsible for the entire lifecycle of each usb_hcd. It also splits up registration of the USB host class_device into an _init and an _add phase, to match the initialization and registration of the USB bus belonging to the host. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Create usb_hcd structures within usbcore [2/13] This patch alters the EHCI driver, removing the routine that allocates the hcd structure and introducing inline functions to convert safely between the public and private hcd structures. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Create usb_hcd structures within usbcore [3/13] This patch alters the OHCI driver, removing the routine that allocates the hcd structure and introducing inline functions to convert safely between the public and private hcd structures. It also moves the code to initialize the private structure into the reset routine, since the allocation routine is now gone. That particular aspect should be reviewed by David, but for now it seems to work. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Create usb_hcd structures within usbcore [4/13] This patch alters the UHCI driver, removing the routine that allocates the hcd structure and introducing inline functions to convert safely between the public and private hcd structures. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Create usb_hcd structures within usbcore [5/13] This patch alters the non-PCI OHCI drivers, removing the routines that allocate the hcd structures and introducing inline functions to convert safely between the public and private hcd structures. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Create usb_hcd structures within usbcore [6/13] This patch alters the dummy_hcd driver, removing the routine that allocates the hcd structure and introducing inline functions to convert safely between the public and private hcd structures. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Hub driver: improve error checking and retries [10/13] Here's another "cleanup" type patch, most of which was written by David Brownell. It causes the hub driver to retry a couple of different types of transfers if they timeout (which seems to help with some flakey devices), and it adds some error checking for the ep0 maxpacket value sent by the device. From: David Brownell Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Hub driver: several bug fixes and simplifications [11/13] This patch adds several relatively minor bug fixes and code simplifications for the hub driver. Perhaps most significantly, a test is added to usbfs to prevent users from unbinding the hub driver from a hub with children. That could cause some bad headaches, and it's best to avoid the situation. Don't set unused bits in the change_bits and event_bits fields (this aids in debugging, nothing more). Use the correct spinlock in the hub ioctl routine! Add an argument to hub_port_disable, indicating whether the device behind the disabled port should be marked NOTATTACHED. Normally it should, but for retries during usb_reset_device it should not. Pass the child device as an argument to hub_port_suspend and hub_port_resume rather than making them recalculate it. Call usb_set_device_state in the suspend/resume code rather than setting udev->state directly. Set udev->power.power_state in the suspend/resume code so that the correct values are visible in sysfs. Recognize during hub_port_resume that the child device udev might be NULL (this will happen when a new device is plugged into a suspended port). Don't allow hub_port_init to drop the usb_address0_sem lock while a device on the bus is still using address 0! Make khubd acquire a reference to the hub interface rather than the hub device. This simplifies disconnect/unbind testing. Don't print a debugging message about hub events while not holding some lock to protect the hub. Remember to drop the reference acquired above if we fail to lock the hub. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Hub driver cleanups [12/13] This patch does a little cleanup of the hub driver, nothing dramatic (although it is long because it touches a lot of code). The main feature is that the private hub structure is passed as an argument to internal routines rather than the hub device structure. This simplifies conversions, because it's easier to go from the private structure to the device structure than vice versa. The other change is to store a pointer to the interface's embedded struct device rather than the interface itself. This helps because that pointer is mainly used for dev_xxx log messages. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Another hub driver cleanup [13/13] This patch does some more cleaning up of the hub driver. The idea is to use 1-based port numbers everywhere, in accordance with the usage of the USB spec, the values stored in USB messages, and the values printed in the system log. The downside is that we have to subtract 1 to index the children[] array, but that's a lot better than all the additions of 1 that were there before. To emphasize the nature of this change, I renamed the "port" local variable to "port1" every place it is used. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [TCP]: Efficient port randomization (rev 3) okay, here is the revised version. Testing shows that it is more consistent, and just as fast as existing code, probably because of the getting rid of portalloc_lock and better distribution. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller USB: convert the idVendor, idProduct, bcdDevice and bcdUSB fields to __le16 These fields are in the struct usb_device_descriptor, and now we keep the native (on-the-wire mode) format of these fields. Any driver using these fields needs to convert it to cpu endian before using them. All USB drivers in the kernel tree have been fixed up to work properly with this change. All out-of-the USB kernel drivers are on their own... Signed-off-by: Greg Kroah-Hartman USB: change wTotalLength field in struct usb_config_descriptor to be __le16 Another step in the quest to get all USB data structures to be native endian. Signed-off-by: Greg Kroah-Hartman USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16 Yet another step in the quest to get all USB data structures to be native endian. Signed-off-by: Greg Kroah-Hartman USB Gadget: fix up simple sparse warnings (NULL stuff) in dummy_hcd.c driver Signed-off-by: Greg Kroah-Hartman MTD: Fix optimisation which breaks with newer Intel L18 flash chips. Increase region info and chip instance independently from each other. Someone tried to be clever with chip masking here... But it breaks with L18 flash where the chip structures are "virtual" chips not real ones. Signed-off-by: Nicolas Pitre Signed-off-by: David Woodhouse MTD: Make nand_write_page() ECC buffer size consistent with nand_read_ecc() We already increased it to 12 because we were overrunning the buffer. Increase it again to be consistent with the 32 bytes we use elsewhere. Signed-off-by: Jarkko Lavinen Signed-off-by: David Woodhouse JFFS2: Fix freeing of block table on mount failure. We weren't correctly using vfree() where appropriate in the error case. Signed-off-by: David Marlin Signed-off-by: David Woodhouse JFFS2: Fix list corruption and memory leak on write retry. Reported by Per Hedblom Signed-off-by: David Woodhouse [ALSA] Fix compilation without CONFIG_PM AC97 Codec Core Fixed the compilation without CONFIG_PM. The resume callback is built only with CONFIG_PM. Signed-off-by: Takashi Iwai [ALSA] Export functions for ioctl32 wrapper Control Midlevel,PCM Midlevel,ALSA Core Export some functions to access from ioctl32 wrapper. This will reduce the memory footprint (doublly kmalloc's for the same ioctl records). Signed-off-by: Takashi Iwai [ALSA] Fix ioctl32 wrapper (for SPARC) IOCTL32 emulation Fix ioctl32 wrapper design, using compat_alloc_user_space() now. This will fix the crash on SPARC64. Signed-off-by: Takashi Iwai [ALSA] Clean up of kfree()/vfree() NULL checks ALSA Core,PCM Midlevel,Memalloc module,Timer Midlevel,IOCTL32 emulation ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer,I2C cs8427 L3 drivers,GUS Library,EMU8000 driver,Wavefront drivers,Maestro3 driver AC97 Codec Core,ALI5451 driver,CS46xx driver,EMU10K1/EMU10K2 driver ICE1712 driver,Trident driver,YMFPCI driver,PPC PMAC driver Common EMU synth,USB generic driver,USB USX2Y I've cleaned up sound/ directory from 'if (x) {k/v}free(x);' and similar constructions. I'm going to to this for most of the kernel if I found some time. Signed-off-by: Marcel Sebek Signed-off-by: Takashi Iwai [ALSA] Fix targets for GUS and OPL4 ALSA sequencer The the obj targets for GUS and OPL4 are fixed. Signed-off-by: Takashi Iwai [PATCH] SCSI ibmmca.c: make a struct static Signed-off-by: Adrian Bunk Signed-off-by: James Bottomley [PATCH] SCSI mca_53c9x.c: make 2 functions static The patch below makes two functions without external users static. Signed-off-by: Adrian Bunk Signed-off-by: James Bottomley [PATCH] SCSI NCR53C9x.c: some cleanups Make two functions static Remove the old polling esp_command() entry point. Signed-off-by: Adrian Bunk Signed-off-by: James Bottomley [ACPI] fix return syntax Signed-off-by: Pavel Machek Signed-off-by: Jesper Juhl USB: explicitly mark the endianness of some visor data fields. Signed-off-by: Greg Kroah-Hartman [PATCH] module sysfs: make module.mkobj inline Make module.mkobj inline. As this is simpler and what's usually done with kobjs when it's representing an entity. Signed-off-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman [PATCH] module sysfs: expand module_attribute methods Modify module_attribute show/store methods to accept self argument to enable further extensions. Signed-off-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman [PATCH] module sysfs: sections attr reimplemented using attr group Reimplement section attributes using attribute group. This makes more sense, for, while they reside in a separate subdirectory, they belong to the ownig module and their lifetime exactly equals the lifetime of the owning module, and it's simpler. Signed-off-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman [PATCH] module sysfs: module parameters reimplemented using attr group Reimplement parameter attributes using attribute group. This makes more sense, for, while they reside in a separate subdirectory, they belong to the ownig module and their lifetime exactly equals the lifetime of the owning module, and it's simpler. Signed-off-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman [PATCH] sysfs: add mmap support to struct bin_attribute files This patch adds an mmap method and some more error checking to struct bin_attribute--good for things like exporting PCI resources directly. I wasn't sure about the return values for the case where an attribute is missing a given method, and it looks like mm.h can't be included in sysfs.h, so I had to forward declare struct vm_area_struct. Other than that, it works fine for my test cases. Signed-off-by: Jesse Barnes Signed-off-by: Greg Kroah-Hartman [PATCH] rename ETH_P_AOE Rename old ETH_P_EDP2 ("EtherDrive Protocol 2") to ETH_P_AOE (ATA over Ethernet). Signed-off-by: Ed L. Cashin Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: Use PCI_DEVICE in bus drivers > Hint, the PCI_DEVICE() macro makes this a lot simpler :) What about this cleanup patch then? It generalizes the use of PCI_DEVICE() among i2c/busses drivers (with some pci ids cleanups for free). Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman [PATCH] I2C patch from MIPS tree... Here is a newer i2c patch from the mainline Linux/MIPS kernel tree. Some more changes came in since yesterday. Please apply this for inclusion in the next Linux release. Thanks. Signed-off-by: Steven J. Hill Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: Remove checksum code in eeprom driver As a follow-up to my earlier proposal to remove the checksum code from the i2c eeprom driver, here is a patch that does just that. This shrinks the driver size by around 5%, and paves the way for further fixes and cleanups. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman [PATCH] USB: additional device id for kaweth driver thanks to Magnus an additional device id. Signed-Off-By: Oliver Neukum [PATCH] USB: ohci build tweaks Resolves some build glitches that snuck into OHCI. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: fix Scheduling while atomic warning when resuming. From: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: add prototype for pci_choose_state() This adds missing prototype for pci_choose_state. Signed-off-by: Pavel Machek Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: export PCI resources in sysfs This patch exports PCI resources to userspace in the corresponding sysfs device directory. It depends on the platform HAVE_PCI_MMAP code, and is #ifdef'd accordingly. I've also added documentation describing the sysfs PCI device file layout. Signed-off-by: Jesse Barnes Signed-off-by: Greg Kroah-Hartman [ACPI] ACPICA 20041210 from Bob Moore ACPI 3.0 support is nearing completion in both the iASL compiler and the ACPI CA core subsystem. Fixed a problem in the ToDecimalString operator where the resulting string length was incorrectly calculated. The length is now calculated exactly, eliminating incorrect AE_STRING_LIMIT exceptions. Fixed a problem in the ToHexString operator to allow a maximum 200 character string to be produced. Fixed a problem in the internal string-to-buffer and buffer-to-buffer copy routine where the length of the resulting buffer was not truncated to the new size (if the target buffer already existed). Signed-off-by: Len Brown [PATCH] PCI: clean up state usage in pci core > Now, care to send patches to fix up all of the new sparse warnings in > the drivers/pci/* directory? This should reduce number of warnings in pci.c. It will still warn on comparison (because we are using __bitwise, but in fact we want something like "this is unique but arithmetic is still ok"), but that probably needs to be fixed in sparse. Also killed "function does not return anything" warning. Signed-off-by: Pavel Machek Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: fix sparse warnings in drivers/net/* and bttv This should fix sparse warnings in drivers/net/* and bttv. Signed-off-by: Pavel Machek Signed-off-by: Greg Kroah-Hartman [PATCH] cpqphp: reduce stack usage Reduce local stack usage in cpqhp_set_irq() from 1028 bytes to 12 bytes (on x86-32). This was the 16th largest offender according to my recent 'make checkstack' run (and 2 other patches for large ones have recently been submitted). Signed-off-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman [PATCH] driver core: allow struct bin_attributes in class devices This small patch adds routines to create and remove bin_attribute files for class devices. One intended use is for binary files corresponding to PCI busses, like bus legacy I/O ports or ISA memory. Signed-off-by: Jesse Barnes [ACPI] Split the ACPI Processor P-States library into a different file Signed-off-by: Dominik Brodowski Signed-off-by: Len Brown [ACPI] Split the ACPI Processor T-States handling into a different file Signed-off-by: Dominik Brodowski Signed-off-by: Len Brown [ACPI] Split the ACPI Processor C-States handling into a different file Signed-off-by: Dominik Brodowski Signed-off-by: Len Brown [ACPI] Split the ACPI Processor passive cooling code into a different file Signed-off-by: Dominik Brodowski Signed-off-by: Len Brown [ACPI] Finalize the splitting of processor.c by moving the rest to processor_core.c Signed-off-by: Dominik Brodowski Signed-off-by: Len Brown [ACPI] Shorten the times IRQs are disabled in throttling. During calculations no disabling is necessary. Signed-off-by: Dominik Brodowski Signed-off-by: Len Brown [ACPI] Differentiate between C-States and C-state type. http://bugzilla.kernel.org/show_bug.cgi?id=1958 Signed-off-by: Bruno Ducrot Signed-off-by: Dominik Brodowski Signed-off-by: Len Brown [AGPGART] Fix up two stupid bugs in the posting fixes. Spotted by MASAO TAKAHASHI Signed-off-by: Dave Jones [ACPI] Split up the extraction of information from the FADT and the pblk_address (acpi_processor_get_power_info_fadt()) and the validation whether the state is indeed available (acpi_processor_power_verify()). http://bugzilla.kernel.org/show_bug.cgi?id=1958 Signed-off-by: Bruno Ducrot Signed-off-by: Dominik Brodowski Signed-off-by: Len Brown [ACPI] deleted unused default c-state http://bugzilla.kernel.org/show_bug.cgi?id=1958 Signed-off-by: Dominik Brodowski Signed-off-by: Len Brown [ACPI] make power.state a pointer http://bugzilla.kernel.org/show_bug.cgi?id=1958 Signed-off-by: Dominik Brodowski Signed-off-by: Len Brown [ACPI] make the c-state policy decisions of demotion and promotion independent of the assumption "one state per type." make the state a pointer inside struct acpi_processor_cx_policy. make max_cstate aware of c-state types instead of c-state number. http://bugzilla.kernel.org/show_bug.cgi?id=1958 Signed-off-by: Dominik Brodowski Signed-off-by: Len Brown [ACPI] Add _CST parsing http://bugzilla.kernel.org/show_bug.cgi?id=1958 Signed-off-by: Bruno Ducrot Signed-off-by: Dominik Brodowski Signed-off-by: Len Brown [ACPI] Handle _CST change notifications It is necessary to unload the processor idle handle for a short period of time to avoid for nasty races -- and we don't want to grab too many locks so that the idle handler continues to be speedy. http://bugzilla.kernel.org/show_bug.cgi?id=1958 Signed-off-by: Bruno Ducrot Signed-off-by: Dominik Brodowski Signed-off-by: Len Brown [ACPI] Notify the BIOS that Linux can handle _CST. http://bugzilla.kernel.org/show_bug.cgi?id=1958 Signed-off-by: Bruno Ducrot Signed-off-by: Dominik Brodowski Signed-off-by: Len Brown [ACPI] Consolidate code in processor_idle(). Only symbols "exported" are _init(), _exit() and _cst_has_changed() Signed-off-by: Dominik Brodowski Signed-off-by: Len Brown sysfs: export the /sys/kernel subsystem for people to use. Signed-off-by: Greg Kroah-Hartman debugfs: add /sys/kernel/debug mount point for people to mount debugfs on. Signed-off-by: Greg Kroah-Hartman [ACPI] Export /sys/module/processor/parameters/max_cstate Signed-off-by: Dominik Brodowski Signed-off-by: Len Brown PCI: fix typo on previous pci_set_power_state() patch for hte sis900 driver. Signed-off-by: Greg Kroah-Hartman PCI: fix bttv-driver "cleanup" that called an incorrect function. Signed-off-by: Greg Kroah-Hartman [PATCH] usb atm: macro consolidation, fixes debugging problem Hi Greg, the recent reorganisation of the speedtouch driver broke the logic that turns on debugging output in speedtch.c and usb_atm.c when DEBUG or CONFIG_USB_DEBUG is set. This patch fixes things up, and moves duplicated debugging code into the header file. Signed-off-by: Duncan Sands Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: Software visible configuration request retry status PCI Express allows cards to return "Configuration Request Retry" if they're not ready to handle accesses to configuration space. The PCI Express 1.0a specification says that the Root Complex should retry the access. ECN 27 http://www.pcisig.com/specifications/pciexpress/ECN_CRS_Software_Visibility_No27.pdf allows software to handle the CRS. Signed-off-by: Matthew Wilcox Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: add legacy resources to sysfs for pci busses This patch adds legacy_io and legacy_mem files to the pci_bus class hierarchy in sysfs. The files can be used (if the platform supports them) to access legacy I/O port space and legacy ISA memory space--useful for things like x86 emulators or VGA card POSTing. The interfaces are documented in Documentation/filesystems/sysfs-pci.txt. Signed-off-by: Jesse Barnes Signed-off-by: Greg Kroah-Hartman [PATCH] driver core: Fix up vesafb failure probing. bus.c file invokes a probe callback for most devices in a list, then checks for -ENODEV return ("no such device"), if so it remains silent. However, some drivers (including vesafb.c) may return -ENXIO ("no such device or address"), which is indeed error -6. I shut up the warning with the attached patch, that basically ignores both -ENODEV and -ENXIO. >From https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=125890 original patch by: Alessandro Suardi Signed-off-by: Dave Jones Signed-off-by: Greg Kroah-Hartman [AGPGART] ULI M1689 support. From: Peer.Chen@uli.com.tw Signed-off-by: Dave Jones [AGPGART] Fix agp=off. agp=off disabled the agpgart driver, but not the chipset specific drivers, which still did their init routines. Chaos ensued. Signed-off-by: Dave Jones [ACPI] max_cstate shall limit C-states not C-state-types. Signed-off-by: Dominik Brodowski Signed-off-by: Len Brown [PATCH] scsi/advansys.c fix !CONFIG_PCI advansys.c fails to build for old ISA cards when CONFIG_PCI is not enabled. Signed-off-by: Paul Gortmaker Signed-off-by: James Bottomley SCSI: add queue_type entry in sysfs This adds an extra attribute to tell you what type of queueing the driver is using: none, simple or ordered. If the driver supplies the change_queue_type API, you can also alter this (which would allow the turning on or off of TCQ). I also fixed the change_queue_depth not to allow the user to go below one. Signed-off-by: James Bottomley SCSI: update 53c700 to use the change_queue_type API Signed-off-by: James Bottomley [ACPI] tweak /proc/acpi/processor/CPU0/power format Current policy is to name both C-state-types and the actual C-States "C[0-n]". Follow this rule... Signed-off-by: Dominik Brodowski [ACPI] Let C4 demote to C3, not directly to C2. Signed-off-by: Dominik Brodowski Signed-off-by: Len Brown [ACPI] add "processor.nocst" parameter which blocks _CST parsing and always uses FADT info instead. Signed-off-by: Dominik Brodowski Signed-off-by: Len Brown [ACPI] fix to the stack-audit patch http://bugzilla.kernel.org/show_bug.cgi?id=2901 Signed-off-by: Len Brown [ACPI] two fixups where promotion and demotion were mixed up Signed-off-by: Dominik Brodowski Signed-off-by: Len Brown TUN/TAP driver packet queuing fixes and improvements Patch from Harald Roelle Fixes for the following issues - "Kicking" packet behavior in case of kernel packet scheduler (! TUN_ONE_QUEUE): When the netif queue is stopped because of an overrun of the driver's queue, no new packets are delivered to the driver until a new packet arrives, not even when in the meantime there's again space in the driver's queue (gained by a reading user process). In short, whenever netif queue was stopped, one needs an additional packet to "kick" packet delivery to the driver. The reason for this is, that the netif queue is started but not woken up, i.e. the rest of the kernel is not signaled to resume packet delivery. - Adjustment of tx queue length by ifconfig has only effect when TUN_ONE_QUEUE is set. Otherwise always constant TUN_READQ_SIZE queue length is used. - TX queue default length setting is not consistent: o TAP dev + TUN_ONE_QUEUE: 1000 (by ether_setup()) o all other cases: 10 - Default tx queue length is too short in many cases. IMHO it should be at least twice as long as the number of fragments needed for a maximum sized IP packet at a "typical" MTU size. This would ensure that at least one complete IP packet can be delivered to the attached user space process, even if the packet's fragments are "misaligned" in the buffer and the user process is not scheduled in time to read the queue. Additional modifications: - To signal that stopping of the queue has occurred, the tx fifo overrun counter is increased. - Implemented ethtool api. Primarily added to have a standard method requesting the driver version. Signed-off-by: Max Krasnyansky Use random_ether_addr() to generate TAP MAC address. Signed-off-by: Mark Smith Signed-off-by: Max Krasnyansky [ACPI] another fix to the stack-audit patch http://bugzilla.kernel.org/show_bug.cgi?id=2901 Signed-off-by: Len Brown [ACPI] apply via_interrupt_line_quirk in ACPI mode the same way it is applied in legacy mode. Delete redundant quirks. http://bugzilla.kernel.org/show_bug.cgi?id=3319 Signed-off-by: David Shaohua Li Signed-off-by: Len Brown [ACPI] Fix suspend/resume lockup issue by leaving Bus Master Arbitration enabled. The ACPI spec mandates it be disabled only for C3. http://bugzilla.kernel.org/show_bug.cgi?id=3599 Signed-off-by: David Shaohua Li Signed-off-by: Len Brown [SCTP] Fix potential null pointer dereference in sctp_err_lookup(). Signed-off-by: Vladislav Yasevich Signed-off-by: Sridhar Samudrala [Bluetooth] Make some code of the core static This patch makes some needlessly global code static. Signed-off-by: Adrian Bunk Signed-off-by: Marcel Holtmann [Bluetooth] Make another function static This patch makes a needlessly global function static. Signed-off-by: Adrian Bunk Signed-off-by: Marcel Holtmann [Bluetooth] Make more code static This patch makes more needlessly global code static. Signed-off-by: Adrian Bunk Signed-off-by: Marcel Holtmann [Bluetooth] Add module parameter for HCI_Reset This patch adds a module parameter to the hci_uart and hci_usb drivers for forcing a HCI_Reset on initialization. Signed-off-by: Marcel Holtmann [Bluetooth] Update socket option handling This patch unifies the socket option handling across the L2CAP, SCO and RFCOMM socket layers. Signed-off-by: Marcel Holtmann [Bluetooth] Add HIDP message parsing This patch introduces changes to incoming packet processing and parsing structure for recieved messages. Signed-off-by: Matthew Grant Signed-off-by: Marcel Holtmann [PATCH] i386 voyager_smp.c: remove a duplicate #include Signed-off-by: Adrian Bunk Signed-off-by: James Bottomley [PATCH] i810 more AC97 tunings Add some more funky AC97 knowledge to the intel8x0 driver. These come from Red Hat and its partners and are included in our shipping code. Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds [PATCH] make microcode text less confusing Red Hat got some confused customers due to this message. The confused user case is when they update the BIOS and all of a sudden we have "no suitable data" yet we did before. We (Arjan van de Ven) thus changed it to "No new microcode" which is much much clearer. Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds [PATCH] Paul Laufer CREDITS address update Paul Laufer informed the list that he had changed address and his change of address had been ignored so CREDITS was still wrong although other files had been updated. Fix this. Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds [PATCH] quiet scsi ioctls warnings SCSI ioctls can ask for a lot of memory and fail. We don't need to vomit in the log file for this case. Again taken from the Red Hat minor patches applied for FC3. Original-patch: Arjan van de Ven Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds [PATCH] Early ALI watchdog support Originally submitted by Mike Waychison in August but apparently lost. Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds [ARM PATCH] 2264/1: Move platform-specific code out of entry-armv.S Patch from Deepak Saxena This patch borrows from the uclinux source where they have moved the per-platform code for get_irqnr_and_base, disable_fiq, and irq_prio_table out of entry-armv.S. However, instead of putting the macros in arch/arm/mach-$(MACHINE)/entry-header.S, we just have it in the machine's incdir. This means we don't need the extra complexity of creating symlink at build time. The patch also removes the irq_prio_table as a requirement for all machines and makes it specific to IOC/IOMD machines. This patch drastically shrinks entry-armv.S and allows us to delete and add machines without having to touch generic code (there were two dead machines laying around in entry-armv.S). Tested on IXP4xx and test-built for just about every defconfig. Signed-off-by: Deepak Saxena Signed-off-by: Russell King [ARM PATCH] 2322/1: Enable ARM922T configuration option for Integrator Patch from Catalin Marinas This patch enables the ARM922T configuration option for the Integrator platforms (there is an Excalibur core module available). Signed-off-by: Catalin Marinas Signed-off-by: Russell King [ARM PATCH] 2323/1: Expand IXP4XX_WATCHDOG config help text Patch from David Vrabel Expand the IXP4XX_WATCHDOG (IXP4xx internal watchdog) config option help text with a note about its ineffectiveness. Signed-off-by: David Vrabel Signed-off-by: Russell King [PATCH] ibmvscsi: replace schedule_timeout() with msleep() Description: Use msleep() instead of schedule_timeout() to guarantee the task delays as expected. Originally submitted to linux-scsi by the janitors, and resubmitted by boutcher (after testing :-) Signed-off-by: Nishanth Aravamudan Signed-off-by: Maximilian Attems Signed-off-by: Dave Boutcher Signed-off-by: James Bottomley SCSI: Add FC transport host attributes From: James.Smart@Emulex.Com This patch updates the fc_transport with attributes for local FC ports (e.g. Hosts). The port attributes are defined per HBAAPI v2.0 definitions. This patch results in the following in /sys/class: ----------------------------------------------------- [jsmart@elxware class]$ cd /sys/class [jsmart@elxware class]$ ls fc_host graphics misc pci_bus scsi_host usb_host fc_transport input net scsi_device tty vc firmware mem netlink scsi_generic usb [jsmart@elxware class]$ cd fc_host [jsmart@elxware fc_host]$ ls host4 [jsmart@elxware fc_host]$ cd host4 [jsmart@elxware host4]$ ls device host_port_maxframe_size host_port_supported_speeds host_fabric_name host_port_name host_port_symbolic_name host_link_down_tmo host_port_speed host_port_type host_node_name host_port_state host_tgtid_bind_type host_port_active_fc4s host_port_supported_classes statistics host_port_id host_port_supported_fc4s [jsmart@elxware host4]$ ls -ld * lrwxrwxrwx 1 root root 0 Oct 13 18:24 device -> ../../../devices/platform/host4 -r--r--r-- 1 root root 4096 Oct 13 18:24 host_fabric_name -rw-r--r-- 1 root root 4096 Oct 13 18:24 host_link_down_tmo -r--r--r-- 1 root root 4096 Oct 13 18:24 host_node_name -r--r--r-- 1 root root 4096 Oct 13 18:24 host_port_active_fc4s -r--r--r-- 1 root root 4096 Oct 13 18:24 host_port_id -r--r--r-- 1 root root 4096 Oct 13 18:24 host_port_maxframe_size -r--r--r-- 1 root root 4096 Oct 13 18:24 host_port_name -r--r--r-- 1 root root 4096 Oct 13 18:24 host_port_speed -r--r--r-- 1 root root 4096 Oct 13 18:24 host_port_state -r--r--r-- 1 root root 4096 Oct 13 18:24 host_port_supported_classes -r--r--r-- 1 root root 4096 Oct 13 18:24 host_port_supported_fc4s -r--r--r-- 1 root root 4096 Oct 13 18:24 host_port_supported_speeds -r--r--r-- 1 root root 4096 Oct 13 18:24 host_port_symbolic_name -r--r--r-- 1 root root 4096 Oct 13 18:24 host_port_type -rw-r--r-- 1 root root 4096 Oct 13 18:24 host_tgtid_bind_type drwxr-xr-x 2 root root 0 Oct 13 18:24 statistics Using the following script (/tmp/show_attributes): #!/bin/sh FILES=`ls *` for file in $FILES; do if [ -f $file ] ; then echo "$file : " `cat $file` fi done Here's a sample of querying the attributes: [jsmart@elxware /]$ cd /sys/class/fc_host/host4 [jsmart@elxware host4]$ /tmp/show_attributes host_fabric_name : 0x33334444ffeeddcc host_link_down_tmo : 30 host_node_name : 0x78563412aabbccdd host_port_active_fc4s : hex: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f host_port_id : 0x789abc host_port_maxframe_size : 2511 bytes host_port_name : 0xefcdab9011223344 host_port_speed : 2 Gbit host_port_state : Online host_port_supported_classes : Class 2, Class 3 host_port_supported_fc4s : hex: 80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f 90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f host_port_supported_speeds : 2 Gbit, 4 Gbit, 10 Gbit host_port_symbolic_name : LP9052 Dual Port Adapter host_port_type : NPort (fabric via point-to-point) host_tgtid_bind_type : wwpn (World Wide Port Name) Signed-off-by: James Bottomley SCSI: fix compile warning in fc transport class CC [M] drivers/scsi/scsi_transport_fc.o drivers/scsi/scsi_transport_fc.c: In function `fc_stat_show': drivers/scsi/scsi_transport_fc.c:634: warning: long long unsigned int format, long unsigned int arg (arg 4) To us %llx on a 64 bit platform we have to cast u64 to unsigned long long. Signed-off-by: James Bottomley dma_release_declared_memory needs iounmap Spotted by: Jeff Garzik Signed-off-by: James Bottomley Revert duplicate AC97 id's. They were already there, properly sorted too. [PATCH] drivers/acpi/ibm_acpi.o .init.text refers to .exit.text the ibm_acpi.c driver references acpi_ibm_exit() from it's __init function, which means the exit function isn't allowed to be __exit since __exit functions are not part of vmlinux while __init functions are. Signed-off-by: Arjan van de Ven Signed-off-by: Linus Torvalds [SCTP] Code cleanup: remove unused code and make needlessly global code static Signed-off-by: Adrian Bunk Signed-off-by: Sridhar Samudrala i386: reboot.c cleanups From: Adrian Bunk - arch/i386/kernel/reboot.c: make reboot_thru_bios static - arch/i386/mach-visws/reboot.c: remove the unused reboot_thru_bios and reboot_smp - arch/i386/mach-voyager/voyager_basic.c: remove the unused reboot_thru_bios - arch/i386/mach-voyager/voyager_smp.c: remove the unused reboot_smp Signed-off-by: Adrian Bunk Signed-off-by: James Bottomley [PATCH] hw_random: Minor cleanup to hw_random.c Clean up in drivers/char/hw_random.c: Make debug #defines a little easier to understand. Small whitespace cleanup. Change some printk()'s into pr_info()'s. Add KERN_ constant to debug printk(). Signed-off-by: James Nelson Signed-off-by: Jeff Garzik [PATCH] drivers/char/hw_random.c: make a variable static Signed-off-by: Jeff Garzik [PATCH] 2.6.9 Use skb_padto() in drivers/net/8390.c The 8390 driver had been fixed for leaking information in short packets prior to skb_padto() existing. This change gets rid of the scratch area on the stack and makes it use skb_padto(). Thanks to Mark Smith for bringing this to my attention. Signed-off-by: Paul Gortmaker Signed-off-by: Jeff Garzik [libata] use PIO mode for request sense Signed-off-by: Albert Lee [libata] PIO error handling improvement Tested burning CD-RW with libata-dev-2.6 and cdrecord: 1. ATAPI DMA mode - tested OK 2. ATAPI PIO mode - test failed when cdrecord finishes burning and issues MODE_SELECT to the device. After checking the log, it showed that MODE_SELECT caused ata_pio_complete() to return error. However, the error is not handled by ata_pio_task(). Attached please find the patch for ata_pio_task() error handling for your review. (The patch is against the libata-dev-2.6 tree. ) Changes in the patch: 1. End the PIO task when PIO_ST_IDLE state is entered 2. End the PIO task after PIO_ST_TMOUT and PIO_ST_ERR state handled by ata_pio_error() 3. Remove the first "if" statement to handle the error condition returned from ata_pio_block(), ata_pio_complete() and ata_pio_poll(). Change #2 is not so necessary since ata_pio_error() will put the cmd to PIO_ST_IDLE state after the error condition is handled. The change just saves a function call to queue_work(). Tested OK on on my machine with pdc20275 and ASUS CD-RW drive. Signed-off-by: Albert Lee [libata] verify ATAPI DMA for a given request is OK After some testing, it seems that some PATA host adapter (ex. pdc20275) cannot work reliably with specific request buffer sizes under ATAPI DMA mode. Detailed test result: 4096, 2048, 1024, 512, 256: OK 384, 257, 255, 128, 96, 64, 32: failed (irq lost) It seems multiple of 256 bytes are the safe ATAPI DMA buffer sizes to use. Attached please find the patch to fix the pdc2027x ATAPI DMA problem. Changes: 1. Add a callback function "check_atapi_dma()" to ata_port_operations such that libata core can ask the driver: "Can this command be processed in ATAPI DMA mode safely? " when the the command is received. 2. ATAPI DMA is off by default if the callback function is not provided by the driver If the callback function is not provided by the driver, the ATAPI DMA should be as is. The ATAPI DMA is already controlled by dev->flags. BTW, the patch isolates the ATAPI DMA workaround to the pdc20275 driver itself, not impacting libata core . Signed-off-by: Albert Lee [libata] add #include (fixes 2.4 alpha build) [SCTP] Treat ICMP protocol unreachable errors from non-SCTP capable hosts as ABORTs. Signed-off-by: Jerome Forissier Signed-off-by: Sridhar Samudrala [INET] move inet_sock into inet_opt and rename it to inet_sock With this we can remove all the cut'n'pasted layouts in all inet_sock derived classes, such as tcp_sock, udp_sock, sctp_sock, etc. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller [PKT_SCHED]: Validate policer configuration TLVs. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller [ATM]: small atm cleanups (from Adrian Bunk ) Signed-off-by: Chas Williams Signed-off-by: David S. Miller [SUNRPC]: Remove unused file net/sunrpc/auth_gss/gss_pseudoflavors.c Signed-off-by: David S. Miller [SUNRPC]: Remove unused file net/sunrpc/svcauth_des.c Signed-off-by: David S. Miller [SUNRPC]: Remove unused file net/sunrpc/auth_gss/sunrpcgss_syms.c Signed-off-by: David S. Miller [APPLETALK]: Make some code static. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [AX25]: Staticize functions, and remove unused global function. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [NET]: No need to export sock_readv_writev Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [SUNRPC]: Staticize, kill unused functions, and remove unneeded exports. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [AF_UNIX]: Mark needlessly global code static. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [X25]: Staticize, and remove unused global functions. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [XFRM]: Staticize, and remove unused global functions. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [NET]: Mark eth_header_parse static. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [AF_NET]: Mark pfkey_table static. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [NETLINK]: Staticize and remove unused functions. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [AF_PACKET]: Make needlessly global code static. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [IPVS]: Make needlessly global code static. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [IPX]: Make needlessly global code static. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [IPV4]: Staticize and remove unneeded exports. The patch below contains the following possible cleanups: - make some needlessly global code static - remove the following unused global functions: - fib_rules.c: fib_rules_map_destination - xfrm4_policy.: xfrm4_fini - remove the following unneeded EXPORT_SYMBOL: - tcp_timer.c: tcp_timer_bug_msg Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [IPV4]: Let people know where to obtain the ss tool from. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [IRDA]: Staticize and remove unnecessary exports. The patch below contains the following possible cleanups: - make some needlessly global code static - remove the following unused global functions: - discovery.c: irlmp_find_device - ircomm/ircomm_param.c: ircomm_param_flush - irda_device.c: irda_device_set_dtr_rts - irda_device.c: irda_device_change_speed - irda_device.c: irda_device_set_mode - iriap.c: iriap_getinfobasedetails_request - iriap.c: iriap_getinfobasedetails_confirm - iriap.c: iriap_getobjects_request - iriap.c: iriap_getobjects_confirm - iriap.c: iriap_getvalue - irlan_client.c: irlan_client_reconnect_data_channel - irlap_frame.c: irlap_send_frmr_frame - irlmp.c: irlmp_status_request - remove the follwong unused global variables: - irnet/irnet_ppp.c: irnet_ppp_ops - irsysctl.c: sysctl_compression - qos.c: #ifndef CONFIG_IRDA_DYNAMIC_WINDOW irlap_requested_line_capacity Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [LLC]: Staticize and remove unnecessary functions and exports. The patch below contains the following possible cleanups: - make some needlessly global code static - remove the following unused global functions: - lc_c_ac.c: llc_conn_ac_report_status - lc_c_ac.c: llc_conn_ac_send_dm_rsp_f_set_f_flag - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1 - lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1_or_send_rr - lc_c_ac.c: llc_conn_ac_send_ack_cmd_p_set_1 - lc_c_ac.c: llc_conn_ac_send_ua_rsp_f_set_f_flag - lc_c_ac.c: llc_conn_ac_set_f_flag_p - llc_c_ev.c: llc_conn_ev_conn_resp - llc_c_ev.c: llc_conn_ev_rst_resp - llc_c_ev.c: llc_conn_ev_rx_xxx_cmd_pbit_set_0 - llc_c_ev.c: llc_conn_ev_rx_xxx_yyy - llc_c_ev.c: llc_conn_ev_any_tmr_exp - llc_c_ev.c: llc_conn_ev_qlfy_init_p_f_cycle - llc_c_ev.c: llc_conn_ev_qlfy_set_status_impossible - llc_c_ev.c: llc_conn_ev_qlfy_set_status_received - llc_if.c: llc_build_and_send_reset_pkt - llc_pdu.c: llc_pdu_decode_cr_bit - remove the following unneeded EXPORT_SYMBOL: - llc_core.c: llc_sap_list_lock Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [NETROM]: Make needlessly global code static. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [ROSE]: Staticize and remove unused global functions. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [RXRPC]: Staticize and remove unused globals and exports. The patch below contains the following possible cleanups: - make some needlessly global code static - remove the following unused global function: - transport.c: rxrpc_clear_transport - remove the following unneeded EXPORT_SYMBOL: - rxrpc_syms.c: rxrpc_call_flush Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [PKT_SCHED]: Staticize and other cleanups. The patch below contans the following possible cleanups: - make some needlessly global code static - sch_htb.c: #undef HTB_DEBUG Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [IPVS]: Remove subscribers-only mailing list from MAINTAINERS. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [IRDA]: Kill useless parens from return statements in irnet.h Signed-off-by: Jesper Juhl Signed-off-by: David S. Miller [SPARC64]: Stop referencing i_sock directly. Use S_ISSOCK() instead. Signed-off-by: Matthew Wilcox Signed-off-by: David S. Miller [IRDA]: More staticization becomes possible in ircomm_ttp.c Signed-off-by: David S. Miller [SPARC64]: Fix typo in previous change, s/IS_SOCK/S_ISSOCK/ Signed-off-by: David S. Miller [LLC]: llc_sap_list_lock really does need to be exported. For the case where CONFIG_LLC2 is modular and thus llc_proc.c needs to get at this symbol. Signed-off-by: David S. Miller [NET]: Use prefetching in skb_queue_walk(). This patch changes skb_queue_walk() in the same manner as in list_for_each() prefetch optimization, see http://marc.theaimsgroup.com/?l=linux-kernel&m=110399132418587 Signed-off-by: Oleg Nesterov Signed-off-by: David S. Miller [PKT_SCHED]: dsmark should ignore ECN bits Taking ECN bits into account doesn't make sense. The two bits were still unused at the time the code was written so this brings back the old behaviour. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller [INFINIBAND]: Add core InfiniBand support (public headers) Add public headers for core InfiniBand support. This can be thought of as a midlayer that provides an abstraction between low-level hardware drivers and upper level protocols (such as IP-over-InfiniBand). Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [INFINIBAND]: Add core InfiniBand support Add implementation of core InfiniBand support. This can be thought of as a midlayer that provides an abstraction between low-level hardware drivers and upper level protocols (such as IP-over-InfiniBand). Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [INFINIBAND]: Hook up drivers/infiniband Add the appropriate lines to drivers/Kconfig and drivers/Makefile so that the kernel configuration and build systems know about drivers/infiniband. Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [INFINIBAND]: Add InfiniBand MAD (management datagram) support (public headers) Add public headers for handling InfiniBand MADs (management datagrams), including sending and receiving MADs as well as passing MADs on to local agents. Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [INFINIBAND]: Add InfiniBand MAD (management datagram) support Add support for handling InfiniBand MADs (management datagrams), including sending and receiving MADs as well as passing MADs on to local agents. This is required for an SM (subnet manager) to discover and configure the host, since the SM's query MADs must be passed to the local SMA (subnet management agent). In addition, this support is used by upper level protocols to send queries to and receive responses from the SM. Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [INFINIBAND]: Add InfiniBand MAD (management datagram) support (private headers) Add MAD layer private implementation headers. Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [INFINIBAND]: Add InfiniBand MAD SMI support Add MAD layer SMI (Subnet Management Interface) code. Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [INFINIBAND]: Add InfiniBand SA (Subnet Administration) query support Add support for sending queries to the SA (Subnet Administration). In particular the PathRecord and MCMember (multicast group member) used by the IP-over-InfiniBand driver are implemented. Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [INFINIBAND]: Add Mellanox HCA low-level driver Add a low-level driver for Mellanox MT23108 and MT25208 HCAs. The MT25208 is only fully supported when in MT23108 compatibility mode; only the very beginnings of support for native MT25208 mode (required for HCAs without local memory) is present. (As a side note, I believe this driver would be the first in-tree consumer of the PCI MSI/MSI-X API) Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [INFINIBAND]: Add Mellanox HCA low-level driver (midlayer interface) Add midlayer interface code for Mellanox HCA driver. Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [INFINIBAND]: Add Mellanox HCA low-level driver (FW commands) Add firmware command processing code for Mellanox HCA driver. Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [INFINIBAND]: Add Mellanox HCA low-level driver (EQ) Add event queue code for Mellanox HCA driver. Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [INFINIBAND]: Add Mellanox HCA low-level driver (initialization) Add device initializaton code for Mellanox HCA driver. Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [INFINIBAND]: Add Mellanox HCA low-level driver (QP/CQ) Add CQ (completion queue) and QP (queue pair) code for Mellanox HCA driver. Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [INFINIBAND]: Add Mellanox HCA low-level driver (last bits) Add code for remaining InfiniBand objects (address vectors, multicast groups, memory regions and protection domains) Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [INFINIBAND]: Add Mellanox HCA low-level driver (MAD) Add MAD (management datagram) code for Mellanox HCA driver. Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [INFINIBAND]: IPoIB IPv4 multicast Add ip_ib_mc_map() to convert IPv4 multicast addresses to IPoIB hardware addresses. Also add so INFINIBAND_ALEN has a home. The mapping for multicast addresses is described in http://www.ietf.org/internet-drafts/draft-ietf-ipoib-ip-over-infiniband-08.txt Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [INFINIBAND]: IPoIB IPv6 support Add ipv6_ib_mc_map() to convert IPv6 multicast addresses to IPoIB hardware addresses, and add support for autoconfiguration for devices with type ARPHRD_INFINIBAND. The mapping for multicast addresses is described in http://www.ietf.org/internet-drafts/draft-ietf-ipoib-ip-over-infiniband-08.txt Signed-off-by: Nitin Hande Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [INFINIBAND]: Add IPoIB (IP-over-InfiniBand) driver Add a driver that implements the (IPoIB) IP-over-InfiniBand protocol. This is a network device driver of type ARPHRD_INFINIBAND (and addr_len INFINIBAND_ALEN bytes). The ARP/ND implementation for this driver is not completely straightforward, because InfiniBand requires an additional path lookup be performed (through an IB-specific mechanism) after a remote hardware address has been resolved. We are very open to suggestions of a better way to handle this than the current implementation. Although IB has a special multicast group join mode intended to support IP multicast routing (non member join), no means to identify different multicast styles has yet been determined, so all joins by the driver are currently full member joins. We are looking for guidance in how to solve this. The IPoIB protocol/encapsulation is described in the Internet-Drafts http://www.ietf.org/internet-drafts/draft-ietf-ipoib-architecture-04.txt http://www.ietf.org/internet-drafts/draft-ietf-ipoib-ip-over-infiniband-08.txt Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [INFINIBAND]: Add IPoIB multicast and partition code Add functions for handling IPoIB multicast and multiple partitions. Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [INFINIBAND]: Add IPoIB userspace MAD support Add a driver that provides a character special device for each InfiniBand port. This device allows userspace to send and receive MADs via write() and read() (with some control operations implemented as ioctls). All operations are 32/64 clean and have been tested with 32-bit userspace running on a ppc64 kernel. Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [INFINIBAND]: Document InfiniBand ioctl use Add the 0x1b ioctl magic number used by ib_umad module to Documentation/ioctl-number.txt. Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [INFINIBAND]: Add InfiniBand Documentation files Add files to Documentation/infiniband that describe the tree under /sys/class/infiniband, the IPoIB driver and the userspace MAD access driver. Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [INFINIBAND]: InfiniBand MAINTAINERS entry Add OpenIB maintainers information to MAINTAINERS. Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [SPARC64]: Include infiniband driver config and update defconfig. Signed-off-by: David S. Miller kbuild: drop use of /usr/bin/env in top-level Makefile The use of env is not needed, and caused the output makefile to be created in some setups where it was not supposed to. Seems to be an issue with GNU sh-utils version of env. One user also reported env to be located in another place (/usr/local/bin/..). This patch fixes bug: http://bugme.osdl.org/show_bug.cgi?id=3953 Thanks to "Mark Williams (MWP)" for helping tracking this down. Signed-off-by: Sam Ravnborg [TCP] merge tcp_sock with tcp_opt No need for two structs, follow the new inet_sock layout style. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller [ide] add "ide=nodma" to documentation Here's a quick patch to add the currently-undocumented ide=nodma option to the Documentation/ide.txt file. Since the code does not mark this option as obsolete as far as I can see, I can only assume that it should be in the documentation Signed-off-by: Vadim Lobanov Signed-off-by: Bartlomiej Zolnierkiewicz [ide] serverworks: add support for CSB6 RAID From: Alan Cox The ServerWorks chips include a RAID variant that the 2.6 driver didn't support. This enables support for this and removes a pile of #if and other pointless obfuscations. This removes the need to use various vendor binary only drivers for CSB6 RAID. Signed-off-by: Bartlomiej Zolnierkiewicz kallsyms: Clean up x86-64 special casing of in_gate_area() x86-64 has special case code for in_gate_area(), but it is not clean. * Replace CONFIG_ARCH_GATE_AREA with __HAVE_ARCH_GATE_AREA. ARCH_GATE_AREA is not a config option. * The definitions of get_gate_vma() and in_gate_area() are identical in include/asm-x86_64/page.h and include/linux/mm.h. Fold the duplicate definitions into include/linux/mm.h. Does not affect kallsyms directly, this patch just creates a clean base for patch 2. Signed-off-by: Keith Owens Signed-off-by: Sam Ravnborg [IA64] irq_ia64.c typo s/_IA64_REG_AR_SP/_IA64_REG_SP/ Patch supplied by Sourav Sen from HP: If I turn on IRQ_DEBUG in arch/ia64/kernel/irq_ia64.c in 2.6.8.1, the compilation does not go thru as there isn't any _IA64_REG_AR_SP Signed-off-by: Tony Luck kallsyms: Add in_gate_area_no_task() Add in_gate_area_no_task() for use in places where no task is valid (e.g. kallsyms). If you have a valid task, use in_gate_area() as before. Signed-off-by: Keith Owens Signed-off-by: Sam Ravnborg kallsyms: gate page is part of the kernel, honour CONFIG_KALLSYMS_ALL * Treat the gate page as part of the kernel, to improve kernel backtraces. * Honour CONFIG_KALLSYMS_ALL, all symbols are valid, not just text. Signed-off-by: Keith Owens Signed-off-by: Sam Ravnborg [IA64] Perfmon over-initialises its inodes i_sb and i_sock are both initialised by alloc_inode() Signed-off-by: Matthew Wilcox Acked-by: Stephane Eranian Signed-off-by: Tony Luck [IA64] contig.c: fix bug in DMA-zone initialization Below is a patch that fixes count_dma_pages(). Without this fix, only memory areas entirely below MAX_DMA_ADDRESS are counted as DMA-pages. While it doesn't really make a difference in practice (MAX_DMA_ADDRESS is equal to ~0UL on zx1), it's clearly not what was intended to be there. I found the bug only because I briefly experimented with lowering MAX_DMA_ADDRESS. Tony> The discontig.c version of this code already gets this right. Signed-off-by: David Mosberger-Tang Signed-off-by: Tony Luck kbuild: make kernelrelease This patch makes it easy to programmatically get at the kernel makefile's idea of the kernel version from external scripts and makefiles with something like V=`make kernelrelease`. Alternatives include parsing Makefile (errorprone and broken by things like localversion) and running the C preprocessor on version.h (which requires a) building version.h somewhere and b) is really ugly). From: Matt Mackall Signed-off-by: Sam Ravnborg [IA64] Fix swiotlb some more: - don't fault in unmap_single() when unmapping a coherent buffer. - make swiotlb_alloc_coherent() more resilient for devices with weird DMA masks - make swiotlb_dma_supported() return a useful value Signed-off-by: David Mosberger-Tang Signed-off-by: Tony Luck [IA64] Fix memcpy_fromio prototype Remove one layer of indirection from memcpy_fromio/memcpy_toio/memset_io and fix the prototypes to be const where appropriate. Signed-off-by: Matthew Wilcox Signed-off-by: Tony Luck kbuild: skip localversion files with '~' anywhere in their name Idea from: Blaisorblade Signed-off-by: Sam Ravnborg kbuild: Trivial Makefile patch The comment doesn't match the function name. From: "Art Haas" Signed-off-by: Sam Ravnborg kbuild: Use -isystem `gcc --print-file-name=include` Using "-nostdinc -isystem `gcc --print-file-name=include" let us see full path to compiler specific files when compiling with make V=1 Furthermore it lets us use same definition for sparse (CHECKFLAGS) and the kernel. Tested with gcc 3.3.4 only. Signed-off-by: Sam Ravnborg [SCTP] Validate and respond to invalid chunk/parameter lengths. Signed-off-by: Vladislav Yasevich Signed-off-by: Sridhar Samudrala [SCTP] Implementation of SCTP Implementer's Guide Section 2.35. This code checks that the verification tag, source port and destination port in the SCTP header matches the information contained in the state cookie. Signed-off-by: Vladislav Yasevich Signed-off-by: Sridhar Samudrala [SCTP] Clean up the T3_rtx timer when deleting a transport. Signed-off-by: Vladislav Yasevich Signed-off-by: Sridhar Samudrala [SCTP] Fix bug in setting ephemeral port in the bind address. Signed-off-by: Sridhar Samudrala [CPUFREQ] make ondemand governor aware of CPU domains The following patch makes ondemand governor aware of policy->cpus. policy->cpus mask lets multiple cpu use the same policy (useful where cpus share the frequency state), a recent change in cpufreq core. Now ondemand governor looks at all cpus in policy->cpus and takes its frequency increase/decrease decisions based on most lightly loaded cpu in the group. This patch will not affect systems where policy->cpus contain only one cpu. Signed-off-by: "Venkatesh Pallipadi" Signed-off-by: Dominik Brodowski Signed-off-by: Dave Jones [CPUFREQ] powernow-k7: ACPI perflib unregistration cleanup The unregistration of the ACPI performance library should be done in the CPU exit function, and the cleanup too. Signed-off-by: Dominik Brodowski Signed-off-by: Dave Jones [CPUFREQ] powernow-k8: unregister from ACPI perflib in error path If something fails in the per-CPU initialization in powernow-k8, it should unregister itself from the ACPI performance library. Signed-off-by: Dominik Brodowski Signed-off-by: Dave Jones [CPUFREQ] re-add call to cpufreq_driver->resume() (if anyone has a brown spare paper bag, feel free to send it to me:) The call to cpufreq_driver->resume() got lost in 2.6.6. Re-add it at the proper place. Signed-off-by: Dominik Brodowski Signed-off-by: Dave Jones [CPUFREQ] acpi-cpufreq: force setting of P-State upon resume Upon resuming from sleep or swsusp, the ACPI P-States driver can't determine the current CPU frequency, as the ACPI specification doesn't contain a method to determine the current P-State. Therefore, _always_ re-set the CPU to the P-State it was before suspending, and don't abort early if this is the same state as the CPU was put to before (like it does make sense when using the ondemand governor, for example). Signed-off-by: Dominik Brodowski Signed-off-by: Dave Jones [CPUFREQ] powernow-k8: small cleanups / documentation additions (Pavel Machek) From: Pavel Machek These are very small cleanups / documentation additions. It avoids using different names for same fields in different structures. Updated to latest cpufreq-bk by Dominik Brodowski, and ack'ed by Mark Langsdorf, Paul Devriendt and Pavel Machek. Signed-off-by: Pavel Machek Signed-off-by: Dominik Brodowski Signed-off-by: Dave Jones [CPUFREQ] core: CPUFREQ_GOV_STOP needs to be last Assert that the call to the cpufreq governor with CPUFREQ_GOV_STOP is really the last. Without this patch, some strange in-kernel preemption combined with the scheduler disliking the "removing" task may cause the opposite. Signed-off-by: Dominik Brodowski Signed-off-by: Dave Jones [CPUFREQ] nforce2: use unified cpufreq debug infrastructure Use the unified cpufreq debug infrastructure in the cpufreq-nforce2 driver. Signed-off-by: Dominik Brodowski Signed-off-by: Dave Jones [CPUFREQ] powernow-k8: handle invalid initial frequency/voltage pairs correctly From: Paul Devriendt patch for powernow-k8 problem (Mobile Sempron 2800+, Acer Aspire 1362 ) If the initial frequency/voltage pair are not valid in the frequency table, the first requested transition is to make them valid. Fix the code doing so. Signed-off-by: Dominik Brodowski Signed-off-by: Dave Jones [CPUFREQ] cpufreq stat output in sysfs From: "Zou, Nanhai" Export cpufreq transition information for drivers using the freq-table helpers via sysfs. Two minor updates from Dominik Brodowski: s/translation/transition Kconfig re-ordering Signed-off-by: Dave Jones [CPUFREQ] speedstep-centrino: fix SMP memory leak Venkatesh Pallipadi made me aware of a memory leak in speedstep-centrino: centrino_model is allocated for all CPUs. There were two possibilities: either make the centrino_model data per-CPU, or to share it across CPUs. I chose the former variant, as ACPI data may be broken and/or different for multiple CPUs. Additionally, I made centrino_cpu per-CPU, and removed a check whether setting allowed_cpus to policy->cpus resulted in smp_processor_id() == policy->cpu: if policy->cpus has more than one bit set, this check will fail very often. Signed-off-by: Dominik Brodowski Signed-off-by: Dave Jones [CPUFREQ] Check in missing file for cpufreq stats. Signed-off-by: Dave Jones [CPUFREQ] speedstep-centrino: transient MSR values (Venkatesh Pallipadi) On some CPUs, we can see transient MSR values (which are not present in _PSS) in IA32_PERF_STATUS MSR, while CPU is doing some automatic P-state transition (like TM2). Current code will return frequency as 0 in such cases. Fix it by retrying the get after a delay and use lowest possible frequency as the current frequency in worst case. Thanks to Matt Domsch for identifying and root-causing this failure. Signed-off-by: Venkatesh Pallipadi Signed-off-by: Dominik Brodowski Signed-off-by: Dave Jones [CPUFREQ] speedstep-centrino: quieten driver (Venkatesh Pallipadi) Patch to remove speedstep-centrino error messages getting printed by default. Print them only when debug flags are enabled. The reason for this patch is - With the multiple drivers model that we have now, any installation will try different drivers one after the other, until one of them succeeds. So, failure to add speedstep-centrino alone doesn't mean error, as some other driver (say acpi.ko) can succeed later and system will still be able to use speedstep. Printing the error whenever speedstep-centrino fails can confuse the enduser. Signed-off-by: Venkatesh Pallipadi Signed-off-by: Dominik Brodowski Signed-off-by: Dave Jones [CPUFREQ] userspace: remove /proc/sys/cpu/ interface Remove the deprecated /proc/sys/cpu/ interface to cpufreq. Signed-off-by: Dominik Brodowski Signed-off-by: Dave Jones [CPUFREQ] proc_cpufreq: remove /proc/cpufreq interface Remove the deprecated /proc/cpufreq interface. The same input is available using cpufreq-info --proc from cpufrequtils. Signed-off-by: Dominik Brodowski Signed-off-by: Dave Jones [ARM PATCH] 2332/1: OMAP update 1/2: Include files Patch from Tony Lindgren This patch syncs the mainline kernel with the linux-omap tree. The patch mostly contains minor fixes and extra register definitions by various OMAP developers. Signed-off-by: Tony Lindgren Signed-off-by: Russell King [ARM PATCH] 2324/1: Convert ARM proc files to use domain and pgtable manifest constants Patch from George G. Davis Convert ARM proc files to use manifest constants defined in pgtable.h and domain.h. This is a prelude to allow renumbering domains. The domain renumbering is required to implement support for ARMv6 MMU super sections where domain 0 is implied. Although this is technically only required for ARMv6, it seemed reasonable to clean up all proc files while here. I did a test build with and without this patch applied and confirmed that all proc file binaries are unchanged when this patch is applied. Signed-off-by: George G. Davis Signed-off-by: Russell King [ARM PATCH] 2325/1: Cleanup IXP2000 reset handling Patch from Deepak Saxena On IXDP2801 we need to write a magic sequence to the CPLD to ensure a full system reset instead of just CPU reset. Also cleanup some comments and copyrights while we are in here. Signed-off-by: Deepak Saxena Signed-off-by: Russell King [ARM PATCH] 2326/1: Fix IXP2000 timer implementation Patch from Deepak Saxena This patch fixes two issues with the IXP2000 timer implementation: - We currently to not account for lost timer interrupts - We currently do not check for rollover within gettimeoffset() Signed-off-by: Deepak Saxena Signed-off-by: Russell King [ARM PATCH] 2328/1: ARM Kconfig updates for OMAP leds Patch from Tony Lindgren ARM Kconfig updates for OMAP leds Signed-off-by: Tony Lindgren Signed-off-by: Russell King [ARM PATCH] 2329/1: Update Kconfig for OMAP processor options Patch from Tony Lindgren Updates processor specific Kconfig options for OMAP Signed-off-by: Tony Lindgren Signed-off-by: Russell King JFS: delete unused file Remove nowhere referenced file. (egrep "filename\." didn't find anything) Signed-off-by: Domen Puncer Signed-off-by: Dave Kleikamp [IA64] Enable ForteMedia in zx1 defconfig Patch from Matthew Wilcox: The FM801 chip is built-in to the zx2000 workstation. There's a lot of noise in the patch because the defconfig hasn't been updated in a few releases. Tony> I tweaked a couple of other CONFIG options (enabled MCA_RECOVERY and TMPFS_XATTR, disabled TCPDIAG). Signed-off-by: Tony Luck [PATCH] affs headers cleanup kernel-only stuff moved from affs headers in include/linux to fs/affs/affs.h; includes in fs/affs/*.c sanitized. That's the patch that had been ACKed by Roman + move of function-like macros from amigaffs.h (also ACKed) + removal of ancient #if 0'ed junk from declaration of affs_inode_info (spotted and suggested by Roman). Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] zatm fix Repairs the breakage introduced in gcc4 fixes. Original had expanded to ((struct zatm_dev *)(dev)->dev_data) = zatm_dev; and that's what gcc4 had complained about (cast-as-lvalue). Proper fix is, of course, dev->dev_data = zatm_dev; What we have in 2.6.10 is dev = (struct atm_dev *)zatm_dev; which doesn't cause complaints, but doesn't do anything good (leak + corruption at the very least). Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] mxser annotations and compile fixes a) __user annotations b) NULL noise removals c) added missing ifdef CONFIG_PCI around the loop over mxser_pcibrds during init. d) declaration of CMSPAR in case if it had been undefined moved up prior to the first use Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] cinergy __user annotations __user annotations in new code. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] x86_64 io.h annotations x86-64 memcpy_toio(), memcpy_fromio(), memset_io() and read{b,w,l,q}(), switched to standard prototypes. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] ppc io.h annotations * prototypes converted to standard ones * bunch of useless casts killed in ioread*/iowrite* Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] hotplug NULL noise removal Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] more isa-ectomy switch to ioremap + normal iomem access primitives Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] tda80xx.c portability fix should include asm/irq.h, not linux/irq.h Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] dib3000 portability fix size_t is %zd, not %d... Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] av7110_hw __user annotations fix Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] ppc __iomem annotations - ->cfg_data struct pci_controller ->cfg_data annotated as iomem pointer; users modified accordingly... Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] ppc __iomem annotations - gg2 gg2_pci_config_base is an iomem pointer. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] ppc __iomem annotations - openpic Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] ppc __iomem annotations - ->cfg_addr ->cfg_addr is an iomem pointer; annotated as such, setup_indirect_pci() cleaned up. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [SCTP] Fix misc. issues in SCTP_PEER_ADDR_PARAMS set socket option. Signed-off-by: Sridhar Samudrala [ARM PATCH] 2336/1: OMAP update 1/2: Arch files, take 2 Patch from Tony Lindgren This patch syncs the mainline kernel with the linux-omap tree. The highlights of the patch are: - Add OMAP board specific low-level init functions for smc91x Ethernet - DMA audio functions by Nishant Menon - Remove references to OMAP specific serial.h This is an updated version of ARM patch 2331/1 with extra comments added to the omap_get_dma_src_pos() and omap_get_dma_dst_pos() functions as recommended by RMK. Signed-off-by: Tony Lindgren Signed-off-by: Russell King [ARM PATCH] 2327/1: Thumb ld/st alignment fault fixups Patch from George G. Davis Adds support for Thumb ld/st alignment fault fixups via conversion of Thumb ld/st instruction forms into equivalent ARM instructions and reusing ARM alignment fault handler for Thumb instructions. This implementation was inspired by and initially based on the algorithm found in gdb/sim/arm/thumbemu.c. I've backed out the silly 'T' suffix on PC in this version as requested by RMK. At this point, I prefer to avoid making any of the other changes discussed, e.g. dump_instr() for bad instruction cases, in order to get the basic Thumb support change committed. Thanks! Signed-off-by: George G. Davis Signed-off-by: Russell King [ide] ide-proc: kill destroy_proc_ide_interfaces() /proc interface entries should be already unregistered by ide_unregister() (unless interface is still busy). Signed-off-by: Bartlomiej Zolnierkiewicz [ide] fix cleanup_module() in ide.c DMA should be already released by ide_unregister() (unless interface is still busy). Signed-off-by: Bartlomiej Zolnierkiewicz [PATCH] i386 uaccess annotations get_user() stores result in a local variable that later gets cast to integer or pointer type. The proper type for that is unsigned long. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [ARM] Add DMA mmap() support. This adds DMA mmap() support for the ARM architecture, as discussed around March 2003 on the linux-arch and linux-kernel mailing lists. Subsystems such as ALSA (for sample ring buffers) and video drivers (for framebuffers in system memory) require this infrastructure to provide userspace with an architecture clean method to mmap these memory areas. Signed-off-by: Russell King [ide] it8172: incorrect return from it8172_init_one() From: Alan Cox Several IDE drivers return positive values as errors in the PCI setup code. Unfortunately the PCI layer considers positive values as success so the driver skips the device but still claims it and things then go downhill. This fixes the IT8172 driver. From: Francois Romieu Use -ENODEV instead of -EAGAIN. Signed-off-by: Bartlomiej Zolnierkiewicz [ide] fix return codes in the generic PCI IDE driver From: Alan Cox This patch updates ide/pci/generic.c to fix the incorrect returns causing PCI devices to be left reserved wrongly by the driver. From: Francois Romieu Use -ENODEV instead of -EAGAIN. Signed-off-by: Bartlomiej Zolnierkiewicz [ide] propagation of error code in PCI IDE setup - Change the return value and the prototype of do_ide_setup_pci_device Due to lack of appropriate return status code, the current clients of do_ide_setup_pci_device() can not distinguish a failing invocation from a successfull one. The patch modify do_ide_setup_pci_device() so that it can propagate some of the errors from the lower layers. - Make ide_setup_pci_device() aware of the change and propagate the news itself. I only gave a quick sight to create_proc_ide_interfaces() (and ide_remove_proc_entries()) but they do seem sane and it should not matter if it fails or not. - ide_setup_pci_devices(): mostly the same thing than ide_setup_pci_device(). do not look trivially suspect. Signed-off-by: Francois Romieu Signed-off-by: Bartlomiej Zolnierkiewicz [ide] clean up error path in do_ide_setup_pci_device() ide_setup_pci_controller() puts the device in a PCI enabled state. The patch adds a small helper to balance it when things go wrong. Actually the helper does not *exactly* balance the setup: if it can not do a better job, ide_setup_pci_controller() may only enable some BARS whereas the new counterpart will try to disable everything. Signed-off-by: Francois Romieu Signed-off-by: Bartlomiej Zolnierkiewicz [ide] propagate the error status in ide_pci_enable/ide_setup_pci_controller - no need to overwrite the status code returned by the pci_xyz() functions; - jump into the new century and use DMA_32BIT_MASK; - misc cleanup in the error paths. It should not add a huge value in ide_pci_enable() due to the FIXME comment but it should not bite too hard either. Signed-off-by: Francois Romieu Signed-off-by: Bartlomiej Zolnierkiewicz [ide] make host drivers aware of the changes made to ide_setup_pci_device{s} - nothing clever here: the most noticeable change is the change of returned value for (*init_setup) in struct ide_pci_device_s which goes from void to int. Anything else is editing and checking for errors in the output of the compiler; - pci_disable_device() added for the error path in pci_init_sgiioc4(); - BUG() removed in amd74xx_probe(): good old printk() is enough. Signed-off-by: Francois Romieu Signed-off-by: Bartlomiej Zolnierkiewicz [patch] Intel ICH7 DID's, PIRQ and PATA support From: Jason Gaston This patch adds the Intel ICH7 DID's to the pci_ids.h file and updates the piix driver and related files for PATA support. bart: this patch also adds PIRQ support Signed-off-by: Bartlomiej Zolnierkiewicz [PATCH] Fix net/core/sock.o build failure This fixes a build failure that happens when you don't select IPV6. Signed-off-by: Linus Torvalds [SCTP] Fix sctp_getladdrs() to return valid local addresses on an endpoint that is bound to INADDR_ANY or inaddr6_any. Signed-off-by: Sridhar Samudrala [ARM] Add CLCD driver mmap method and callbacks. Convert CLCD driver such that boards can use the dma_mmap_*() interfaces where appropriate. Signed-off-by: Russell King [ARM] Add missing end of comment. [ARM PATCH] 2339/1: Don't mask IRQ_STATUS with IXP2000_VALID_IRQ_MASK Patch from Deepak Saxena Supersedes 2226/1 According to the IXP Programmer's Reference Manual, a read from IRQ_STATUS can only return '1' for IRQ sources that have been explicitly enabled in IRQ_ENABLE. So if we never enable 'invalid' IRQ sources, we don't actually have to mask off IRQ_STATUS with IXP2000_VALID_IRQ_MASK. Signed-off-by: Deepak Saxena Signed-off-by: Russell King [ARM PATCH] 2307/1: Add IXP46x and IXDPG465 implementation Patch from Deepak Saxena Patch adds implementation details for IXP46x CPUs and new IXDPG465 reference platform. Signed-off-by: Deepak Saxena Signed-off-by: Russell King drm: Use wbinvd macro instead of assembly for it, From: Stefan Dirsch Signed-off-by: Dave Airlie Make 1-bit fields be unsigned (no sign bit :). sparse complains about them: drivers/char/drm/sis_ds.h:88:12: warning: dubious one-bit signed bitfield drivers/char/drm/sis_ds.h:89:16: warning: dubious one-bit signed bitfield Signed-off-by: Randy Dunlap Signed-off-by: Dave Airlie drm: correct historic mis-attribution of copyright From: Keith Withwell Signed-off-by: Dave Airlie drm: use spin_lock_init instead of SPIN_LOCK_UNLOCKED From: Jon Smirl Signed-off-by: Dave Airlie drm: make reclaim_buffers take dev argument Allow drivers to override reclaim_buffers in an OS-independent way by passing drm_device_t* as first parameter, like in the BSD version. From: Felix Kuehling Signed-off-by: Dave Airlie SCSI: update ipr to use the change_queue_depth API Instead of doing an attribute override. Ack'd by: Brian King Signed-off-by: James Bottomley [PATCH] sym2 version 2.1.18n sym2 version 2.1.18n: - Prevent querying for DT clocking on a single ended bus - Check the U3EN bit instead of the ULTRA3 bit - Only use PPR if SDTR is incapable of negotiating the desired options or speed - minsync bugfix (James Bottomley) - Always calculate what negotiation to perform inside sym_prepare_nego() - Delete unused SYM_OPT_HANDLE_IO_TIMEOUT and SYM_CONF_TIMEOUT_ORDER_MAX code (Christoph Hellwig) - Use SCSI-3 message names instead of SCSI-2 names - Remove private definitions of PCI IDs - Reorganise DMA mask setup - Fix comment tpyo - Make some needlessly global code static (Adrian Bunk) - Reorder some functions to eliminate predeclaration - Use memset instead of bzero - Consolidate and abstract SPARC's special IRQ printing - Convert hcb_p to struct sym_hcb * - Remove cam_ccb_p and cam_scsiio_p typedefs - Treat PA-RISC firmware as if it were a type of NVRAM Signed-off-by: Matthew Wilcox Signed-off-by: James Bottomley [PATCH] Remove lasi700.h Inline lasi700.h into lasi700.c to cut down on the size of the drivers/scsi directory. Signed-off-by: James Bottomley [PATCH] Misc zalon fixes Some miscellaneous cleanups for the Zalon driver: - Remove unused definitions of sync_scsi_data_for_cpu and sync_scsi_data_for_device - Fill in dev->irq in the zalon driver - Request the interrupt in the name of the driver, not the bus address - Change the driver name to look better in sysfs - Call ncr53c8xx_exit() in zalon7xx_exit() Signed-off-by: Matthew Wilcox Signed-off-by: James Bottomley [PATCH] fix SPI transport class to do DV for broken Western Digital drives There's been a problem reported where a WD Ultra3 drive reports that it has an echo buffer of length 255 and then returns ILLEGAL REQUEST when anyone tries to use it. This causes DV to treat this as a retraining error and eventually drop back to async. The attached fix makes the DV code identify the ILLEGAL REQUEST condition and configure the drive using the read only DV tests instead. Signed-off-by: James Bottomley [PATCH] ibmvscsi: limit size of I/O requests, updated Description: Limit the size of I/O requests sent by the ibmvscsi adapter. With better I/O scheduling (and thus larger requests) we were breaking some servers. Updated based on comments from Jens Axboe and James Bottomley to not specify max I/O sectors as a module parameter, and subsequently not needlessly store the value as a static variable. Signed-off-by: Dave Boutcher Signed-off-by: James Bottomley [PATCH] ibmvscsi: fix loop exit condition Fix a bug where we could fall out of our delay loop and then forget to scan for drives. Signed-off-by: Dave Boutcher Signed-off-by: James Bottomley [PATCH] ibmvscsi: fix dangling pointer reference This code has been problematic for a while and still contained a leg where free_event_struct was called....followed by a reference to the event_struct. Restructure to make the code cleaner and fix the dangling pointer reference. Signed-off-by: Dave Boutcher Signed-off-by: James Bottomley [PATCH] ibmvscsi: fix abort and reset error path Description: Fix error paths to handle SCSI targets that reject SCSI aborts and resets and subsequently complete SCSI commands. There are targets in the field that currently exhibit this behaviour, particularly in the case of bad media (a CD drive got stuck for a LOOONG time on a read op.) We previously ignore the status on aborts and resets under the mistaken belief that whether they worked or not, the command response was never going to show up. Signed-off-by: Dave Boutcher Signed-off-by: James Bottomley drm: core changes broke i810/830 Reported by Joseph Fannin during -mm, revert incorrect change. Signed-off-by: Dave Airlie [ARM PATCH] 2338/1: IXP465 and IXDPG465 header file updates Patch from Deepak Saxena Update IXP4xx header files with new registers for IXP46x CPU family. Replaces 2306/1 Signed-off-by: Deepak Saxena Signed-off-by: Russell King [ARM] Update Integrator RTC driver. This updates the Integrator RTC driver to use the ARM common RTC interface, and converts the driver to behave as a standard AMBA peripheral driver. [ARM] Remove static mapping for RTC on Integrator/AP Now that sparse looks into asms, fix the fake anti-optimizer cast macro to use the right address space. x86: common send_sigtrap helper for debug event SIGTRAP's, and use that for system call single-step events. This one also gets the user mode test right, and makes sure the siginfo is not leaking any stack contents. x86: be a lot more careful about TF handling. This should fix Wine for some games that otherwise seem to think that they run under a debugger. x86: single-step over "popf" without corrupting state. This still leaves "pushf" able to see that somebody is single-stepping us, but that is at least something you can work around. [PATCH] parentheses to x86-64 macro Add parentheses to x86-64's pgd_index's arguments Signed-off-by: Nick Piggin Signed-off-by: Linus Torvalds [PATCH] generic 3-level nopmd folding header Generic headers to fold the 3-level pagetable into 2 levels. Signed-off-by: Nick Piggin Signed-off-by: Linus Torvalds [PATCH] convert i386 to generic nopmd header Adapt the i386 architecture to use the generic 2-level folding header. Just to show how it is done. Signed-off-by: Nick Piggin Signed-off-by: Linus Torvalds [PATCH] split copy_page_range Split copy_page_range into the usual set of page table walking functions. Needed to handle the complexity when moving to 4 levels. Signed-off-by: Andi Kleen Split out from Andi Kleen's 4level patch by Nick Piggin. Signed-off-by: Nick Piggin Signed-off-by: Linus Torvalds [PATCH] replace clear_page_tables with clear_page_range Rename clear_page_tables to clear_page_range. clear_page_range takes byte ranges, and aggressively frees page table pages. Maybe useful to control page table memory consumption on 4-level architectures (and even 3 level ones). Possible downsides are: - flush_tlb_pgtables gets called more often (only a problem for sparc64 AFAIKS). - the opportunistic "expand to fill PGDIR_SIZE hole" logic that ensures something actually gets done under the old system is still in place. This could sometimes make unmapping small regions more inefficient. There are some other solutions to look at if this is the case though. Signed-off-by: Nick Piggin Signed-off-by: Linus Torvalds [PATCH] introduce 4-level nopud folding header Generic headers to fold the 4-level pagetable into 3 levels. Signed-off-by: Nick Piggin Signed-off-by: Linus Torvalds [PATCH] convert Linux to 4-level page tables Extend the Linux MM to 4level page tables. This is the core patch for mm/*, fs/*, include/linux/* It breaks all architectures, which will be fixed in separate patches. The conversion is quite straight forward. All the functions walking the page table hierarchy have been changed to deal with another level at the top. The additional level is called pml4. mm/memory.c has changed a lot because it did most of the heavy lifting here. Most of the changes here are extensions of the previous code. Signed-off-by: Andi Kleen Converted by Nick Piggin to use the pud_t 'page upper' level between pgd and pmd instead of Andi's pml4 level above pgd. Signed-off-by: Nick Piggin Signed-off-by: Linus Torvalds [PATCH] introduce fallback header Add a temporary "fallback" header so architectures can run with the 4level patgetables patch without modification. All architectures should be converted to use the folding headers (include/asm-generic/pgtable-nop?d.h) as soon as possible, and the fallback header removed. Make all architectures include the fallback header, except i386, because that architecture has earlier been converted to use pgtable-nopmd.h under the 3 level system, which is not compatible with the fallback header. Signed-off-by: Nick Piggin Signed-off-by: Linus Torvalds [PATCH] convert i386 to generic nopud header i386 works with 2 and 3 levels Signed-off-by: Andi Kleen Converted to use pud_t by Nick Piggin Signed-off-by: Nick Piggin Signed-off-by: Linus Torvalds [PATCH] convert ia64 to generic nopud header Convert ia64 architecture over to handle 4 level pagetables. Signed-off-by: Nick Piggin Signed-off-by: Linus Torvalds [PATCH] convert x86_64 to 4 level page tables Converted to true 4levels. The address space per process is expanded to 47bits now, the supported physical address space is 46bits. Lmbench fork/exit numbers are down a few percent because it has to walk much more pagetables, but some planned future optimizations will hopefully recover it. See Documentation/x86_64/mm.txt for more details on the memory map. Signed-off-by: Andi Kleen Converted to pud_t by Nick Piggin. Signed-off-by: Nick Piggin Signed-off-by: Linus Torvalds [PATCH] osst: remove typedefs Make style changes that are the equivalent of recent changes to st, such as using 'struct osst_tape' where we used to have 'OS_Scsi_Tape' as a typedef. Osst behavior is not affected by this patch. signed-off-by: Willem Riede Signed-off-by: James Bottomley osst: error handling updates From: Willem Riede important error handling improvements that I've made as the result of problem reports. signed-off-by: Willem Riede Signed-off-by: James Bottomley osst: add sysfs support From: Willem Riede adds sysfs support to osst. This enables hotplug and udev to manage the osst /dev nodes, which is a real necessity on installations that use a dynamic /dev, such as Fedora Core 3. signed-off-by: Willem Riede Signed-off-by: James Bottomley drm: mark ffb as broken because it actually is The ffb driver has been broken since 2.6.8 at least, so mark it as so. This also contains some fixes so it at least compiles. Signed-off-by: Dave Airlie [Bluetooth] Remove casts in BCSP driver This patch removes unneeded casts of (void *) pointers. Signed-off-by: Domen Puncer Signed-off-by: Marcel Holtmann [PATCH] ipt_ECN corrupt checksum fix Nasty bug, caught while writing the ECN target test. Corrupts checksums of packets when target is used on them. Let this be a warning on the evils of casts. Signed-off-by: Linus Torvalds [PATCH] setup_pci.c build fix On sparc64: drivers/ide/setup-pci.c:310: error: `DMA_32BIT_MASK' undeclared (first use in this function) drivers/ide/setup-pci.c:310: error: (Each undeclared identifier is reported only once drivers/ide/setup-pci.c:310: error: for each function it appears in.) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sparc64 pmd_offset() fix mm/memory.c: In function `zeromap_pud_range': mm/memory.c:1053: warning: suggest parentheses around + or - inside shift mm/memory.c: In function `remap_pud_range': mm/memory.c:1170: warning: suggest parentheses around + or - inside shift Parenthesize this macro arg. Cc: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ia64 PTRS_PER_PGD build fix mm/memory.c:1944:6: missing binary operator before token "long" The preprocessor doesn't like the typecast.... PTRS_PER_PGD isn't used in assembly code, so this looks to be safe enough.. This patch helps, but the ia64 build is still broken. There is no implementation of __pmd_alloc(). Cc: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] VIA PadLock compilation fixes This patch contains two fixes for VIA PadLock compilation with GCC 2.95.3 and GCC 3.4.3 (original patch was tested with 3.3.4 only). Signed-off-by: Michal Ludvig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Add Michal Ludvig to CREDITS Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix inet6_sk for non IPV6 builds again The recent ipv6 "fix" broke the build: security/selinux/avc.c: In function `avc_audit': security/selinux/avc.c:581: warning: implicit declaration of function `inet6_sk' security/selinux/avc.c:581: warning: initialization makes pointer from integer without a cast Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] floppy build fix drivers/block/floppy.c: In function `init_module': drivers/block/floppy.c:4598: error: parse error before "UTS_RELEASE" Not sure what went wrong here - just kill the thing. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sparc32: fix hypersparc dvma DVMA is having aliasing problems. Bob originally sent in the following description: At some point in the past, Bob Breuer wrote: > Here's the preliminary patch. This time around, both the hme > and esp drivers are working for me. This replaces my previous > patch and is against the vanilla 2.6.9 kernel. I've tried to > reduce the amount of unnecessary cache flushing, therefore this > will need some testing on non-hypersparc cpus also. It needs > some cleanup yet, and will be rediffed against a later kernel. > I'm looking for comments and feedback. This patch represents one of those subsequent rediffings. Signed-off-by: Bob Breuer Acked-by: William Irwin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sparc32: sun4d update Chris Newport and Thomas Bogendoerfer have been working to get the sun4d port functional again. This patch updates 2.6.10-rc3 to a current snapshot of their work. It does the following 3 things: (1) add sun4d hook to sbus_bus_ranges_init() (2) fix up pgd_offset() call in sun4d iommu code (3) fix up sun4d's definition of current Signed-off-by: Chris Newport Signed-off-by: Thomas Bogendoerfer Acked-by: William Irwin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sparc32: fix initrd memcpy problem The latter hunk of the forwarded patch has already been applied, so please apply the patch as it appears in the un-forwarded part. I've taken some liberties in adding the Acked/Signed-off lines in what I hope is an agreeable way. On Sun, Nov 14, 2004 at 11:16:40PM -0500, Jurij Smakov wrote: > As a followup: I have tried fiddling more with the memcpy() routine. > Insight from Rob Radez and comments in arch/sparc/lib/blockops.S suggest, > that __copy_1page assumes that the memory regions copied are aligned on a > double-word boundary. I have checked, that in the cramfs case it wasn't > true, the destination was not aligned on the double-word boundary. So, I > have implemented a simple workaround (see patch below), which together > with Bob Breuer's iommu.c fix [0] made 2.6.8 kernel to boot on my > machine (SS10 with Ross Hypersparc CPU)! I also confirm, that adding the > suggested fix to the srmmu.c also [1] breaks sunlance on my machine. With > that "fix" the line 'eth0: Memory error, status 88c3, addr 3713ba' is > displayed continuously during boot, when it comes to configuring network > interfaces. The successful patch for me is: Acked-by: William Irwin Acked-by: Dave Miller Signed-off-by: Jurij Smakov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sparc32: fix missing return value for svr4_setcontext() sparc32 svr4_setcontext() needs to return a value in the SIGSEGV path. Signed-off-by: William Irwin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sparc32: arch/sparc/kernel/pcic.c iomem annotations arch/sparc/kernel/pcic.c trips numerous warnings due to iomem annotations. This patch adds various needed iomem annotations. Signed-off-by: William Irwin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sparc32: unused variable in sunsu.c serio is unused except in the #ifdef CONFIG_SERIO paths. To kill the warning, make the declaration conditional on the same. Signed-off-by: William Irwin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sparc32: fix sbus rtc warnings Add a sparc #ifdef to drivers/char/rtc.c and iomem annotations to drivers/sbus/char/rtc.c Signed-off-by: William Irwin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sparc32: fix missing handling for VM fault codes Fix missing cases for vm fault codes in sparc32 fault handling, and convert the entire file to using symbolic fault codes. This fixes a latent bug where an allocation failure returns to the kernel instead of delivering an error as expected. Signed-off-by: William Irwin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sparc32: fix incomplete irqreturn_t sweep in include/asm-sparc/floppy.h Squelch the floppy compile warning: include/asm/floppy.h: In function `sun_fd_request_irq': include/asm/floppy.h:276: warning: passing arg 2 of `request_fast_irq' from incompatible pointer type Signed-off-by: Tom 'spot' Callaway Acked-by: William Irwin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sparc32: remove conflicting definition of _exit() sparc32 had a conflicting _exit, removed the line from asm- sparc/unistd.h. This is the same change that DaveM made to sparc64 here: http://linux.bkbits.net:8080/linux-2.6/diffs/include/asm- sparc64/unistd.h@1.33 Warning was: In file included from include/linux/unistd.h:9, from init/main.c:45: include/asm/unistd.h:489: warning: conflicting types for built-in function '_exit' Signed-off-by: Tom 'spot' Callaway Acked-by: William Irwin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sparc32: fix blank screen problem in cg6.c Although the CG6 framebuffer is detected and initialized, without this patch all it displays is a blank screen. Tested on an Ultra 1 with a TGX+. Originally from Bob Breuer for the CG14. Signed-off-by: Adam Kropelin Acked-by: William Irwin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] parport_pc: don't mix module parameter styles Somehow parport_pc.c ended up with mixed old-style and new-style module parameters, but mixing them is not allowed. Use module_param() instead of MODULE_PARM() -- cannot be mixed. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix proc removal in ip_conntrack_standalone Someone thought it would be clever if proc code ignores removal of non-existent entries. Hence, we missed that /proc/net/stat/ip_conntrack is never removed on module removal or init failure. Found by nfsim. Signed-off-by: Linus Torvalds [PATCH] Fix cleanup path when sysctl registration fails nfsim gains sysctl support, and sure enough, --failtest uncovered an unregister when the registration had failed. Signed-off-by: Linus Torvalds [PATCH] ppc uaccess annotations - get_user() __gu_val should be unsigned long (same as with i386 patch) - __copy_to_user() et.al. didn't have proper type checking - documented the casts in __copy_tofrom_user() calls with __force. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] pc300 portability fixes local variable used to store flags after spin_lock_irqsave() should be unsigned long, not u32. That should complete the 64bit cleanups in there. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] diskonchip missing iomem annotations some trivial iomem annotations were still missing Signed-off-by: Al Viro Signed-off-by: Linus Torvalds acpi video device enumeration: fix incorrect device list allocation It didn't allocate space for the final terminating entry, which caused it to overwrite the next slab entry, which in turn sometimes ended up being a slab array cache pointer. End result: total slab cache corruption at a random time afterwards. Very nasty. kallsyms: Avoid kallsyms corner case on _etext and _einittext Avoid kallsyms corner case on _etext and _einittext with CONFIG_KALLSYMS_ALL=n. Signed-off-by: Keith Owens Signed-off-by: Sam Ravnborg [ARM] Add DMA mmap support for SA1100/PXA framebuffer drivers. Since the framebuffers are allocated via dma_alloc_writecombine() we should use the DMA mmap interface to map these buffers. Signed-off-by: Russell King [MMC] Fix UNSTUFF_BITS Quieten down compiler warnings, and fix an off-by-one bug when deciding whether to include the next word. x86 ptrace: remove long stale (and bitrotted) test for PT_DTRACE without PT_PTRACED. Long ago, the "D" in PT_DTRACE meant "Delayed", and it was used as a flag to mark that we had ptrace'd the process but no longer did so. That hasn't been true in a while now, and the flag should probably be renamed, but in the meantime the test for PT_PTRACED being cleared had been corrupted into something totally nonsensical. Pointed out by Andi Kleen. x86 single-step: fix up comments and cleanup. Pretty much all the TF-related comments were stale, and had been for a long time. Fix them up, clean up code. [PATCH] ia64 4-level pgtable fix Fix a 4-level page table bug that slipped through (introduced by me, not Andi). Compiles and boots on ia64 and 2-level i386. Signed-off-by: Nick Piggin Signed-off-by: Linus Torvalds [ALSA] [trivial] Fix compilation warnings on 64bit SPARC cs4231 driver Fixed the compilation warnings about the pointer size. Signed-off-by: Takashi Iwai [ALSA] Fix the interface type of mixer controls RME32 driver The patch will change SNDRV_CTL_ELEM_IFACE_PCM to SNDRV_CTL_ELEM_IFACE_MIXER for some mixer elements of rme32. Signed-off-by: Martin Langer Signed-off-by: Takashi Iwai [ALSA] Fix interface type for some mixer controls RME96 driver The interface type of some basic mixer controls is changed from IFACE_PCM to IFACE_MIXER so that it can be accessed from mixer apps. Signed-off-by: Peter Chrisensen Signed-off-by: Takashi Iwai [ALSA] ifdef typos: sound_isa_cs423x_cs4231_lib.c CS4231 driver Funny typo. Acked-by: Randy Dunlap Signed-off-by: Domen Puncer Signed-off-by: Maximilian Attems Signed-off-by: Takashi Iwai [ALSA] ifdef typos: sound_isa_es18xx.c ES18xx driver Changed CONFIG_PNP_ to CONFIG_PNP, also fixed a comment related to another CONFIG_PNP. Signed-off-by: Domen Puncer Signed-off-by: Takashi Iwai [ALSA] check __copy_to_user in sscape_upload_bootblock() Sound Scape driver __copy_to_user() is called without checking its return value in sound/isa/sscape.c::sscape_upload_bootblock . Signed-off-by: Jesper Juhl Signed-off-by: Takashi Iwai [ALSA] ALSA core: misc cleanups HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer The patch below does the following cleanups under sound/core/ : - make needlessly global code static - remove the following stale prototypes from pcm.h (the functions are not or no longer present): - snd_pcm_capture_ready_jiffies - snd_pcm_playback_ready_jiffies - remove the following unused global functions: - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask - seq/seq_instr.c: snd_seq_cluster_new - seq/seq_instr.c: snd_seq_cluster_free - move global to static inline functions - pcm_lib.c: snd_pcm_playback_ready - pcm_lib.c: snd_pcm_capture_ready - pcm_lib.c: snd_pcm_playback_empty - pcm_lib.c: snd_pcm_capture_empty - pcm_lib.c: snd_pcm_playback_data - remove the following unused EXPORT_SYMBOL's: - snd_create_proc_entry - snd_interval_ratden - snd_midi_channel_init - snd_midi_channel_init_set - snd_pcm_playback_empty - snd_pcm_capture_empty - snd_pcm_playback_data - snd_pcm_capture_poll - snd_pcm_playback_ready - snd_pcm_capture_ready - snd_pcm_format_size - snd_pcm_open - snd_pcm_playback_poll - snd_pcm_playback_ready - snd_pcm_release - snd_pcm_subformat_name - snd_remove_proc_entry Signed-off-by: Adrian Bunk Signed-off-by: Takashi Iwai [ALSA] Added VIA82xx-modem driver Documentation,PCI drivers,VIA82xx-modem driver Added the VIA82xx AC97 modem driver by Sasha Khapyorsky . Signed-off-by: Takashi Iwai [ALSA] Remove the NULL pointer check in kfree/vfree wrappers ALSA Core The check of NULL pointer in kfree/vfree wrappers is removed. kfree() and vfree() accept NULL pointer. Signed-off-by: Takashi Iwai [ALSA] Use macro usb_maxpacket() for portability USB USX2Y In future kernels struct usb_device won't have the epmaxpacketin/out members. Use macro usb_maxpacket() instead of directly accessing those members. Signed-off-by: Karsten Wiese Signed-off-by: Takashi Iwai [ALSA] Fix sleep in h/w volume control ES1968 driver Fixed sleeps in h/w volume control tasklet. Also, msleep()s in ac97 accessor callbacks are removed since the chip works without such delays. Signed-off-by: Takashi Iwai [ALSA] IEC958 Capture mixer controls and Universe support ICE1712 driver,ICE1724 driver * Added SPI read routine * Added IEC958 Capture mixer controls * Improved Universe support * Headphone Amp renamed to External Amplifier * Fixed GPIO bug in Prodigy code (There is no GPIO23 on ICE1724) Signed-off-by: Peter Christensen Signed-off-by: Takashi Iwai [ALSA] disable legacy IRQs before request_irq() to avoid unhandled interrupts VIA82xx driver Signed-off-by: Christian Koerner Signed-off-by: Jaroslav Kysela [ALSA] Update user-space access from sscape driver Sound Scape driver I see that the copy_to/from_user() functions have been updated across Linux 2.4 and 2.6, and that verify_read/write() has been replaced by access_ok(). I have patched the SoundScape driver accordingly. Signed-off-by: Chris Rankin Signed-off-by: Takashi Iwai [ALSA] opl4 depends on opl3 OPL3 Compiling OPL4 doesn't include the snd-opl3-lib. This change in the Makefile enables now the compiling of snd-opl3-lib.o for OPL4 soundcards. Signed-off-by: Martin Langer Signed-off-by: Takashi Iwai [ALSA] Add 'Duplicate Front' control CS46xx driver A new mixer control 'Duplicate Front' is added for the board with a single codec. This toggles the duplication of front signal to the rear speakers. Signed-off-by: Takashi Iwai [ALSA] misc cleanups OPL3,Digigram VX core,I2C cs8427,SoundFont,Common EMU synth The patch below contains the following changes in ALSA code not touched by my previous patches: - make some needlessly global code static - remove the following unused global functions: - sound/i2c/cs84: snd_cs8427_detect - sound/synth/emux/emux_synth.c: snd_emux_release_voice - sound/synth/emux/soundfont.: snd_soundfont_mem_used - remove the following unused EXPORT_SYMBOL's: - sound/i2c/cs8427.c: snd_cs8427_detect - sound/i2c/cs8427.c: snd_cs8427_reg_read Signed-off-by: Adrian Bunk Signed-off-by: Takashi Iwai ALSA CVS update ENS1370/1+ driver Trivial patch to enable rear out selection for ens1373 on the Gigabyte GA-8IEXP motherboard. Signed-off-by: Andrew Dennison Signed-off-by: Jaroslav Kysela [ALSA] Fix detection of Xbox AC97 Codec Core Unfortunately, on newer xboxes, the chip reports less info than before, making another change necessary - this change is backwards compatible, and doesn't break earlier xboxes, of course. The patch is originally from Ed Hucek . Signed-off-by: David Pye Signed-off-by: Takashi Iwai [ALSA] hwdep interface for pcm data USB,USB USX2Y Implements 'rawusb' pcm data transfer through hwdep interface: The usb_hc moves pcm data from/into memory via DMA. That memory is mmaped by jack's usx2y driver. Jack's usx2y driver is the first/last executable code to read/write pcm data. Read/write is a combination of power of 2 period shaping and float/int conversation. Compared to standard alsa/jack we leave out power of 2 period shaping inside snd-usb-usx2y which needs memcpy() and additional buffers. As a side effect possible unwanted pcm-data coruption resulting of standard alsa's snd-usb-usx2y period shaping scheme falls away. Result is sane jack operation at buffering schemes down to 128frames, 2 periods. Also changed Kconfig file, so snd-usb-usx2y is only available for X86, PPC or ALPHA platforms, as on others DMA-memory isn't mmapable. Signed-off-by: Karsten Wiese Signed-off-by: Takashi Iwai [ALSA] Add missing source codes in the last hwdep-pcm patch. USB USX2Y The missing source files in the last hwdep-pcm patch are added. Signed-off-by: Karsten Wiese Signed-off-by: Takashi Iwai [ALSA] Add missing USX2Y_PCM hwdep entry ALSA Core Added the missing SNDRV_HWDEP_IFACE_USX2Y_PCM definition. Signed-off-by: Takashi Iwai [ALSA] Fix non-symmetrical page_attr changes Intel8x0 driver Fixed non-symmetrical calls of change_page_attr() which may cause BUG(). This bug happens only on 440MX. Signed-off-by: Takashi Iwai [ALSA] [trivial] Fix compile warning Intel8x0 driver Fix compile warning abount unused variables. Signed-off-by: Takashi Iwai [ALSA] Midiman Delta DIO2496 has two stereo analog outs ICE1712 driver Signed-off-by: Jaroslav Kysela [ALSA] Clean up power-management Documentation,SA11xx UDA1341 driver,Control Midlevel,ALSA Core ES18xx driver,OPL3SA2 driver,AD1848 driver,CS4231 driver,ATIIXP driver ATIIXP-modem driver,CS4281 driver,ES1938 driver,ES1968 driver Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,VIA82xx driver VIA82xx-modem driver,ALI5451 driver,CS46xx driver,NM256 driver Trident driver,YMFPCI driver,Sound Core PDAudioCF driver PPC PMAC driver Clean up for PM code. snd_power_change() is called in the common routines instead of driver's callback. Signed-off-by: Takashi Iwai [ALSA] Export snd_ctl_elem_read/write() functions Control Midlevel,ALSA Core,IOCTL32 emulation snd_ctl_elem_read() and snd_ctl_elem_write() functions are exported to be accessible from other kernel modules. They can be used for suspend/resume codes, for example. Signed-off-by: Takashi Iwai [ALSA] buffersize and constraints on pmac PPC PMAC driver Buffersize is a bit small compared to the OSS driver (dmasound.h says 128kb is limit for Amiga, for pmac 256kb is used) At least on Snapper, some samplerates cause choppy sound when periods<3 or buffersize is not a multiple of periodsize. Signed-off-by: Danny Tholen Signed-off-by: Takashi Iwai [ALSA] Add volatile to IO pinters ALSA Core Add volatile prefix to IO pointers for copy_to_user_fromio() and copy_from_user_toio() functions. Signed-off-by: Takashi Iwai [ALSA] Return -EBADFD when the device is disconnected USB generic driver The trigger callback returns -EBADFD when the device is disconnected. Signed-off-by: Takashi Iwai [ALSA] Fix memory corruption Digigram VX core Fixed the memory corruption by the wrong sized kmalloc. Signed-off-by: Takashi Iwai [ALSA] Hotplug firmware loader support Digigram VX core,MIXART driver,Digigram VX222 driver Digigram VX Pocket driver The hogplut fw loader is supported by vxpocket, vxp440, vx2222 and mixart drivers. The old ALSA fw loader is still supported for built-in kernels. To use the hotplug, the new firmware data must be installed beforehand from the latest alsa-tools package. The experimental suspend/resume for vxpocket, vxp440 and vx222 are added, too. Signed-off-by: Takashi Iwai [ALSA] Add description about hotplug fw loader Documentation New descriptions about hotplug fw loader for vx and mixart drivers. Signed-off-by: Takashi Iwai [ALSA] Fix interrupt generation on MIDI input for es1938 sound cards ES1938 driver The patch ensures that a es1938 based sound card generates interrupts on incoming MIDI events. I tested the patch successfully on an ess Solo-1 in a AlphaPC UX/164. Signed-off-by: Andreas Feldner Signed-off-by: Takashi Iwai [ALSA] Fix CMI9739A silent problem AC97 Codec Core Fix by Zinx Verituse The patch for cmi9739a is added. The undocumented unmute bits are enabled. Signed-off-by: Takashi Iwai [ALSA] Fix compilation errors Digigram VX core,MIXART driver Fix compilation errors when built without hotplug fw loader. Signed-off-by: Takashi Iwai [ALSA] Fix the invalid DMA pointer value PPC PMAC driver Fixed the bug returning invalid DMA pointer values. Signed-off-by: Takashi Iwai [ALSA] Add PCXHR hwdep iface type ALSA Core Added SNDRV_HWDEP_IFACE_PCXHR for Digigram PCXHR driver. Signed-off-by: Takashi Iwai [ALSA] Fix invalid 'AutoSync Reference' value RME HDSP driver The value returned by controllers for control number 14 ('AutoSync Reference') is incorrect and different from that reported by doing a cat /proc/asound/card0/hdsp. The value reported is not 'AutoSync Reference' but 'Preferred Sync Reference' instead. Signed-off-by: Remy Bruno Signed-off-by: Takashi Iwai [ALSA] Fix the wrong sign of format data entries PCM Midlevel Fix suggested by Benjamin Herrenschmidt On architectures like PPC, char is handled as 'unsigned char', thus the pcm_format_data table entries with -1 give a positive 255. This causes Oops with OSS-emulation on such architectures. The patch simply adds the right signed/unsigned prefix to fix this problem. Signed-off-by: Takashi Iwai [ALSA] Fix compile warning Wavefront drivers Fixed compile warning regarding the sign of char. Signed-off-by: Takashi Iwai [ALSA] Add mute LED quirk AC97 Codec Core,Intel8x0 driver A new quirk type, AC97_TUNE_MUTE_LED, is added for HP/Compaq laptops. With this quirk, the EAPD bit is used to control the mute LED in conjunction with the master mute switch. Signed-off-by: Takashi Iwai [ALSA] Fix creation of control devices over udev Control Midlevel,ALSA Core Don't create control devices before the driver initialization finishes (ALSA BTS #742). The control device is now handled in the device list together with others (holding the card instance as the device pointer). Signed-off-by: Takashi Iwai [ALSA] Replace long delays with msleep() au88x0 driver Long udelay()'s are replaced with msleep() as much as possible. Signed-off-by: Takashi Iwai [ALSA] Unify ac97 control callbacks AC97 Codec Core Unified single_* and double_* control callbacks. Signed-off-by: Takashi Iwai [ALSA] Remove spinlock in callbacks AC97 Codec Core,AK4531 codec Removed spinlocks in callback, use sempahore instead since all ac97 callbacks are supposed to be non-atomic. Signed-off-by: Takashi Iwai [ALSA] Remove unnecessary ac97 spinlocks ATIIXP driver,ATIIXP-modem driver,ENS1370/1+ driver,Intel8x0 driver Intel8x0-modem driver,Maestro3 driver,VIA82xx driver VIA82xx-modem driver Removed unnecessary spinlocks in ac97 callbacks. Signed-off-by: Takashi Iwai [ALSA] Fix spinlocks FM801 driver Fixed the possible deadlock with no irq spinlock. Also, spin_lock_irqsave() is replaced with spin_lock_irq() in some places. Signed-off-by: Takashi Iwai [ALSA] Spinlock removal and loop fix au88x0 driver Removed unnecessary spinlocks. The invalid (typo) loop in the codec read callback is fixed. Signed-off-by: Takashi Iwai [ALSA] Use msleep() in ac97 callbacks CS46xx driver,NM256 driver Use msleep() instead of mdelay() in ac97 callbacks (spinlock was removed). Signed-off-by: Takashi Iwai [ALSA] Don't probe rates when bus->no_vra is set AC97 Codec Core Don't probe rates and set VRA/VRM bits when bus->no_vra is set. Signed-off-by: Takashi Iwai [ALSA] Fix handling of user-defined controls Control Midlevel,ALSA Core Fixed handling of user-defined controls. The max number of user-defined controls is limited, too (as default 32). Signed-off-by: Takashi Iwai [ALSA] Allow strings for ac97_quirk options AC97 Codec Core,Intel8x0 driver,VIA82xx driver Since there are many ac97_quirk values, the number is no longer good to remember what it really means. Now ac97_quirk option becomes as a string option, and more undstandable. For example, you can pass like 'ac97_quirk=hp_only'. The old number is still kept and parsed for backward compatibility. Signed-off-by: Takashi Iwai [ALSA] Add emu10k1x driver Documentation,PCI drivers,EMU10K1/EMU10K2 driver Added the new driver, snd-emu10k1x, for SB Live Dell OEM version by Francisco Moraes . Signed-off-by: Takashi Iwai [ALSA] Add snd-ca0106 driver Documentation,PCI drivers,CA0106 driver Added snd-ca0106 driver for SB Audigy LS / Live 24bit boards by James Courtier-Dutton . Signed-off-by: Takashi Iwai [ALSA] Avoid VRA on codec chips YMFPCI driver Avoid VRA setting on ac97 codec chips. YMFPCI doesn't need VRA. Signed-off-by: Takashi Iwai [ALSA] Code clean up EMU10K1/EMU10K2 driver Small code clean up. Use snd_pcm_lib_preallocage_pages_for_all() for buffer allocation. Signed-off-by: Takashi Iwai [ALSA CVS] delete unused file Remove nowhere referenced file. (egrep "filename\." didn't find anything) Signed-off-by: Domen Puncer Signed-off-by: Takashi Iwai [ALSA] Fix open handling USB USX2Y Return -EBUSY from snd_usX2Y_usbpcm_open(), if the associated hwdep device is not opened. It now works as originally intended. Had forgotten a pair of parenthesis. Signed-off-by: Karsten Wiese Signed-off-by: Takashi Iwai [ALSA] Fix compile warning (make inline) AZT3328 driver Fixed compile warning when built without joystick support. (Optimized via inline.) Signed-off-by: Takashi Iwai [ALSA] Fix compile warning EMU10K1/EMU10K2 driver Removed an unused variable to fix a compile warning. Signed-off-by: Takashi Iwai [ALSA] Add hotplug firmware loader support RME HDSP driver Added the hotplug firmware loader support without hdsploader. The firmware data must be installed beforehand in the proper place from the latest alsa-firmware package. Signed-off-by: Takashi Iwai [ALSA] Update documentation for hotplug fw loader Documentation Updated descriptions about the firmware loading for the recent support of hotplug firmware loader. Signed-off-by: Takashi Iwai [ALSA] Fix the release of resources at error path Control Midlevel Implemented free callback to fix the release of control resources before calling register. Signed-off-by: Takashi Iwai [ALSA] Description about snd_card_set_dev() Documentation Added the description about snd_card_set_dev(). Misc cleanup. Signed-off-by: Takashi Iwai [ALSA] Clean up codes ALSA<-OSS emulation Got rid of the unused float codes (the legacy code for sharing with ALSA library). Add assert to the invalid conversion indices which results in oops (just to be sure). Signed-off-by: Takashi Iwai Input: i8042 - fix "debug" parameter sysfs permissions. Signed-off-by: Dmitry Torokhov Signed-off-by: Vojtech Pavlik [ALSA] Fix the order of creation of instances AZT3328 driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver Maestro3 driver,SonicVibes driver,CS46xx driver,KORG1212 driver NM256 driver,Trident driver,YMFPCI driver Make sure that the chip instance is created at first before other components. This will fix occasional oops at unloading due to the access to the released resources. Signed-off-by: Takashi Iwai [ALSA] Remove superfluous code USB USX2Y Removed the superfluous creation/deletion of lowlevel component. It's not used at all. Signed-off-by: Takashi Iwai [ALSA] Add CODEC and BUS device types OPL3,OPL4,I2C lib core,L3 drivers,AK4117 receiver,ALSA Core EMU8000 driver,AC97 Codec Core,AK4531 codec Added SNDRV_DEV_CODEC and SNDRV_DEV_BUS types to tell from the lowlevel components. Signed-off-by: Takashi Iwai [ALSA] Fix spinlock au88x0 driver Fixed possible spin deadlocks. Signed-off-by: Takashi Iwai [PATCH] gdth buggy page mapping Just tripped over a bug report for the SUSE kernel where gdth would crash on a 32G opteron, turned out that the gdth_internal_copy() sg handling was really buggy. After fixing this I wanted to do the same for mainline, but I can see that a vain attempt was already made to fix it. Unfortunately it wasn't complete, and on top of that there's room for improvement. The current code is buggy on highmem, as page_address() will not yield a valid kernel address causing a NULL pointer dereference. The current code also doesn't unmap the sg list if it sees a NULL sl->page. In fact, the whole sg mapping looks really strange, why on earth would you be mapping the sglist for dma when you are only going to copy from it? This patch corrects both errors - correctly maps in the page, and kills the pci_map_sg/pci_unmap_sg calls completely. If someone could test this, that would be great. Signed-off-by: Jens Axboe Signed-off-by: James Bottomley [ARM PATCH] 2340/1: Added PXA27x SSP port 3 to kernel io address range Patch from Liam Girdwood This patch adds the PXA27x SSP port 3 configuration register space (Phys 0x41900000) to the kernel memory table. Signed-off-by: Liam Girdwood Signed-off-by: Russell King [PATCH] gdth: reduce large on-stack locals gdth is the fourth-highest stack user (for a single function) in 2.6.10-rc3-bk-recent (sizes on x86-32). Reduce stack usage in gdth driver: reduce ioc_rescan() from 1564 to 52 bytes; reduce ioc_hdrlist() from 1528 to 24 bytes; reduce gdth_get_info() from 1076 to 300 bytes; Signed-off-by: Randy Dunlap Signed-off-by: James Bottomley [ARM] Swap DOMAIN_USER and DOMAIN_KERNEL indicies This changes kernel domains to use domain 0 rather than domain 1, in preparation to supporting supersection mappings. Signed-off-by: Russell King [PATCH] gdth: cleanup compat clutter This patch - removes support for 2.2.x and 2.4.x without the full dma API (<= 2.4.13 or 2.4.9rh) - makes sure we don't acquire or release unessecary locks around ->scsi_done - it's a small BH/softirq that doesn't care about the callers lock state - cleans up the 2.4 vs 2.6 compat code a little Signed-off-by: James Bottomley [ARM PATCH] 2342/1: Support PXA SSP configuration changes when port is open Patch from Liam Girdwood This patch allows the PXA SSP port configuration to be changed without the need to close the port. Signed-off-by: Liam Girdwood Signed-off-by: Russell King kconfig: pass 0, 0 to show_file() to select max size window From: Roman Zippel Signed-off-by: Sam Ravbnorg [ARm] Silence a couple of compiler warnings. Signed-off-by: Russell King [ARM] Fix some pointer/integer conversion warnings for RiscPC. Signed-off-by: Russell King [MMC] Fix warning in wbsd From: Pierre Ossman Cleanup that fixes a warning in the wbsd module. [MMC] Remove deprecated data->req Since all users of this have now been eliminated, we can eliminate the element itself. MMC host drivers now operate only on the scatter lists passed to them, rather than needing knowledge of block devices. Signed-off-by: Russell King kconfig: introduce util.c Moved two functions from menu.c to new file util.c. Introduced functions to handle growable strings - no user yet. Signed-off-by: Sam Ravnborg [PATCH] aacraid: remove aac_handle_aif When aac_command_thread detects an adapter event (AifCmdDriverNotify or AifCmdEventNotify) it calls aac_handle_aif. This routine sets a flag, calls fib_adapter_complete, and returns. The bad news is that after the return, aac_command_thread continues to process the command and calls fib_adapter_complete again. Under some circumstances this causes the driver to take the device offline. In my case, it happens with a Dell CERC SATA with a RAID 5 in the "building" state: aacraid: Host adapter reset request. SCSI hang ? aacraid: Host adapter appears dead scsi: Device offlined - not ready after error recovery: host 0 channel 0 id 0 lun 0 SCSI error : <0 0 0 0> return code = 0x6000000 end_request: I/O error, dev sda, sector 976537592 Mark Salyzyn says the intent is for aac_handle_aif to perform some plug-n-play actions based on the adapter event, and return, leaving the command completion to the caller. The attached patch solves the problem by removing aac_handle_aif entirely, since it is wrong, and there is currently no code in the driver to actually do anything with these events. Signed-off-by: James Bottomley [SERIAL] support for another Rockwell PNP modem From: Lennart Poettering Trivial patch against Linux 2.6.10 which adds PNP support for a certain kind of Rockwell 28.8/ISA modems. [PATCH] Expose reiserfs_sync_fs() Attached patch exposes reiserfs_sync_fs(). This call is needed by the new quota code to write data to disk on quotaoff so that userspace can see them afterwards. Chris Mason agrees with the patch. Make reiserfs provide the sync_fs() function so that the quota code has a way to reliably force a transaction to disk. Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix reiserfs quota debug messages Attached patch fixes debug messages of quota code in reiserfs so that they compile. Chris Mason agreed the patch. Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix of quota deadlock on pagelock: quota core The four patches in this series fix deadlocks with quotas of pagelock (the problem was lock inversion on PageLock and transaction start - quota code needed to first start a transaction and then write the data which subsequently needed acquisition of PageLock while the standard ordering - PageLock first and transaction start later - was used e.g. by pdflush). They implement a new way of quota access to disk: Every filesystem that would like to implement quotas now has to provide quota_read() and quota_write() functions. These functions must obey quota lock ordering (in particular they should not take PageLock inside a transaction). The first patch implements the changes in the quota core, the other three patches implement needed functions in ext2, ext3 and reiserfs. The patch for reiserfs also fixes several other lock inversion problems (similar as ext3 had) and implements the journaled quota functionality (which comes almost for free after the locking fixes...). The quota core patch makes quota support in other filesystems (except XFS which implements everything on its own ;)) unfunctional (quotaon() will refuse to turn on quotas on them). When the patches get reasonable wide testing and it will seem that no major changes will be needed I can make fixes also for the other filesystems (JFS, UDF, UFS). This patch: The patch implements the new way of quota io in the quota core. Every filesystem wanting to support quotas has to provide functions quota_read() and quota_write() obeying quota locking rules. As the writes and reads bypass the pagecache there is some ugly stuff ensuring that userspace can see all the data after quotaoff() (or Q_SYNC quotactl). In future I plan to make quota files inaccessible from userspace (with the exception of quotacheck(8) which will take care about the cache flushing and such stuff itself) so that this synchronization stuff can be removed... The rewrite of the quota core. Quota uses the filesystem read() and write() functions no more to avoid possible deadlocks on PageLock. From now on every filesystem supporting quotas must provide functions quota_read() and quota_write() which obey the quota locking rules (e.g. they cannot acquire the PageLock). Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] quota umount race fix Fix possible races between umount and quota on/off. Finally I decided to take a reference to vfsmount during vfs_quota_on() and to drop it after the final cleanup in the vfs_quota_off(). This way we should be all the time guarded against umount. This way was protected also the old code which used filp_open() for opening quota files. I was also thinking about other ways of protection but there would be always a window (provided I don't want to play much with namespace locks) where vfs_quota_on() could be called while umount() is in progress resulting in the "Busy inodes after unmount" messages... Get a reference to vfsmount during quotaon() so that we are guarded against umount (as was the old code using filp_open()). Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix of quota deadlock on pagelock: ext2 Implementation of quota reading and writing functions for ext2. Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix of quota deadlock on pagelock: ext3 Implementation of quota reading and writing functions for ext3. Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix of quota deadlock on pagelock: reiserfs Implement quota journaling and quota reading and writing functions for reiserfs. Solves also several other deadlocks possible for reiserfs due to the lock inversion on journal_begin and quota locks. From: Vladimir Saveliev When CONFIG_QUOTA is defined reiserfs's finish_unfinished sets and clears MS_ACTIVE bit in s_flags field of super block. If that bit was set already it should not be set. Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Allow disabling quota messages to console Allow disabling of quota messages to console (they can disturb other output). Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] vmscan: total_scanned fix We haven't been incrementing local variable total_scanned since the scan_control stuff went in. That broke kswapd throttling. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] CS461x gameport code isn't being included in build With Cal Peake I've found a typo in drivers/input/gameport/Makefile in kernel 2.6.9 which effectively prevents the CS461x gameport code from being included. Signed-off-by: Ron Murray Signed-off-by: Cal Peake Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mm: keep count of free areas Keep track of the number of free pages of each order in the buddy allocator. Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mm: higher order watermarks Move the watermark checking code into a single function. Extend it to account for the order of the allocation and the number of free pages that could satisfy such a request. From: Marcelo Tosatti Fix typo in Nick's kswapd-high-order awareness patch Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mm: teach kswapd about higher order areas Teach kswapd to free memory on behalf of higher order allocators. This could be important for higher order atomic allocations because they otherwise have no means to free the memory themselves. Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Simplified readahead With Ram Pai - request size is now passed into page_cache_readahead. This allows the removal of the size averaging code in the current readahead logic. - readahead rampup is now faster (especially for larger request sizes) - No longer "slow read path". Readahead is turn off at first random access, turned back on at first sequential access. - Code now handles thrashing, slowly reducing readahead window until thrashing stops, or min size reached. - Returned to old behavior where first access is assumed sequential only if at offset 0. - designed to handle larger (1M or above) window sizes efficiently Benchmark results: machine 1: 8 way pentiumIV 1GB memory, tests run to 36GB SCSI disk (Similar results were seen on a 1 way 866Mhz box with IDE disk.) TioBench: tiobench.pl --dir /mnt/tmp --block 4096 --size 4000 --numruns 2 --threads 1(4,16,64) 4k request size sequential read results in MB/sec Threads 2.6.9 w/patches %diff diff [PATCH] Simplified readahead congestion control Reinstate the feature wherein readahead will be bypassed if the underlying queue is read-congersted. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mempolicy optimisation Some optimizations in mempolicy.c (like to avoid rebalancing the tree while destroying it and by breaking loops early and not checking for invariant conditions in the replace operation). Signed-off-by: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mm: overcommit updates Alan made overcommit mode 2 and it doesnt work at all. A process passing the limit often does so at a moment of stack extension, and is killed by a segfault, not better than being OOM-killed. Another problem is that close to the edge no other processes can be started, so that a sysadmin has problems logging in and investigating. Below a patch that does 3 things: (1) It reserves a reasonable amount of virtual stack space (amount randomly chosen, no guarantees given) when the process is started, so that the common utilities will not be killed by segfault on stack extension. (2) It reserves a reasonable amount of virtual memory for root, so that root can do things when the system is out-of-memory (3) It limits a single process to 97% of what is left, so that also an ordinary user is able to use getty, login, bash, ps, kill and similar things when one of her processes got out of control. Since the current overcommit mode 2 is not really useful, I did not give this a new number. The patch is just for playing, not to be applied by Linus. But, Andrew, I hope that you would be willing to put this in -mm so that people can experiment. Of course it only does something if one sets overcommit mode to 2. The past month I have pressured people asking for feedback, and now have about a dozen reports, mostly positive, one very positive. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] kill off highmem_start_page People love to do comparisons with highmem_start_page. However, where CONFIG_HIGHMEM=y and there is no actual highmem, there's no real page at *highmem_start_page. That's usually not a problem, but CONFIG_NONLINEAR is a bit more strict and catches the bogus address tranlations. There are about a gillion different ways to find out of a 'struct page' is highmem or not. Why not just check page_flags? Just use PageHighMem() wherever there used to be a highmem_start_page comparison. Then, kill off highmem_start_page. This removes more code than it adds, and gets rid of some nasty #ifdefs in .c files. Signed-off-by: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] make sure ioremap only tests valid addresses When CONFIG_HIGHMEM=y, but ZONE_NORMAL isn't quite full, there is, of course, no actual memory at *high_memory. This isn't a problem with normal virt<->phys translations because it's never dereferenced, but CONFIG_NONLINEAR is a bit more finicky. So, don't do virt_to_phys() to non-existent addresses. Signed-off-by: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mark_page_accessed() for read()s on non-page boundaries When reading a (partial) page from disk using read(), the kernel only marks the page as "accessed" if the read started at a page boundary. This means that files that are accessed randomly at non-page boundaries (usually database style files) will not be cached properly. The patch below uses the readahead state instead. If a page is read(), it is marked as "accessed" if the previous read() was for a different page, whatever the offset in the page. Testing results: - Boot kernel with mem=128M - create a testfile of size 8 MB on a partition. Unmount/mount. - then generate about 10 MB/sec streaming writes for i in `seq 1 1000` do dd if=/dev/zero of=junkfile.$i bs=1M count=10 sync cat junkfile.$i > /dev/null sleep 1 done - use an application that reads 128 bytes 64000 times from a random offset in the 64 MB testfile. 1. Linux 2.6.10-rc3 vanilla, no streaming writes: # time ~/rr testfile Read 128 bytes 64000 times ~/rr testfile 0.03s user 0.22s system 5% cpu 4.456 total 2. Linux 2.6.10-rc3 vanilla, streaming writes: # time ~/rr testfile Read 128 bytes 64000 times ~/rr testfile 0.03s user 0.16s system 2% cpu 7.667 total # time ~/rr testfile Read 128 bytes 64000 times ~/rr testfile 0.03s user 0.37s system 1% cpu 23.294 total # time ~/rr testfile Read 128 bytes 64000 times ~/rr testfile 0.02s user 0.99s system 1% cpu 1:11.52 total # time ~/rr testfile Read 128 bytes 64000 times ~/rr testfile 0.03s user 0.21s system 2% cpu 10.273 total 3. Linux 2.6.10-rc3 with read-page-access.patch , streaming writes: # time ~/rr testfile Read 128 bytes 64000 times ~/rr testfile 0.02s user 0.21s system 3% cpu 7.634 total # time ~/rr testfile Read 128 bytes 64000 times ~/rr testfile 0.04s user 0.22s system 2% cpu 9.588 total # time ~/rr testfile Read 128 bytes 64000 times ~/rr testfile 0.02s user 0.12s system 24% cpu 0.563 total # time ~/rr testfile Read 128 bytes 64000 times ~/rr testfile 0.03s user 0.13s system 98% cpu 0.163 total As expected, with the read-page-access.patch, the kernel keeps the 8 MB testfile cached as expected, while without it, it doesn't. So this is useful for workloads where one smallish (wrt RAM) file is read randomly over and over again (like heavily used database indexes), while other I/O is going on. Plain 2.6 caches those files poorly, if the app uses plain read(). Signed-Off-By: Miquel van Smoorenburg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] do_anonymous_page() use SetPageReferenced mark_page_accessed() is more heavyweight than we need: the page is already headed for the active list, so setting the software-referenced bit is equivalent. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] slab: Add more arch overrides to control object alignment Add ARCH_SLAB_MINALIGN and document ARCH_KMALLOC_MINALIGN: The flags allow the arch code to override the default minimum object aligment (BYTES_PER_WORD). Signed-Off-By: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] collect page_states only from online cpus I noticed the function __read_page_state() curiously high in a q-tools profile of a write to a software raid0 device. Seems this is because we're checking page_states for all possible cpus and we have NR_CPUS possible when CONFIG_HOTPLUG_CPU=y. The default config for ia64 is now NR_CPUS=512, so on a little 8-way box, this is a significant waste of time. The patch below updates __read_page_state() and __get_page_state() to only count page_state info for online cpus. To keep the stats consistent, the page_alloc notifier is updated to move page_states off of the cpu going offline. On my profile, this dropped __read_page_state() back into the noise and boosted block write performance by 5% (as measured by spew - http://spew.berlios.de). Signed-off-by: Alex Williamson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] alloc_large_system_hash: NUMA interleaving NUMA systems running current Linux kernels suffer from substantial inequities in the amount of memory allocated from each NUMA node during boot. In particular, several large hashes are allocated using alloc_bootmem, and as such are allocated contiguously from a single node each. This becomes a problem for certain workloads that are relatively common on big-iron HPC NUMA systems. In particular, a number of MPI and OpenMP applications which require nearly all available processors in the system and nearly all the memory on each node run into difficulties. Due to the uneven memory distribution onto a few nodes, any thread on those nodes will require a portion of its memory be allocated from remote nodes. Any access to those memory locations will be slower than local accesses, and thereby slows down the effective computation rate for the affected CPUs/threads. This problem is further amplified if the application is tightly synchronized between threads (as is often the case), as they entire job can run only at the speed of the slowest thread. Additionally since these hashes are usually accessed by all CPUS in the system, the NUMA network link on the node which hosts the hash experiences disproportionate traffic levels, thereby reducing the memory bandwidth available to that node's CPUs, and further penalizing performance of the threads executed thereupon. As such, it is desired to find a way to distribute these large hash allocations more evenly across NUMA nodes. Fortunately current kernels do perform allocation interleaving for vmalloc() during boot, which provides a stepping stone to a solution. This series of patches enables (but does not require) the kernel to allocate several boot time hashes using vmalloc rather than alloc_bootmem, thereby causing the hashes to be interleaved amongst NUMA nodes. In particular the dentry cache, inode cache, TCP ehash, and TCP bhash have been changed to be allocated in this manner. Due to the limited vmalloc space on architectures such as i386, this behavior is turned on by default only for IA64 NUMA systems (though there is no reason other interested architectures could not enable it if desired). Non-IA64 and non-NUMA systems continue to use the existing alloc_bootmem() allocation mechanism. A boot line parameter "hashdist" can be set to override the default behavior. The following two sets of example output show the uneven distribution just after boot, using init=/bin/sh to eliminate as much non-kernel allocation as possible. Without the boot hash distribution patches: Nid MemTotal MemFree MemUsed (in kB) 0 3870656 3697696 172960 1 3882992 3866656 16336 2 3883008 3866784 16224 3 3882992 3866464 16528 4 3883008 3866592 16416 5 3883008 3866720 16288 6 3882992 3342176 540816 7 3883008 3865440 17568 8 3882992 3866560 16432 9 3883008 3866400 16608 10 3882992 3866592 16400 11 3883008 3866400 16608 12 3882992 3866400 16592 13 3883008 3866432 16576 14 3883008 3866528 16480 15 3864768 3848256 16512 ToT 62097440 61152096 945344 Notice that nodes 0 and 6 have a substantially larger memory utilization than all other nodes. With the boot hash distribution patch: Nid MemTotal MemFree MemUsed (in kB) 0 3870656 3789792 80864 1 3882992 3843776 39216 2 3883008 3843808 39200 3 3882992 3843904 39088 4 3883008 3827488 55520 5 3883008 3843712 39296 6 3882992 3843936 39056 7 3883008 3844096 38912 8 3882992 3843712 39280 9 3883008 3844000 39008 10 3882992 3843872 39120 11 3883008 3843872 39136 12 3882992 3843808 39184 13 3883008 3843936 39072 14 3883008 3843712 39296 15 3864768 3825760 39008 ToT 62097440 61413184 684256 While not perfectly even, we can see that there is a substantial improvement in the spread of memory allocated by the kernel during boot. The remaining uneveness may be due in part to further boot time allocations that could be addressed in a similar manner, but some difference is due to the somewhat special nature of node 0 during boot. However the uneveness has fallen to a much more acceptable level (at least to a level that SGI isn't concerned about). The astute reader will also notice that in this example, with this patch approximately 256 MB less memory was allocated during boot. This is due to the size limits of a single vmalloc. More specifically, this is because the automatically computed size of the TCP ehash exceeds the maximum size which a single vmalloc can accomodate. However this is of little practical concern as the vmalloc size limit simply reduces one ridiculously large allocation (512MB) to a slightly less ridiculously large allocation (256MB). In practice machines with large memory configurations are using the thash_entries setting to limit the size of the TCP ehash _much_ lower than either of the automatically computed values. Illustrative of the exceedingly large nature of the automatically computed size, SGI currently recommends that customers boot with thash_entries=2097152, which works out to a 32MB allocation. In any case, setting hashdist=0 will allow for allocations in excess of vmalloc limits, if so desired. Other than the vmalloc limit, great care was taken to ensure that the size of TCP hash allocations was not altered by this patch. Due to slightly different computation techniques between the existing TCP code and alloc_large_system_hash (which is now utilized), some of the magic constants in the TCP hash allocation code were changed. On all sizes of system (128MB through 64GB) that I had access to, the patched code preserves the previous hash size, as long as the vmalloc limit (256MB on IA64) is not encountered. There was concern that changing the TCP-related hashes to use vmalloc space may adversely impact network performance. To this end the netperf set of benchmarks was run. Some individual tests seemed to benefit slightly, some seemed to be harmed slightly, but in all cases the average difference with and without these patches was well within the variabilty I would see from run to run. The following is the overall netperf averages (30 10 second runs each) against an older kernel with these same patches. These tests were run over loopback as GigE results were so inconsistent run to run both with and without these patches that they provided no meaningful comparison that I could discern. I used the same kernel (IA64 generic) for each run, simply varying the new "hashdist" boot parameter to turn on or off the new allocation behavior. In all cases the thash_entries value was manually specified as discussed previously to eliminate any variability that might result from that size difference. HP ZX1, hashdist=0 ================== TCP_RR = 19389 TCP_MAERTS = 6561 TCP_STREAM = 6590 TCP_CC = 9483 TCP_CRR = 8633 HP ZX1, hashdist=1 ================== TCP_RR = 19411 TCP_MAERTS = 6559 TCP_STREAM = 6584 TCP_CC = 9454 TCP_CRR = 8626 SGI Altix, hashdist=0 ===================== TCP_RR = 16871 TCP_MAERTS = 3925 TCP_STREAM = 4055 TCP_CC = 8438 TCP_CRR = 7750 SGI Altix, hashdist=1 ===================== TCP_RR = 17040 TCP_MAERTS = 3913 TCP_STREAM = 4044 TCP_CC = 8367 TCP_CRR = 7538 I believe the TCP_CC and TCP_CRR are the tests most sensitive to this particular change. But again, I want to emphasize that even the differences you see above are _well_ within the variability I saw from run to run of any given test. In addition, Jose Santos at IBM has run specSFS, which has been particularly sensitive to TLB issues, against these patches and saw no performance degredation (differences down in the noise). This patch: Modifies alloc_large_system_hash to enable the use of vmalloc to alleviate boottime allocation imbalances on NUMA systems. Due to limited vmalloc space on some architectures (i.e. x86), the use of vmalloc is enabled by default only on NUMA IA64 kernels. There should be no problem enabling this change for any other interested NUMA architecture. Signed-off-by: Brent Casavant Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] filesystem hashes: NUMA interleaving The following patch modifies the dentry cache and inode cache to enable the use of vmalloc to alleviate boottime memory allocation imbalances on NUMA systems, utilizing flags to the alloc_large_system_hash routine in order to centralize the enabling of this behavior. In general, for each hash, we check at the early allocation point whether hash distribution is enabled, and if so we defer allocation. At the late allocation point we perform the allocation if it was not earlier deferred. These late allocation points are the same points utilized prior to the addition of alloc_large_system_hash to the kernel. Signed-off-by: Brent Casavant Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] TCP hashes: NUMA interleaving Modifies the TCP ehash and TCP bhash to enable the use of vmalloc to alleviate boottime memory allocation imbalances on NUMA systems, utilizing flags to the alloc_large_system_hash routine in order to centralize the enabling of this behavior. Signed-off-by: Brent Casavant Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] netfilter: fix return values of ipt_recent checkentry Peejix's nfsim test for ipt_recent, written two days ago, revealed this bugs with ipt_recent: checkentry() returns true or false, not an error. (Maybe it should, but that's a much larger change). Also, make hash_func() static. Signed-off-by: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] netfilter: Fix ip_conntrack_proto_sctp exit on sysctl fail On failure from register_sysctl_table, we return with exit 0. Oops. init and fini should also be static. nfsim found these. Signed-off-by: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] netfilter: Fix ip_ct_selective_cleanup(), and rename ip_ct_iterate_cleanup() Several places use ip_ct_selective_cleanup() as a general iterator, which it was not intended for (it takes a const ip_conntrack *). So rename it, and make it take a non-const argument. Also, it missed unconfirmed connections, which aren't in the hash table. This introduces a potential problem for users which expect to iterate all connections (such as the helper deletion code). So keep a linked list of unconfirmed connections as well. Signed-off-by: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] netfilter: Add comment above remove_expectations in destroy_conntrack() I removed this code in a previous patch, and Patrick McHardy explained what was wrong. Add a comment. Signed-off-by: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] netfilter: Remove IPCHAINS and IPFWADM compatibility We've been threatening to do this for ages: remove the backwards compatibility code. We can now combine ip_conntrack_core.c and ip_conntrack_standalone.c, likewise for the NAT code, but that will come later. Signed-off-by: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] netfilter: Remove copy_to_user Warnings in Netfilter After changing firewall rules, we try to return the counters to userspace. We didn't fail at that point if the copy failed, but it doesn't really matter. Someone added a warn_unused_result attribute to copy_to_user, so we get bogus warnings. Signed-off-by: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] netfilter: Fix cleanup in ipt_recent should ipt_registrater_match error When ipt_registrater_match() fails, ipt_recent doesn't remove its proc entry. Found by nfsim. Signed-off-by: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix broken RST handling in ip_conntrack Here's a patch that fixes a pretty serious bug introduced by a recent "bugfix". The problem is that RST packets are ignored if they follow an ACK packet, this means that the timeout of the connection isn't decreased, so we get lots of old connections lingering around until the timeout expires, the default timeout for state ESTABLISHED is 5 days. This needs to go into -bk as soon as possible. The bug is present in 2.6.10 as well. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: freescale Book-E MMU cleanup Updates the Freescale Book-E MMU usage to match the architecture spec. This is mainly growing the widths of fields in various registers to match the architecture spec instead of the implementation. Signed-off-by: Becky Gill Signed-off-by: Kumar Gala Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: refactor common book-e exception code Moves common handling of InstructionStorage, Alignment, Program, and Decrementer exceptions handlers for Book-E processors (44x & e500) into common code. Signed-off-by: Kumar Gala Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: Switch to KBUILD_DEFCONFIG The following patch switches ppc32 from using arch/ppc/defconfig to arch/ppc/configs/common_defconfig as a defconfig. These files are supposed to be identical, but always end up out of sync. This also updates the common_defconfig with current options. Signed-off-by: Tom Rini Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: Marvell host bridge support (mv64x60) This patch adds core support for a line of host bridges from Marvell (formerly Galileo). This code has been tested with a GT64260a, GT64260b, MV64360, and MV64460. Patches for platforms that use these bridges will be sent separately. The patch is rather large so a link is provided. Signed-off-by: Mark A. Greer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32-marvell-host-bridge-support-mv64x60 review fixes Here is an incremental patch [hopefully] with your concerns addressed. Note that the arch/ppc/boot code is not kernel code and only exists for a short period of time before execution jumps to the kernel. Signed-off-by: Mark A. Greer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: support for Marvell EV-64260[ab]-BP eval platform This patch adds support for a line of evaluation platforms from Marvell that use the Marvell GT64260[ab] host bridges. This patch depends on the Marvell host bridge support patch (mv64x60). Signed-off-by: Mark A. Greer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: support for Force CPCI-690 board This patch adds support for the Force CPCI-690 cPCI board. Signed-off-by: Mark A. Greer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: support for Artesyn Katana cPCI boards This patch adds support for the Artesyn Katana 750i, 752i, and 3750. Signed-off-by: Mark A. Greer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: add Support for IBM 750FX and 750GX Eval Boards I've added support for the IBM 750FX and 750GX Eval Boards (Chestnut/Buckeye). Signed-off-by: Randy Vinson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: PPC4xx PIC rewrite/cleanup Patch from Eugene to do some cleanup of the PPC4xx PIC code. Separates the interrupts that can have polarity/triggering modified for platform modification if necessary. Between the two of us, it's tested on most of the affected platforms. Signed-off-by: Eugene Surovegin Signed-off-by: Matt Porter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: performance Monitor/Oprofile support for e500 Adds oprofile support for the e500 PowerPC core. Signed-off-by: Andy Fleming Signed-off-by: Kumar Gala Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix prototypes & externs in e500 oprofile support Remove prototypes and externs out of the .c files Signed-off-by: Andy Fleming Signed-off-by: Kumar Gala Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: fix ebony.c warnings This patch removes annoying warnings in ebony.c. Fix is similar to one I made in ocotea.c before. Signed-off-by: Eugene Surovegin Signed-off-by: Matt Porter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: remove bogus SPRN_CPC0_GPIO define This trivial patch removes long-standing typo in ibm44x.h. In fact, we already have correct DCRN_CPC0_GPIO define later in the same file. Signed-off-by: Eugene Surovegin Signed-off-by: Matt Porter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] PPC debug setcontext syscall implementation. Add a debugging interface for PowerPC that allows signal handlers (or any jump to a context, really) to perform debug functions. It allows the a user program to turn on single-stepping, for instance, and the thread will get a trap after executing the next instruction. It can also (on supported PPC processors) turn on branch tracing and get a trap after the next branch instruction is executed. This is useful for in-application debugging. Note that you can enable single-stepping on x86 processors directly from signal handlers. Newer x86 processors have the equivalent of a branch-trace bit in the IA32_DEBUGCTL MSR and could have similar function to this syscall. Most other processors could benefit from a similar interface, except for ARM which is extraordinarily broken for debugging. Future uses of this could be adding the ability to set the hardware breakpoint registers from a signal handler. Signed-off-by: Corey Minyard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: add uImage to default targets We'd like to get a uImage when just using 'make' on many targets. After some discussion, it made sense to simply add uImage to the default targets since it adds minimal build overhead and will work on all platforms. Also, fix a dependency in the boot stuff. Signed-off-by: Matt Porter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: fix io_remap_page_range for 36-bit phys platforms Fixes io_remap_page_range() to use the 32-bit address translator similar to ioremap(). Someday u64 start/end resources should make this unnecessary. Fixes set_pte() to handle a long long pte_t properly. Signed-off-by: Matt Porter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: Resurrect Documentation/powerpc/cpu_features.txt Documentation/powerpc/cpu_features.txt mysteriously disappeared sometime when 2.5 forked off. Searching through BK logs on linux.bkbits.net didn't reveal anything, unfortunately. The only reference I could pick up from searching the available lkml archives is the 2.4.20-pre11 ChangeLog where this was first merged. Thus far, nothing indicates it was intentionally removed, and AFAICS, is still up to date with the current code. Signed-off-by: Arthur Othieno Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: kprobes implementation Kprobes (Kernel dynamic probes) is a lightweight mechanism for kernel modules to insert probes into a running kernel, without the need to modify the underlying source. The probe handlers can then be coded to log relevent data at the probe point. More information on kprobes can be found at: http://www-124.ibm.com/developerworks/oss/linux/projects/kprobes/ Jprobes (or jumper probes) is a small infrastructure to access function arguments. It can be used by defining a small stub with the same template as the routine in kernel, within which the required parameters can be logged. Signed-off-by: Ananth N Mavinakayanahalli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: tweaks to ppc64 cpu sysfs information Currently the ppc64 sysfs code registers an entry for each possible cpu in sysfs, rather than just online cpus. That makes sense, since the sysfs entries are needed to control onlining of the cpus. However, this is done even if CONFIG_HOTPLUG_CPU is not set, or if it is not a hotplug capable (DLPAR) machine, which is a bit misleading. Secondly it also registers all the other sysfs entries (mostly performance monitoring controls) on all possible cpus, although they are quite meaningless on non-online cpus. This patch alters the code to only register sysfs directories at boot for cpus which are either online or could be onlined (cpu is possible, and CONFIG_HOTPLUG_CPU and an lpar machine). Furthermore, the entries apart from 'online' itself and 'physical_id' are only registered for online CPUs (and deregistered again if a cpu goes offline). Currently the ppc64 sysfs code registers an entry for each possible cpu in sysfs, rather than just online cpus. That makes sense, since the sysfs entries are needed to control onlining of the cpus. However, this is done even if CONFIG_HOTPLUG_CPU is not set, or if it is not a hotplug capable (DLPAR) machine, which is a bit misleading. Secondly it also registers all the other sysfs entries (mostly performance monitoring controls) on all possible cpus, although they are quite meaningless on non-online cpus. This patch alters the code to only register sysfs directories at boot for cpus which are either online or could be onlined (cpu is possible, and CONFIG_HOTPLUG_CPU and an lpar machine). Furthermore, the entries apart from 'online' itself and 'physical_id' are only registered for online CPUs (and deregistered again if a cpu goes offline). Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Kprobes: wrapper to define jprobe.entry Here is a patch that adds a wrapper for defining jprobe.entry to make t easy to handle the three dword function descriptors defined by the PowerPC ELF ABI. x86, ppc64 and x86_64 are also updated. Signed-off-by: Ananth N Mavinakayanahalli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Termio userspace access error handling The attached patch creates a generic set of termio userspace access functions with proper error handling. None of the current archs check for errors in this case. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] IDE_ARCH_OBSOLETE_INIT fix The attached patch fixes the IDE driver to initialise correctly in the case that IDE_ARCH_OBSOLETE_INIT is not defined. Not defining this macro would seem to be the correct thing to do since it includes the word "obsolete" in its name. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Assign PKMAP_BASE dynamically Badari hit a problem when configuring PAE off (ie CONFIG_4G) where the pkmap area could end up overlapping the fixmap area. For some reason, PKMAP_BASE was defined statically, which seems rather pointless, and asking for trouble. Patch below definines it dynamically, under the fixmap area. The ordering of the VMALLOC_RESERVE space is: FIXADDR_TOP fixed_addresses FIXADDR_START temp fixed addresses FIXADDR_BOOT_START Persistent kmap area PKMAP_BASE VMALLOC_END Vmalloc area VMALLOC_START high_memory Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86: remove data-header and code overlap in boot/setup.S The setup.S data and code is not cleanly separated. The current space reserved for setup header is not enough to fit the complete header. As a result, part of the header (EDDBUF) will overwrite the initial code. I haven't seen any negative impact of this bug. As, by the time the setup code is overwritten, we would have finished executing it anyway. But, I think it is better to separate the header and code and prevent this data_overwriting_the_code condition. The atatched patch adds some space in the header to fit all the data listed in Documentation/i386/zero-page.txt for both i386 and x86_64 (and updates zero-page.txt). Signed-off-by:: "Venkatesh Pallipadi" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Cyrix MII cpuid returns stale %ecx This patch is for the following bug, thanks to Ondrej Zary for reporting, testing and submitting a patch. http://bugzilla.kernel.org/show_bug.cgi?id=3767 It appears that the Cyrix MII won't touch %ecx at all resulting in stale data being returned as extended attributes, so clear ecx before issuing the cpuid. I have also made the capability print code display all the capability words for easier debugging in future. Signed-off-by: Zwane Mwaikambo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] NX: Triple fault with 4k kernel mappings and PAE Booting with NX, CONFIG_X86_PAE and CONFIG_DEBUG_PAGEALLOC or mem=nopentium triple faults really early during boot as it appears to be tripping over pages from PAGE_OFFSET -> PAGE_OFFSET + 0x100000 not being marked as executable. Signed-off-by: Zwane Mwaikambo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Trivial cleanup in arch/i386/kernel/head.S Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] remove pfn_to_pgdat() on x86 This function is unused on i386. Signed-off-by: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Secondary cpus boot-up for non default location built kernels This patch fixes the problem of secondary cpus not coming up over a reboot. This problem was seen when a kernel compiled for non default (16MB) location is booted. Signed-off-by: Vivek Goyal Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] i386 boot loader IDs This patch adds some i386 boot loader IDs that were used but never officially recorded as assigned. This makes them nice and official. Signed-Off-By: H. Peter Anvin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] /proc/sys/kernel/bootloader_type This patch exports to userspace the boot loader ID which has been exported by (b)zImage boot loaders since boot protocol version 2. It is needed so that update tools that update kernels from vendors know which bootloader file they need to update; eg right now those tools do all kinds of hairy heuristics to find out if it's grub or lilo or .. that installed the kernel. Those heuristics are fragile in the presence of more than one bootloader (which isn't that uncommon in OS upgrade situations). Tested on i386 and x86-64; as far as I know those are the only architectures which use zImage/bzImage format. Signed-Off-By: H. Peter Anvin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Intel thermal monitor for x86_64 Patch adds support for notification of overheating conditions on intel x86_64 processors. Tested on EM64T, test booted on AMD64. Hardware courtesy of Intel Corporation Signed-off-by: Zwane Mwaikambo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: do_general_protection() retval check This patch adds the return value check for the exception notifiers at do_general_protection as pointed out by Chuck Ebbert. Signed-off-by: Prasanna S Panchamukhi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Add a real pfn_valid Add a real pfn_valid This adds a real pfn_valid. Needed together with the SRAT patch which can generated memmap less holes for mmio. In general it will help to handle memory holes better. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Fix bugs in the AMD K8 CMP support code. Fix bugs in the AMD K8 CMP support code. Check the correct cpuid level and move numa_add_cpu to the correct place. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: numa_add_cpu() fix Problem is with "c - cpu_data" arthimetic. "c" could be "boot_cpu_data" or "cpu_data". Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Reenable MGA DRI on x86-64 Reenable MGA DRI on x86-64 Has been reported as working. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Remove duplicated FAKE_STACK_FRAME macro. Remove duplicated FAKE_STACK_FRAME macro. FAKE_STACK_FRAME macro is defined twice. The one that gets used is in arch/x86_64/kernel/entry.S, and is slightly different codewise, although should have the same end result (uses pushq rather than addq %rsp + movq and has the extra dwarf annotations). Signed-off-by: Chris Wright Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Remove BIOS reboot code Remove BIOS reboot code Remove the never quite working BIOS reboot code. This gets rid of a lot of code. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Add reboot=force Add reboot=force reboot=force doesn't wait for any other CPUs on reboot. This is useful when you really need a system to reboot on its own. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Collected ioremap fixes Collected ioremap fixes - Call change_page_attr correctly - Fix a race during iounmap - Handle mmio holes without mem_map correctly (needed for SRAT patch) - Some cleanups Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Handle NX correctly in pageattr Handle NX correctly in pageattr Second attempt to try to fix an long standing NX bug in change_page_attr. Hopefully this version will be better. The kernel text mapping aliases part of the physical memory and needs its caching attributes changed too. But when doing this one has to be very careful to handle the NX bit correctly. A previous slightly different version of this broke the X server on some RH systems. I hope this version will be better, but if you have X server problems please revert this one. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Split ACPI boot table parsing Split ACPI boot table parsing Split ACPI boot table parsing into two parts. First a acpi_boot_table_init() call that initializes the basic ACPI table parsing machinery and discovers the RSDP, and then another call to actually parse the various boot tables. This is needed for a followon patch that implements SRAT support, because nodes need to be set up before the other ACPI tables can be parsed. On x86-64 I moved the early initialization very early because that is needed for the SRAT parser. On i386 it should be a nop. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Add SRAT NUMA discovery to x86-64. Add SRAT NUMA discovery to x86-64. Previously the NUMA nodes on Opteron systems were directly read from the hardware registers of the northbridge. This version also supports reading it from the more generic ACPI SRAT table. This allows to support NUMA on all kinds of systems and in general gives more flexibility, but needs a bit of BIOS support. This implementation was not done before because the SRAT specification had a bad license from Microsoft that didn't allow to implement it on other OS. Now that ACPI 3.0 is released and SRAT is part of it that isn't a concern anymore. One side effect of this is that holes not described in SRAT (e.g. usually the 640K DOS and 4GB PCI memory holes) will not included in the nodes and won't get mem_map entries allocated. This may have side effects for some drivers. Some support for handling dual core AMD CPUs is included. SLIT parsing is done in a later patch. Depends on earlier patches to split up the ACPI boot parsing and to add better CMP support on x86-64. Can be disabled with numa=noacpi Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Update uptime after suspend Update uptime after suspend Derived from i386 Adjust jiffies after suspend to keep uptime. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Allow a kernel debugger to hide single steps in more cases. Allow a kernel debugger to hide single steps in more cases. Apparently helps the kgdb people. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Remove debug information for vsyscalls Remove debug information for vsyscalls This helps gdb apparently because it doesn't like code with debugging information before other code (?) Via the kgdb folks. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Rename HTVALID to CMP_LEGACY Rename HTVALID to CMP_LEGACY AMD renamed the HTVALID CPUID flag to CMP_LEGACY and reverted its meaning. Follow this for /proc/cpuinfo Needed for the followon CMP patches. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Scheduler support for AMD CMP Scheduler support for AMD CMP AMD dual core looks like HT but isn't really. Hide it from the scheduler. This works around problems with the domain scheduler. Also probably gives slightly better scheduling and disables SMT nice which is harmful on dual core. We still display it like HT in /proc/cpuinfo. This is to make it appear the same to license managers so that they count dual cores only as a single physical CPU. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Add a missing __iomem pointed out by Linus. Add a missing __iomem pointed out by Linus. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Add a missing newline in /proc/cpuinfo Add a missing newline in /proc/cpuinfo Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Always print segfaults for init. Always print segfaults for init. This gives better debugging output when something is really wrong with the kernel. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Export phys_proc_id Export phys_proc_id This is useful for the powernow-k8 driver which needs to know that two CPUs share a die. It cannot use cpu_sibling_map anymore, so this is an alternative. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Allow to configure more CPUs and nodes. Allow to configure more CPUs and nodes. With clustered mode and AMD's big flat APIC mode there is no reason anymore to limit the max number of CPUs to 8. Increase the limit to 256 for now, which is the current APIC limit. Untested for now. Also increase the max number of nodes to 64. Remove the MAXNODE define and replace it with MAX_NUMNODES everywhere or the constant if the hardware limits the number of nodes. Also remove some obsolete comments. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Fix a warning in the CMP support code for !CONFIG_NUMA Fix a warning in the CMP support code for !CONFIG_NUMA Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Fix some outdated assumptions that CPU numbers are equal numbers. Fix some outdated assumptions that CPU numbers are equal numbers. Depends on the unlimited cpus patch. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Fix EM64T config description Fix EM64T config description From: Xose Vazquez Perez Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Remove unneeded ifdef in hardirq.h Remove unneeded ifdef in hardirq.h I can't see any reason for the #ifdef CONFIG_X86 introduced to the x86_64 hardirq.h as part of the generic irq subsystem changes. Signed-off-by: Adrian Bunk Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Add SLIT (inter node distance) information to sysfs. Add SLIT (inter node distance) information to sysfs. [This is Jack's patch that he submitted on l-k. I'm submitting it for him because I need it for my x86-64 followon SLIT patch. Hope I don't stomp onto his toes with that one. If you already merged it please ignore] From: Jack Steiner Here is an update patch to externalize the SLIT information. I think I have encorporated all the comments that were posted previously) For example: # cd /sys/devices/system # find . ./node ./node/node5 ./node/node5/distance ./node/node5/numastat ./node/node5/meminfo ./node/node5/cpumap # cat ./node/node0/distance 10 20 64 42 42 22 # cat node/*/distance 10 20 64 42 42 22 20 10 42 22 64 84 64 42 10 20 22 42 42 22 20 10 42 62 42 64 22 42 10 20 22 84 42 62 20 10 Signed-off-by: Jack Steiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Add x86_64 support for Jack Steiner's SLIT sysfs patch Add x86_64 support for Jack Steiner's SLIT sysfs patch Make Jack's code compile on x86-64 and add x86-64 low level support to save the SLIT pointer and a node_distance() implementation. Requires the previous SRAT patch. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Eliminate some useless printks in ACPI numa.c Eliminate some useless printks in ACPI numa.c They trigger all the time on x86-64 with CONFIG_ACPI_NUMA Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] H8/300 new systemcall support Signed-off-by: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] arm26: remove arm32 cruft This patch drops some more stuff left over from the old combined arm26/32 architecture. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] arm26: update the atomic ops Replace the macros for atomic ops and bring arm26 up to current definitions. make the arm26 mm code use the proper macros also. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] arm26 build system updates - Updates to makefiles required by the other changes in this patchset. - Also add some entries to the linker scripts. The linker scripts really ought to be merged into one script but that will have to wait. - Add a comment for building xipImages Update the compiler flags used to build arm26 so gcc 3.4 doesnt barf. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] arm26: update comments, headers, notes Add and update comments all throughout the arm26 tree. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] arm26: necessary compilation fixes for 2.6.10 Various trivial fixes required to get a clean compile. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] arm26:cleanup trap handling assembly This removes some unneeded definitions and makes the naming used within the file more consistent. Also adds some macros to make it easier to see how the interrupt handler is structured. The assembled output is identical to the original. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] arm26: new execve code This pulls in the execve changes made in arm32. Also, drops some old arm32 power management stuff thats no longer relevant in process.c. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] arm26: move some files to better locations This diff effects a restructuring of arm26s directory layout. A number of files can now move to more logical locations, since there are no machine specific directories anymore. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] arm26: remove shark (arm32) from arm26 Drop shark support from arm26 (shark isn't arm26 based) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] arm26: softirq update New irq exit handler (part of the softirq changes) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] arm26: update system.h to some semblance of recentness. The arm26 version of this had become horribly out of date. this is a sideways-port of the arm32 version, dropping the unwanted stuff and adjusted for arm26 compatability. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] arm26: replace arm32 time handling code with smaller version ARM26 systems only have one possible clock, thus we can merge all this into one source file and drop the ability to dynamically alter it. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] arm26: TLB update A keep-it-compiling patch based on the arm32 code. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] arm26: better put_user macros. Better put_user macro. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] arm26: better unistd.h (reimplemented based on arm32) Some long overdue updates to this file. newer macros taken from arm32. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ia64: remove HCDP support for early printk This is only used by the ia64 early_printk patch, which isn't in the mainline tree. If anybody is still using that patch, hcdp_early_uart() should be incorporated into it. Signed-off-by: Bjorn Helgaas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] typeof(dev->power.saved_state) arch/arm/common/sa1111.c: In function `sa1111_suspend': arch/arm/common/sa1111.c:816: warning: assignment from incompatible pointer type This is a rather annoying, and IMHO pointless warning. First question: what is the reasoning for using an array of unsigned bytes here? Are we expecting to power manage devices which only have byte wide registers? In reality, devices have half-word and word sized registers as well, which means that dev->power.saved_state actually points to device specific data (or even device driver specific data) for the device. As such, it makes far more sense for this to be a 'void *'. I'd rather not go around the ARM kernel tree adding pointless casts to 'u8 *' and back again because the wrong type for this was picked in the structure definition, so here's a patch which changes this to void *. Signed-off-by: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix naming in swsusp At few points we still reference to swsusp as "pmdisk"... it might confuse someone not knowing full history. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] swsusp: kill unused variable Variable used only for writing is bad idea. Signed-off-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] swsusp: kill one-line helpers, handle read errors swsusp contains few one-line helpers that only make reading/understanding code more difficult. Also warn the user when something goes wrong, instead of waking machine with corrupt data. Signed-off-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] swsusp: Small cleanups This adds statics at few places and fixes stale references to pmdisk. Signed-off-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] swsusp: Kill O(n^2) algorithm in swsusp Some machines are spending minutes of CPU time during suspend in stupid O(n^2) algorithm. This patch replaces it with O(n) algorithm, making swsusp usable to some people. Signed-off-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] swsusp: try_to_freeze to make freezing hooks nicer This moves refrigerator changes to sched.h, so that every file user of refrigerator does not have to include suspend.h, and makes refrigerator support easier by introducing try_to_freeze. Adapted from patch by Nigel Cunningham Signed-off-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] swsusp-try_to_freeze-to-make-freezing-hooks-nicer fix In file included from include/linux/ptrace.h:77, from arch/ppc64/lib/sstep.c:12: include/linux/sched.h: In function `freeze_processes': include/linux/sched.h:1189: warning: no return statement in function returning non-void Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] m32r: Add new relocation types to elf.h include/asm-m32r/elf.h: Add relocations R_M32R_GOTOFF_HI_ULO, R_M32R_GOTOFF_HI_SLO, and R_M32R_GOTOFF_LO. These relocations are required to implement GOTOFF support for m32r. Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] m32r: Support pgprot_noncached() This patch updates include/asm-m32r/pgtable.h to add pgprot_noncached(). It is required to fix a problem of an userspace application, which mmaps io registers. This patch also modifies drivers/video/fbmem.c to support noncachable framebuffer access for m32r. In this routine, pgprot_writecombine() is used hopefully, even though the current m32r never does write-combining or write-coalescing... Please apply this. * include/asm-m32r/pgtable.h (pgprot_noncached, pgprot_writecombine): Newly added. * drivers/video/fbmem.c (fb_mmap): Add m32r support. Signed-off-by: Mamoru Sakugawa Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] m32r: Update ptrace.c for multithread debugging This patch updates ptrace.c to support multithread debugging. So far, only one breakpoint's location was kept by kernel, however, in the multithreaded application's debug, it is required to kept multi-point breakpoint locations by kernel. In this implementation, maximum number of MAX_TRAPS(=10 (by default)) breakpoint's information will be kept in the "debug_trap" member of the thread_struct for each thread. * include/asm-m32r/processor.h: Modify debug_trap struct to keep multipoint breakpoint locations for multithread debugging. * arch/m32r/kernel/ptrace.c: - Update to support multithread debugging. - Remove unused functions, withdraw_debug_trap_for_signal() and embed_debug_trap_for_signal(). Signed-off-by: Kei Sakamoto Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] m32r: Cause SIGSEGV for nonexec page execution - Cause a segmentation fault for an illegal execution of a code on non-executable memory page. Signed-off-by: Naoto Sugai Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] m32r: Don't encode ACE_INSTRUCTION in address - To be more comprehensive, keep ACE_INSTRUCTION (access exception on instruction execution) information in thread_info->flags, instead of encoding it into address parameter. Signed-off-by: NIIBE Yutaka Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] m32r: Clean up arch/m32r/mm/fault.c - Fix a typo: ACE_USEMODE --> ACE_USERMODE. - Update copyright statement, and so on. Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] m32r: Clean up include/asm-m32r/pgtable.h - Change PAGE_*_X to PAGE_*_EXEC for good readability. - Add #include __KERNEL__ - Change __inline__ to inline for the __KERNEL__ portion. Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] m32r: Support PAGE_NONE - Support PAGE_NONE attribute for memory protection. - Add _PAGE_PROTNONE bit to pte (software bit). Signed-off-by: NIIBE Yutaka Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] m32r: Remove PAGE_USER - Remove _PAGE_USER bit from pte. - The m32r doesn't support _PAGE_USER bit by hardware. Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] m32r: Clean up include/asm-m32r/pgtable-2level.h - Add #ifdef __KERNEL__ - Change __inline__ to inline for __KERNEL__ portion. - Remove RCS ID string. Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] m32r: include/asm-m32r/thread_info.h minor updates - Use THREAD_SIZE for __ASSEMBLY__ portion. - Update comments. - Fix a typo: user-thead --> user-thread. NOTE: Now there are two THREAD_SIZE definitions in the following patch, one is in C part and the other is in __ASSEMBLY__ part. I'm going to consolidate these THREAD_SIZE definitions. So, I have to change PAGE_SIZE definition of include/asm-m32r/page.h to be includable into asm portion... Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] m32r: Use kmalloc for m32r stacks - Use kmalloc for m32r stacks (cf. changeset 1.1046.533.10) - Update for CONFIG_DEBUG_STACK_USAGE This modification was taken from include/asm-i386/thread_info.h. Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] m32r: Make kernel headers for mutual exclusion Here is a patch to update kernel headers for mutual exclusion, atomic.h, bitops.h and semaphore.h of m32r. This patch is for making these headers publishable to userland. * include/asm-m32r/assembler.h (M32R_LOCK, M32R_UNLOCK): Define M32R_LOCK and M32R_UNLOCK macros. For SMP configuration, these macros are expanded to m32r's LOCK and UNLOCK instructions. While, for UP configuration, these are simply expanded to m32r's LD(load) and ST(store) instructions, respectively. * include/asm-m32r/atomic.h, include/asm-m32r/bitops.h, include/asm-m32r/semaphore.h: - Change macros from LOAD and STORE to M32R_LOCK and M32R_UNLOCK, respectively. It is because LOAD and STORE are too generic words. - Change inline to __inline__. Retrieve __inline__ modifiers for functions which are placed outside of __KERNEL__ region in these headers, because those functions might be included and used from ISO C program in userland. Currently, it seems that these headers are allowed to be included from userland. Indeed, they are kernel stuff, but these headers provide useful definitions and functions even for userland applications, I think. Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] m32r: Use generic hardirq framework This patch is for employing the generic hardirq framework for m32r. Now CONFIG_GENERIC_HARDIRQS is set to Y by default. - Update to use GENERIC_HARDIRQ framework. - Fix PREEMPT_ACTIVE definition (changeset 1.2000.16.20) Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] m32r: Update include/asm-m32r/system.h This patch updates include/asm-m32r/system.h. * include/asm-m32r/system.h: - Use barrier() as mb(). - Change __inline__ to inline. Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] m32r: Update include/asm-m32r/mmu_context.h This patch updates include/asm-m32r/mmu_context.h. * include/asm-m32r/mmu_context.h: - Add #ifdef __KERNEL__ - Change __inline__ to inline for __KERNEL__ portion. Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: remove most devfs_mk_symlink calls Remove uses of devfs_mk_symlink(). We didn't do this before to avoid breaking most user setups, but this patch should be quite harmless. I've excluded the hottest part, i.e. the ubd symlink, while removing the other; I released a end-user tree with this patch and there was a good number of people using the symlink rather than the preferred name. That part will be merged later, I think. Since now we have evidence of less and less users using devfs, we think that it will not cause too much problems. Acked-by: Jeff Dike Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: fix __wrap_free comment Reworded the comment about __wrap_free detection of the allocator used to allocate the pointer (it can free a pointer created by either the host malloc(), kmalloc() or vmalloc()). Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: fix some ptrace functions returns values From: Jeff Dike This patch adds ptrace_setfpregs and makes these functions return -errno on failure. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: redo the signal delivery mechanism This patch rips out the old signal delivery mechanism and replaces it with a sane one. Specifically, UML used to capture a host signal frame and use it as a template for its own signal frames. This was a worthy idea, because it promised a degree of architecture-independence for this part of UML, but impractical. There are some environments, notably 32 bit emulation on a 64 bit box, where you can't use the host signal frame as a template for your own. Plus, this code is as complicated, even to someone who understands what it's doing, as the standard fill-in-a-structure-and-write-it-to-the-stack. For everyone else, it is incomprehensible. So, this reimplements signal handling in the way that everyone else does. It gives up on architecture independence, and moves this code into the x86-specific stuff. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: make restorer match i386 From: Bodo Stroesser Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: unistd.h cleanup From: Chris Wedgewood: this removes unnecessary cruft from unistd.h Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: remove a quilt-induced duplicity This piece appears to have gone in twice. Signed-off-by: Milton Miller Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: fix sigreturn to not copy_user under a spinlock Fix sys_sigreturn and sys_rt_sigreturn to avoid calling copy_from_user inside a spinlock. We copy the blocked signal mask into a local sigset_t before the spinlock and then just assign from it inside the lock. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: close host file descriptors properly This process closes some file descriptors which were left open incorrectly. These are the initrd descriptor, the temporary test file used for testing /tmp for execution permission, and a descriptor used by the netork to connect to the switch. In the network case, we add network devices to the opened list as soon as they are added to UML, rather than when they are configured. This ensures that close_devices will remove the device properly on shutdown. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: free host resources associated with freed IRQs This adds a free_irq_by_irq_and_dev call which was accidentally removed when the UML free_irq was replaced by generic code. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: unregister signal handlers at reboot From: Bodo Stroesser In most cases reboot failed on my system. After "Restarting system.", UML exited without further messages. I found an SIGIO being processed by sig_handler() resp. sig_handler_common_skas(). Don't know, why this exits, maybe the context is no longer valid at this time. So, I changed the sequence in the reboot part of main() to stop the timers and disable the fds before unblocking the signals. Since this wasn't enough, I also added set_handler(SIGXXX, SIG_IGN) calls to disable_timer() and deactivate_all_fds(). Now reboot works fine in SKAS and it still works in TT. Signed-off-by: Bodo Stroesser Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] hostfs: uml: set .sendfile to generic_file_sendfile Make hostfs use the generic sendfile implementation. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] hostfs: uml: add some other pagecache methods This is a follow-up to my previous "hostfs - uml: set .sendfile to generic_file_sendfile" patch. I was asking whether other methods should have been added, and comparing with ext3 I found some more ones. However, I have not specific clues about them: I know they use the pagecache, which relies on *page methods, which are defined by hostfs. So I think it could work. I have a doubt, whether hostfs needs the commented out method below: static struct address_space_operations hostfs_aops = { .writepage = hostfs_writepage, .readpage = hostfs_readpage, /* .set_page_dirty = __set_page_dirty_nobuffers, */ .prepare_write = hostfs_prepare_write, .commit_write = hostfs_commit_write }; Hostfs does not have a underlying device (and I have some rough idea that buffers cache block devices data), so I wonder if that is needed or not. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: terminal cleanup This is a major cleanup of the uml terminal drivers and console handling (console as in "where the kernel messages go to", not as in "linux virtual terminals"). The changes in detail: (1) There is a new console driver calles "stderr" which (as the name implies) simply dumps all kernel messages to stderr. That one is registered very early in the boot process via console_initcall() and will print every almost kernel message instantly: Both very early in the boot process and very late in shutdown. Note that this is not enabled by default, see below for details. (2) Ditched the early-console-init hackery in stdio_console.c (open_console(NULL) + related stuff) into the waste basket, not needed any more as you can use the new stderr console driver to get the kernel messages if your kernel crashes very early in the boot process. (3) Handle console initialitation for the uml stdio console and virtual serial lines the normal way using the console->setup() function. Now all kernel messages appear on your console device once it is initialized without any dirty tricks. (4) The (2) changes allow a number of further cleanups: As we don't open a line without a tty_struct any more we can ... * hook struct line into tty->driver_data * pass around tty_struct instead of struct line everythere * get rid of some trivial wrappers in ssl.c and stdio_console.c because we can get struct line via tty_struct all the time now. (5) Change the ordering in the arch/um/drivers/Makefile and thus the link and initialization order to make sure the stdio console and not the virtual serial line is the default console device. (6) Fixed a number of Documentation/CodingStyle issues within the code (not systematically, but usually just the places I was touching anyway or where it bugged me while browsing the code because it was hard to read). Looks like that cleanup also fixed some strange tty issues I've seen in the past (like console getty not responding to input sometimes, suse's /sbin/blogd causing trouble). Finally some usage notes for using the new stderr console: If the stderr console is enabled, then it is the default console device because it registeres very early in the boot process. But as it isn't linked to a tty device this makes init unhappy, you'll see "can't open initial console" error messages. Because you usually don't want that the stderr console is turned off by default. That also maintains the behavior that /dev/tty0 is the first console device registered and thus the default console. There are basically two useful use cases for the stderr console: (1) Your kernel dies before the normal console device is initialized and thus you don't see any messages. Just enable the stderr console to see them by adding "stderr=1" to the kernel command line. (2) You want to have the kernel messages on both stderr and your console terminal device. Try something like this: $ ./linux stderr=1 console=stderr console=ttyS0 ssl0=xterm This example sets up the console on a virtual serial line and pops up an xterm for that. Signed-off-by: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Uml: first part rework of run_helper() and users. With Jeff Dike , Fixed a file descriptor leak in the network driver when changing an IP address. Fixed the error handling in run_helper. Paolo notes: Actually, this is part one of the change, the exact one extracted from Jeff Dike's incrementals tree before 2.6.9-rc big UML merge. There is some changes must be done, so I'm also sending a second patch with this one, too. Separated for tracking purposes. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: finish fixing run_helper failure path Fix some bugs left in the failure path of run_helper by the previous patch: it was missing one os_close_file(fds[1]) which is conditional. To use the goto handling model, I set the fd to -1 if it's already closed (I don't want to check if keeping one more pipe-end open is no problem). Also do some cosmethic cleanup: * "err" was what we returned even on success, so just use a neutral "ret". * use tabs, not spaces. * a little more comments. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: add elf vsyscall support From: Bodo Stroesser This is the first patch of a series of four. These patches allow the use of sysenter-systemcalls in UML if the host support sysenter. Some facts have to be noted: - the sysenter instruction does not save anything, not even the return address. Thus the host-kernel builds a stackframe with an fixed return address for the backjump to the vsyscall-page. All kernels that support sysenter thus must have a vsyscall-page - The hosts vsyscall-page is visible in all memory-contexts on the host, even in those of the processes running on UML. This cannot be changed. So the best way to implement sysenter is to integrate the host's vsyscall-page into UML, if available. This patch creates a new source file containing an UML initialization function. The function scans the Elf-auxiliary vector that is prepared by the host for relevant information about: - vsyscall elf-header - vsyscall entry - machine type (called "platform", e.g. "i586" or "i686") - hardware capabilities These informations are inserted into the Elf-auxiliary-vector that is generated if an UML process calls "execXX()". If the information from the auxiliray-vector is not complete, UML uses the previos default values, with one exception: if the host has no vsyscall-page, UML now does no longer insert AT_SYSINFO or AT_SYSINFO_EHDR elements. (I think, that's better than writing dummies) Since the host's vsyscall-page is always visible to UML processes, this change is enough to let UML with an i686-compiled glibc use sysenter. what's missing: - is_syscall() in SKAS cannot access the code in the vsyscall-page via copy_from_user(), thus singlesteppers still could break out. (Note: that's not new, if someone jumps willingly to the sysenter-entry in the vsyscall-page, he can do that without the patch, too). - a debugger cannot access the code in the vsyscall-page via ptrace( PEEKTEXT, ...) Risks: could there by any feature of the host's processor, that is indicated in the hardware capabilities, but must not be used in UML? Signed-off-by: Bodo Stroesser Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: make vsyscall page into process page tables From: Bodo Stroesser To make the vsyscall-page available for copy_from_user() and ptrace(), we should use kernel's "gate-vma" mechanism. Therefore we need a valid page structure. To have this, one page (or more) is allocated at boot time, the contents of the vsyscall-page is copied into this page and the page's pte is inserted in swapper's pagetables. Now it will be copied into the pagetables of all processes. Note: this alone doesn't work, since FIXADDR_USER_START and FIXADDR_USER_END are not yet defined correctly. Also access_ok_skas() does not yet grant read accesses to pages not in the normal user area. Risks: Please check the first hunk! I don't know, whether this change is OK. Maybe fixrange_init() is wrong anyway with 3-level-pagetables? Here access_ok_skas() and FIXADDR_USER_XXXX are fixed. Now everything should work fine, while the processes are running. But if a process crashes, the vsyscall-page will not be dumped. Signed-off-by: Bodo Stroesser Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: include vsyscall page in core dumps From: Bodo Stroesser Complete the dump with the vsyscall-information, if a vsyscall-page is available. Signed-off-by: Bodo Stroesser Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: Add TRACESYSGOOD support From: Bodo Stroesser Patch 1/3 to implement usage of PTRACE_O_TRACESYSGOOD This is necessary, to fix UMLs bad behavior when a process does a systemcall with syscall-number less than 0. Insert a check for availability and function of ptrace(PTRACE_SETOPTIONS,,,PTRACE_O_TRACESYSGOOD) into the normal ptrace checks at startup. Patch 2/3 to implement usage of PTRACE_O_TRACESYSGOOD This is necessary, to fix UMLs bad behavior when a process does a systemcall with syscall-number less than 0. This patch makes SKAS-mode use PTRACE_O_TRACESYSGOOD and fixes the problems in SKAS. Patch 3/3 to implement usage of PTRACE_O_TRACESYSGOOD This is necessary, to fix UMLs bad behavior when a process does a systemcall with syscall-number less than 0. This patch makes TT-mode use PTRACE_O_TRACESYSGOOD and fixes the problems in TT. I'm not quite sure, that this patch doesn't cause problems with debugger usage. It should be testet by someone, who has more know how about TT-mode debugger. Signed-off-by: Bodo Stroesser Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: kill host processes properly This patch changes how UML kills ptraced processes in order to be more correct in the presence of the ptrace changes in 2.6.9. It used to be that ptrace stopped processes could simply be killed and they would go away. Now, there's a new run state for ptraced processes which doesn't receive signals until they are PTRACE_KILLed or PTRACE_CONTinued. So, this patch kills the process, as usual, then PTRACE_KILL and PTRACE_CONT. This is done in os_kill_ptrace_process() for use from skas mode, and in tracer() when it sees a child process getting a SIGKILL. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: defconfig update Update defconfig for 2.6.10-rc2-mm4. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: small vsyscall fixes From: Bodo Stroesser As Jeff pointed out, the check for address wrapping in access_ok_skas was wrong. Also, change vsyscall_ehdr and vsyscall_end to be unsigned long and export them, since modules need them for access_ok_skas Signed-off-by: Bodo Stroesser Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: export end_iomem From: Bodo Stroesser some modules need end_iomem to be exported. Signed-off-by: Bodo Stroesser Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: system call restart fixes From: Bodo Stroesser The implementation of sys_sigreturn() and sys_rt_sigreturn() in UML must be changed. This is necessary, since the return value of sys_*_sigreturn() is the value of eax in the thread, that was interrupted by the signal handler. If accidentaly eax contains -ERESTART_*, orig_eax *must* be -1 to avoid syscall restart processing in kern_do_signal(). If orig_eax is >=0, eip might be lowered by 2, the process will fail. In UML PT_REGS_SYSCALL_NR() or UPT_SYSCALL_NR() have to be used instead of orig_eax. While writing and testing an exploit for this, I saw that for most interrupts, the syscall number is undefined. So even on a return from interrupt a wrong syscall restart handling could happen. And also: UML resumes a process with ptrace(PTRACE_SYSCALL/SYSEMU/SINGLESTEP when a syscall in UML in SKAS mode has been processed. But since there is a valid syscall number in the host's orig_eax, the host could do a wrong syscall restarting if the syscall in UML was a sigreturn() returning -ERESTART* To avoid this, in SKAS -1 should be written to regs.orig_eax before restore_registers(). Signed-off-by: Bodo Stroesser Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: Fix setting of TIF_SIGPENDING From: Bodo Stroesser My older patch, that sets TIF_SIGPENDING after an ptrace-interception in syscall_trace() is wrong. Some syscalls want to be called without any signal pending. If a signal is pending on syscall-entry, they immediately return with -ERESTARTNOINTR. Thus, on return to user, the pending signals can be processed and the kernel will lower eip by 2 to have the syscall restarted after that. Since my change sets TIF_SIGPENDING on the entry and exit interception, stracing such a syscall looped! Try "strace ls" to see what happens. Fix: set TIF_SIGPENDING on the exit interception only. This avoids the loop and is enough for security. Signed-off-by: Bodo Stroesser Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: Allow vsyscall code to build on 2.4 From: Bodo Stroesser This patch fixes compilation on 2.4 hosts by not relying on macros from 2.6 host kernel headers in one userspace file. It's about AT_SYSINFO_* macros. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: SYSEMU fixes From: Bodo Stroesser Usage of SYSEMU in TT mode is modified, so that always the same method is used in do_syscall as has been used before in ptrace(PTRACE_SYSCALL/SYSEMU, ...) Signed-off-by: Bodo Stroesser Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: correctly restore extramask in sigreturn From: Bodo Stroesser Restoring of current->blocked in sys_sigreturn is wrong. The first (long ) of the mask correctly is fetched from sc->oldmask. The further longs again come from there, but correctly should be taken from frame->extramask. Signed-off-by: Bodo Stroesser Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: fix update_process_times call From: Bodo Stroesser In call to update_process_times() set parameter user correctly. (was from for SKAS). Signed-off-by: Bodo Stroesser Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: detect SYSEMU_SINGLESTEP From: Bodo Stroesser This implements checking for the new ptrace option SYSEMU_SINGLESTEP (advanced sysemu) and allows the values 0,1,2 for /proc/sysemu, if advanced sysemu is available: 0 = don't use sysemu 1 = use sysemu, but don't use advanced sysemu 2 = use sysemu and advanced sysemu Signed-off-by: Bodo Stroesser Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: use SYSEMU_SINGLESTEP This implements using the new ptrace option SYSEMU_SINGLESTEP in UML (advanced sysemu) in SKAS and TT modes. To have a fast selection of the appropriate ptrace option to use next, a 2 dimensional arry is used and singlestepping() is modified to return 0,1 or 2: 0 = don't do singlestepping 1 = singlestep a syscall 2 = singlestep a "non syscall" instruction In do_syscall() writing of the syscall number is supressed, if the advanced sysemu is in use (that does it itself). Signed-off-by: Bodo Stroesser Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: declare ptrace_setfpregs Add a declaration for ptrace_setfpregs Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: Remove bogus __NR_sigreturn check Before Bodo's signal fixes and my signal delivery rework, it was possible for a process to execute UML code by running the default signal restorer. This is no longer possible, so this check can be removed from the sanity test for UML accidentally tracing itself. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: Fix highmem compilation Remove a reference to an unused variable. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: symbol export export a missing symbol, IIRC xfs needs that one. Signed-off-by: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: fix umldir init order Fixup initialization order when creating the $HOME/.uml/ directory and the files therein, also make the error messages more useful. Signed-off-by: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: raise tty limit Signed-off-by: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: sysfs support for uml network driver. Add sysfs support to the uml network driver. Also comment the eth_init function, I think that one is never ever needed as the devices are initialized when the underlying transport mechanism registeres. Signed-off-by: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: sysfs support for the uml block devices. Signed-off-by: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: remove compat setup_arg_pages32 Remove the s390 version of setup_arg_pages32 function and use the generic setup_arg_pages function instead. Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: core patches s390 core changes: - Disable pfault pseudo page faults before stopping a cpu. - Add exception table for diag10 instruction. - Move initialization of active_mm of idle task to smp_create_idle. - Regenerate default configuration. Signed-off-by: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: Common I/O layer From: Cornelia Huck common i/o layer changes: - Cope with changed cdev->handler. - Split clearing of subchannels from reipl function and declare it in header. Signed-off-by: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: Network device driver patches From: Ursula Braun-Krahl From: Peter Tiedemann From: Thomas Spatzier From: Frank Pavlic - ctc: make sysfs attribute buffer early available. - ctc: remove memory leak for channel ccw struct. - qeth: remove redundant info card->info.ifname. - qeth: enable recovery with retries in qeth_hardsetup_card after unit check. - qeth: do not allow to set layer2 attribute on IQD devices. Signed-off-by: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: DASD driver From: Peter Oberparleiter dasd driver changes: - Modify format analysis routine to use block size provided by on-disk label. - Search data structures when referencing use_diag/ro attribute values. - Correct return code checking when allocating memory. Signed-off-by: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: Character device drivers From: Peter Oberparleiter From: Stefan Bader character device driver changes: - tape: Correct module count usage. - 3270: Use mod_timer only when timer is pending. Signed-off-by: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: DCSS driver cleanup fix From: Carsten Otte - Fix codingstyle. Signed-off-by: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: SCLP device driver cleanup From: Peter Oberparleiter sclp: core driver cleanup Details: - moved signal shutdown (quiesce) handling into a separate file - cleanup of SCLP core driver: . introduced driver states instead of bits . introduced request retry count and retry limit . sclp_add_request now returns an error code if a request couldn't be started . introduced separate request structure for init_mask requests to simplify code . request timer is now manually checked in sclp_sync_wait because timer interrupts are disabled in this context . removed busy timer - request timer now handles both cases . split up sclp_start_request into __sclp_start_request and sclp_process queue . removed sclp_error_message (unused) . introduced sclp_check_handler function to split up initial init mask test from standard init mask request processing . introduced sclp_deactivate and sclp_reactivate for simplified reboot event handling (and potential use in suspend/resume scenario) . added protection against multiple concurrent init mask calls - minor changes in SCLP core driver: . updated comments . renamed functions to be consistent with "function name starts with __ => needs lock" . renamed internal functions for consistency reasons . introduced inlined helper functions to simplify code . moved EXPORT_SYMBOL definitions next to function definition - changes in sclp console driver . removed callback recursion to prevent stack overflow - changes to CPI module . added check for sclp_add_request return code . changed printks to specify a message level - changes to generic sclp tty layer . removed timed buffer retry after error (timers may not work in some situations) . introduced return code for sclp_emit_buffer - changes to sclp tty driver . removed callback recursion - changes to sclp vt220 driver . removed callback recursion . removed timed buffer retry after error - modified sclp_init_mask to prevent problems with some compiler versions Signed-off-by: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] NX: Fix noexec kernel parameter noexec_setup runs too late to take any effect, so parse it earlier. Signed-off-by: Zwane Mwaikambo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds bk-kbuild-in_gate_area_no_task-warning-fix arch/x86_64/mm/init.c: In function `in_gate_area_no_task': arch/x86_64/mm/init.c:656: warning: suggest parentheses around && within || In file included from include/asm/numa.h:5, from arch/x86_64/kernel/setup.c:60: Signed-off-by: Andrew Morton Signed-off-by: Sam Ravnborg [ALSA] Clean up handling of user-defined controls Control Midlevel Cleaned up the code to handle user-defined controls. Signed-off-by: Takashi Iwai [ALSA] Clean up and fix stereo mutes AC97 Codec Core Clean up the build of controls. The volume resolution detection is unified. Fixed minor bugs to handle stereo mutes. Signed-off-by: Takashi Iwai [ALSA] Add a new ID CA0106 driver I attach a minor update that corrects the DMA mask, and adds an extra ID. This sound card can handle 32bit DMA addresses. Signed-off-by: James Courtier-Dutton Signed-off-by: Takashi Iwai [ALSA] Fix NULL pointer access MIXART driver Fixed NULL pointer access when id string isn't given. Signed-off-by: Takashi Iwai [ALSA] Add a DXS entry for ABIT VA-20 VIA82xx driver Added a DXS whitelist entry for ABIT VA-20. Signed-off-by: Takashi Iwai [ALSA] Fix C-Media codecs AC97 Codec Core Don't create PCM (and Master for CM9739/9761) volume controls for some of C-Media codecs. The volume is supposed to be controlled via softvol plugin. The wrong (duble) entry for a CM9761 model is removed, too. Signed-off-by: Takashi Iwai [ALSA] Add codec id in component names AC97 Codec Core Added codec id number to the component names. The component becomes like 'AC97a:12345678'. Signed-off-by: Takashi Iwai [ALSA] Don't probe sample rates on non-VRA chips ES1968 driver,CA0106 driver,EMU10K1/EMU10K2 driver Don't probe sample rates on chips which need no VRA. Signed-off-by: Takashi Iwai [ALSA] Print values at errors EMU10K1/EMU10K2 driver Print out the invalid values at resource allocation errors, too. Signed-off-by: Takashi Iwai Hide question about SERIO_LIBPS2 unless there is some remote reason the user migth want to see it. Under any normal use it gets auto-selected by PS/2 mouse or ATKBD support anyway, and if those aren't selected there's no reason to select this one either unless you have some very special uses. [Bluetooth] Add module parameter for ignoring a device This patch adds a module parameter to the USB Bluetooth drivers for ignoring devices from their matching list. This makes it possible for alternate drivers to grab the device. Signed-off-by: Marcel Holtmann Mark HPUSBSCSI scanner broken. You're supposed to use libusb. RPC: Convert rpciod into a work queue for greater flexibility. Signed-off-by: Trond Myklebust RPC: Remove the rpc_queue_lock global spinlock. Replace it with per-rpc_queue spinlocks. Signed-off-by: Trond Myklebust RPC: Fix a bug in rpc_killall_tasks(). Shirly Ma reported seeing problems with rpc_killall_tasks() causing the task->tk_magic debugging test to trigger. It turns out we may be killing tasks that are not yet running or even initialized. Signed-off-by: Trond Myklebust RPC: More aggressive RPC debugging code. People are worrying about spinlock deadlocks in the debugging code, without actually worrying about the bugs that triggered the debugging code in the first place. Convert to BUG_ON() in order to ensure that bugs are reported. Signed-off-by: Trond Myklebust RPC: Add missing calls to flush_dcache_page() in net/sunrpc/xdr.c Signed-off-by: Trond Myklebust NFS: Make readdirplus create dentries on the fly when we're running through the directory. Signed-off-by: Trond Myklebust NFS: The fact that readdirplus calls now create dentries from within readdir calls renders nfs_cached_lookup() obsolete. Signed-off-by: Trond Myklebust NFS: Change rpc_ops->create() to take a dentry argument rather than a qstr. Signed-off-by: Trond Myklebust NFSv4: Make nfs4_do_open() take a dentry argument. Signed-off-by: Trond Myklebust NFSv4: setattr, close and open_downgrade should use the state_owner's credentials when they are available. Signed-off-by: Trond Myklebust NFSv4: Convert the NFSv4 close and open_downgrade operations to use asynchronous RPC calls. Signed-off-by: Trond Myklebust RPCSEC_GSS: When the gss code notices that a cred has expired, mark the cred containing the context non-uptodate, triggering creation of a new context. Note that on the send-side operations (get_mic, wrap), we mark the cred as not uptodate, but continue trying to use it; the server can complain if it wants to, and the next time through we'll refresh it. Signed-off-by: J. Bruce Fields Signed-off-by: Trond Myklebust RPC: Instead of setting a flag (RPCAUTH_CRED_DEAD) in the cred to indicate failure of an upcall to get a gss context for that cred, set the status of waiting tasks to indicate failure. This solves problems e.g. with creds with the CRED_DEAD flag set never being refreshed, which caused krb5 mounts to fail after the context used to do RENEWS expired. Signed-off-by: J. Bruce Fields Signed-off-by: Trond Myklebust RPC: The RPCAUTH_CRED_DEAD flag had been unused for some time before I unwisely revived it for use with the gss code. Having removed that use from the gss code, it's time to remove all references to it. Signed-off-by: J. Bruce Fields Signed-off-by: Trond Myklebust RPCSEC_GSS: Miscellaneous cleanup of auth_gss.c: we're passing something as a void * when we know perfectly well what it is. And we're passing some arguments that we don't actually use. Signed-off-by: J. Bruce Fields Signed-off-by: Trond Myklebust Subject: [PATCH] NFS: Sync NFS writes still use kmalloc Replace the kmalloc() and kfree() calls in this path with appropriate invocations of nfs_writedata_alloc() and nfs_writedata_free(). This makes nfs_writepage_sync match all the other write paths in fs/nfs/write.c. Category: Maintainability, performance Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust NFSv2/v3/v4: ESTALE should not be a permanent condition on directories. Although it usually means that someone has deleted a file on the server, the ESTALE error may also indicate that the sysadmin has used exportfs to deny our client access to the server. Most NFS implementations therefore consider it a non-permanent condition, and allow inodes to "recover" when the sysadmin re-enables access. If, however, you want to work with broken servers, like unfsd, that reuse filehandles for new files after the original file gets deleted, then "recovery" is impossible, since it may be that the filehandle now points to a different file. Note that this is broken server behaviour that may happen even without us ever seeing the ESTALE error. In order to minimize (but we can never eliminate entirely) this race condition on unfsd servers, Linux has traditionally made ESTALE a permanent condition on all filehandles except the root filehandle. The problem is that if we apply this strict staleness criterion to directories (particularly so for he current directory), then all processes will need to re-walk the path starting from the mount point, in order to recover from the sysadmin intervention case. As this is not usual on other *NIX implementations, and may in any case be undermined by caching rules etc, this is being seen as a usability problem. This patch makes ESTALE a non-permanent condition on directories, but preserves the current behaviour for non-directories. Signed-off-by: Trond Myklebust VFS: Avoid dentry aliasing problems in filesystems like NFS, where inodes may be marked as stale in one instance (causing the dentry to be dropped) then re-enabled in the next instance. Signed-off-by: Trond Myklebust RPC: Optimize away unnecessary del_timer_sync() operations, when we know there are no pending timers. Signed-off-by: Trond Myklebust VFS: Remove LOCK_USE_CLNT. It should no longer be necessary. Signed-off-by: Trond Myklebust NFS: when we mount with the "nolock" flag we need to use local locking. Signed-off-by: Trond Myklebust NFS: Fix dentry refcount accounting error which causes unnecessary sillyrenames when renaming to an existing file. Signed-off-by: Greg Banks Signed-off-by: Trond Myklebust Subject: [PATCH] NFS: short write warning Recently a patch set was accepted to allow the Linux NFS client to handle short writes by retrying the unwritten portion of the request. The only case that now results in an error is when the server makes no progress; that is, writes zero bytes. This patch changes the kernel log warning that is generated in that case to reflect the error condition more accurately. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust Subject: [PATCH] NFS: report return code on GETATTR and SETATTR Improve trace debugging messages for NFSv2/3 GETATTR and SETATTR procedures. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust Subject: [PATCH] RPC: display XIDs in host order Description: Ethereal and other tools display RPC XIDs in host order. This patch changes the RPC trace messages that display XIDs to print them in host order so they can be easily matched to XIDs that appear in Ethereal. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust Subject: [PATCH] NFS: Use sizeof() instead of C macro Replace a C macro with sizeof(). Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust Subject: [PATCH] NFS: better handling of short writes in direct write path Immediately return control to the application if a short NFS write is detected in the NFS client's direct write path. This is better behavior than what the direct write path does today, which could result in data appearing at the wrong offset in the file. Eventually this code path should retry short writes at least once before giving up. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust Subject: [PATCH] NFS: Direct write path allocates nfs_write_data on the stack Reduce stack utilization in the NFS direct write path by using a dynamically allocated nfs_write_data structure instead of allocating one on the stack. This reduces stack utilization of nfs_direct_write_seg from over 900 bytes to less than 100 bytes. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust Subject: [PATCH] NFS: Direct read path allocates nfs_read_data on the stack Reduce stack utilization in the NFS direct read path by using a dynamically allocated nfs_read_data structure instead of allocating one on the stack. This reduces stack utilization of nfs_direct_read_seg from over 900 bytes to less than 100 bytes. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust Subject: [PATCH] NFS: Use parallel read operations to do direct read requests The initial implementation of NFS direct reads was entirely synchronous. The direct read logic issued one NFS READ operation at a time, and waited for the server's reply before issuing the next one. For large direct read requests, this is unnecessarily slow. This patch changes the NFS direct read path to dispatch NFS READ operations for a single direct read request in parallel and wait for them once. The direct read path is still synchronous in nature, but because the NFS READ operations are going in parallel, the completion wait should be much shorter. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust Subject: [PATCH] NFS: Direct reads and writes need to flush dirty cache pages Other parts of the NFS client invoke nfs_wb_all() when they want to flush dirty cache pages. The direct path needs to do that, too. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust Subject: [PATCH] NFS: use attribute timeout instead of "noac" mount option The behavior enabled by the "noac" mount option should be precisely equivalent to setting acreg{min,max} or acdir{min,max} to zero via mount options. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust NFS: Ensure ACCESS caches are invalidated together with the attribute cache. Signed-off-by: Trond Myklebust Subject: [PATCH] NFS: incorrect "df" results Description: Fix an NFS client bug introduced in 2.6.9-rc1. The "df" command was reporting the size of NFS file systems incorrectly. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust RPC: call_verify Don't label all retries as "server seeing garbage". Report correct error for buffer overflows. Fix incorrect buffer overflow test that was masking AUTH_REJECTEDCRED, AUTH_REJECTEDVERF,... errors. Signed-off-by: Trond Myklebust [ARM] Fix slab corruption issues triggered with pud_t integration. When the page tables are wrapped from 4 levels to 2 levels, the new MM code requires PMD_SHIFT to match PUD_SHIFT, which must also match PGDIR_SHIFT. If PMD_SHIFT is smaller than PUD_SHIFT, we risk freeing a still-in-use table (== page) which can then get re-used for the slab cache. Testing and inspection shows that there isn't any real benefit from keeping PMD_SHIFT set to 20. In addition, add some comments concerning the granularity of alloc_init_section() and fix a missing PMD assignment in the rebooting code. Somehow we managed to get away with that, although it is actually wrong. Maybe I've just been lucky until now. Signed-off-by: Russell King kconfig: Redo and improve search support Based on patch from: Roman Zippel The search functionality has been improved: - Restructured printout with more info - Include value of relevant symbols - Improved handling of corner cases - Generic search support moved to backend - ready to be utilised by xconfig and gconfig - Search functionality moved to fronend - not hardcoded in menubox.c Sample search (^$ used to limit search): Search for "^USB_STORAGE$": Symbol: USB_STORAGE [=y] Prompt: USB Mass Storage support Defined at drivers/usb/storage/Kconfig:7 Depends on: USB Location: -> Device Drivers -> USB Support Selects: SCSI Some symbols has loong "Depends on:" lines - for example FW_LOADER. Use arrows to scroll horisontally to see full value. Signed-off-by: Sam Ravnborg [PATCH] track capabilities in default dummy security module code Switch dummy logic around to set cap_* bits during exec and set*uid based on basic uid check. Then check cap_* bits during capable() (rather than doing basic uid check). This ensures that capability bits are properly initialized in case the capability module is later loaded. Signed-off-by: Chris Wright Signed-off-by: Linus Torvalds kconfig: Include more info when selecting help for a symbol in menuconfig When selecting help on a symbol include information below help text displaying relevant info that kconf has stored. The info printed is the same info obtained when searching for a symbol and the same methods are resued. Sample (help for "System V IPC"): ----------------------------------------------------------------------- CONFIG_SYSIPC: Inter Process Communcation ... Symbol: SYSVIPC [=y] Prompt: System V IPC Defined at init/Kconfig:82 Depends on: MMU Location: -> General setup ----------------------------------------------------------------------- Idea-from: Cal Peake Signed-off-by: Sam Ravnborg kconfig: Fold README.Menuconfig into mconf.c Content of README.Menuconfig folded into mconf.c and README.Menuconfig deleted. Text was slightly updated - mainly by deleting obsolete information. Signed-off-by: Sam Ravnborg [ARM PATCH] 2343/1: S3C2410 / S3C2440 MAINTAINERS entries Patch from Ben Dooks Mainter entries for ARM/S3C2410 and ARM/S3C2410 ARM Architectures, mainted by Ben Dooks on behalf of Simtec Electronics. Signed-off-by: Ben Dooks Signed-off-by: Russell King [PATCH] remove duplicated patch fragment Acked-by: Chris Wright Signed-off-by: Linus Torvalds [ARM PATCH] 2344/1: S3C2440 - fix mapping of watchdog for reboot Patch from Ben Dooks Ensure the watchdog timer is mapped for use with the reboot code. Also fixes minor comment typo. Signed-off-by: Dimitry Andric Signed-off-by: Ben Dooks Signed-off-by: Russell King [ARM PATCH] 2345/1: S3C24XX - serial init depending on cpu detected Patch from Ben Dooks Use the cpu-type detected in arch/arm/mach-s3c2410/cpu.c to work out which uart initialisation routine to call, instead of relying on the one called within mach-xxxx.c. This allows one machine-type to run with either an 2410 or 2440 cpu installed. Thanks to Dimitry Andric for the original patch. Signed-off-by: Ben Dooks Signed-off-by: Russell King [ARM PATCH] 2346/1: Update IXP4xx documentation Patch from Deepak Saxena This patch updates the IXP4xx documentation with information about the latest chipsets and supported devices. Supercedes 2308/1 Signed-off-by: Deepak Saxena Signed-off-by: Russell King [ARM PATCH] 2347/1: PXA SSP PSP bit definition Patch from Liam Girdwood This patch adds a bit definition for the SSP port PSP mode. Signed-off-by: Liam Girdwood Signed-off-by: Russell King [PATCH] NFS client O_DIRECT error case fix The NFS direct-io error return path for request sizes greater than MAX_DIRECTIO_SIZE fails to initialize the returned page struct array pointer to NULL. Discovered using AKPM's ext3-tools: odwrite -ko 0 16385 foo Signed-off-by: Bill Rugolsky Signed-off-by: Linus Torvalds [PATCH] fix up dummy security module code merge OK, somehow I managed to botch this one. It happens to work fine, but I should have been more careful with forward porting this 1+ year old patch. The exec-time calc should go in bprm_apply_creds, not bprm_free_security. Thanks to Stephen for spotting my mistake. Signed-off-by: Chris Wright Signed-off-by: Linus Torvalds [PATCH] ipt_REJECT Target nonlinear fixes nfsim now generates non-linear packets: when run under valgrind it finds linear assumptions very nicely. This is the second thing I tried, and it found a real bug. In this case, checking the UDP checksum is correct, but overkill, and like the ICMP header handling, does not handle non-linear packets. Remove UDP checksum, fix ICMP error. Signed-off-by: Rusty Russell Signed-off-by: Linus Torvalds [PATCH] When ipt_ECN needs TCP, check it is not inverted Writing the nfsim testcase for the ECN target revealed a hole in the rule checking: when checking whether the rule specified TCP, you need to check it isn't inverted. Signed-off-by: Rusty Russell Signed-off-by: Linus Torvalds [PATCH] Remove NAT to multiple ranges The NAT code has the concept of multiple ranges: you can say "map this connection onto IP 192.168.1.2 - 192.168.1.4, 192.168.1.7 ports 1024-65535, and 192.168.1.10". I implemented this because we could. But it's not actually *used* by many (any?) people, and you can approximate this by a random match (from patch-o-matic) if you really want to. It adds complexity to the code. Signed-off-by: Rusty Russell Signed-off-by: Linus Torvalds [PATCH] ip_conntrack_alter_reply doesn't need to loop ip_conntrack_alter_reply checks that the reply isn't already taken, but there's little point, since there's *still* a race after it is called (which we handle at confirm time anyway). Signed-off-by: Linus Torvalds [PATCH] Don't try too hard to NAT to unique tuple On NF_IP_LOCAL_OUT or NF_IP_PRE_ROUTING, if destination NAT is not sufficient to create a unique tuple, we try changing the source port as well. However, this is also not strictly necessary: if the tuple is not unique, we will also try to change the source on the NF_IP_POST_ROUTING hook. When we finally confirm the connection, if the tuple is still not unique the packet will be dropped (this is required anyway as we could race: the conntrack is not placed in the hash until the packet is about to leave the box anyway). In fact, we only need best effort *everywhere*. This patch rips that code out to see what breaks. Signed-off-by: Rusty Russell Signed-off-by: Linus Torvalds [PATCH] Remove do_extra_mangle: double NAT on LOCAL_OUT On NF_IP_LOCAL_OUT, when destination NAT changes the destination interface, we also change the source address, so the packet is the same as if it were generated to go that way in the first place. This is not strictly necessary, I believe. This patch rips that code out to see what breaks. Signed-off-by: Rusty Russell Signed-off-by: Linus Torvalds [PATCH] Warn when old code would have done extra mangling Now we no longer do extra mangling, warn in that case. Signed-off-by: Rusty Russell Signed-off-by: Linus Torvalds [PATCH] Remove Randomness in Selecting NAT IP Address We currently choose a "random" IP address to NAT to, where we have a range. Martin Josefsson pointed out that he uses the SAME target in iptables because changing IP addresses breaks Internet banking sites (among others) which assume the customer will be coming from a consistent IP address. In fact, we spend a fair bit of effort trying to balance the number of connections we NAT to each IP address. We can come pretty damn close just hashing the source and destination IP addresses, and it has the consistency property which is so desirable, as well as being faster. Signed-off-by: Rusty Russell Signed-off-by: Linus Torvalds [PATCH] Clean up the kmod handling code in iptables.c We now have a convenient kmod macro try_then_request_module(). 1) Split our current "generic" function into separate find_target_lock(), find_table_lock() and find_match_lock() functions explicitly. 2) Have those functions do try_module_get() for us, and fix up the one caller who didn't do that anyway. 3) Have the caller use try_then_request_module(). 4) Remove __ipt_mutex_up() and __ipt_find_target_lock() which weren't used (even in patch-o-matic AFAICT). This cleanup takes us closer to using standard list macros everywhere, and makes the version patch simpler. Signed-off-by: Rusty Russell Signed-off-by: Linus Torvalds [PATCH] Steal a Character To Create a Revision Number Pablo Neira came up with the idea of stealing the last byte in the (already nul-terminated) name of a target/match to create a version. That patch motivated me to clean up the match and target searching in ip_tables, which makes this patch more trivial. I also renamed "version" to "revision" since the word "version" was used for iptables itself. Signed-off-by: Rusty Russell Signed-off-by: Linus Torvalds [PATCH] iptables revision getsockopt This adds a new getsockopt to iptables, which allows userspace to query the revision number of extensions. iptables 1.3.0 (to be released soon) already has support for this. Signed-off-by: Rusty Russell Signed-off-by: Linus Torvalds [PATCH] Add bitops to ipt_MARK without breaking compatbility Anders Fugmann wrote a patch to add bitops to ipt_MARK. I made a version based on the revision patch. Bart De Schuymer provided the idea of overriding the target type. Signed-off-by: Rusty Russell Signed-off-by: Linus Torvalds [PATCH] Multiport revision with port ranges (replaces "mport") The multiport match doesn't support ranges of ports, so a new match called "mport" was written. Now we have versioning of matches and targets, we can simply put this extension in multiport revision 1. Also, removes gratuitous checking in match: we basically trust iptables userspace these days. Signed-off-by: Pablo Neira Ayuso Signed-off-by: Rusty Russell (modified) Signed-off-by: Linus Torvalds [PATCH] Conntrack Hash Allocation using __get_free_pages Here is a patch that just makes it use get_free_pages to test the TLB theory. Another obvious improvement would be to not use list_heads for the hash table buckets - a single pointer would likely suffice and it would cut the hash table in half, saving cache, TLB and memory. Signed-off-by: Linus Torvalds [PATCH] Fix for UDP and TCP NAT on nonlinear skbs UDP and TCP refer to potentially stale pointers after calling skb_ip_make_writable(), and UDP calls it with the wrong len argument. All found by nfsim. Signed-off-by: Rusty Russell Signed-off-by: Linus Torvalds [PATCH] Fix for NAT core on nonlinear skbs The nat core calls skb_ip_make_writable() with a length too short. Found by nfsim. Signed-off-by: Rusty Russell Signed-off-by: Linus Torvalds [PATCH] ftp nonlinear packet fix FTP connection tracking assumes it can just dereference tcphdr; not neccessarily true now we don't linearize in ftp conntrack helper or tcp connection tracking. Also found by nfsim. Signed-off-by: Rusty Russell Signed-off-by: Linus Torvalds [PATCH] More ECN Fixes: make writable before writing Patrick McHardy spotted this, on top of previous fix. I neatened it. Signed-off-by: Rusty Russell Signed-off-by: Linus Torvalds [PATCH] s390: fix pgd_index() compile warnings the patch below fixes a few compile warnings due to missing parenthesizes. Signed-off-by: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix arch/x86_64/ia32/syscall32.c misdeclared pud variable pud needs to be declared as a pud_t in order to avoid an assignment from incompatible pointer type warning or two; this patch makes it so. Signed-off-by: William Irwin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix double sync_page_range() in generic_file_aio_write() generic_file_aio_write(): generic_file_aio_write_nolock(): if (SYNC) sync_page_range_nolock(); if (SYNC) sync_page_range(); I think that generic_file_aio_write() should use __generic_file_aio_write_nolock() instead. Signed-off-by: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] properly split capset_check+capset_set The attached patch removes checks from kernel/capability.c which are redundant with cap_capset_check() code, and moves the capset_check() calls to immediately before the capset_set() calls. This allows capset_check() to accurately check the setter's permission to set caps on the target. Please apply. Signed-off-by: Serge Hallyn Signed-off-by: Chris Wright Signed-off-by: Stephen Smalley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] capset returns -EPERM when pid==current->pid In the current kernel/capability.c:sys_capset() code, permission is denied if CAP_SETPCAP is not held and pid is positive. pid=0 means use the current process, and this is allowed. But using the current process' pid is not allowed. The man page for capsetp simply says that CAP_SETPCAP is required to use this function, and does not mention the exception for pid=0. The current behavior seems inconsistent. The attached patch also allows a process to call capset() on itself. Signed-off-by: Chris Wright Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: limit xmon dump length A number of people (myself included) have pasted bad input into xmon that it parsed as a request to dump gigabytes of memory. Place a limit of 128kB on the dump commands. Also remove a stale function prototype thats been lying around. Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: catch bad xmon read/write SPR commands Protect the read/write SPR xmon commands. Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: Clarify rtasd printk On machines with RTAS but without event-scan support we would incorrectly claim there was no RTAS on the system. Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: fix some compiler warnings Fix some compiler warnings: - The first two are spurious gcc warnings, but quieten them up regardless - Add a missing include - Use register_sysrq_key instead of __sysrq_put_key_op Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: remove stale prom.h code Remove some stale code in prom.h Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: simplify timer_interrupt This patch is from Milton Miller . When the update_process_times call was moved out of do_timer for the UP case, the replicator didn't track down the hiding and just added ifndef SMP. This removes the ifdefs and the indirection of calling another file for one function in a third file. Signed-off-by: Milton Miller Signed-off-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: consolidate cache sizing variables This patch consolidates the variables that define the PPC64 cache sizes into a single structure (the were in the naca and the systemcfg structures). Those that were in the systemcfg structure are left there just because they are exported to user mode through /proc. Signed-off-by: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: remove the page table size from the naca This patch just removes the page table size field from the naca (and makes it ppc64_pft_size instead). Signed-off-by: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: remove interrupt_controller from naca This patch just moves the interrupt_controller field of the naca into a global variable. Signed-off-by: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: remove /proc/ppc64/{naca,paca/xx} This patch removes the (unused) /proc entries for the naca and the (per cpu) pacas. Also it removes a lot of no longer necessary includes of . Signed-off-by: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: remove the paca pointer form the naca The only place that was using the paca pointer that was in the naca was some assembler that used it to find a parameter to pass to some C code. That C code did not even declare that parameter! Remove the paca pointer. Signed-off-by: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: remove serialPortAddr from the naca The serialPortAddr field of the naca was only being used locally, remove it. Signed-off-by: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: remove debug_switch from the naca The patch moves the debug_switch from the naca to a global variable. Also, a couple of trivial naming tidy ups. Signed-off-by: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: remove the naca from all but iSeries This patch finally removes the naca from all architectures except legacy iSeries and in the process makes it a structure instead of a pointer. Signed-off-by: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: use xPMCRegsInUse This fixes an aweful piece of code that could have just referenced xPMCRegsInUse in the lppaca structure. Signed-off-by: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: move the lppaca defining header file This patch just renames asm/iSeries/ItLpPaca.h to asm/lppaca.h as the lppaca structure is no longer just legacy iSeries specific. Signed-off-by: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: remove StudlyCaps from lppaca structure This patch just renames all the fields (and the structure name) of the lppaca structure to rid us of some more StudyCaps. Signed-off-by: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: use c99 initializers This patch is just more clean up in the ppc64 arch. It uses c99 initializers for various iSeries structures that are used to pass information to the hypervisor. Also itLpNaca is not used by any code that could be in a module, so don't export it. Built and booted. Signed-off-by: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: tidy up the htab_data structure More tidying up. The htab_data structure contained 5 fields or which two were completely unused and one other was just kept for printing at boot time. I have mode the remaining two into global variables. Built and booted on iSeries (which is always lpar) and on pSeries without partitioning. Signed-off-by: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] out-of-line implementation of find_next_bit() The attached patch provides an out-of-line implementation of find_next_bit() and rearranges linux/bitops.h to avoid a dependency loop between inline functions in there and in asm/bitops.h trying to include one another. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] GP-REL data support The attached patch makes it possible to support gp-rel addressing for small variables. Since the FR-V cpu's have fixed-length instructions and plenty of general-purpose registers, one register is nominated as a base for the small data area. This makes it possible to use single-insn accesses to access global and static variables instead of having to use multiple instructions. This, however, causes problems with small variables used to pinpoint the beginning and end of sections. The compiler assumes it can use gp-rel addressing for these, but the linker then complains because the displacement is out of range. By declaring certain variables as arrays or by forcing them into named sections, the compiler is persuaded to access them as if they can be outside the displacement range. Declaring the variables as "const void" type also works. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] frv: add initdata variable spec in a header file The attached patch marks a variable as __initdata in a header file so that the FRV gcc generates the correct access method as initdata variables are too far from the GPREL pointer to access directly. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] VM routine fixes The attached patch fixes a number of problems in the VM routines: (1) Some inline funcs don't compile if CONFIG_MMU is not set. (2) swapper_pml4 needn't exist if CONFIG_MMU is not set. (3) __free_pages_ok() doesn't counter set_page_refs() different behaviour if CONFIG_MMU is not set. (4) swsusp.c invokes TLB flushing functions without including the header file that declares them. CONFIG_SHMEM semantics: - If MMU: Always enabled if !EMBEDDED - If MMU && EMBEDDED: configurable - If !MMU: disabled Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: Fujitsu FR-V CPU arch maintainer record The attached patch supplies the maintainer record for an architecture implementation for the Fujistu FR-V CPU series. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: Fujitsu FR-V arch documentation The attached patch provides the arch-specific documentation for the Fujitsu FR-V CPU arch. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: Fujitsu FR-V CPU arch implementation part 1 The attached patches provides part 1 of an architecture implementation for the Fujitsu FR-V CPU series, configurably as Linux or uClinux. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: Fujitsu FR-V CPU arch implementation part 2 The attached patches provides part 2 of an architecture implementation for the Fujitsu FR-V CPU series, configurably as Linux or uClinux. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: Fujitsu FR-V CPU arch implementation part 3 The attached patches provides part 3 of an architecture implementation for the Fujitsu FR-V CPU series, configurably as Linux or uClinux. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: Fujitsu FR-V CPU arch implementation part 4 The attached patches provides part 4 of an architecture implementation for the Fujitsu FR-V CPU series, configurably as Linux or uClinux. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: Fujitsu FR-V CPU arch implementation part 5 The attached patches provides part 5 of an architecture implementation for the Fujitsu FR-V CPU series, configurably as Linux or uClinux. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: Fujitsu FR-V CPU arch implementation part 6 The attached patches provides part 6 of an architecture implementation for the Fujitsu FR-V CPU series, configurably as Linux or uClinux. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: Fujitsu FR-V CPU arch implementation part 7 The attached patches provides part 7 of an architecture implementation for the Fujitsu FR-V CPU series, configurably as Linux or uClinux. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: Fujitsu FR-V CPU arch implementation part 8 The attached patches provides part 8 of an architecture implementation for the Fujitsu FR-V CPU series, configurably as Linux or uClinux. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: Fujitsu FR-V CPU arch implementation part 9 The attached patches provides part 9 of an architecture implementation for the Fujitsu FR-V CPU series, configurably as Linux or uClinux. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Put memory in DMA zone not Normal zone in FRV arch The attached patch makes the FR-V arch put all its memory in the DMA zone rather than the Normal zone since all the memory is available as a DMA target. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] kill off highmem_start_page People love to do comparisons with highmem_start_page. However, where CONFIG_HIGHMEM=y and there is no actual highmem, there's no real page at *highmem_start_page. That's usually not a problem, but CONFIG_NONLINEAR is a bit more strict and catches the bogus address tranlations. There are about a gillion different ways to find out of a 'struct page' is highmem or not. Why not just check page_flags? Just use PageHighMem() wherever there used to be a highmem_start_page comparison. Then, kill off highmem_start_page. This removes more code than it adds, and gets rid of some nasty #ifdefs in .c files. Signed-off-by: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: First batch of Fujitsu FR-V arch include files The attached patch provides the first 100KB or so of the arch-specific include files for the Fujitsu FR-V CPU arch. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] frv: emove obsolete hardirq stuff from includes The attached patch removes irq_enter() and friends from asm-frv/hardirq.h as they are now mandatorily defined in linux/hardirq.h. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] frv: PCI DMA fixes The attached patch makes cache flushing work correctly on DMA consistent memory for the frv arch. On the FRV unmapped memory can't be flushed directly, but has to be kmapped first since the flush instructions take virtual pointers not physical ones. It also splits the MMU and !MMU versions into separate files. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] frv: Fix PCI config space write The attached patch makes byte and word writes to PCI config space work. The problem was that the pointer to the appropriate chunk of the config port needs to be juggled to allow for the fact that FRV is big endian in this case. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: More Fujitsu FR-V arch include files The attached patch provides the second 100KB or so of the arch-specific include files for the Fujitsu FR-V CPU arch. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] convert FRV to use remap_pfn_range This patch converts FRV to use remap_pfn_range() in its io_remap_page_range() function. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: Yet more Fujitsu FR-V arch include files The attached patch provides the third 100KB or so of the arch-specific include files for the Fujitsu FR-V CPU arch. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: Remaining Fujitsu FR-V arch include files The attached patch provides the remaining arch-specific include files for the Fujitsu FR-V CPU arch. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: Make calibrate_delay() optional The attached patch makes calibrate_delay() optional. In this architecture, it's a waste of time since we can predict exactly what it's going to come up with just by looking at the CPU's hardware clock registers. Thus far, we haven't seen a board with any clock not dependent on the CPU's clock. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: Better mmap support in uClinux The attached patch changes mm/nommu.c to better support mmap() when MMU support is disabled (as it is in uClinux). This was discussed on the uclibc mailing list in a thread revolving around the following message: Date: Thu, 1 Apr 2004 12:05:50 +1000 From: David McCullough To: David Howells Cc: Alexandre Oliva , uclibc@uclibc.org Subject: Re: [uClibc] mmaps for malloc should be private Message-ID: <20040401020550.GG3150@beast> The revised rules are: (1) Anonymous mappings can be shared or private, read or write. (2) Chardevs can be mapped shared, provided they supply a get_unmapped_area() file operation and use that to set the address of the mapping (as a frame buffer driver might do, for instance). (3) Files (and blockdevs) cannot be mapped shared since it is not really possible to honour this by writing any changes back to the backing device. (4) Files (or sections thereof) can be mapped read-only private, in which case the mapped bit will be read into memory and shared, and its address will be returned. Any excess beyond EOF will be cleared. (5) Files (or sections thereof) can be mapped writable private, in which case a private copy of the mapped bit will be read into a new bit memory, and its address will be returned. Any excess beyond EOF will be cleared. Mappings are per MM structure still. You can only unmap what you've mapped. Fork semantics are irrelevant, since there's no fork. A global list of VMA's is maintained to keep track of the bits of memory currently mapped on the system. The new binfmt makes use of (4) to implement shared libraries. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: procfs changes for nommu changes The attached patch splits some memory-related procfs files into MMU and !MMU versions and places them in separate conditionally-compiled files. A header file local to the fs/proc/ directory is used to declare functions and the like. Additionally, a !MMU-only proc file (/proc/maps) is provided so that master VMA list in a uClinux kernel is viewable. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: change setup_arg_pages() to take stack pointer The attached patch changes setup_arg_pages() to take the proposed initial stack top for the new executable image. This makes it easier for the binfmt to place the stack at a non-fixed location, such as happens in !MMU configurations. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix usage of setup_arg_pages() in IA64, MIPS, S390 and Sparc64 The attached patch fixes the usage of setup_arg_pages() in the IA64, MIPS, S390 and Sparc64 arches. This function now takes an extra parameter: the initial top of stack. This is useful in uClinux when there's no fixed location to which the stack pointer can be initialised. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: Add FDPIC ELF binary format driver The attached patch adds a new binary format driver that allows a special variety of ELF to be used that permits the dynamic sections that comprise an executable, its dynamic loader and its shared libaries and its stack and data to be located anywhere within the address space. This is used to provide shared libraries and shared executables (at least, as far as the read-only dynamic sections go) on uClinux. Not only that, but the same binaries can be run on MMU linux without a problem. This is achieved by: (1) Passing loadmaps to the dynamic loader (or to a statically linked executable) to indicate the whereabouts of the various dynamic sections. (2) Using a GOT inside the program. (3) Passing setup_arg_pages() the stack pointer to be. (4) Allowing the arch greated control over how an executable is laid out in memory in MMU Linux. (5) Rewriting mm/nommu.c to support MAP_PRIVATE on files, thus allowing _mmap_ to handle sharing of private-readonly mappings. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix some ELF-FDPIC binfmt problems The attached patch fixes the following problems in the ELF-FDPIC binfmt driver: (1) elf_fdpic_map_file() should be passed an mm_struct pointer, not NULL. (2) do_mmap() should be called with the mmap_sem held. (3) mm_struct::end_brk doesn't exist in 2.6 (debugging only). (4) Avoid debugging warnings by casting certain values to unsigned long before printing them. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Further nommu changes The attached patch further changes the nommu stuff previously changed. These new changes do the following: (0) Some additional variables have been defined to make nommu even compile. (1) Get rid of the alternate vm_area_struct. The nommu mmap now uses the normal one. There's a refcount field added to the normal one, contingent on !CONFIG_MMU. (2) vm_rb is now used to keep track of the VMAs in an rbtree rather than adding a separate list. (3) mm_tblock_struct is now vm_list_struct. (4) put_vma() now calls vma->vm_ops->close() if available on nommu. (5) A dummy generic_file_vm_ops has been provided. It does nothing, but permits tiny-shmem to compile. tiny-shmem and ramfs still need attention, such that files contained therein can be mmapped shared-writably to some extent on nommu. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Further nommu /proc changes The attached patch changes the nommu procfs routines to match the nommu changes in patch 1/1. This is an exercise in structure renaming and handling the fact that the list of VMAs in the system is now held together by vma->vm_rb. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] frv: nommu changes The attached patch changes the nommu bits of the FRV arch to incorporate the name changes made to the nommu core stuff. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Make more syscalls available for the FR-V arch The attached patch makes more syscalls available for the FR-V arch. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: debugging fixes The attached patch fixes three debugging problems in the frv arch: (1) Single-stepping in userspace steps through into the kernel-mode interrupt handler when a hardware interrupt happens, and sometimes it gets past where the debug-mode handler would normally catch it. This patch extends the range of detected PC values. (2) When setting up the kernel-mode exception frame from the debug-mode handler for a userspace debugging event, we weren't setting the LR register to generate a return to the exception handler epilogue. (3) sys_ptrace() now needs to "put" the inferior task_struct not "free" it as was done in 2.4. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] frv: Minix & ext2 bitops fixes The attached patch does two things: (1) Implements the ext2/ext3 bitops in terms of the main bitops functions. (2) Changes the Minix bitops to use the ext2 bitops (LE) rather than the main bitops (BE). Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] frv: perfctr_info syscall The attached patch gets rid of the perfctr_info syscall from the FRV arch now that its implementation has gone and it has been removed from the i386 arch and the i386 syscalls have been renumbered. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] frv: update the trap tables comment The attached patch updates the FRV trap tables comment to make it more appropriate. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] frv: accidental TLB entry write-protect fix The attached patch stops the FRV kernel-instruction-TLB-miss handler from setting the write-protect bit on a mapping entry when punting an entry from the mapping fast cache registers (DAMR1/IAMR1) to the TLB. This patch derives the WP value from the DAMPR1 register (which actually has a WP bit) rather than the IAMPR1 register (which does not). Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: pagetable handling fixes The attached patch makes the following fixes to the frv arch: (1) pte_offset() should no longer be around; the fault handler should use pte_offset_kernel() instead when fixing up vmalloc misses. (2) The PGEs/PMEs do not hold PTEs. They have greater address resolution and fewer control bits. (3) The data access error pattern in ESR15.EC should be 10000 not 10100. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: FR55x CPU support fixes The attached patch fixes the following issues with support for the FR55x CPUs: (1) The FR555 has a 64-byte cacheline size; everything else that we've come across has a 32-byte cacheline size. (2) Fix machine_restart() for FR55x. (3) Fix frv_cpu_suspend() for FR55x. Signed-Off-By: David Howells Signed-off-by: Mark Salter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: Change PML4 -> PUD The attached patch changes the PML4 bits of the FRV arch to the new PUD way. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Implement nommu find_vma() The attached patch implements a nommu version of find_vma(). Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix nommu MAP_SHARED handling The attached patch does the following things: (1) It uniquifies permitted overlapping VMAs (eg: MAP_SHARED on chardevs) in nommu_vma_tree. Identical entries break the assumptions on which rbtrees work. Since we don't need to share VMAs in this case, we uniquify such VMAs by using the pointer to the VMA. They're only kept in the tree for /proc/maps visibility. (2) Extracts VMA unlinking into its own function so that the source is adjacent to the VMA linking function. (3) No longer releases memory belonging to a shared chardev or file (the underlying driver is expected to provide mappable memory). (4) Frees the file attached to a VMA whether or not that VMA is shared or is a memory-mapped I/O mapping. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Permit nommu MAP_SHARED of memory backed files The attached patch applies some further fixes and extensions to the nommu mmap implementation: (1) /proc/maps distinguishes shareable private mappings and real shared mappings by marking the former with 's' and the latter with 'S'. (2) Rearrange and optimise the checking portion of do_mmap_pgoff() to make it easier to follow. (3) Only set VM_SHARED on MAP_SHARED mappings. Its presence indicates that the backing memory is supplied by the underlying file or chardev. VM_MAYSHARE indicates that a VMA may be shared if it's a private VMA. The memory for a private VMA is allocated by do_mmap_pgoff() from a kmalloc slab and then the file contents are read into it before returning. (4) Permit MAP_SHARED + PROT_WRITE on memory-backed files[*] and chardevs to indicate a contiguous area of memory when its get_unmapped_area() is called if the backing fs/chardev is willing. [*] file->f_mapping->backing_dev_info->memory_backed == 1 (5) Require chardevs and files that support to provide a get_unmapped_area() file operation. (6) Made sure a private mapping of /dev/zero is possible. Shared mappings of /dev/zero are not currently supported because this'd need greater interaction of mmap with the chardev driver than is currently supported. (7) Add in some extra checks from mm/mmap.c: security, file having write access for a writable shared mapping, file not being in append mode. (8) Only account the mapping memory if it's allocated here; memory belonging to a shared chardev or file is not accounted. With this patch it should be possible to map contiguous flash files directly out of ROM simply by providing get_unmapped_area() for a read-only/shared mapping. I think that it might be worth splitting do_mmap_pgoff() up into smaller subfunctions: one to handle the checking, one to handle shared mappings and one to handle private mappings. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Cross-reference nommu VMAs with mappings The attached patch includes prio-tree support and adds cross-referencing of VMAs with address spaces back in, as is done under normal MMU Linux. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] enhanced I/O accounting data patch This patch is to offer common accounting data collection method at I/O for various accounting packages including BSD accounting, ELSA, CSA and any other acct packages that use a common layer of data collection. Patch is made to fs/read_write.c to collect per process data on character read/written in bytes and number of read/write syscalls made. New struct fields are added to task_struct to store the data. These data are collected on per process basis. Signed-off-by: Jay Lan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] enhanced Memory accounting data collection This patch is to offer common accounting data collection method at memory usage for various accounting packages including BSD accounting, ELSA, CSA and any other acct packages that use a common layer of data collection. New struct fields are added to mm_struct to save high watermarks of rss usage as well as virtual memory usage. New struct fields are added to task_struct to collect accumulated rss usage and vm usages. These data are collected on per process basis. Signed-off-by: Jay Lan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] 4/4GB: Incorrect bound check in do_getname() This patch fixes incorrect address range check in do_getname(). Theoretically this can lead to do_getname() failure on kernel address space string on the TASK_SIZE boundary addresses when 4GB split is ON. (akpm: I don't see why this check exists at all, actually. afaict the only effect of removing it is that we'll then generate -EFAULT on a non-null-terminated pathname which ends exactly at TASK_SIZE). Signed-Off-By: Kirill Korotaev Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] handle quoted module parameters Fix module parameter quote handling. Module parameter strings (with spaces) are quoted like so: "modprm=this test" and not like this: modprm="this test" Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] move irq_enter and irq_exit to common code This code is the same for all architectures with the following invariants: - arm gurantees irqs are disabled when calling irq_exit so it can call __do_softirq directly instead of do_softirq - arm26 is totally broken for about half a year, I didn't care for it - some architectures use softirq_pending(smp_processor_id()) instead of local_softirq_pending, but they always evaluate to the same This patch moves the out of line irq_exit implementation from kernel/irq/handle.c which depends on CONFIG_GENERIC_HARDIRQS to kernel/softirq.c which is always compiled, tweaks it for the arm special case and moves the irq_enter/irq_exit/nmi_enter/nmi_exit bits from asm-*/hardirq.h to linux/hardirq.h Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] remove unused irq_cpustat fields The only common field in irq_cpustat is __softirq_pending, i386 and ppc have some of their own. Remove all unused obsolete fields from various architectures. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Hold BKL for shorter period in generic_shutdown_super(). Testing revealed long pauses of the entire system while autofs initiated umounts as a result of timing out the mounts. It was noticed that during a umount, the BKL is held while scanning the inode_list and removing and inodes that are candidates. This patch moves locking until after the first pass had gone through the inode_list. Testing revelead that on an ia64 machine with a filesystem that had 8.4 Million inodes, there were no observable pauses during the umount. This was down from over 4 seconds without this patch. Signed-Off-By: Robin Holt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Cleanups for the IPMI driver This patch removes some unneeded cruft that Adrian found, and also turns off the shutdown of the timer when removing the module. Since the timer is shutdown when the driver is closed (unless no way out is specified) this is unnecessary and defeats the no way out option. - remove some completely unused code - make some needlessly global code static - removal of some EXPORT_SYMBOL'ed code with zero users. - Removal of the timer shutdown on module removal Signed-off-by: Adrian Bunk Signed-off-by: Corey Minyard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] kill blk.h All blk.h users were converted in 2.5, and at the same time blk.h began giving a warning. The patch below removes this obsolete file. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext3: cleanup handling of aborted transactions. This patch improves ext3's error logging when we encounter an on-disk corruption. Previously, a transaction (such as a truncate) which encountered many corruptions (eg. a single highly-corrupt indirect block) would emit copious "aborting transaction" errors to the log. Even worse, encountering an aborted journal can count as such an error, leading to a flood of spurious "aborting transaction: Journal has aborted" errors. With the fix, only emit that message on the first error. The patch also restores a missing \n in that printk path. Signed-off-by: Stephen Tweedie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext3: handle attempted delete of bitmap blocks. This patch improves ext3's ability to deal with corruption on-disk. If we ever get a corrupt inode or indirect block, then an attempt to delete it can end up trying to remove any block on the fs, including bitmap blocks. This can cause ext3 to assert-fail as we end up trying to do an ext3_forget on a buffer with b_committed_data set. The fix is to downgrade this to an IO error and journal abort, so that we take the filesystem readonly but don't bring down the whole kernel. Make J_EXPECT_JH() return a value so it can be easily tested and yet still retained as an assert failure if we build ext3 with full internal debugging enabled. Make journal_forget() return an error code so that in this case the error can be passed up to the caller. This is easily reproduced with a sample ext3 fs image containing an inode whose direct and indirect blocks refer to a block bitmap block. Allocating new blocks and then deleting that inode will BUG() with: Assertion failure in journal_forget() at fs/jbd/transaction.c:1228: "!jh->b_committed_data" With the fix, ext3 recovers gracefully. Signed-off-by: Stephen Tweedie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext3: handle attempted double-delete of metadata. This patch improves ext3's ability to deal with corruption on-disk. If we try to delete a metadata block twice, we confuse ext3's internal revoke error-checking, resulting in a BUG(). But this can occur in practice due to a corrupt indirect block, so we should attempt to fail gracefully. Downgrade the assert failure to a JH_EXPECT_BH failure, and return EIO when it occurs. This is easily reproduced with a sample ext3 fs image containing an inode which references the same indirect block more than once. Deleting that inode will BUG() an unfixed kernel with: Assertion failure in journal_revoke() at fs/jbd/revoke.c:379: "!buffer_revoked(bh)" With the fix, ext3 recovers gracefully. Signed-off-by: Stephen Tweedie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] cpumask_t initializers In the course of another patch I've been working on, I stumbled across some weirdness with some of the SD_*_INIT sched_domains initializers. A day or so of digging narrowed it down to the CPU_MASK_NONE initializer nested inside the sched_domain initializers. The errors I got were: kernel/sched.c:4812: error: initializer element is not constant kernel/sched.c:4812: error: (near initialization for `sched_domain_dummy') kernel/sched.c:4812: error: initializer element is not constant which was this line: static struct sched_domain sched_domain_dummy = SD_CPU_INIT; Janis Johnson, a GCC hacker, told me the following: [PATCH] time runx too fast after S3 After resume from S3, 'date' shows time run too fast. Signed-off-by: Li Shaohua Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fork: total_forks not counted under tasklist_lock Bring the total_forks under tasklist_lock. When most of the fork code icluding nr_threads is moved to copy_process() from do_fork() code in 2.6, this is left out. Althought accuracy of total_forks is not important, it would be nice to add this. It does not involve additional cost, and the code will be cleaner if it is grouped with nr_threads. The difference is, total_forks will increase on fork, but nr_threads will increase on fork and decrease on the exit. I also moved extern decleration to sched.h from proc_misc.c. Signed-off-by: Prasanna Meda Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] suppress might_sleep() if oopsing We can call might_sleep() functions on the oops handling path (under do_exit). There seem little point in emitting spurious might_sleep() warnings into the logs after the kernel has oopsed. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Reduce i_sem usage during file sync operations We hold i_sem during the various sync() operations to prevent livelocks: if another thread is dirtying the file, a sync() may never return. Or at least, that used to be true when we were using the per-address_space page lists. Since writeback has used radix tree traversal it is not possible to livelock the sync() operations, because they only visit each page a single time. sync_page_range() (used by O_SYNC writes) has not been holding i_sem for quite some time, for the above reasons. The patch converts fsync(), fdatasync() and msync() to also not hold i_sem during the radix-tree-based writeback. Now, we _do_ still need to hold i_sem across the file->f_op->fsync() call, because that is still based on a list_head walk, and is still livelockable. But in the case of msync() I deliberately left i_sem untaken. This is because we're currently deadlockable in msync, because mmap_sem is already held, and mmap_sem nexts inside i_sem, due to direct-io.c. And yes, the ranking of down_read() veruss down() does matter: Task A Task B Task C down_read(rwsem) down(sem) down_write(rwsem) down(sem) down_read(rwsem) C's down_write() will cause B's down_read to block. B holds `sem', so A will never release `rwsem'. So the patch fixes a hard-to-hit triple-task deadlock, but adds a possible livelock in msync(). It is possible to fix sys_msync() so that it takes i_sem outside i_mmap_sem. Later. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext3: support for EA in inode 1) intent of the patch is to get possibility to store EAs in the body of large inode. it saves space and improves performance in some cases 2) the patch is quite simple: it works the same way original xattr does, but using other storage (inode body). body has priority over separate block. original routines (ext3_xattr_get, ext3_xattr_list, ext3_xattr_set) are renamed to ext3_xattr_block_*. new routines that handle inode storate are added (ext3_xattr_ibody_get, ext3_xattr_ibody_list, ext3_xattr_ibody_set). routines ext3_xattr_get, ext3_xattr_list and ext3_xattr_set allow user to accesss both the storages transparently 3) the change makes sense on filesystem with inode size >= 256 bytes only. 2.4 kernels don't support such a filesystems, AFAIK. 2.6 kernels do support and ignore EAs stored in a body w/o the patch 4) debugfs and e2fsck need to be patched to deal with EAs in inode the patch will be sent later 5) testing results: a) Andrew Samba Master (tridge) has done successful tests b) we've been using ea-in-inode feature in Lustre for many months Signed-off-by: Andreas Dilger Signed-off-by: Alex Tomas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Off by one in drivers/parport/probe.c This fixes a theoretical bug indicated in: http://bugme.osdl.org/show_bug.cgi?id=240 It prevents overflow in case the required buffer is larger than the passed buffer. This I found to be the minimally intrusive change. Signed-off-by: Alexander Nyberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] compile with -ffreestanding For the kernel, it would be logical to use -ffreestanding. The kernel is not a hosted environment with a standard C library. The gcc option -ffreestanding is supported by both gcc 2.95 and 3.4, which covers the whole range of currently supported compilers. Regarding changes caused by this patch: Andi Kleen reported: Newer gcc rewrites sprintf(buf,"%s",str) to strcpy(buf,str) transparently. This is only true with unit-at-a-time (disabled on i386 but enabled on x86_64). The Linux kernel doesn't offer a standard C library, and such transparent replacements of kernel functions with builtins are quite fragile. Even with -ffreestanding, it's still possilble to explicitely use a gcc builtin if desired. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sys_stime needs a compat function I realized that the best way to get the sys_time/sys_stime problem fixed is to make sys_time 64 bit safe by using "time_t *" instead of "int *" and to introduce two proper compat functions compat_sys_time and compat_sys_stime. The prototype change of sys_time is transparent for 32 bit architectures because both "int" and "time_t" are 32 bit. For 64 bit the type change would be wrong but luckily no 64 bit architecture uses sys_time/sys_stime in 64 bit mode. The patch makes the following change: ia64 : Remove sys32_time, use compat_sys_time and add (!!) compat_sys_stime to compat syscall table. mips : Use compat_sys_time/compat_sys_stime in 32 bit syscall table. Add #ifdef magic to compile sys_time/sys_stime and compat_sys_time/compat_sys_stime only if needed. parisc : Remove sys32_time, use compat_sys_time and compat_sys_stime. ppc64 : remove sys32_time, ppc64_sys32_stime and ppc64_sys_stime. Use common compat_sys_time, compat_sys_stime and sys_stime. s390 : Use compat_sys_stime. Add #ifdef magic to compile sys_time/sys_stime and compat_sys_time/compat_sys_stime only if needed. sparc64 : Use compat_sys_time/compat_Sys_stime in 32 bit syscall table. um : Remove um_time and um_stime. Use common functions sys_time and sys_stime. This adds a CAP_SYS_TIME check to UMs stime call. x86_64 : Remove sys32_time. Use compat_sys_time and compat_sys_stime in 32 bit syscall table. The original stime bug is fixed for mips, parisc, s390, sparc64 and x86_64. Can the arch-maintainers please take a look at this? From: Martin Schwidefsky Convert compat_time_t to time_t in 32 bit emulation for sys_stime and consolidate all the different implementation of sys_time, sys_stime and their 32-bit emulation parts. Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Sync in core time granuality with filesystems This patch corrects a problem that was originally added with the nanosecond timestamps in stat patch. The problem is that some file systems don't have enough space in their on disk inode to save nanosecond timestamps, so they truncate the c/a/mtime to seconds when flushing an dirty node. In core the inode would have full jiffies granuality. This can be observed by programs as a timestamp that jumps backwards under specific loads when an inode is flushed and then reloaded from disk. The problem was already known when the original patch went in, but it wasn't deemed important enough at that time. So far there has been only one report of it causing problems. Now Tridge is worried that it will break running Excel over samba4 because Excel seems to do very anal timestamp checking and samba4 will supply 100ns timestamps over the network. This patch solves it by putting the time resolution into the superblock of a fs and always rounding the in core timestamps to that granuality. This also supercedes some previous ext2/3 hacks to flush the inode less often when only the subsecond timestamp changes. I tried to keep the overhead low, in particular it tries to keep divisions out of fast paths as far as possible. The patch is quite big but 99% of it is just relatively straight forward search'n'replace in a lot of fs. Unconverted filesystems will default to a 1ns granuality, but may still show the problem if they continue to use CURRENT_TIME. I converted all in tree fs. One possible future extension of this would be to have two time granualities per superblock - one that specifies the visible resolution, and the other to specify how often timestamps should be flushed to disk, which could be tuned with a mount option per fs (e.g. often m/atimes don't need to be flushed every second). Would be easy to do as an addon if someone is interested. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] remove ip2 programs drivers/char/ip2/ contained three programs. Besides shipping programs at this place doesn't sound like a good idea, they didn't even all compile. The patch below removes them. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] rcu: eliminate rcu_ctrlblk.lock rcu_ctrlblk.lock is used to read the ->cur and ->next_pending atomically in __rcu_process_callbacks(). It can be replaced by a couple of memory barriers. rcu_start_batch: rcp->next_pending = 0; smp_wmb(); rcp->cur++; __rcu_process_callbacks: rdp->batch = rcp->cur + 1; smp_rmb(); if (!rcp->next_pending) rcu_start_batch(rcp, rsp, 1); This way, if __rcu_process_callbacks() sees incremented ->cur value, it must also see that ->next_pending == 0 (or rcu_start_batch() is already in progress on another cpu). Signed-off-by: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] rcu: make two internal structs static The patch below makes two needlessly global structs static. Signed-off-by: Adrian Bunk Signed-off-by: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] rcu: simplify quiescent state detection Based on an initial patch from Oleg Nesterov rcu_data.last_qsctr is not needed. Actually, not even a counter is needed, just a flag that indicates that there was a quiescent state. Signed-Off-By: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] smb_file_open() retval fix Correctly propagate the return value from smb_open(). Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sys_sched_setaffinity() on UP should fail for non-zero CPUs. Return EINVAL for invalid sched_setaffinity on UP. I was a little surprised that sys_sched_setaffinity for CPU 1 didn't fail on my UP box. With CONFIG_SMP it would have. Signed-off-by: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] make gconfig work with gtk-2.4 I need this to make gconfig work under gtk-2.4. Without this, it just coredumps. There is some problem with pixmap creation/usage from XPM in the way it is done in gconf, so I just added some stock icons. It is even prettier..;) Could someone test this still works on gtk-2.0 or 2.2 ? Changes: - change the wiget class 'button' in glade files to something known to glade (GtkToolButton) - use 'stock-id' property for toolbar buttons instead of "stock_pixmap" - change unknown signal "pressed" to "clicked" - remove manual setting of icons in gconf.c Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] EDD: add edd=off and edd=skipmbr options EDD: add edd=off and edd=skipmbr command line options New command line options edd=off (or edd=of) edd=skipmbr (or edd=sk) runtime options for disabling all EDD int13 calls completely, or for skipping the int13 READ SECTOR calls, respectively. These are provided to allow Linux distributions to include CONFIG_EDD=m, yet allow end-users to disable parts of EDD which may not work well with their system's BIOS. I incorporated comments from Randy Dunlap, and got an ack from Andi Kleen. Signed-off-by: Matt Domsch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] panic_timeout: move to kernel.h Move 'panic_timeout' to linux/kernel.h. ipmi_watchdog.c wanted to know why panic_timeout isn't in some header file. However, ipmi_watchdog.c doesn't even use it, so that reference was deleted. Other references now use kernel.h instead of straight extern int. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Add PR_GET_NAME A while back we added the PR_SET_NAME prctl, but no PR_GET_NAME. I guess we should add this, if only to enable testing of PR_SET_NAME. Signed-off-by: Prasanna Meda Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix alt-sysrq deadlock __handle_sysrq was modified to do a spin_lock_irqsave so we were entering smp_send_stop with interrupts. So reenable interrupts to prevent the possible smp_call_function() deadlock. (It's still deadlocky if the sysrq handler is against called via an interrupt from a different device, but that seems unlikely). Signed-off-by: Zwane Mwaikambo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] cpumask: range check before using value When setting the 'cpu_isolated_map' mask, check that the user input value is valid (in range 0 .. NR_CPUS - 1). Also fix up kernel-parameters.txt for this parameter. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] noop iosched: make code static This patch makes code static in drivers/block/noop-iosched.c and adds __init and __exit for module initialization and cleanup functions. Signed-off-by: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] noop iosched: remove unused includes This patch removes unused includes from drivers/block/noop-iosched.c. Signed-off-by: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] loop device resursion avoidance With Andries Brouwer Fix various recursion scenarios wherein it was possible to mount a loop device on itself, either directly or via intermediate loops devices. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] noone uses HAVE_ARCH_SI_CODES or HAVE_ARCH_SIGEVENT_T Since asm-generic/siginfo.h was created, the architectures have been slowly fixed/modified until noone uses HAVE_ARCH_SI_CODES or HAVE_ARCH_SIGEVENT_T any more, so this patch removes the checks for them. Signed-off-by: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] get_blkdev_list() cleanup - Move prototype to genhd.h - It is only needed for /proc Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Ext[23]: apply umask to symlinks with ACLs configured out Keith Young has reported that when ACLs are not compiled in, the default implementation of ext[23]_init_acl applies the umask to all new files, including symlinks, which is wrong. In this case the VFS already takes care of applying the umask when needed, so ext2 and ext3 need not bother about it. Remove the superfluous statements. Signed-off-by: Andreas Gruenbacher Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix missing wakeup in ipc/sem My patch that removed the spin_lock calls from the tail of sys_semtimedop introduced a bug: Before my patch was merged, every operation that altered an array called update_queue. That call woke up threads that were waiting until a semaphore value becomes 0. I've accidentially removed that call. The attached patch fixes that by modifying update_queue: the function now loops internally and wakes up all threads. The patch also removes update_queue calls from the error path of sys_semtimedop: failed operations do not modify the array, no need to rescan the list of waiting threads. Signed-Off-By: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] IRQ resource deallocation: ACPI Architecture dependent IRQ resources such as interrupt vector for PCI devices are allocated at pci_enable_device() time on i386, x86-64 and ia64 platform. Today, however, these IRQ resources are never deallocated even if they are no longer used. The following set of patches adds supports to deallocate IRQ resources at pci_disable_device() time. The motivation of the set of patches is as follows: - IRQ resources such as interrupt vectors should be freed if they are no longer used because the amount of these resources are limited. By deallocating IRQ resources, we can recycle them. - I think some hardwares will support hot-pluggable I/O units with I/O xAPICs in the near future. So I/O xAPIC hot-plug support by OS will be needed soon. IRQ resouces deallocation will be one of the most important stuff for I/O xAPIC hot-plug. For now, the following set of patches has ia64 implementation only. i386 and x86_64 implementations are TBD. This patch is ACPI portion of IRQ deallocation. This patch defines the following new interface. The implementation of this interface depends on each platform. o void acpi_unregister_gsi(u32 gsi) This is a opposite portion of acpi_register_gsi(). This has a responsibility for deallocating IRQ resources associated with the specified GSI number. We need to consider the case of shared interrupt. In the case of shared interrupt, acpi_register_gsi() is called multiple times for one gsi. That is, registrations and unregistrations can be nested. This function undoes the effect of one call to acpi_register_gsi(). If this matches the last registration, IRQ resources associated with the specified GSI number are freed. This patch also adds the following new function. o void acpi_pci_irq_disable (struct pci_dev *dev) This function is a opposite portion of acpi_pci_enable_irq(). It clears the device's linux IRQ number and calls acpi_unregister_gsi() to deallocate IRQ resources. Signed-off-by: Kenji Kaneshige Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] IRQ resource deallocation: ia64 This is an ia64 portion of IRQ resource deallocation. It implements pcibios_disable_device() and acpi_unregister_gsi() for ia64. o acpi_unregister_gsi() Summary of changes for implementing this interface: - Add new function iosapic_unregister_intr() into arch/ia64/kernel/iosapic.c. This function frees an interrupt vector and related data structures. - Add new function free_irq_vector() into arch/ia64/kernel/irq_ia64.c. This frees an unused vector. - Change assign_irq_vector() to be able to support free_irq_vector(). o pcibios_disable_device() This calls acpi_pci_irq_disable() to deallocate IRQ resources. Signed-off-by: Kenji Kaneshige Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] __getblk_slow can loop forever when pages are partially mapped When a block device is accessed via read/write, it is possible for some of the buffers on a page to be mapped and others not. __getblk and friends assume this can't happen, and can end up looping forever when pages have some unmapped buffers. Picture: lseek(/dev/xxx, 2048, SEEK_SET) write(/dev/xxx, 2048 bytes) Assuming the block size is 1k, page 0 has 4 buffers, two are mapped by __block_prepare_write and two are not. Next, another process triggers getblk(/dev/xxx, blocknr = 0); __getblk_slow will loop forever. __find_get_block fails because the buffer isn't mapped. grow_dev_page does nothing because there are buffers on the page with the correct size. madhav@veritas.com and others at Veritas tracked this down. The fix below has two parts. First, it changes __find_get_block to avoid the buffer_error warnings when it finds unmapped buffers on the page. Second, it changes grow_dev_page to map the buffers on the page by calling init_page_buffers. init_page_buffers is changed so we don't stomp on uptodate bits for the buffers. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Remove RCU abuse in cpu_idle() Introduce cpu_idle_wait() on architectures requiring modification of pm_idle from modules, this will ensure that all processors have updated their cached values of pm_idle upon exit. This patch is to address the bug report at http://bugme.osdl.org/show_bug.cgi?id=1716 and replaces the current code fix which is in violation of normal RCU usage as pointed out by Stephen, Dipankar and Paul. Signed-off-by: Zwane Mwaikambo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] udf: simplify udf_iget, fix race udf_iget calls __udf_read_inode after the inode has been unlocked and other threads could access it. Switching to iget_locked() fixes this race and nicely simplifies the code. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] udf: fix reservation discarding UDF discards file preallocations on every ->put_inode which is totally bogus. It already discards them in ->release which makes sense for normal writes, so the only additional discard is in ->clear_inode so we make sure we don't leak any reservations for shared writeable mappings. This follows similar changes to ext2 and ext3. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] remove dead ext3_put_inode prototype ext3_put_inode has been removed a while ago. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] compat: sigtimedwait - Merge sys32_rt_sigtimedwait function in X86_64, IA64, PPC64, MIPS, SPARC64, S390 32 bit layer into 1 compat_rt_sigtimedwait function. It will also fix a bug of copy wrong information to 32 bit userspace siginfo structure on X86_64, IA64 and SPARC64 when calling sigtimedwait on 32 bit layer. - Change all name the of siginfo_t32 structure in X86_64, IA64, MIPS, SPARC64 and S390 to the name compat_siginfo_t as used in PPC64. - Patch introduced a macro __COMPAT_ENDIAN_SWAP__ in include/asm-mips/compat.h when MIPS kernel is compiled in little-endian mode. This macro is used to do byte swapping in function sigset_from_compat. - This patch is only tested on X86_64 and IA_64. Signed-off-by: Zou Nan hai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] msync(): set PF_SYNCWRITE Pass the "we are doing synchronous writes" hint down from msync(). Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] prio_tree: roll call to prio_tree_first into prio_tree_next Allow prio_tree_next to be used as the only function for tree traversal, similar to how vma_prio_tree_next works. This patch isn't needed for the generalization, but since it affects the API, it's better to include it first. Signed-off-by: Werner Almesberger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] prio_tree: generalization Export prio_tree functions such that they can be used by other subsystems than only VMAs. Also adds a mode to prio_tree to use it with keys explicitly included in the prio_tree meta-data. The plan is to also consider converting VMAs to use explicit keys, so that the old "raw" mode can be removed. Signed-off-by: Werner Almesberger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] prio_tree: move general code from mm/ to lib/ Last but not least, move the general prio_tree code from mm/ to lib/. This patch also duplicates some macros, which are used in the VMA code for debugging purposes, so we can't properly separate them yet. Note that this patch conflicts with a patch in 2.6.10-rc3-mm1 (frv-better-mmap-support-in-uclinux.patch), which removes mm/prio_tree in systems without an MMU. Not making that other patch provide a dummy for prio_tree_init should resolve the conflict. (That's just from reading the patch - I haven't actually tried this.) Signed-off-by: Werner Almesberger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] lcd: fix memory leak, code cleanup This patch addresses the following issues: - Fix log-spamming and cryptic error messages, and add KERN_ constants. - Convert some ints to unsigned ints. - Add checks for CAP_SYS_ADMIN for FLASH_Burn and FLASH_Erase ioctls. - Identify use of global variable. - Fix memory leak in FLASH_Burn ioctl. - Fix error return codes in lcd_ioctl(). - Move variable "index" in lcd_ioctl() to smaller scope to reduce memory usage. - Convert cli()/sti() to spin_lock_irqsave()/spin_unlock_irqrestore(). Fix legibility issues in FLASH_Burn ioctl. Signed-off-by: James Nelson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix conflicting cpu_idle() declarations cpu_idle() is referenced from generic code (init/main.c). It is declared/defined in init/main.c: void cpu_idle(void) i386/kernel/process.c void cpu_idle(void) i386/kernel/smpboot.c: int cpu_idle(void) i386/mach-voyager/voyager_smp.c: int cpu_idle(void) ppc/kernel/idle.c: int cpu_idle(void) ppc/kernel/smp.c: int cpu_idle(void *unused) ppc64/kernel/idle.c: int cpu_idle(void) ppc64/kernel/smp.c: int cpu_idle(void *unused) sparc/kernel/process.c: int cpu_idle(void) sparc64/kernel/process.c: int cpu_idle(void) sh/kernel/process.c: void cpu_idle(void *unused) sh/kernel/smp.c: int cpu_idle(void *unused) ia64/kernel/smpboot.c: int cpu_idle(void) ia64/kernel/process.c: void cpu_idle(void *unused) sh64/kernel/process.c: void cpu_idle(void *unused) s390/kernel/process.c: int cpu_idle(void) s390/kernel/smp.c: int cpu_idle(void * unused) m32r/kernel/process.c: void cpu_idle(void) m32r/kernel/smpboot.c int cpu_idle(void) Other arches beleive that cpu_idle is void(void). This patch puts 'void cpu_idle(void)' in include/linux/smp.h and fixes conflicting definitions. Also removes now unneeded declarations in x86_64, alpha, parisc. Only i386 part is tested. Signed-off-by: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] remove redundant sys_delete_module() Peter Chubb recently split out a standalone sys_ni.c file for the not implemented syscalls. This patch removes the redundant sys_delete_module() in module.c. Signed-off-by: Coywolf Qi Hunt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix stop signal race The `sig_avoid_stop_race' checks fail to catch a related race scenario that can happen. I don't think this has been seen in nature, but it could happen in the same sorts of situations where the observed problems come up that those checks work around. This patch takes a different approach to catching this race condition. The new approach plugs the hole, and I think is also cleaner. The issue is a race between one CPU processing a stop signal while another CPU processes a SIGCONT or SIGKILL. There is a window in stop-signal processing where the siglock must be released. If a SIGCONT or SIGKILL comes along here on another CPU, then the stop signal in the midst of being processed needs to be discarded rather than having the stop take place after the SIGCONT or SIGKILL has been generated. The existing workaround checks for this case explicitly by looking for a pending SIGCONT or SIGKILL after reacquiring the lock. However, there is another problem related to the same race issue. In the window where the processing of the stop signal has released the siglock, the stop signal is not represented in the pending set any more, but it is still "pending" and not "delivered" in POSIX terms. The SIGCONT coming in this window is required to clear all pending stop signals. But, if a stop signal has been dequeued but not yet processed, the SIGCONT generation will fail to clear it (in handle_stop_signal). Likewise, a SIGKILL coming here should prevent the stop processing and make the thread die immediately instead. The `sig_avoid_stop_race' code checks for this by examining the pending set to see if SIGCONT or SIGKILL is in it. But this fails to handle the case where another CPU running another thread in the same process has already dequeued the signal (so it no longer can be found in the pending set). We must catch this as well, so that the same problems do not arise when another thread on another CPU acted real fast. I've fixed this dumping the `sig_avoid_stop_race' kludge in favor of a little explicit bookkeeping. Now, dequeuing any stop signal sets a flag saying that a pending stop signal has been taken on by some CPU since the last time all pending stop signals were cleared due to SIGCONT/SIGKILL. The processing of stop signals checks the flag after the window where it released the lock, and abandons the signal the flag has been cleared. The code that clears pending stop signals on SIGCONT generation also clears this flag. The various places that are trying to ensure the process dies quickly (SIGKILL or other unhandled signals) also clear the flag. I've made this a general flags word in signal_struct, and replaced the stop_state field with flag bits in this word. Signed-off-by: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] move group_exit flag into signal_struct.flags word After my last change, there are plenty of unused bits available in the new flags word in signal_struct. This patch moves the `group_exit' flag into one of those bits, saving a word in signal_struct. Signed-off-by: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix ptracer death race yielding bogus BUG_ON There is a BUG_ON in ptrace_stop that hits if the thread is not ptraced. However, there is no synchronization between a thread deciding to do a ptrace stop and so going here, and its ptracer dying and so detaching from it and clearing its ->ptrace field. The RHEL3 2.4-based kernel has a backport of a slightly older version of the 2.6 signals code, which has a different but equivalent BUG_ON. This actually bit users in practice (when the debugger dies), but was exceedingly difficult to reproduce in contrived circumstances. We moved forward in RHEL3 just by removing the BUG_ON, and that fixed the real user problems even though I was never able to reproduce the scenario myself. So, to my knowledge this scenario has never actually been seen in practice under 2.6. But it's plain to see from the code that it is indeed possible. This patch removes that BUG_ON, but also goes further and tries to handle this case more gracefully than simply avoiding the crash. By removing the BUG_ON alone, it becomes possible for the real parent of a process to see spurious SIGCHLD notifications intended for the debugger that has just died, and have its child wind up stopped unexpectedly. This patch avoids that possibility by detecting the case when we are about to do the ptrace stop but our ptracer has gone away, and simply eliding that ptrace stop altogether as if we hadn't been ptraced when we hit the interesting event (signal or ptrace_notify call for syscall tracing or something like that). Signed-off-by: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] move waitchld_exit from task_struct to signal_struct There is really no point in each task_struct having its own waitchld_exit. In the only use of it, the waitchld_exit of each thread in a group gets woken up at the same time. So, there might as well just be one wait queue for the whole thread group. This patch does that by moving the field from task_struct to signal_struct. It should have no effect on the behavior, but saves a little work and a little storage in the multithreaded case. Signed-off-by: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] task_struct.exit_state usage I just did a quick audit of the use of exit_state and the EXIT_* bit macros. I guess I didn't really review these changes very closely when you did them originally. :-( I found several places that seem like lossy cases of query-replace without enough thought about the code. Linus has previously said the >= tests ought to be & tests instead. But for exit_state, it can only ever be 0, EXIT_DEAD, or EXIT_ZOMBIE--so a nonzero test is actually the same as testing & (EXIT_DEAD|EXIT_ZOMBIE), and maybe its code is a tiny bit better. The case like in choose_new_parent is just confusing, to have the always-false test for EXIT_* bits in ->state there too. The two cases in wants_signal and do_process_times are actual regressions that will give us back old bugs in race conditions. These places had s/TASK/EXIT/ but not s/state/exit_state/, and now there tests for exiting tasks are now wrong and never catching them. I take it back: there is no regression in wants_signal in practice I think, because of the PF_EXITING test that makes the EXIT_* state checks superfluous anyway. So that is just another cosmetic case of confusing code. But in do_process_times, there is that SIGXCPU-while-exiting race condition back again. Signed-off-by: Roland McGrath Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uninline/kill __exit_mm() __exit_mm() is an inlined version of exit_mm(). This patch unifies them. Saves 356 byte in exit.o. Signed-off-by: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] SELinux scalability: add spin_trylock_irq and spin_trylock_irqsave This patch from Kaigai Kohei adds irq and irqsave trylock spinlock variants for use by the SELinux AVC RCU patch. Signed-off-by: Kaigai Kohei Signed-off-by: Stephen Smalley Signed-off-by: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] SELinux scalability: convert AVC to RCU The following patch improves the scalability of SELinux by replacing the global avc_lock with an RCU based scheme by Kaigai Kohei. The size of the cache is made tunable, to allow administrators to tune systems for different workloads, while statistics are exported via selinuxfs to allow AVC performance to be monitored at a low level. AVC nodes are also allocated now via a slab cache, and AVC references have been removed from the code. This code has been extensively tested and benchmarked (see benchmark results below). Baseline performance is not improved, although it is clear that dramatic scalability improvements are achieved. Baseline performance and networking scalability are areas where work is ongoing (in particular, we need to add caching of some network security objects so that we don't fallback to policy database lookups on each permission call). Benchmark results: =============================================================================================== System: 4 node 16-way IA64 NUMA - 'Stream' is based on http://www.cs.virginia.edu/stream/ , HPC memory bandwidth test, higher result is better. - Hackbench: scheduler scalability benchmark by Rusty, lower is better. Standard kernel: 2.6.9-1.648_EL SELINUX=0 : Stream 6159.987MB/s HackBench 53.144 2.6.9-1.648_EL SELINUX=1 : Stream 5872.529MB/s HackBench 1043.132 Kernel with RCU/AVC patches: 2.6.9-1.689_avcrcu.root SELINUX=0 : Stream 8829.647MB/s HackBench 53.976 2.6.9-1.689_avcrcu.root SELINUX=1 : Stream 8817.117MB/s HackBench 50.975 =============================================================================================== System: 8-way PIII 900Mhz Xeon with 9GB RAM Fileystem: ext2 for all testing. Notes: AVC was reset before tests, so avc was flushed. System was run in enforcing mode. Key: std-nolsm: standard kernel with LSM disabled std-lsmcap: standard kernel with LSM enabled, capabilities LSM std-sel-strict: standard kernel with SELinux enabled, capabilities secondary LSM rcu-sel-strict: as above with RCU & AVC stats patches [PATCH] SELinux: atomic_dec_and_test() bug Atomic underflow debugging in this kernel exposed a bug in the AVC RCU code, fix below. The effect of this bug would be delayed node reclamation. Signed-off-by: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] SELinux scalability: AVC statistics and tuning This patch adds an selinuxfs based API to the AVC, to allow monitoring of the cache, and tuning of the cache size. The latter is mediated via the new setsecparam permission. AVC statistics may be monitored via the avcstat utility: http://people.redhat.com/jmorris/selinux/perf/avcstat.c Signed-off-by: James Morris Signed-off-by: Stephen Smalley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] SELinux: regenerate SELinux module headers This patch regenerates the SELinux module headers to use a new format and updates their use by the AVC. Signed-off-by: Stephen Smalley Signed-off-by: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] SELinux: update selinux_task_setscheduler This patch updates the selinux_task_setscheduler hook function to use the standard helper for task permission checks since it is now safe to audit from this hook (due to the upstream change to setscheduler() to not hold the runqueue lock during the security hook call). Signed-off-by: Stephen Smalley Signed-off-by: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] SELinux: audit task comm if exe cannot be determined This patch ensures that the comm is included in the audit message if avc_audit is unable to determine the exe due to the mmap_sem being held. This is helpful in tracking down the causes of permission denials that occur in the mmap/mprotect hooks. Signed-off-by: Stephen Smalley Signed-off-by: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] SELinux: add dynamic context transition support to SELinux This patch for adds dynamic context transition support to SELinux via writes to the existing /proc/pid/attr/current interface. Previously, SELinux only supported exec-based context transitions. This functionality allows privileged applications to apply privilege bracketing without necessarily being refactored to an exec-based model (although such a model has advantages in least privilege and isolation). A process must have setcurrent permission to use this mechanism at all, and the dyntransition permission must be granted between the old and new security contexts. Multi-threaded processes are not allowed to use this operation, as it will yield an inconsistency among the security contexts of the threads sharing the same mm. Ptrace permission is revalidated against the new context if the process is being ptraced. Author: Darrel Goeddel Signed-off-by: Stephen Smalley Signed-off-by: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] SELinux: enhance SELinux control of executable mappings This patch adds new permission checks to the SELinux mmap and mprotect hooks to enable control over the ability to make executable a mapping that can contain data not covered by the existing file-based permission checks. The task->self execmem permission controls the ability to create an executable anonymous mapping or a writable executable private file mapping. The task->file execmod permission controls the ability to make executable a previously written private file mapping, e.g. for text relocations. Thanks to Roland McGrath for input and feedback on earlier versions of this patch. Signed-off-by: Stephen Smalley Signed-off-by: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] SELinux: add member node to selinuxfs This patch adds a member node to selinuxfs to export the security_member_sid interface to userspace for obtaining security polyinstantiation decisions. Signed-off-by: Stephen Smalley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] SELinux: eliminate unaligned accesses by policy loading code This patch rewrites the SELinux next_entry() function and all callers to copy entry data from the binary policy into properly aligned buffers, eliminating unaligned accesses. This patch is in response to a bug report from Prarit Bhargava for SELinux and ia64, and he has confirmed that this patch eliminates the unaligned access warnings. Signed-off-by: Stephen Smalley Signed-off-by: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] oprofile: add check_user_page_readable() Add check_user_page_readable() for kernel modules which need to follow user space addresses but can't use get_user(). Signed-off-by: John Levon Signed-off-by: Greg Banks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] oprofile: arch-independent code for stack trace sampling oprofile arch-independent updates, including some internal API changes and support for stack trace sampling. Signed-off-by: John Levon Signed-off-by: Greg Banks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] oprofile: backtrace operation does not initialized Allow stack tracing to work when sampling on timer is forced using the timer=1 boot option. Reported by Akinobu Mita. Signed-off-by: Greg Banks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] oprofile: i386 support for stack trace sampling oprofile i386 arch updates, including some internal API changes and support for stack trace sampling. (akpm: I added a nasty hack to fix the x86_64 build. However the feature is untested on x86_64 and probably doesn't work yet). Signed-off-by: John Levon Signed-off-by: Greg Banks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] oprofile: ia64 support for oprofile stack trace sampling oprofile ia64 arch updates, including some internal API changes and support for stack trace sampling. Signed-off-by: John Levon Signed-off-by: Keith Owens Signed-off-by: Greg Banks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] oprofile: update alpha for api changes oprofile alpha arch updates, including some internal API changes. Signed-off-by: John Levon Signed-off-by: Greg Banks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] oprofile: update arm for api changes oprofile arm arch updates, including some internal API changes. Signed-off-by: John Levon Signed-off-by: Greg Banks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] oprofile: update ppc for api changes oprofile ppc64 arch updates, including some internal API changes. Signed-off-by: John Levon Signed-off-by: Greg Banks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] oprofile: update parisc for api changes oprofile parisc arch updates, including some internal API changes. Signed-off-by: John Levon Signed-off-by: Greg Banks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] oprofile: update s390 for api changes oprofile s390 arch updates, including some internal API changes. Signed-off-by: John Levon Signed-off-by: Greg Banks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] oprofile: update sh for api changes oprofile sh arch updates, including some internal API changes. Signed-off-by: John Levon Signed-off-by: Greg Banks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] oprofile: update sparc64 for api changes oprofile sparc64 arch updates, including some internal API changes. Signed-off-by: John Levon Signed-off-by: Greg Banks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] oprofile: minor cleanups This patch has the following cleanups to oprofile: - Remove spurious casts - vfree() accepts NULL pointers so remove redundant test - The parameter for __free_cpu_buffer() is not used so merge the function with free_cpu_buffer() Signed-off-by: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: nfsd_translate_wouldblocks -EAGAIN has a special treatment in the nfsd code since it's used to indicate that an upcall has been initiated and that a request should be dropped pending the upcall result. But when the break_lease functions return -EWOULDBLOCK (==-EAGAIN on most architectures), we actually prefer to return nfserr_jukebox. So translate -EAGAIN returns to -ETIMEDOUT (which will be translated to nfserr_jukebox). Undo the mapping of -EWOULDBLOCK to nfserr_jukebox, since on most architectures that has the undesireable effect of mapping -EAGAIN to nfserr_jukebox. Signed-off-by: J. Bruce Fields Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: svcrpc: auth_null fixes Fix some discrepencies between the server-side auth_null and auth_unix rpc code: in particular, make sure we return an auth error in the auth_null case instead of dropping when we fail to match an export entry, and make sure such responses are encoded correctly. Signed-off-by: J. Bruce Fields Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: svcrpc: share code duplicated between auth_unix and auth_null Call a helper function from svcauth_unix_accept() and svcauth_null_accept() instead of duplicating code. Signed-off-by: J. Bruce Fields Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: nfsd4: fix open_downgrade decode error. Fix open downgrade decode error. Signed-off-by: Andy Adamson Signed-off-by: J. Bruce Fields Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: rpcsec_gss: comparing pointer to 0 instead of NULL Just noticed while fixing some other sparse-related stuff. Signed-off-by: J. Bruce Fields Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: nfsd4: fix fileid in readdir responses We were reporting mounted_on fileid instead of fileid in readdir responses. Signed-off-by: J. Bruce Fields Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: nfsd4: use the fsid export option when returning the fsid attribute Return the special NFSv4 pseudo filesystem fsid (0/0) in a GETATTR on an NFSv4 pseudo filesystem node. Signed-off-by: Andy Adamson Signed-off-by: J. Bruce Fields Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: nfsd4 encode_dirent cleanup No sensible client is ever going to request only the RDATTR_ERROR attribute, so there's no point optimizing for that case. Signed-off-by: J. Bruce Fields Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: nfsd4: encode_dirent: superfluous assignment Remove unused assignment Signed-off-by: J. Bruce Fields Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: nfsd4: encode_dirent: superfluous local variables The local variables bmval0 and bmval1 turn out not to really help much. Signed-off-by: J. Bruce Fields Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: nfsd4: encode_dirent: more readdir attribute encoding to new function Move readdir attribute encoding to nfsd4_encode_dirent_fattr(), remove the (no-longer used) error label. Signed-off-by: J. Bruce Fields Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: nfsd4: encode_dirent: simplify nfs4_encode_dirent_fattr Make nfsd4_encode_dirent_fattr() slightly more concise. Signed-off-by: J. Bruce Fields Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: nfsd4: encode_dirent: move rdattr_error code to new function Move code to encode the special rdattr_error attribute to nfsd4_encode_rdattr_error(). Signed-off-by: J. Bruce Fields Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: nfsd4: encode_dirent: simplify error handling Minor simplification of error handling in encode_dirent. Signed-off-by: J. Bruce Fields Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: nfsd4: encode_dirent: simplify control flow Replace series of if's by a switch, remove (now unnecessary) label "out". Signed-off-by: J. Bruce Fields Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: nfsd4: encode_dirent: fix dropit return We need to handle nfserr_dropit as a special case here, since we don't want to return it in the rdattr_error attribute. Signed-off-by: J. Bruce Fields Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: nfsd4: encode_dirent: trivial cleanup Trim a couple redundant comments, minor whitespace cleanup. Signed-off-by: J. Bruce Fields Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: move nfserr_openmode checking from nfsd_read/write into nfs4_preprocess_stateid_op() in preparation for delegation state. Signed-off-by: Andy Adamson Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: check the callback netid in gen_callback. since we only support tcp, don't save the netinfo. Signed-off-by: Andy Adamson Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: count the nfs4_client structure usage ... to protect the null (probe) callback asynchronous rpc's reference. Atomically inc and set the cb_set flag. Signed-off-by: Andy Adamson Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: preparation for delegation: client callback probe client callback rpc to probe the callback channel on setclientid with a null request. Signed-off-by: Andy Adamson Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: probe the callback path upon a successful setclientid_confirm Signed-off-by: Andy Adamson Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: check for existence of file_lock parameter inside of the kernel lock. Signed-off-by: Andy Adamson Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: get rid of the special delegation_stateid_t, use the existing stateid_t. Signed-off-by: Andy Adamson Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: add structures for delegation support Signed-off-by: Andy Adamson Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: allocate and initialize the delegation structure. Declare and initialize the recall_lru list. Signed-off-by: Andy Adamson Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: find a delegation for a file given a stateid. Signed-off-by: Andy Adamson Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: add the delegation release and free functions Signed-off-by: Andy Adamson Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: changes to expire_client ... to shutdown the rpc callback client and remove all client associated delegations Signed-off-by: Andy Adamson Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: delay nfsd_colse for delegations until reaping Because nfsd_close() can call locks_remove_flock() which removes leases, delay nfsd_close() for delegations until the delegation is reaped. Don't release an nfs4_file struct with delegations. Signed-off-by: Andy Adamson Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: delegation recall callback rpc. Signed-off-by: Andy Adamson Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: kernel thread for delegation callback Any task can call break_lease or time_out_leases on a v4 delegated file which results in a recall callback rpc sent to the NFSv4 client holding the delegation, and/or the FL_LEASE to be removed. Spawn a kernel thread to perform the callback. Signed-off-by: Andy Adamson Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: helper functions for deciding to grant a delegation. Signed-off-by: Andy Adamson Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: attempt to hand out a delegation Signed-off-by: Andy Adamson Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: remove unnecessary stateowner existence check. At OPEN: Check for delegations in the process of being recalled. Attempt to hand out a delegation. Signed-off-by: Andy Adamson Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: check for openmode violations given a delegation stateid. Signed-off-by: Andy Adamson Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: add checking of delegation stateids to nfs4_preprocess_stateid_op. Call release_delegation on delegreturn (DELEG_RET). Signed-off-by: Andy Adamson Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: add the DELEGRETURN operation. Signed-off-by: Andy Adamson Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: add to the laundromat service for delegations. Walk the recall_lru and reap unused or timed-out delegations. Signed-off-by: Andy Adamson Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] knfsd: clear the recall_lru of delegations at shutdown Signed-off-by: Andy Adamson Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] invalidate_inodes speedup With Kirill Korotaev invalidate_inodes() can take a large amount of time searching the inode lists for inodes which belong to this fs. Add a separate list for this search. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fbdev: SiS framebuffer driver update 1.7.17 attached is an update for sisfb, lifting it up to version 1.7.17. It contains all changes done behind my back by other people (viro, torvalds, adaplas) in the meantime. Furthermore, - all remaining sparse warnings were fixed (mainly caused by the ROM code) - problems with very old and brand new BIOSes from SiS were fixed, - LCD setup was simplified, allowing more display modes than before, - UMC/charter bridge type handling was added, - a code clean-up was performed, the new FB_BLANK-flags were taken over, VBLANK status info was corrected, etc. Signed-off-by: Thomas Winischhofer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fbdev: sysfs fix Make sure the fbdev sysfs class is registered before all drivers, otherwise some symlinks are missing. Signed-off-by: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pm2fb: module parameters and module-conditional code - Update MODULE_PARM to module_param. - Omit some non-module code from module builds and vice-versa. Signed-off-by: Jim Hague Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pm2fb: save/restore memory config - From 2.4 driver: Save memory config registers at init and restore after card reset. Reset card on mode change. Signed-off-by: Jim Hague Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pm2fb: use modedb in modules - modedb is now available in modules. Signed-off-by: Jim Hague Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pm2fb: fix big-endian (Sparc) support A collection of changes that taken together makes the driver work correctly on big-endian systems, specifically Sparc. - Remove old PM2FB_BE_APERTURE define and use __BIG_ENDIAN throughout. PM2FB_BE_APERTURE wasn't defined on Sparc; this was incorrect. - Replace colour mode magic numbers with suitable constants, and tidy colour mode handling. Use BGR not RGB at 24bit on big-endian. - Replace aperture magic numbers with constants. Rearrange code to emphasise second aperture is not used. Add short explanations of aperture settings for big endian. - Update comments to note that the driver now works on Sparc. - Revisit 32bit depth colour offsets and ensure transp is set. Signed-off-by: Jim Hague Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pm2fb: fix fbi image display on 24 bit depth big endian Handle 24bit on big-endian by leaving the hardware in RGB and using the colour offset to reverse red/blue. Leaving the hardware in RGB means that fbi displays images correctly (abeit fortuitously) and the console is correct, thanks to a recent patch to the console code correcting an endian bug in fbcon_putc(). Signed-off-by: Jim Hague Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix ROM enable/disable in r128 and radeon fb drivers Both the r128 and radeon fb drivers do bad things with the PCI BAR corresponding to their option ROM. They incorrectly use the host address instead of the BAR address to enable the ROM, and then incorrectly lose the original value on unmap. This patch fixes both problems. Tested on Altix. Signed-off-by: Jesse Barnes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fbdev: Cleanup i2c code of rivafb - Change timings to as close as possible to VESA specs and use msecs_to_jiffies() instead of hard-coded number - Attempt to read all i2c busses regardless of chipset type Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fbdev: Revive BIOS-less booting for Rage XL cards The file drivers/video/aty/xlinit.c is currently unused. This file might be useful to boot some types of RageXL cards on non-x86 platforms. Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fbdev: Revive global_mode_option The global_mode_option is useful for choosing the initial video mode without specifying the driver, ie 'video=1024x768@60'. After the initialization cleanup, this variable was accidentally removed. This patch brings it back again. Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fbcon/fbdev: Add blanking notification Add blanking event to the notifier call chain. This can be used by fbcon to blank/unblank the console, and theoretically, by backlight drivers. Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fbdev: Check return value of fb_add_videomode The function fb_add_videomode can fail, check return value. Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fbdev: Do a symbol_put for each symbol_get in savagefb Do a symbol_put() for each symbol_get() in savagefb. Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fbdev: Add Viewsonic PF775a to broken display database Add Viewsonic PF775a to broken display database Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fbdev: Fix default timings in vga16fb From: Martin Wilck ..I am asking because we have encountered a video device that obviously has problems displaying the standard mode of the vga16fb driver... The default timings give a vtotal of 529 instead of 525 in 640x480@60. Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fbdev: Reduce stack usage of intelfb Reduce stack usage in intelfb_set_par() from 2404 bytes (on x86-32) to 12 bytes. Signed-off-by: Randy Dunlap Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] zr36067 driver - correct jpeg app/com markers Attached patch fixes the writing of APP (application-specific) and COM (comment) markers in the JPEG stream as generated by the zr36050 or zr36060 encoders, both part of the zr36067 driver. During separating those bits out of the main zoran driver, we accidently removed the interface through which applications can adapt those markers, replacing them by unchangeable (static) markers. Some video formats, particularly Quicktime and AVI, require specific container-specific markers in the stream for interlaced streams. Those markers specify field order and such. The attached patch re-adds this feature so that decoders depending on those container-specific markers for correct playback will work correctly. Signed-off-by: Ronald S. Bultje Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] zr36067 driver - ppc/be port Attached patch adds some host<->le conversion functions for 32-bit integers. The hardware expects 32-bit integers, which the host does not always provide. With the attached patch, the hardware runs fine on PPC hardware as well. Original patch by Ben Capper . Signed-off-by: Ronald S. Bultje Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] zr36067 driver - reduce stack size usage Reduce local variable (large struct) stack usage in zoran_do_ioctl() from 1028 bytes to 324 bytes (on x86-32) by declaring & using only 1 "struct zoran_jpg_settings" instead of 5 instances of it. Reduced from 5 * 180 bytes to 1 * 180 bytes, plus other locals in each case. Signed-off-by: Randy Dunlap Signed-off-by: Ronald S. Bultje Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [ALSA] 1.0.8rc2 [MTD] Bug in 2.6.10 mtd driver for physmem mapped flash chips The patch below fixes a small but fatal bug in the code that handles non-buswidth-aligned writes. The problem is that the code used the same index in both map_word and buf, therefore putting the wrong words in the map_word that partially contains old data and partially contains new data. The result: corrupt data is being written. Signed-off-by: Koen Martens Signed-off-by: David Woodhouse [MTD] remove unnecessary casts from drivers/mtd/maps/nettel.c and kill two warnings I took a look at the cause for these warnings in the 2.6.10 kernel, drivers/mtd/maps/nettel.c:361: warning: assignment makes pointer from integer without a cast drivers/mtd/maps/nettel.c:395: warning: assignment makes pointer from integer without a cast and as far as I can see the casts in there (to unsigned long and back to void*) are completely unnessesary ('virt' in 'struct map_info' is a void __iomem *), and getting rid of those casts buys us a warning free build. Signed-off-by: Jesper Juhl Signed-off-by: David Woodhouse [MTD] New blockdev-backed 'fake' MTD device. Rewritten alternative driver by Gareth Bult and Jörn Engel. Signed-off-by: David Woodhouse MTD SharpSL NAND driver: Calculate partitions sizes at runtime. This allows one kernel build to support multiple machines. Signed-off-by: Richard Purdie Signed-off-by: David Woodhouse MTD: include moduleparam.h in DiskOnChip driver Signed-off-by: David Woodhouse MTD: Fix config option name in Makefile for IBM 750FX/750GX boards. Also some cosmetic fixes in the map driver itself. Signed-off-by: David Woodhouse [MTD] add missing dependencies on MTD_PARTITIONS Signed-off-by: Adrian Bunk Signed-off-by: David Woodhouse MTD: Cosmetic ident catchup. Let the CVS idents catch up where changes have been made upstream. Signed-off-by: David Woodhouse MTD: Remove long-obsolete DiskOnChip 1000 driver. MTD: Remove gratuitous (void *) casts. Signed-off-by: Domen Puncer Signed-off-by: David Woodhouse [PATCH] Fix megaraid oops on unload Reported by Wakko Warner. The megaraid driver is trying to remove a non-empty directory in procfs. Trivially fixed by first unregistering the driver, which will remove all the per-controller files in the megaraid directory, and only _then_ removing the megaraid /proc directory entry. [SPARC64]: We really do need to mask the start/end args to flush_tlb_pgtables(). The callers used to do it, but with the 4-level page table code this is no longer the case. Noticed by Nick Piggin and Andrew Morton. Signed-off-by: David S. Miller [ARM PATCH] 2348/1: Fix IXDP2800 PCI irq mapping Patch from Deepak Saxena Our case statments are looking at the devfn, but the existing code does a switch(PCI_SLOT(dev->devfn)). This causes all PCI devices behind the first bridge to be configured with IRQ 0. Bad. Signed-off-by: Deepak Saxena Signed-off-by: Russell King [ARM PATCH] 2351/1: fix compilation for ixp2000 enp2611 and ixdp2400 platforms Patch from Lennert Buytenhek Instead of 'struct sys_timer', the ixdp2400 code has 'struct timer' and the enp2611 has just 'struct', preventing compilation for both machine types. This patch fixes it up. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King [ARM] Quieten compiler warnings, etc with ARM set_pmd() Signed-off-by: Russell King [ARM] Update mach-types file. Signed-off-by: Russell King [PATCH] Make page allocator aware of requests for zeroed memory Thisintroduces __GFP_ZERO as an additional gfp_mask element to allow to request zeroed pages from the page allocator: - Modifies the page allocator so that it zeroes memory if __GFP_ZERO is set - Replace all page zeroing after allocating pages by prior allocations with allocations using __GFP_ZERO Signed-off-by: Christoph Lameter Signed-off-by: Linus Torvalds fbmem: don't mix code/declarations. That messes up gcc-2.95 [PATCH] FRV: vperfctr syscalls don't exist in -bk8 This marks the vperfctr syscalls as unavailable as they aren't actually implemented in -bk8. Signed-Off-By: David Howells Signed-off-by: Linus Torvalds [PATCH] FRV: remove excess argument passed to expand_stack() This removes the excess argument being passed to expand_stack() as it isn't needed in -bk8. Signed-Off-By: David Howells Signed-off-by: Linus Torvalds [PATCH] FRV: provide stub asm/a.out.h This provides a stub asm/a.out.h for the FRV arch. This shouldn't be necessary as FRV doesn't support the AOUT binfmt, but it seems to be required by some archs for compilation of fs/exec.c. Signed-Off-By: David Howells Signed-off-by: Linus Torvalds [PATCH] Make pud_alloc() and pmd_alloc() non-existant on !MMU This makes the general pud_alloc() and pmd_alloc() inline functions unavailable if CONFIG_MMU is not defined. Signed-Off-By: David Howells Signed-off-by: Linus Torvalds [PATCH] FRV: Update banner comments at the top of frv arch files This updates the banner comments at the top of the frv arch files so that they don't proclaim to be part of the m68k arch and also to attribute responsibility for them to myself. Signed-Off-By: David Howells Signed-off-by: Linus Torvalds acpi video device enumeration: fix incorrect device list allocation It didn't allocate space for the final terminating entry, which caused it to overwrite the next slab entry, which in turn sometimes ended up being a slab array cache pointer. End result: total slab cache corruption at a random time afterwards. Very nasty. [PATCH] clean out old cruft from FD MCS driver - Remove the unused macro DEBUG_DETECT - Remove code inside DO_DETECT conditional that's broken - Remove superfluous header Signed-off-by: Jesper Juhl Signed-off-by: James Bottomley Input: atkbd - fix keycode table size initialization that got broken by my changes that exported 'set' and other settings via sysfs. setkeycodes should work again now. Signed-off-by: Dmitry Torokhov Signed-off-by: Vojtech Pavlik Input: psmouse - set mouse name to "Mouse" when using PS2++ and don't have any other information about the mouse. Signed-off-by: Dmitry Torokhov Signed-off-by: Vojtech Pavlik Use 'free_pipe_info()' helper function for pipe closedown. This avoids having fs/fifo.c having to know anything about pipe data passing details, and cleans up the code. [PATCH] arm26: Remove unreferenced file Remove nowhere referenced file. (egrep "filename\." didn't find anything) Signed-off-by: Domen Puncer Signed-off-by: Ian Molton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [IA64] Stagger the addresses of the pernode data structures to minimize cache aliasing. Allocation of pernode structures in find_pernode_space() does not properly stagger the alignment of the pgdats. This causes aliasing of the structures in the L3 caches, ie. the same fields in pgdat structures for multiple nodes will index to same cache index in the L3. If a process is allocating a huge amount of space & many nodes must be scanned before finding a node with available space, allocation of a pages is significantly slowed by excessive cache misses. By properly staggering the locations of the pgdat structures, allocation times on insanely large systems is dramatically improved. On a 256 node 512GB system, allocation of 450 GB by a single process was reduced from 1510 sec to 220 sec - a 7X improvement. Aside from wasting a trivial amount of space, I don't see any downside to staggering the allocation by 1 cacheline per node. wasted space bytes = N * (N-1) * 64 For 64 node system wasted bytes = ~256K Signed-off-by: Jack Steiner Signed-off-by: Tony Luck [PATCH] fix read capacity for large disks when CONFIG_LBD=n We shouldn't configure an device that requires LBD if the kernel doesn't suppoprt it (because we won't be able to see most of it), so set the capacity to zero in this case. Signed-off-by: James Bottomley [PATCH] export print_sense_internal Currently, we have scsi_print_sense and scsi_print_req_sense, but the linux-iscsi driver receives async messages from a target that may contain SCSI sense data and these messages are not tied to any specific command. So that we can use the scsi-ml sense printing capabilities the attached patch exports exports print_sense_internal and renames it to __scsi_print_sense. Signed-off-by: Mike Christie Signed-off-by: James Bottomley [PATCH] I2C: probe fewer addresses for asb100 (sensors) driver This patch limits SMBus scanning for the asb100 sensor chip to just one address - the only one we've ever seen in practice. Signed-off-by Mark M. Hoffman Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: Add secondary Super-I/O address support to This patch adds support for the secondary Super-I/O address to the w83627hf driver. Most manufacturer use the primary address but at least the EPoX EP-9NDA3+ had a Winbond W83627THF at the secondary address. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: Improve VID code for the W83627THF This patch cleans up and improves the VID pins value retrieval for the W83627THF chip in the w83627hf driver. Tested successfully by Mark Hoffman. The previous code was using an unrelated lock and reading register values it didn't need. The new code supports 6-bit VID values (as defined by Intel VRM 10), and also ensures that the GPIO pins are possibly used as VID inputs. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: Fix MAX6657/8/9 detection in lm90 I received no additional feedback about my MAX6657/8/9 detection fix. Since it was correct for the only chips I got a report for, I propose we apply it. After all, maybe people don't know they have such a chip because the detection was previously not correct. The patch below is the one I sent to the LM Sensors and Linux Kernel mailing-lists two weeks ago, unchanged. Thanks. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: Add byte commands to i2c-stub While working on EEPROMs, DDC/EDID and the like these last few days, I wanted to use your i2c-stub driver to test my code. However, I noticed that it wouldn't handle byte commands, while both i2cdetect and the eeprom driver need it for proper operation. Thus I added this functionality to the driver. What do you think about it? Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman [IA64] swiotlb.c: long line, whitespace, and other cleanup Clean up swiotlb.c a bit in preparation for some other changes that might be coming (e.g. moving it to the top level lib/ directory, adding support for more uses). Mostly whitespace and long line fixes, along with a few printk fixes. Signed-off-by: Jesse Barnes Signed-off-by: Tony Luck [TG3]: Return 0 when PHY read times out, not all-ones. Noticed by Peter Chubb. Signed-off-by: David S. Miller [TG3]: Fix signedness issues in PHY read/write loops. Signed-off-by: David S. Miller [TG3]: Update driver version and reldate. Signed-off-by: David S. Miller [PATCH] I2C: minor isp1301_omap tweaks Minor cleanups to the isp130_omap driver: enable the right amount of VBUS current draw in non-OTG configurations; get rid of a warning from GCC 2.95.3 ("int" function returns no value); use kcalloc() not kmalloc+memset. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: Update fscher pwm functionality This is a small update to the fscher hardware monitoring chip driver. More specifically it fixes two aspects of pwm: 1* Use the new sysfs names (e.g. pwm1 instead of fan1_pwm). 2* Better handling of out-of-range pwm values. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman [PATCH] Update IOP3xx I2C bus driver The following patch is a major cleanup of the IOP3xx I2C bus driver that is found on Intel's IOP and IXP chipsets. The existing driver in the 2.6 tree uses hardcoded I/O addresses based on board configuration which is just going to get ugly as more chips use this unit. The update switches to using the driver model and passing in the I/O addresses via platform_device resources. The patch also updates the ID name to more closely match the actual usage of the device. I have tested this new driver on IXP46x systems and Dave Jiang has tested it on both IOP321 and IOP331 systems. ARM-specific patches to provide platform-level hooks will go upstream after this patch is integrated. An example of using the new driver (from IXP46x ARM code) follows: static struct resource ixp46x_i2c_resources[] = { [0] = { .start = 0xc8011000, .end = 0xc801101c, .flags = IORESOURCE_MEM, }, [1] = { .start = IRQ_IXP4XX_I2C, .end = IRQ_IXP4XX_I2C, .flags = IORESOURCE_IRQ } }; static struct platform_device ixp46x_i2c_controller = { .name = "IOP3xx-I2C", .id = 0, .num_resources = 2, .resource = &ixp46x_i2c_resources }; static struct platform_device *ixp46x_devices[] __initdata = { &ixp46x_i2c_controller }; void __init ixp4xx_init(void) { if (cpu_is_ixp46x()) { platform_add_devices(ixp46x_devices, ARRAY_SIZE(ixp46x_devices)); } } Signed-off-by: Deepak Saxena Signed-off-by: Greg Kroah-Hartman [ARM] Add basic SMP support. Add the beginnings of SMP support to the ARM architecture, providing smp.c, smp.h, and cpu.h. Convert setup.c to use per-cpu for topology initialisation. Signed-off-by: Russell King [ARM PATCH] 2334/1: Corrects ixp4xx USB base addr and adds QMGRr/EthA/EthB in ixp4xx-regs.h Patch from George Joseph Corrects the IXP4XX_USB_BASE offset to be 0xB000 instead of overlapping TIMER at 0x5000. Also adds IXP4XX_QMGR_BASE and offsets for EthA and EthB. Signed-off-by: George T. Joseph Signed-off-by: Russell King [ARM PATCH] 2352/1: Increase amount of physical memory addressable on IOP platforms Patch from Dave Jiang Signed-off-by: Dave Jiang Move the VMALLOC_END to 0xfe000000 from 0xe8000000 to increase the amount of physical memory addressable on XScale IOP platforms. Signed-off-by: Russell King [PATCH] I2C: vid version detection fix AMD 64 uses same VID table as Opteron. Source: http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/25112.PDF Signed-off-by: Rudolf Marek Signed-off-by: Greg Kroah-Hartman [ARM PATCH] 2355/1: cleanup of PCI defines for IOP33x platforms Patch from Dave Jiang Signed-off-by: Dave Jiang Major cleanup of the IOP33x family platform PCI defines. Hopefully should be more coherent and removed some magic numbers. Also should be finalized with the latest redboot ATU config. Signed-off-by: Russell King [IA64] Fix problems in per cpu MCA code. * K.3 was not getting set on all cpus. * The pointer to each cpu's mca save area was getting incremented before being set, with the result that the last cpu's pointer was wrong. * Made contig.c changes corresponding to earlier discontig.c changes. * An offset into cpuinfo_ia64 structure was wrong in mca_asm.S. Special thanks to Keith Owens for helping test and identify problems. Signed-off-by: Russ Anderson Signed-off-by: Tony Luck Make pipe data structure be a circular list of pages, rather than a circular list of one page. This improves pipe throughput, and allows us to (eventually) use these lists of page buffers for moving data around efficiently. [PATCH] __GFP_ZERO pktcdvd fix Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: add missing pte_read function this patch adds the missing pte_read function and makes s390 compile again. Signed-off-by: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mmc build fix Usual workaround for the gcc-2.95.x macro expansion bug. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix MTD_BLOCK2MTD dependency The patch below fixes an obviously wrong dependency. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: export ppc64_caches for afs/ntfs they use clear_page, which in turn uses ppc64_caches so it needs to be exported. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: remove duplicate _end entry This is already declared in asm-generic/sections.h Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] cosa.c intialization crash This fixes crash on insmod of the cosa.ko module - the sppp_attach() was called too early when dev->priv has not been set up yet. Signed-off-by: Jan "Yenya" Kasprzak Signed-off-by: Linus Torvalds [PATCH] cosa.h ioctl numbers Make COSA ioctl numbers compatible with previous kernels. Signed-off-by: Jan "Yenya" Kasprzak Signed-off-by: Linus Torvalds [ARM PATCH] 2356/1: cleanup for compliance of machine ID and ATAG for IOP platforms Patch from Dave Jiang Signed-off-by: Dave Jiang Latest IOP official release of redboot now supports the proper machine IDs for all IOP platforms and also pass in the correct amount of memory available via ATAG. Removing hard coded stuff now that we can get the proper info from redboot. Signed-off-by: Russell King [PATCH] debugfs-typo-fix Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman [PATCH] add printing of udev version to scripts/ver_linux Since udev is starting to be used a lot of places and I've seen people get asked about their udev version a few times on lkml I figured it was perhaps time that scripts/ver_linux reported this info so it would get into more bugreports by default. This patch adds printing of udev version to scripts/ver_linux Signed-off-by: Jesper Juhl Signed-off-by: Greg Kroah-Hartman [PATCH] fix oops when reading resourceN files in sysfs On Thursday, January 6, 2005 12:25 pm, Jesse Barnes wrote: > [Sorry about the bogus reply, I don't have the original message.] > > That shouldn't happen. Maybe you were running an old version of the tree > or an old version of my sysfs mmap patch? When I do a 'bk pull' of > gregkh's latest usb tree into a recent Linus tree, I get an -EINVAL, not an > oops. An earlier version of my patch had this bug though, so maybe that's > what you're seeing? Ugg. How about this? Zero out newly allocated bin_attributes for legacy I/O, memory and resource files since we won't fill in all of the file operation methods. This will allow the checks in bin.c for the existence of a method to work properly instead of checking garbage memory. Signed-off-by: Jesse Barnes Signed-off-by: Greg Kroah-Hartman [PATCH] Resurrect ISICOM serial The isicom driver had bitrotted badly and although it had some 2.6 cleanup work didn't actually do anything useful. ISIcom had their own 2.4 driver which didn't work with 2.6 either but had done the hard work like the locking rewrites. So I nailed them together and then fixed some obvious bugs in the ISIcom driver version. [PATCH] First cut at setsid/tty locking Use the existing "tty_sem" to protect against the process tty changes too. [PATCH] net: netconsole support for smc91x Signed-off-by: Hayato Fujiwara Signed-off-by: Hirokazu Takata Signed-off-by: Jeff Garzik [PATCH] r8169: missing netif_poll_enable and irq ack From: Francois Romieu - (noticed by Jon D. Mason) rtl8169_wait_for_quiescence() needs to disable the NAPI processing but it has no reason to lock any part of the driver which would try to do the same at a later time. Let's reenable NAPI processing as soon as possible. - properly ack any aborted interruption: a reset of the device is not always enough. Signed-off-by: Francois Romieu Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik [PATCH] r8169: C 101 From: Francois Romieu Back to C101 and code which gives the expected result. Signed-off-by: Francois Romieu Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik [PATCH] r8169: Large Send enablement From: Francois Romieu Large Send enablement. Acked-by: Francois Romieu Signed-off-by: Jon Mason Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik [PATCH] r8169: reduce max MTU for large frames From: Francois Romieu The device does not support the whole mtu range it claims. Experimenting with the Tx threshold and/or the PCI burst size does not seem to improve the behavior. Signed-off-by: Francois Romieu Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik [PATCH] r8169: oversized driver field for ethtool From: Francois Romieu Reported by Richard Dawe : - RTL8169_DRIVER_NAME contains more than the 32 characters allowed for the driver field; - remove RTL8169_DRIVER_NAME as it is only used once. Signed-off-by: Francois Romieu Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik [PATCH] USB: fix serial gadget oops during enumeration This prevents the serial gadget driver from oopsing during enumeration when spinlocks are configured, and slab poisoning is active... Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] Driver Core: handle bridged platform bus segments During setup to access platform bus segments through bridges, the current platform_device_register() ignores the resource parent specified by the bridge. That means it'll always detect a (false) resource conflict with the bridge, and fail the resource reservation step. This patch makes that code use the specified parent resource, defaulting to "iomem_resource" or "ioport_resource" only for a NULL parent (that is, for devices that aren't accessed through a bridge). Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: ov511.c - vfree() checking cleanups ov511.c vfree() checking cleanups. Signed-off by: James Lamanna Signed-off-by: Greg Kroah-Hartman [PATCH] USB: another workaround for cdc-acm there are a lot of buggy modems. Signed-Off-By: Oliver Neukum Signed-off-by: Greg Kroah-Hartman [ide] remove pci_disable_device() calls from setup-pci.c and sgiioc4.c On Mon, 03 Jan 2005 21:44:33 +0000, Alan Cox wrote: > > Different PCI functions are but nothing requires that the PCI function > that is the IDE controller is only the IDE controller. In some cases > other logic lives in the "spare" BAR register areas of the device. > > One example where the weird design makes it obvious is the CS5520. Here > the 5520 bridge has the IDE in one BAR and all sorts of other logic > (including the xBUS virtual ISA environment) in the same PCI function. > On that chip a pci_disable_device on the IDE pci_dev turns off mundane > things like the timer chips keyboard and mouse 8). > > Other vendors do equally evil things and providing the chip reports IDE > class and has the IDE BARs set up nobody else is any the wiser and > presumably gate count goes down. Signed-off-by: Bartlomiej Zolnierkiewicz [libata] add DMA blacklist Blacklist devices that seem to have some problem with DMA. From drivers/ide/ide-dma.c blacklist. [ide] remove CRD-8480C from the DMA blacklist Reported to work OK by Daniel Robitaille . Signed-off-by: Bartlomiej Zolnierkiewicz [ide] disable debug in IDE ppc/pmac driver Ben did not disagree to hide the 3 additional lines printed when booting my ibook with the 'quiet' cmdline option. I think these debug printk have no real value for normal operation. Signed-off-by: Olaf Hering Signed-off-by: Bartlomiej Zolnierkiewicz [PATCH] Fix up compiler inefficiencies Oh, bugger... The recent mmzone.h change triggered some very, very ugly things in next_zone(), is_highmem(), is_normal() and zone_idx() because it changed the size of "struct zone" subtly. Pointer subtraction is no fun when sizeof of object gets weird and poor gcc blows its brains out trying to optimize that... This slowed down an ARM cross-build by a factor of 2.5. Turn the pointer subtraction tests into pointer addition tests instead where possible, making them trivial to deal with (and gets better code, in addition to faster compile). zone_idx() still does a subtraction. [ide] fix erroneous rq->buffer = NULL in ide-io.c:ide_dma_timeout_retry() From: Prarit Bhargava Please see discussion related to this patch here, http://marc.theaimsgroup.com/?l=linux-ide&m=110485007824374&w=2 Acked-by: Jens Axboe Signed-off-by: Bartlomiej Zolnierkiewicz [PATCH] via-rhine warning fix drivers/net/via-rhine.c: In function `rhine_init_one': drivers/net/via-rhine.c:864: warning: long unsigned int format, pointer arg (arg 4) Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik [PATCH] net: Netconsole poll support for 3c509 From: Con Kolivas This patch provides poll support to allow netconsole to work with 3c509 network cards. Status: Compiled, debugged and tested working by Michael Buesch. Signed-off-by: Con Kolivas Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik [PATCH] xircom_tulip_cb.c build fix From: Bernhard Rosenkraenzer , Adrian Bunk - Define `debug' before using it. - remove now-unneeded module_parm_array hack. Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik [PATCH] Multicast filtering for tun.c From: Shaun Jackman This patch adds multicast filtering to the TUN network driver, for packets being sent from the network device to the character device. * drivers/net/tun.c: Add multicast filtering for packets travelling from the network device to the character device. * include/linux/if_tun.h (tun_struct): Add interface flags, a hardware device addres, and a multicast filter. Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik [PATCH] ULi support for 526X tulip variants Signed-off-by: Alan Cox from a 2.4 change by Clear Zhang (signed off by Clear Zhang) Signed-off-by: Jeff Garzik [PATCH] SATA support for Intel ICH7 Reposting patch with word wrap turned off. Please let me know if this is still not formated correctly. This patch adds the Intel ICH7 DID's to the ata_piix.c SATA driver, ahci.c SATA AHCI driver and quirks.c for ICH7 SATA support. Signed-off-by: Jeff Garzik [ide] PCI quirk for ICH3-M IDE From: Jim Paris Bartlomiej: I have an ICH3-M controller on my laptop. The BIOS is leaving the prog-if as 0x8E (primary = legacy, secondary = native). When the PCI interrupt is routed (either in the IDE driver's pci_enable_device, or earlier if pci=routeirq is used), unhandled interrupts cause IRQ 9 to be disabled, breaking most of my other hardware. This seems to be caused by having the nonexistant secondary interface set to native mode. According to the datasheet I checked, having different modes for primary/secondary is not an allowed combination anyway, so the following PCI quirk checks for this case and forces both interfaces to legacy if true. It may make sense to make this more generic (this problem may affect other PCI IDs as well), or it may be better solved in the IDE driver, at least when pci=routeirq is not used. But the following patch does work well for me. Signed-off-by: Bartlomiej Zolnierkiewicz [ide] kill write-only ide_driver_t->sense also kill default_sense() in ide.c Signed-off-by: Bartlomiej Zolnierkiewicz [PATCH] e100: Replace locally implemented delay routines Signed-off-by: Ganesh Venkatesan Signed-off-by: Jeff Garzik [PATCH] e100: Sort Device IDs Signed-off-by: Ganesh Venkatesan Signed-off-by: Jeff Garzik [PATCH] e100: Update driver version number Signed-off-by: Ganesh Venkatesan Signed-off-by: Jeff Garzik [ide] add ide_dump_opcode() * add it to ide-lib.c and cleanup ide{disk}_dump_status() * as a bonus it fixes unknown opcode reporting in ide_dump_status() * use ide_dump_opcode() in ide_dump_atapi_status() Signed-off-by: Bartlomiej Zolnierkiewicz [PATCH] e1000: ITR does not default correctly on 2.6.x kernels Signed-off-by: Ganesh Venkatesan Signed-off-by: Jeff Garzik [PATCH] e1000: Fix kernel panic when the interface is brought down while the NAPI enabled driver is under stress Signed-off-by: Ganesh Venkatesan Signed-off-by: Jeff Garzik [PATCH] e1000: Fix ethtool diagnostics -- specifically for blade server implementations Signed-off-by: Ganesh Venkatesan Signed-off-by: Jeff Garzik [PATCH] e1000: Enabling NETIF_F_SG without checksum offload is illegal -- jdmason@us.ibm.com Signed-off-by: Ganesh Venkatesan Signed-off-by: Jeff Garzik [PATCH] e1000: Avoid filling tx_ring completely - shemminger@osdl.org Signed-off-by: Ganesh Venkatesan Signed-off-by: Jeff Garzik [PATCH] e1000: remove a redundant assignment to a local nr_frags in e1000_xmit_frame. Signed-off-by: Ganesh Venkatesan Signed-off-by: Jeff Garzik [PATCH] e1000: Replace schedule_timeout() with msleep()/msleep_interruptible() nacc@us.ibm.com Signed-off-by: Ganesh Venkatesan Signed-off-by: Jeff Garzik [PATCH] e1000: Fix tx resource cleanup logic Signed-off-by: Ganesh Venkatesan Signed-off-by: Jeff Garzik [PATCH] e1000: {set, get}_wol is now symmetric for 82545EM adapters Signed-off-by: Ganesh Venkatesan Signed-off-by: Jeff Garzik [PATCH] e1000: Kernel API change for Module_param_array_named Signed-off-by: Ganesh Venkatesan Signed-off-by: Jeff Garzik [PATCH] e1000: Added workaround to prevent inadvertent gigabit waveform to be sent out on the wire due to init-time operations on the IGP phy. Signed-off-by: Ganesh Venkatesan Signed-off-by: Jeff Garzik [PATCH] e1000: Applied eeprom fix where it was possible to read/write one more word than what should have been possible. Signed-off-by: Ganesh Venkatesan Signed-off-by: Jeff Garzik [PATCH] e1000: Applied smart speed fix where the code was forcing smart speed on all the time. Now it will honor the setting defined in the eeprom. Signed-off-by: Ganesh Venkatesan Signed-off-by: Jeff Garzik [PATCH] e1000: Driver version number, white spaces, comments, device id & other changes Signed-off-by: Ganesh Venkatesan Signed-off-by: Jeff Garzik [ide] cleanup ide_dump_status() * move idedisk_dump_status() and ide_dump_status() to ide-lib.c * rename idedisk_dump_status() to ide_dump_ata_status() * use ide_dump_{ata,atapi}_status() in ide_dump_status() * use ide_dump_status() in ide-cd.c, ide-disk.c and ide-scsi.c * make ide_dump_opcode() and ide_dump_atapi_status)() static Signed-off-by: Bartlomiej Zolnierkiewicz [ide] cleanup ide_error() * move idedisk_error() and ide_cdrom_error() to ide-io.c * rename idedisk_error() to ide_ata_error() * rename ide_cdrom_error() to ide_atapi_error() * use ide_{ata,atapi}_error() in ide_error() Signed-off-by: Bartlomiej Zolnierkiewicz [PATCH] e1000: Documentation/networking/e1000.txt update Signed-off-by: Ganesh Venkatesan Signed-off-by: Jeff Garzik [PATCH] e100: Documentation/networking/e100.txt update Signed-off-by: Ganesh Venkatesan Signed-off-by: Jeff Garzik [PATCH] EMAC: fix ibm_emac autonegotiation result parsing From: Matt Porter Fix aneg result parsing in ibm_emac driver. Signed-off-by: Eugene Surovegin Signed-off-by: Matt Porter Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik [PATCH] miri_sbus iomem annotations missing __iomem annotations in myri_sbus Signed-off-by: Al Viro Signed-off-by: Jeff Garzik [PATCH] hamachi iomem annotations Signed-off-by: Jeff Garzik [PATCH] bmac iomem annotations Signed-off-by: Al Viro Signed-off-by: Jeff Garzik [PATCH] s2io iomem annotations and cleanups * usual iomem annotations * u64 is not an equivalent to pointer; unsigned long is * cast-as-lvalue ugliness killed. * caddr_t has no place in kernel (and these guys were iomem pointers, actually). Signed-off-by: Al Viro Signed-off-by: Jeff Garzik [ide] rework ide_driver_t->error * split __ide_error() out of ide_error() * call driver->error() inside ide_error() * convert all users of driver->error() * fix default_cleanup() and idescsi_atapi_error() * make idescsi_atapi_error() static Signed-off-by: Bartlomiej Zolnierkiewicz [PATCH] allow rx of the maximum sized VLAN tagged packets Patch enables EMAC to receive maximum sized VLAN tagged packets. Signed-off-by: Eugene Surovegin Signed-off-by: Matt Porter Signed-off-by: Jeff Garzik [PATCH] Add netpoll support Add netpoll support to the EMAC driver. Signed-off-by: Matt Porter Signed-off-by: Jeff Garzik [PATCH] new PCI_ID for tulip it exist a PCCARD from SIEMENS, its relabeled DLINK. Signed-off-by: Jeff Garzik [ide] ide_driver_t->abort() cleanup * add drive->media != ide_disk check to ide_abort() * kill ide_cdrom_abort() and idedisk_abort() * split __ide_abort() out of ide_abort() * call driver->abort() inside ide_abort() * convert the only user of driver->abort() * fix default_abort() and idescsi_atapi_abort() * make idescsi_atapi_abort() static Signed-off-by: Bartlomiej Zolnierkiewicz [PATCH] Fix sx8 device naming in sysfs Attached fixes sysfs naming of sx8 block devs to follow LANANA naming. You then get /sys/block/sx8!0, etc instead of /sys/block/sx80_0 (device names should be /dev/sx8/0 instead of /dev/sx80_0) Signed-off-by: Jeff Garzik [ide] kill current_capacity() Signed-off-by: Bartlomiej Zolnierkiewicz [PATCH] via-velocity: convert to module_param Convert via-velocity driver to module_param. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik [PATCH] forcedeth: add ethtool get/set_settings support The patch adds ethtool get_ and set_settings support to the forcedeth nic driver. This allows to force a certain link speed with ethtool -s. Supported link speeds: 10 HD&FD, 100 HD&FD, 1000 FD 1000 HD is not supported (probably a hardware restriction), 1000 FD is only supported with autonegotiation enabled. Changelog: - Code reorganization: move ethtool functions further down in forcedeth.c (no code changes within the existing ethtool functions) - add support for setting the link setting bits in the nic with autodetection in the PHY disabled (i.e. use a netdev_priv() variable instead of querying the PHY) - implement get_settings and set_settings ethtool functions. Signed-Off-By: Manfred Spraul Signed-off-by: Jeff Garzik [PATCH] S2io: fixes in free_shared_mem function Hello All, As per KK's review comment received on Nov 8 about the free_shared_mem function, Iam sending the following patch. The change log includes: 1. Break from the main 'for loop' if ba[i] is NULL. 2. In the second level 'for loop', if ba[i][j] is NULL, instead of continuing as was done previously, we now free the ba[i] pointer and break from the main 'for loop'. 3. In the 'while loop' inside the second tier 'for loop', if any of the three pointers (ba or ba->ba_0_org or ba->ba_1_org) is found to be NULL, then ba[i], ba[i][j] and the non NULL buffer pointer if any (ba_0_org or ba_1_org) is freed and break from the main 'for loop'. Signed-off-by: Koushik Signed-off-by: Ravi Signed-off-by: Jeff Garzik [PATCH] OSS via82cxxx_audio.c: remove unused CONFIG_SOUND_VIA82CXXX_PROCFS code > >How else is this information available? > > lspci. it's just a verbose dump of PCI config registers. Sounds reasonable. Below is a patch to remove the CONFIG_SOUND_VIA82CXXX_PROCFS code. diffstat output: sound/oss/via82cxxx_audio.c | 218 ------------------------------------ 1 files changed, 1 insertion(+), 217 deletions(-) Signed-off-by: Adrian Bunk Signed-off-by: Jeff Garzik [PATCH] Another trivial orinoco update Jeff/Andrew please apply: This patch alters the convention with which orinoco_lock() is invoked in the orinoco driver. This should cause no behavioural change, but reduces meaningless diffs between the mainline and CVS version of the driver. Another small step towards a merge. Signed-off-by: David Gibson Signed-off-by: Jeff Garzik 8139cp: support for TTTech MC322 [PATCH] Fix ADMtek Comet on x86-64 This Tulip clone doesn't like an Cache Line setting over 8 words. This broke it on x86-64. Make it the same as on i386. Signed-off-by: Jeff Garzik [MMC] Remove linux/blkdev.h include. Since we no longer pass a struct request to the MMC host drivers, it seems pointless including linux/blkdev.h. Instead, include linux/highmem.h and asm/scatterlist.h as appropriate. Signed-off-by: Russell King [PATCH] x86-64: kernel/sys.c build fix On x86-64, the attached patch is required to fix > kernel/sys.c: In function `sys_setsid': > kernel/sys.c:1078: error: `tty_sem' undeclared (first use in this function) > kernel/sys.c:1078: error: (Each undeclared identifier is reported only once > kernel/sys.c:1078: error: for each function it appears in.) kernel/sys.c needs the tty_sem declaration from linux/tty.h. [PATCH] USB: minor usb doc/comment fixes Some minor doc/comment fixes for USB. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: definitions for USB2 debug device, debug port This provides basic definitions to support "USB2 Debug Devices", as supported by certain EHCI root hub ports (from ALI, Intel, NVidia, and other vendors). Docs are available at Intel's USB spec webpage. The basic idea is to help debug "legacy free" systems, with no serial port for a console or debugger to use. The USB debug port uses PIO to send and receive at most 8 bytes of high speed data at a time, so it can support one I/O channel without needing _any_ of the usbcore infrastructure, or DMA, or IRQs. (Cost can be 2KB rather than ~150KB.) Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: usb makefile tweaks Two minor Makefile fixes, catching up to some driver removals. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: ohci diagnostic tweak This changes the OHCI "USB HC TakeOver failed" message to be a bit more informative, by fingering the root cause: a BIOS/SMM bug. That way they're more likely to either bug the board vendor, or find workarounds (like tweaking the BIOS setup, or the ohci_hcd no_handshake parameter) before giving up or (wrongly) reporting a Linux bug. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] eepro: cache EEPROM values eepro: cache EEPROM values Signed-off-by: Aristeu Sergio Rozanski Filho Signed-off-by: Jeff Garzik [PATCH] eepro: use module_param macros eepro: use module_param macros Signed-off-by: Aristeu Sergio Rozanski Filho Signed-off-by: Jeff Garzik [PATCH] eepro: basic ethtool support eepro: basic ethtool support Signed-off-by: Aristeu Sergio Rozanski Filho Signed-off-by: Jeff Garzik [PATCH] eepro: fix return value in init_module() eepro: fix return value in init_module() Signed-off-by: Aristeu Sergio Rozanski Filho Signed-off-by: Jeff Garzik [PATCH] eepro: fix auto-detection option eepro: fix auto-detection option Signed-off-by: Aristeu Sergio Rozanski Filho Signed-off-by: Jeff Garzik [PATCH] USB: ehci "hc died" on startup (chip bug workaround) This fixes OSDL bugid #3056 for at least some users, where the EHCI driver gets a "fatal error" IRQ on startup ... only on certain boards, starting with the 2.6.6 or 2.6.7 kernels. These IRQs normally indicate that an invalid DMA address got passed to the controller, or something equally nasty and unrecoverable. But it turns out that some of these controllers (at least ALI and Intel) are lying. They're issuing these IRQs without stopping, contrary to the EHCI spec ... so these IRQs can be recovered from. Thanks to Christian Iversen for noticing that his ALI controller would continue operating, which was the first real break in this annoying case. This patch tests for these bogus IRQs, and ignores them ... working around what's clearly a chip bug. It's not clear why we started triggering that bug, but at least EHCI is now usable on boards exhibiting this problem. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] hotplug/acpiphp_ibm: module_param fix File permissins should be octal number. Signed-off-by: Domen Puncer Signed-off-by: Greg Kroah-Hartman [PATCH] PCI Hotplug: Remove unneeded kmalloc casts from ibmphp_pci.c this patch removes some unneeded casts from ibmphp_pci.c that cast the result of kmalloc to some pointer type. It also uses "sizeof(*result)" instead of "sizeof(type_of_result)". Signed-off-by: Rolf Eike Beer Signed-off-by: Greg Kroah-Hartman [PATCH] PCI Hotplug: use PCI_DEVFN in ibmphp_pci.c This patch changes ibmphp_pci.c to use the PCI_DEVFN makro where possible instead of doing the match itself. Signed-off-by: Rolf Eike Beer Signed-off-by: Greg Kroah-Hartman [PATCH] PCI Hotplug: don't check pointer before kalling kfree in ibmphp_pci.c Calling kfree() with a NULL pointer is no error so we don't need this check. Signed-off-by: Rolf Eike Beer Signed-off-by: Greg Kroah-Hartman [ACPI] Use kernel.h for ARRAY_SIZE() instead of using local NUM_OF(). Signed-off-by: Randy Dunlap Signed-off-by: Len Brown [IA64] Use alloc_bootmem() to get the space for mca_data. PERCPU_MCA_SIZE is not a power of two, so is unsuited to be used as the 'align' argument to __alloc_bootmem(). In fact we don't need any special alignment for this structure, so we can use the simpler alloc_bootmem() macro interface to the allocator. Signed-off-by: Tony Luck [PATCH] I2C: add new sensors driver: SMSC LPC47B397-NC This patch (3rd time's a charm) adds support for the SMSC LPC47B397-NC sensor chip. It was sponsored by In-Store Broadcasting Network. Signed-off-by: Craig Kelly (In-Store Broadcasting Network) Signed-off-by: Glenn Ball (Utilitek Systems, Inc.) Signed-off-by: Mark M. Hoffman [PATCH] I2C: let I2C_ALGO_SGI depend on MIPS Signed-off-by: Greg Kroah-Hartman [PATCH] i2c-ali1563: fix init & exit section usage Fix init & exit section usages, beginning with this diagnostic from reference_discarded.pl (make buildcheck): Error: ./drivers/i2c/busses/i2c-ali1563.o .data refers to 00000278 R_386_32 .exit.text Signed-off-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman Fix exploitable hole in sg_scsi_ioctl in_len and out_len are signed quantites copied from user space but are only checked to see if they're > PAGE_SIZE. The exploit would be to pass in a negative quantity which would pass the check. Fix by making them unsigned. Signed-off-by: James Bottomley [IA64] correct PERCPU_MCA_SIZE and ia64_init_stack size * PERCPU_MCA_SIZE was the size of the wrong structure. * ia64_init_stack was larger than necessary. Signed-off-by: Russ Anderson Signed-off-by: Tony Luck [ARM PATCH] 2358/1: Add IXP46x I2C platform device Patch from Deepak Saxena The IXP46x chips from Intel include the same I2C controller as found on the IOP3xx. This patch adds a hook to the platform-level init code to add that device to the device tree if running on a 46x CPU. A separate patch has been sent upstream via Greg KH for the changes to the I2C driver to support both IOP and IXP systems. While at it, we fix a minor issue with the code where we were sending the wrong ptr to platform_add_devices(). I am not sure how it ever worked... Signed-off-by: Deepak Saxena Signed-off-by: Russell King Fix up udev url in Documentation/Changes file Signed-off-by: Greg Kroah-Hartman [PATCH] add feature-removal-schedule.txt documentation Add Documentation/feature-removal-schedule.txt as a way to notify everyone when and what is going to be removed. Signed-off-by: Greg Kroah-Hartman [PATCH] add cpufreq info to Documentation/feature-removal-schedule.txt Add 2.4.x cpufreq /proc and sysctl interface removal to the feature-removal-schedule. Signed-off-by: Randy Dunlap [ARM PATCH] 2361/1: clean up irq handling code for IOP33x platforms Patch from Dave Jiang Signed-off-by: Dave Jiang Substitute 2 asm instr w/ one recommend by RMK. Signed-off-by: Russell King [ARM PATCH] 2362/1: cleanup of PCI defines for IOP321 platforms Patch from Dave Jiang Signed-off-by: Dave Jiang Major cleanup of the 321 PCI defines to make them more coherent. Unified some groups that were per platform to common proc specific. Removed some magic numbers. Signed-off-by: Russell King Fix do_brk() locking in library loader The regular executable loader path doesn't need the locking, because it's the only user of its VM. But the same is not true at library load time. So get the mmap semaphore. [ARM PATCH] 2363/1: IQ80332 platform port Patch from Dave Jiang Signed-off-by: Dave Jiang This is the IQ80332 platform port that's based off the IOP33x CPU. The IQ80332 is an PCI-express CRB based off the IOP332 processor. Otherwise functionalites are fairly similar to IQ80331. Signed-off-by: Russell King [IA64] add hpzx1_swiotlb machine-vector I was in need of a 3.3V/dual-voltage-capable PCI sound-card and, as luck would have it, the only card of that sort in the local computer store was one that _still_ has a DMA engine that cannot even DMA to all 32 bits (it's limited to 28 bits). Hard to believe, but true (the card in question is a "SoundBlaster Live! 24-bit" with a CA0106 chip; stay away from that one if you can...). Anyhow, since I don't like it when PCI cards don't work in my machine, I created the attached patch which adds a new machine-vector to enable support of such broken cards. With the patch applied, you can either configure the kernel for "HP-zx1/sx1000+swiotlb" or configure for "generic" and boot with option "machvec=hpzx1_swiotlb" to enable support for broken PCI devices. The patch works as follows: the new machvec implements a I/O MMU which will use the hardware I/O MMU whenever possible but fall back on the software I/O TLB when encountering a device that can't be supported by the hardware I/O MMU. Fortunately, we don't have to mess with MAX_DMA_ADDRESS or create a new zone: the software I/O TLB allocates its memory as low as possible and early in the boot-process, so on any machine with low memory, we're pretty much guaranteed that we'll get a reasonable amount of low memory, which is all we need to properly support broken PCI cards. Note that I made a small change to swiotlb.c: I added a swiotlb_init_with_default_size() function to let the new I/O MMU initialize the software I/O TLB with less than 64MB (which is way too much for the limited uses we'll see for the broken PCI devices; for example, the CA0106 chip allocates only coherent buffers of about 128KB). The patch has been tested on a zx1 machine in the generic, hpzx1, and hpzx1_swiotlb configuration. Thanks to Alex Williamson for the suggestion of doing this via a completely separate machvec. Signed-off-by: David Mosberger-Tang Signed-off-by: Tony Luck [netdrvr s2io] make debug_level variable static Fixes 'make allyesconfig' build conflict with infiniband, which also has a global variable named 'debug_level'. Cset exclude: jmunsin@iki.fi|ChangeSet|20041221190949|45117 Reverted due to problems reported by users Signed-off-by: Greg Kroah-Hartman [PATCH] ixgb: Limit number of Rx Descriptors to 512 Workaround for a Si Erratum. When more that 512 Rx descriptors are used, there may be Rx data corruption. Signed-off-by: Ganesh Venkatesan [PATCH] ixgb: Enable Message Signalled Interrupts Signed-off-by: Ganesh Venkatesan [PATCH] ixgb: Add support for 10GbE LR device ID Signed-off-by: Ganesh Venkatesan [PATCH] ixgb: Fix VLAN filter setup errors (while running on PPC) Signed-off-by: Ganesh Venkatesan [PATCH] ixgb: Fix memory leak in NAPI mode Signed-off-by: Ganesh Venkatesan [PATCH] ixgb: Poll Routine cleanup Includes fixes for (a) kernel panic when the interface is shutdown when Poll is active (b) include tx workdone in deciding when to quit polling mode (c) fix poll quit condition (from Robert Olsson) Signed-off-by: Ganesh Venkatesan [PATCH] ixgb: Fix error in setting MFS register Signed-off-by: Ganesh Venkatesan [PATCH] ixgb: Fix infinite loop trying to re-establish link Signed-off-by: Ganesh Venkatesan [PATCH] ixgb: Limit Rx Address Filter Array entries to 3 Signed-off-by: Ganesh Venkatesan [PATCH] ixgb: Remove support for RAIDC interrupt mitigation Signed-off-by: Ganesh Venkatesan [PATCH] ixgb: Replace kmalloc with vmalloc (one time alloc) Signed-off-by: Ganesh Venkatesan [PATCH] ixgb: ethtool_ops support Signed-off-by: Ganesh Venkatesan [PATCH] ixgb: Shrink size and fix ordering of elements in ixgb_buffer Signed-off-by: Ganesh Venkatesan [PATCH] ixgb: Fix Tx cleanup logic Signed-off-by: Ganesh Venkatesan [PATCH] ixgb: Support for 2.6.x style module parameters Signed-off-by: Ganesh Venkatesan [PATCH] ixgb: Driver version number update Signed-off-by: Ganesh Venkatesan [PATCH] ixgb: White space corrections Signed-off-by: Ganesh Venkatesan Fix TASK_SIZE range check that got lost in recent clear_page_range()/4-level page table updates. [PATCH] fix double iget in romfs_fill_super Acked-by: Al Viro Signed-off-by: Linus Torvalds Merge small pipe writes into the write buffers [PATCH] cs416x: use upcase in config Kconfig symbols are always uppercase. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] oprofile: update m32r for api changes oprofile m32r arch updates, including some API changes. Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] hugetlbfs MAINTAINERS update I'm being at least sometimes deferred to for hugetlb maintenance. I also originally wrote the fs methods, and generally get stuck working on it on a regular basis. So here is a MAINTAINERS entry reflecting that. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] m32r: build fix This patch is required to fix compile errors for m32r. This was originally given by the following patch: [PATCH] move irq_enter and irq_exit to common code http://www.ussg.iu.edu/hypermail/linux/kernel/0411.1/1738.html I think it was maybe accidentally dropped only for the m32r arch due to a patching conflict with the other patches or something like that. Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] vmscan: count writeback pages in nr_scanned OOM kills have been observed with 70% of the pages in lowmem being in the writeback state. If we count those pages in sc->nr_scanned, the VM should throttle and wait for IO completion, instead of OOM killing. (akpm: this is how the code was designed to work - we broke it six months ago). Signed-off-by: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] compound pages optimisation Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: add performance monitor register information to processor.h Most special purpose registers on the ppc64 have both the SPR number, and the various fields within the register defined in asm-ppc64/processor.h. So far that's not true for the performance counter control registers, MMCR0 and MMCRA. They have the SPR numbers defined, but the internal fields are defined in the oprofile code and (just a few) in traps.c where they're actually used. This patch moves all the MMCR0 and MMCRA definitions, plus the MSR performance monitor bit, MSR_PMM, into processor.h. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: use newer RTAS call when available This patch is from Nathan Fontenot originally. The PPC64 EEH code needs a small update to start using the ibm,read-slot-reset-state2 rtas call if available. The currently used ibm,read-slot-reset-state call will be going away on future machines. This patch attempts to use the newer rtas call if available and falls back the older version otherwise. This will maintain EEH slot checking capabilities on all future and current firmware levels. Signed-off-by: Nathan Fontenot Signed-off-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: clean up trap handling This patch is from Jake Moilanen . Clean-up of traps.c. Moved the machine dependent calls to a ppc_md call, and moved the pSeries specific code to ras.c. I also changed the naming convention to more closely follow the Linux standards. Signed-off-by: Jake Moilanen Signed-off-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: clean up trap handling in head.S This patch is from Jake Moilanen . Changed the naming conventions for head.S to more closely follow the Linux naming conventions. Signed-off-by: Jake Moilanen Signed-off-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: Log machine check errors to error log and NVRAM This patch is from Jake Moilanen . Log machine check errors to error log and NVRAM. Signed-off-by: Dave Altobelli Signed-off-by: Jake Moilanen Signed-off-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: IOMMU cleanups: rename pci_dma_direct.c This patch renames pci_dma_direct.c to pci_direct_iommu.c to comply to the naming convention of the other iommu files. This is part of the iommu cleanup, but broken out as a separate patch since for mainline, a BK rename is more appropriate. Still, we need a patch to apply for non-BK-based trees (-mm) Signed-off-by: Olof Johansson Acked-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: IOMMU cleanups: Main cleanup patch Earlier cleanup efforts of the ppc64 IOMMU code have mostly been targeted at simplifying the allocation schemes and modularising things for the various platforms. The IOMMU init functions are still a mess. This is an attempt to clean them up and make them somewhat easier to follow. The new rules are: 1. iommu_init_early_ is called before any PCI/VIO init is done 2. The pcibios fixup routines will call the iommu_{bus,dev}_setup functions appropriately as devices are added. TCE space allocation has changed somewhat: * On LPARs, nothing is really different. ibm,dma-window properties are still used to determine table sizes. * On pSeries SMP-mode (non-LPAR), the full TCE space per PHB is split up in 256MB chunks, each handed out to one child bus/slot as needed. This makes current max 7 child buses per PHB, something we're currently below on all machine models I'm aware of. * Exception to the above: Pre-POWER4 machines with Python PHBs have a full GB of DMA space allocated at the PHB level, since there are no EADS-level tables on such systems. * PowerMac and Maple still work like before: all buses/slots share one table. * VIO works like before, ibm,my-dma-window is used like before. * iSeries has not been touched much at all, besides the changed unit of the it_size variable in struct iommu_table. Other things changed: * Powermac and maple PCI/IOMMU inits have been changed a bit to conform to the new init structure * pci_dma_direct.c has been renamed pci_direct_iommu.c to match pci_iommu.c (see separate patch) * Likewise, a couple of the pci direct init functions have been renamed. Signed-off-by: Olof Johansson Acked-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] request_irq: avoid slash in proc directory entries A few users of request_irq pass a string with '/'. As a result, ls -l /proc/irq/*/* will fail to list these entries. Signed-off-by: Olaf Hering Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] prohibit slash in proc directory entry names proc_create() needs to check that the name of an entry to be created does not contain a '/' character. To test, I hacked the ibmveth driver to try to call request_irq with a bogus "foo/bar" devname. The creation of the /proc/irq/1234/xxx entry silently fails, as intended. Perhaps the irq code should be made to check for the failure. Signed-off-by: Nathan Lynch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix cdrom autoclose The attached patch fixes the CD-ROM autoclose. It is broken in recent kernels for CD-ROMs that do not properly report that the tray is opened. Now on such a drives the kernel will do one close attempt and check for the disc again. This is how it used to work in the past. Signed-off-by: Stas Sergeev Acked-by: Alexander Kern Acked-by: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] readdir: return value missed in getdents64 Small issue: return value missed in getdents64, but handled in getdents. Signed-Off-by: Prasanna Meda Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix sx8 blk driver device naming Attached fixes sysfs naming of sx8 block devs to follow LANANA naming. You then get /sys/block/sx8!0, etc instead of /sys/block/sx80_0 (device names should be /dev/sx8/0 instead of /dev/sx80_0) Signed-off-by: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ibmasm: fix init/exit sections Fix init & exit section usage, started with this diagnostic from reference_discarded.pl (make buildcheck): Error: ./drivers/misc/ibmasm/module.o .data refers to 00000058 R_386_32 .exit.text Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] gen_init_cpio symlink, pipe and socket support This patch makes gen_init_cpio more complete by adding symlink, pipe and socket support. It updates scripts/gen_initramfs_list.sh to support the new types. The patch applies to the recent mm series that already have the updated gen_init_cpio and gen_initramfs_list.sh. From: William Lee Irwin III The rest of gen_init_cpio.c seems to cast the result of strlen() to handle this situation, so this patch follows suit while killing off size_t -related printk() warnings. Signed-off-by: William Irwin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] INITRAMFS: allow no trailer According to "initramfs buffer format -- third draft" http://lwn.net/2002/0117/a/initramfs-buffer-format.php3 "the cpio "TRAILER!!!" entry (cpio end-of-archive) is optional, but is not ignored" The kernel handling does not follow this spec. If you add null padding after an uncompressed cpio without TRAILER!!! the kernel complains "no cpio magic". In a gzipped archive one gets "junk in gzipped archive" without the TRAILER!!! This patch changes the state transitions so the kernel will follow the spec. Tested: padded uncompressed, padded compressed, unpadded compressed (error) and trailing junk in compressed (error) === I have a boot loader that knows how to load files, determine their size, and advance to the next 4-byte boundary and reports the total size of the files loaded. It doesn't understand about converting this number to some ASCII representation. With this patch I can embed the contents of a file padded with NULs with out knowing the exact size of the file with the following files: 1) file containing cpio header & file name, padded to 4 bytes 2) contents of file 3) pad file of zeros, the size at least as large as the that specified for the file. hpa points out that you should be careful with the headers, use unique inode numbers and/or add a cpio header with just TRAILER!!! to reset the inode hash table to avoid unwanted hard links. I just put this sequence as the last files loaded. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext3 htree telldir() fix telldir() is broken on large ext3 dir_index'd directories because getdents() gives d_off==0 for the first entry Here's a patch which fixes the problem, but note the following warning from the readdir man page: According to POSIX, the dirent structure contains a field char d_name[] of unspecified size, with at most NAME_MAX characters preceding the terminating null character. Use of other fields will harm the porta- bility of your programs. Also, as always, telldir() and seekdir() are truly awful interfaces because they implicitly assume that (a) a directory is a linear data structure, and (b) that the position in a directory can be expressed in a cookie which hsa only 31 bits on 32-bit systems. So there will be hash colliions that will cause programs that assume that seekdir(dirent->d_off) will always return the next directory entry to sometimes lose directory entries in the not-as-unlikely-as-we-would wish case of a 31-bit hash collision. Really, any program which is using telldir/seekdir really should be rewritten to not use these interfaces if at all possible. So with these caveats.... What we need to do is wire '.' and '..' to have hash values of (0,0) and (2,0), respectively, without ignoring other existing dirents with colliding hashes. (In those cases the programs will break, but they are statistically rare, and there's not much we can do in those cases anyway.) Signed-off-by: "Theodore Ts'o" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] initramfs: unprivileged image creation This patch makes several tweaks so that an initramfs image can be completely created by an unprivileged user. It should maintain compatibility with previous initramfs early userspace cpio/image creation and it updates documentation. There are a few very important tweaks: CONFIG_INITRAMFS_SOURCE is now either a single cpio archive that is directly used or a list of directories and files for building a cpio archive for the initramfs image. Making the cpio archive listable in CONFIG_INITRAMFS_SOURCE makes the cpio step more official and automated so that it doesn't have to be copied by hand to usr/initramfs_data.cpio (I think this was broken anyway and would be overwritten). The alternative list of directories *and* files means that files can be install in a "root" directory and device-special files can be listed in a file list. CONFIG_ROOT_UID and CONFIG_ROOT_GID are now available for doing simple user/group ID translation. That means that user ID 500, group ID 500 can create all the files in the "root" directory, but that they can all be owned by user ID 0, group ID 0 in the cpio image. Various documentation updates to pull it all together. Removal of old cruft that was unused/misleading. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] oprofile: fix ia64 callgraph bug with old gcc With Keith Owens This patch from Keith Owens fixes a bug in the ia64 port of oprofile when built without the kdb patch and with a pre-3.4 gcc. If you build a standard kernel with gcc < 3.4 then ia64_spinlock_contention_pre3_4 is defined. But a standard kernel does not have ia64_spinlock_contention_pre3_4_end, that label is only added by the kdb patch. To get the backtrace profiling with gcc < 3.4, the _end label needs to be added as part of the kernprof patch, then I will remove it from kdb. Signed-off-by: Keith Owens Signed-off-by: Greg Banks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] nfsd4_setclientid_confirm locking fix Avoid unlock-without-lock problem on error path in nfsd4_setclientid_confirm Signed-off-by: Neil Brown Signed-off-by: J. Bruce Fields Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: more agressive wake_idle() This patch addresses some problems with wake_idle(). Currently wake_idle() will wake a task on an alternate cpu if: 1) task->cpu is not idle 2) an idle cpu can be found However the span of cpus to look for is very limited (only the task->cpu's sibling). The scheduler should find the closest idle cpu, starting with the lowest level domain, then going to higher level domains if allowed (doamin has flag SD_WAKE_IDLE). This patch does this. This and the other two patches (also to be submitted) combined have provided as much at 5% improvement on that "online transaction DB workload" and 2% on the industry standard J@EE workload. I asked Martin Bligh to test these for regression, and he did not find any. I would like to submit for inclusion to -mm and barring any problems eventually to mainline. Signed-off-by: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: can_migrate exception for idle cpus Fix can_migrate to allow aggressive steal for idle cpus. This -was- in mainline, but I believe sched_domains kind of blasted it outta there. IMO, it's a no brainer for an idle cpu (with all that cache going to waste) to be granted to steal a task. The one enhancement I have made was to make sure the whole cpu was idle. Signed-off-by: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: newidle fix Allow idle_balance to search an incresingly larger span of cpus to find a cpu. Minor change, NODE_SD_INIT gets SD_BALANCE_NEWIDLE flag. This is critical for x86_64, where there is only one cpu oer node. In the current code, idle_balance for Opteron -never- works. Signed-off-by: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: active_load_balance() fixlet There is a small problem with the active_load_balance() patch that Darren sent out last week. As soon as we discover a potential 'target_cpu' from 'cpu_group' to try to push tasks to, we cease considering other CPUs in that group as potential 'target_cpu's. We break out of the for_each_cpu_mask() loop and try to push tasks to that CPU. The problem is that there may well be other idle cpus in that group that we should also try to push tasks to. Here is a patch to fix that small problem. The solution is to simply move the code that tries to push the tasks into the for_each_cpu_mask() loop and do away with the whole 'target_cpu' thing entirely. Compiled & booted on a 16-way x440. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: reset cache_hot_time Reset cache_hot_time to sane values (in the ms range). Some recent changes resulted in values in the us range. Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched.c whitespace mangler Convert whitespace in sched.c to tabs Signed-off-by: Con Kolivas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: alter_kthread_prio Timeslice proportion has been increased substantially for -niced tasks. As a result of this kernel threads have much larger timeslices than they previously had. Change kernel threads' nice value to -5 to bring their timeslice back in line with previous behaviour. This means kernel threads will be less likely to cause large latencies under periods of system stress for normal nice 0 tasks. Signed-off-by: Con Kolivas Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: adjust_timeslice_granularity The minimum timeslice was decreased from 10ms to 5ms. In the process, the timeslice granularity was leading to much more rapid round robinning of interactive tasks at cache trashing levels. Restore minimum granularity to 10ms. Signed-off-by: Con Kolivas Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: add_requeue_task We can requeue tasks for cheaper then doing a complete dequeue followed by an enqueue. Add the requeue_task function and perform it where possible. This will be hit frequently by upcoming changes to the requeueing in timeslice granularity. Signed-off-by: Con Kolivas Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: requeue_granularity Change the granularity code to requeue tasks at their best priority instead of changing priority while they're running. This keeps tasks at their top interactive level during their whole timeslice. Signed-off-by: Con Kolivas Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: remove_interactive_credit Special casing tasks by interactive credit was helpful for preventing fully cpu bound tasks from easily rising to interactive status. However it did not select out tasks that had periods of being fully cpu bound and then sleeping while waiting on pipes, signals etc. This led to a more disproportionate share of cpu time. Backing this out will no longer special case only fully cpu bound tasks, and prevents the variable behaviour that occurs at startup before tasks declare themseleves interactive or not, and speeds up application startup slightly under certain circumstances. It does cost in interactivity slightly as load rises but it is worth it for the fairness gains. Signed-off-by: Con Kolivas Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: use cached current value schedule() can use prev instead of get_current(). Signed-off-by: Oleg Nesterov Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] don't hide thread_group_leader() from grep Replace open-coded thread_group_leader() calls. Signed-off-by: Oleg Nesterov Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: no need to recalculate rq no need to call task_rq in setscheduler; just use rq Signed-Off-By: Robert Love Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] export sched_setscheduler() for kernel module use This patch exports sched_setscheduler() so that it can be used by a kernel module to set a kthread's scheduling policy and associated parameters. Signed-off-by: Dean Nelson Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: remove outdated/misleading comments This patch removes two outdated/misleading comments from the CPU scheduler. 1) The first comment removed is simply incorrect. The function it comments on is not used for what the comments says it is anymore. 2) The second comment is a leftover from when the "if" block it comments on contained a goto. It does not any more, and the comment doesn't make sense. There isn't really a reason to add different comments, though someone might feel differently in the case of the second one. I'll leave adding a comment to anybody who wants to - more important to just get rid of them now. Signed-off-by: Josh Aas Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] introduce idle_task_exit Heiko Carstens figured out that offlining a cpu can leak mm_structs because the dying cpu's idle task fails to switch to init_mm and mmdrop its active_mm before the cpu is down. This patch introduces idle_task_exit, which allows the idle task to do this as Ingo suggested. I will follow this up with a patch for ppc64 which calls idle_task_exit from cpu_die. Signed-off-by: Nathan Lynch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: call idle_task_exit from cpu_die Call idle_task_exit from cpu_die to avoid mm_struct leak. Signed-off-by: Nathan Lynch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] improve preemption on SMP SMP locking latencies are one of the last architectural problems that cause millisec-category scheduling delays. CONFIG_PREEMPT tries to solve some of the SMP issues but there are still lots of problems remaining: spinlocks nested at multiple levels, spinning with irqs turned off, and non-nested spinning with preemption turned off permanently. The nesting problem goes like this: if a piece of kernel code (e.g. the MM or ext3's journalling code) does the following: spin_lock(&spinlock_1); ... spin_lock(&spinlock_2); ... then even with CONFIG_PREEMPT enabled, current kernels may spin on spinlock_2 indefinitely. A number of critical sections break their long paths by using cond_resched_lock(), but this does not break the path on SMP, because need_resched() *of the other CPU* is not set so cond_resched_lock() doesnt notice that a reschedule is due. to solve this problem i've introduced a new spinlock field, lock->break_lock, which signals towards the holding CPU that a spinlock-break is requested by another CPU. This field is only set if a CPU is spinning in a spinlock function [at any locking depth], so the default overhead is zero. I've extended cond_resched_lock() to check for this flag - in this case we can also save a reschedule. I've added the lock_need_resched(lock) and need_lockbreak(lock) methods to check for the need to break out of a critical section. Another latency problem was that the stock kernel, even with CONFIG_PREEMPT enabled, didnt have any spin-nicely preemption logic for the following, commonly used SMP locking primitives: read_lock(), spin_lock_irqsave(), spin_lock_irq(), spin_lock_bh(), read_lock_irqsave(), read_lock_irq(), read_lock_bh(), write_lock_irqsave(), write_lock_irq(), write_lock_bh(). Only spin_lock() and write_lock() [the two simplest cases] where covered. In addition to the preemption latency problems, the _irq() variants in the above list didnt do any IRQ-enabling while spinning - possibly resulting in excessive irqs-off sections of code! preempt-smp.patch fixes all these latency problems by spinning irq-nicely (if possible) and by requesting lock-breaks if needed. Two architecture-level changes were necessary for this: the addition of the break_lock field to spinlock_t and rwlock_t, and the addition of the _raw_read_trylock() function. Testing done by Mark H Johnson and myself indicate SMP latencies comparable to the UP kernel - while they were basically indefinitely high without this patch. i successfully test-compiled and test-booted this patch ontop of BK-curr using the following .config combinations: SMP && PREEMPT, !SMP && PREEMPT, SMP && !PREEMPT and !SMP && !PREEMPT on x86, !SMP && !PREEMPT and SMP && PREEMPT on x64. I also test-booted x86 with the generic_read_trylock function to check that it works fine. Essentially the same patch has been in testing as part of the voluntary-preempt patches for some time already. NOTE to architecture maintainers: generic_raw_read_trylock() is a crude version that should be replaced with the proper arch-optimized version ASAP. From: Hugh Dickins The i386 and x86_64 _raw_read_trylocks in preempt-smp.patch are too successful: atomic_read() returns a signed integer. Signed-off-by: Ingo Molnar Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] preempt cleanup This is another generic fallout from the voluntary-preempt patchset: a cleanup of the cond_resched() infrastructure, in preparation of the latency reduction patches. The changes: - uninline cond_resched() - this makes the footprint smaller, especially once the number of cond_resched() points increase. - add a 'was rescheduled' return value to cond_resched. This makes it symmetric to cond_resched_lock() and later latency reduction patches rely on the ability to tell whether there was any preemption. - make cond_resched() more robust by using the same mechanism as preempt_kernel(): by using PREEMPT_ACTIVE. This preserves the task's state - e.g. if the task is in TASK_ZOMBIE but gets preempted via cond_resched() just prior scheduling off then this approach preserves TASK_ZOMBIE. - the patch also adds need_lockbreak() which critical sections can use to detect lock-break requests. Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] add lock_need_resched() Add lock_need_resched() which is to check for the necessity of lock-break in a critical section. Used by later latency-break patches. tested on x86, should work on all architectures. Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: add cond_resched_softirq() It adds cond_resched_softirq() which can be used by _process context_ softirqs-disabled codepaths to preempt if necessary. The function will enable softirqs before scheduling. (Later patches will use this primitive.) Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: ext3: fix scheduling latencies in ext3 The attached patch fixes long scheduling latencies in the ext3 code, and it also cleans up the existing lock-break functionality to use the new primitives. This patch has been in the -VP patchset for quite some time. Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] break latency in invalidate_list() break latency in invalidate_list(). Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: vfs: fix scheduling latencies in prune_dcache() and select_parent() The attached patch fixes long scheduling latencies in select_parent() and prune_dcache(). The prune_dcache() lock-break is easy, but for select_parent() the only viable solution i found was to break out if there's a resched necessary - the reordering is not necessary and the dcache scanning/shrinking will later on do it anyway. Signed-off-by: Ingo Molnar Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: net: fix scheduling latencies in netstat The attached patch fixes long scheduling latencies caused by access to the /proc/net/tcp file. The seqfile functions keep softirqs disabled for a very long time (i've seen reports of 20+ msecs, if there are enough sockets in the system). With the attached patch it's below 100 usecs. The cond_resched_softirq() relies on the implicit knowledge that this code executes in process context and runs with softirqs disabled. Potentially enabling softirqs means that the socket list might change between buckets - but this is not an issue since seqfiles have a 4K iteration granularity anyway and /proc/net/tcp is often (much) larger than that. Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: net: fix scheduling latencies in __release_sock The attached patch fixes long scheduling latencies caused by backlog triggered by __release_sock(). That code only executes in process context, and we've made the backlog queue private already at this point so it is safe to do a cond_resched_softirq(). Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: mm: fix scheduling latencies in unmap_vmas() The attached patch fixes long latencies in unmap_vmas(). We had lockbreak code in that function already but it did not take delayed effects of TLB-gather into account. Has been tested as part of the -VP patchset. Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: mm: fix scheduling latencies in get_user_pages() The attached patch fixes long scheduling latencies in get_user_pages(). Has been tested as part of the -VP patchset. Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: mm: fix scheduling latencies in filemap_sync() The attached patch, written by Andrew Morton, fixes long scheduling latencies in filemap_sync(). Has been tested as part of the -VP patchset. Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix keventd execution dependency We dont want to execute off keventd since it might hold a semaphore our callers hold too. This can happen when kthread_create() is called from within keventd. This happened due to the IRQ threading patches but it could happen with other code too. Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: fix scheduling latencies in mttr.c Fix scheduling latencies in the MTRR-setting codepath. Also, fix bad bug: MTRR's _must_ be set with interrupts disabled! From: Bernard Blackham The patch sched-fix-scheduling-latencies-in-mttr in recent -mm kernels has the bad side-effect of re-enabling interrupts even if they were disabled. This caused bugs in Software Suspend 2 which reenabled MTRRs whilst interrupts were already disabled. Attached is a replacement patch which uses spin_lock_irqsave instead of spin_lock_irq. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: fix scheduling latencies in vgacon.c This patch fixes scheduling latencies in vgacon_do_font_op(). The code is protected by vga_lock already so it's safe to drop (and re-acquire) the BKL. Has been tested in the -VP patchset. Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: fix scheduling latencies for !PREEMPT kernels This patch adds a handful of cond_resched() points to a number of key, scheduling-latency related non-inlined functions. This reduces preemption latency for !PREEMPT kernels. These are scheduling points complementary to PREEMPT_VOLUNTARY scheduling points (might_sleep() places) - i.e. these are all points where an explicit cond_resched() had to be added. Has been tested as part of the -VP patchset. Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] idle thread preemption fix The early bootup stage is pretty fragile because the idle thread is not yet functioning as such and so we need preemption disabled. Whether the bootup fails or not seems to depend on timing details so e.g. the presence of SCHED_SMT makes it go away. Disabling preemption explicitly has another advantage: the atomicity check in schedule() will catch early-bootup schedule() calls from now on. The patch also fixes another preempt-bkl buglet: interrupt-driven forced-preemption didnt go through preempt_schedule() so it resulted in auto-dropping of the BKL. Now we go through preempt_schedule() which properly deals with the BKL. Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] oprofile smp_processor_id() fixes Clean up a few suspicious-looking uses of smp_processor_id() in preemptible code. The current_cpu_data use is unclean but most likely safe. I haven't seen any outright bugs. Since oprofile does not seem to be ready for different-type CPUs (do we even care?), the patch below documents this property by using boot_cpu_data. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix smp_processor_id() warning in numa_node_id() The patch below fixes smp_processor_id() warnings that are triggered by numa_node_id(). All uses of numa_node_id() in mm/mempolicy.c seem to use it as a 'hint' only, not as a correctness number. Once a node is established, it's used in a preemption-safe way. So the simple fix is to disable the checking for numa_node_id(). But additional review would be more than welcome, because this patch turns off the preemption-checking of numa_node_id() permanently. Tested on amd64. Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] debug sched domains before attach Change the sched-domain debug routine to be called on a per-CPU basis, and executed before the domain is actually attached to the CPU. Previously, all CPUs would have their new domains attached, and then the debug routine would loop over all of them. This has two advantages: First, there is no longer any theoretical races: we are running the debug routine on a domain that isn't yet active, and should have no racing access from another CPU. Second, if there is a problem with a domain, the validator will have a better chance to catch the error and print a diagnostic _before_ the domain is attached, which may take down the system. Also, change reporting of detected error conditions to KERN_ERR instead of KERN_DEBUG, so they have a better chance of being seen in a hang on boot situation. The patch also does an unrelated (and harmless) cleanup in migration_thread(). Signed-off-by: Nick Piggin Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Replace 'numnodes' with 'node_online_map' - alpha Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Replace 'numnodes' with 'node_online_map' - arm Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Replace 'numnodes' with 'node_online_map' - i386 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Replace 'numnodes' with 'node_online_map' - ia64 From: Jesse Barnes Here are some compile fixes for this patch. Looks like simple typos. Signed-off-by: Jesse Barnes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Replace 'numnodes' with 'node_online_map' - m32r Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Replace 'numnodes' with 'node_online_map' - mips Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Replace 'numnodes' with 'node_online_map' - parisc Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Replace 'numnodes' with 'node_online_map' - ppc64 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Replace 'numnodes' with 'node_online_map' - x86_64 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Replace 'numnodes' with 'node_online_map' - arch-independent From: William Lee Irwin III Without passing this parameter by reference, the changes to used_node_mask are meaningless and do not affect the caller's copy. This leads to boot-time failure. This proposed fix passes it by reference. Signed-off-by: William Irwin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] block2mtd: avoid touching truncate_count blockmtd doesn't need to initialise address_space.truncate_count: open_bdev_excl did that. Plus I have a patch queued up which removes ->truncate_count. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] vmtrunc: truncate_count not atomic Why is mapping->truncate_count atomic? It's incremented inside i_mmap_lock (and i_sem), and the reads don't need it to be atomic. And why smp_rmb() before call to ->nopage? The compiler cannot reorder the initial assignment of sequence after the call to ->nopage, and no cpu (yet!) can read from the future, which is all that matters there. And delete totally bogus reset of truncate_count from blkmtd add_device. truncate_count is all about detecting i_size changes: i_size does not change there; and if it did, the count should be incremented not reset. Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] vmtrunc: restore unmap_vmas zap_bytes The low-latency unmap_vmas patch silently moved the zap_bytes test after the TLB finish and lockbreak and regather: why? That not only makes zap_bytes redundant (might as well use ZAP_BLOCK_SIZE), it makes the unmap_vmas level redundant too - it's all about saving TLB flushes when unmapping a series of small vmas. Move zap_bytes test back before the lockbreak, and delete the curious comment that a small zap block size doesn't matter: it's true need_flush prevents TLB flush when no page has been unmapped, but unmapping pages in small blocks involves many more TLB flushes than in large blocks. Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] vmtrunc: unmap_mapping_range_tree Move unmap_mapping_range's nonlinear vma handling out to its own inline, parallel to the prio_tree handling; unmap_mapping_range_list is a better name for the nonlinear list, rename the other unmap_mapping_range_tree. Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] vmtrunc: unmap_mapping dropping i_mmap_lock vmtruncate (or more generally, unmap_mapping_range) has been observed responsible for very high latencies: the lockbreak work in unmap_vmas is good for munmap or exit_mmap, but no use while mapping->i_mmap_lock is held, to keep our place in the prio_tree (or list) of a file's vmas. Extend the zap_details block with i_mmap_lock pointer, so unmap_vmas can detect if that needs lockbreak, and break_addr so it can notify where it left off. Add unmap_mapping_range_vma, used from both prio_tree and nonlinear list handlers. This is what now calls zap_page_range (above unmap_vmas), but handles the lockbreak and restart issues: letting unmap_mapping_range_ tree or list know when they need to start over because lock was dropped. When restarting, of course there's a danger of never making progress. Add vm_truncate_count field to vm_area_struct, update that to mapping-> truncate_count once fully scanned, skip up-to-date vmas without a scan (and without dropping i_mmap_lock). Further danger of never making progress if a vma is very large: when breaking out, save restart_vma and restart_addr (and restart_pgoff to confirm, in case vma gets reused), to help continue where we left off. Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] vmtrunc: vm_truncate_count race caution Fix some unlikely races in respect of vm_truncate_count. Firstly, it's supposed to be guarded by i_mmap_lock, but some places copy a vma structure by *new_vma = *old_vma: if the compiler implements that with a bytewise copy, new_vma->vm_truncate_count could be munged, and new_vma later appear up-to-date when it's not; so set it properly once under lock. vma_link set vm_truncate_count to mapping->truncate_count when adding an empty vma: if new vmas are being added profusely while vmtruncate is in progess, this lets them be skipped without scanning. vma_adjust has vm_truncate_count problem much like it had with anon_vma under mprotect merge: when merging be careful not to leave vma marked as up-to-date when it might not be, lest unmap_mapping_range in progress - set vm_truncate_count 0 when in doubt. Similarly when mremap moving ptes from one vma to another. Cut a little code from __anon_vma_merge: now vma_adjust sets "importer" in the remove_next case (to get its vm_truncate_count right), its anon_vma is already linked by the time __anon_vma_merge is called. Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] vmtrunc: bug if page_mapped If unmap_mapping_range (and mapping->truncate_count) are doing their jobs right, truncate_complete_page should never find the page mapped: add BUG_ON for our immediate testing, but this patch should probably not go to mainline - a mapped page here is not a catastrophe. Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] vmtrunc: restart_addr in truncate_count Despite its restart_pgoff pretentions, unmap_mapping_range_vma was fatally unable to distinguish a vma to be restarted from the case where that vma has been freed, and its vm_area_struct reused for the top part of a !new_below split of an isomorphic vma yet to be scanned. The obvious answer is to note restart_vma in the struct address_space, and cancel it when that vma is freed; but I'm reluctant to enlarge every struct inode just for this. Another answer is to flag valid restart in the vm_area_struct; but vm_flags is protected by down_write of mmap_sem, which we cannot take within down_write of i_sem. If we're going to need yet another field, better to record the restart_addr itself: restart_vma only recorded the last restart, but a busy tree could well use more. Actually, we don't need another field: we can neatly (though naughtily) keep restart_addr in vm_truncate_count, provided mapping->truncate_count leaps over those values which look like a page-aligned address. Zero remains good for forcing a scan (though now interpreted as restart_addr 0), and it turns out no change is needed to any of the vm_truncate_count settings in dup_mmap, vma_link, vma_adjust, move_one_page. Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] remove the BKL by turning it into a semaphore This is the current remove-BKL patch. I test-booted it on x86 and x64, trying every conceivable combination of SMP, PREEMPT and PREEMPT_BKL. All other architectures should compile as well. (most of the testing was done with the zaphod patch undone but it applies cleanly on vanilla -mm3 as well and should work fine.) this is the debugging-enabled variant of the patch which has two main debugging features: - debug potentially illegal smp_processor_id() use. Has caught a number of real bugs - e.g. look at the printk.c fix in the patch. - make it possible to enable/disable the BKL via a .config. If this goes upstream we dont want this of course, but for now it gives people a chance to find out whether any particular problem was caused by this patch. This patch has one important fix over the previous BKL patch: on PREEMPT kernels if we preempted BKL-using code then the code still auto-dropped the BKL by mistake. This caused a number of breakages for testers, which breakages went away once this bug was fixed. Also the debugging mechanism has been improved alot relative to the previous BKL patch. Would be nice to test-drive this in -mm. There will likely be some more smp_processor_id() false positives but they are 1) harmless 2) easy to fix up. We could as well find more real smp_processor_id() related breakages as well. The most noteworthy fact is that no BKL-using code was found yet that relied on smp_processor_id(), which is promising from a compatibility POV. Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] oprofile preempt warning fixes From: Peter Zijlstra I have to use oprofile a lot but do want to enable preemption checks. This gives some noise; I think andrew allready mentioned fixin this. The following patch fixes about half of the warnings. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] cpu_down() warning fix Fix (harmless?) smp_processor_id() usage in preemptible section of cpu_down. Signed-off-by: Nathan Lynch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] md: improve 'hash' code in linear.c The hashtable that linear uses to find the right device stores two pointers for every entry. The second is always one of: The first plus 1 NULL When NULL, it is never accessed, so any value can be stored. Thus it could always be "first plus 1", and so we don't need to store it as it is trivial to calculate. This patch halves the size of this table, which results in some simpler code as well. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] vm: remove remap_page_range() completely All in-tree references to remap_page_range() have been removed by prior patches in the series. This patch, intended to be applied after some waiting period for people to adjust to the API change, notice __deprecated, etc., does the final removal of remap_page_range() as a function symbol declared within kernel headers and/or implemented in kernel sources. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] no buddy bitmap patch revist: intro and includes Followings are patches for removing bitmaps from the buddy allocator. This is benefical to memory-hot-plug stuffs, because this removes a data structure which must meet to a host's physical memory layout. This is one step to manage physical memory in nonlinear / discontiguous way and will reduce some amounts of codes to implement memory-hot-plug. This patch removes bitmaps from zone->free_area[] in include/linux/mmzone.h, and adds some comments on page->private field in include/linux/mm.h. non-atomic ops for changing PG_private bit is added in include/page-flags.h. zone->lock is always acquired when PG_private of "a free page" is changed. Signed-off-by: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] no buddy bitmap patch revisit: for mm/page_alloc.c This patch removes bitmaps from page allocator in mm/page_alloc.c. This buddy system uses page->private field to record free page's order instead of using bitmaps. The algorithm of the buddy system is unchanged. Only bitmaps are removed. In this buddy system, 2 pages,a page and "buddy", can be coalesced when (buddy->private & PG_private) && (page_order(page)) == (page_order(buddy)) && !PageReserved(buddy) && page_count(buddy) == 0 this also means "buddy" is a head of continuous free pages of length of (1 << page_order(buddy)). bad_range() is called from inner loop of __free_pages_bulk(). In many archs, bad_range() is only a sanity check, it will always return 0. But if a zone's memmap has a hole, it sometimes returns 1. An architecture with memory holes in a zone has to define CONFIG_HOLES_IN_ZONE. When CONFIG_HOLES_IN_ZONE is defined, pfn_valid() is called for checking whether a buddy pages is valid or not. Signed-off-by: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] no buddy bitmap patch revist: for ia64 This patch is for ia64 kernel, and defines CONFIG_HOLES_IN_ZONE in arch/ia64/Kconfig. IA64 has memory holes smaller than its MAX_ORDER and its virtual memmap allows holes in a zone's memmap. This patch makes vmemmap aligned with IA64_GRANULE_SIZE in arch/ia64/mm/init.c. Signed-off-by: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fbdev: rivafb should recognize NF2/IGP I got tired of not seeing the boot time penguin on my Shuttle SN41G2, and not having a decently large text display when I bypass X11. XFree86 says it's "Chipset GeForce4 MX Integrated GPU", and the kernel driver has hooks for this chip ID although it doesn't have a #define to match. Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] raid6: altivec support This patch adds Altivec support for RAID-6, if appropriately configured on the ppc or ppc64 architectures. Note that it changes the compile flags for ppc64 in order to handle -maltivec correctly; this change was vetted on the ppc64 mailing list and OK'd by paulus. Signed-off-by: H. Peter Anvin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Remove EXPORT_SYMBOL_NOVERS Vadim Lobanov points out that EXPORT_SYMBOL_NOVERS is no longer used; in fact, SH still uses it, but once we fix that, the kernel is clean. Remove it. Signed-off-by: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] readpage-vs-invalidate fix A while ago we merged a patch which tried to solve a problem wherein a concurrent read() and invalidate_inode_pages() would cause the read() to return -EIO because invalidate cleared PageUptodate() at the wrong time. That patch tests for (page_count(page) != 2) in invalidate_complete_page() and bales out if false. Problem is, the page may be in the per-cpu LRU front-ends over in lru_cache_add. This elevates the refcount pending spillage of the page onto the LRU for real. That causes a false positive in invalidate_complete_page(), causing the page to not get invalidated. This screws up the logic in my new O_DIRECT-vs-buffered coherency fix. So let's solve the invalidate-vs-read in a different manner. Over on the read() side, add an explicit check to see if the page was invalidated. If so, just drop it on the floor and redo the read from scratch. Note that only do_generic_mapping_read() needs treatment. filemap_nopage(), filemap_getpage() and read_cache_page() are already doing the oh-it-was-invalidated-so-try-again thing. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] invalidate_inode_pages2() mmap coherency fix - When invalidating pages, take care to shoot down any ptes which map them as well. This ensures that the next mmap access to the page will generate a major fault, so NFS's server-side modifications are picked up. This also allows us to call invalidate_complete_page() on all pages, so filesytems such as ext3 get a chance to invalidate the buffer_heads. - Don't mark in-pagetable pages as non-uptodate any more. That broke a previous guarantee that mapped-into-user-process pages are always uptodate. - Check the return value of invalidate_complete_page(). It can fail if someone redirties a page after generic_file_direct_IO() write it back. But we still have a problem. If invalidate_inode_pages2() calls unmap_mapping_range(), that can cause zap_pte_range() to dirty the pagecache pages. That will redirty the page's buffers and will cause invalidate_complete_page() to fail. So, in generic_file_direct_IO() we do a complete pte shootdown on the file up-front, prior to writing back dirty pagecache. This is only done for O_DIRECT writes. It _could_ be done for O_DIRECT reads too, providing full mmap-vs-direct-IO coherency for both O_DIRECT reads and O_DIRECT writes, but permitting the pte shootdown on O_DIRECT reads trivially allows people to nuke other people's mapped pagecache. NFS also uses invalidate_inode_pages2() for handling server-side modification notifications. But in the NFS case the clear_page_dirty() in invalidate_inode_pages2() is sufficient, because NFS doesn't have to worry about the "dirty buffers against a clean page" problem. (I think) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer unifying: ALPHA To make spinlock/rwlock initialization consistent all over the kernel, this patch converts explicit lock-initializers into spin_lock_init() and rwlock_init() calls. Currently, spinlocks and rwlocks are initialized in two different ways: lock = SPIN_LOCK_UNLOCKED spin_lock_init(&lock) rwlock = RW_LOCK_UNLOCKED rwlock_init(&rwlock) this patch converts all explicit lock initializations to spin_lock_init() or rwlock_init(). (Besides consistency this also helps automatic lock validators and debugging code.) The conversion was done with a script, it was verified manually and it was reviewed, compiled and tested as far as possible on x86, ARM, PPC. There is no runtime overhead or actual code change resulting out of this patch, because spin_lock_init() and rwlock_init() are macros and are thus equivalent to the explicit initialization method. That's the second batch of the unifying patches. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer unifying: IA64 To make spinlock/rwlock initialization consistent all over the kernel, this patch converts explicit lock-initializers into spin_lock_init() and rwlock_init() calls. Currently, spinlocks and rwlocks are initialized in two different ways: lock = SPIN_LOCK_UNLOCKED spin_lock_init(&lock) rwlock = RW_LOCK_UNLOCKED rwlock_init(&rwlock) this patch converts all explicit lock initializations to spin_lock_init() or rwlock_init(). (Besides consistency this also helps automatic lock validators and debugging code.) The conversion was done with a script, it was verified manually and it was reviewed, compiled and tested as far as possible on x86, ARM, PPC. There is no runtime overhead or actual code change resulting out of this patch, because spin_lock_init() and rwlock_init() are macros and are thus equivalent to the explicit initialization method. That's the second batch of the unifying patches. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Acked-by: "Luck, Tony" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer unifying: M32R To make spinlock/rwlock initialization consistent all over the kernel, this patch converts explicit lock-initializers into spin_lock_init() and rwlock_init() calls. Currently, spinlocks and rwlocks are initialized in two different ways: lock = SPIN_LOCK_UNLOCKED spin_lock_init(&lock) rwlock = RW_LOCK_UNLOCKED rwlock_init(&rwlock) this patch converts all explicit lock initializations to spin_lock_init() or rwlock_init(). (Besides consistency this also helps automatic lock validators and debugging code.) The conversion was done with a script, it was verified manually and it was reviewed, compiled and tested as far as possible on x86, ARM, PPC. There is no runtime overhead or actual code change resulting out of this patch, because spin_lock_init() and rwlock_init() are macros and are thus equivalent to the explicit initialization method. That's the second batch of the unifying patches. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer unifying: MIPS To make spinlock/rwlock initialization consistent all over the kernel, this patch converts explicit lock-initializers into spin_lock_init() and rwlock_init() calls. Currently, spinlocks and rwlocks are initialized in two different ways: lock = SPIN_LOCK_UNLOCKED spin_lock_init(&lock) rwlock = RW_LOCK_UNLOCKED rwlock_init(&rwlock) this patch converts all explicit lock initializations to spin_lock_init() or rwlock_init(). (Besides consistency this also helps automatic lock validators and debugging code.) The conversion was done with a script, it was verified manually and it was reviewed, compiled and tested as far as possible on x86, ARM, PPC. There is no runtime overhead or actual code change resulting out of this patch, because spin_lock_init() and rwlock_init() are macros and are thus equivalent to the explicit initialization method. That's the second batch of the unifying patches. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer unifying: Misc drivers To make spinlock/rwlock initialization consistent all over the kernel, this patch converts explicit lock-initializers into spin_lock_init() and rwlock_init() calls. Currently, spinlocks and rwlocks are initialized in two different ways: lock = SPIN_LOCK_UNLOCKED spin_lock_init(&lock) rwlock = RW_LOCK_UNLOCKED rwlock_init(&rwlock) this patch converts all explicit lock initializations to spin_lock_init() or rwlock_init(). (Besides consistency this also helps automatic lock validators and debugging code.) The conversion was done with a script, it was verified manually and it was reviewed, compiled and tested as far as possible on x86, ARM, PPC. There is no runtime overhead or actual code change resulting out of this patch, because spin_lock_init() and rwlock_init() are macros and are thus equivalent to the explicit initialization method. That's the second batch of the unifying patches. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer unifying: Block devices To make spinlock/rwlock initialization consistent all over the kernel, this patch converts explicit lock-initializers into spin_lock_init() and rwlock_init() calls. Currently, spinlocks and rwlocks are initialized in two different ways: lock = SPIN_LOCK_UNLOCKED spin_lock_init(&lock) rwlock = RW_LOCK_UNLOCKED rwlock_init(&rwlock) this patch converts all explicit lock initializations to spin_lock_init() or rwlock_init(). (Besides consistency this also helps automatic lock validators and debugging code.) The conversion was done with a script, it was verified manually and it was reviewed, compiled and tested as far as possible on x86, ARM, PPC. There is no runtime overhead or actual code change resulting out of this patch, because spin_lock_init() and rwlock_init() are macros and are thus equivalent to the explicit initialization method. That's the second batch of the unifying patches. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer unifying: DRM To make spinlock/rwlock initialization consistent all over the kernel, this patch converts explicit lock-initializers into spin_lock_init() and rwlock_init() calls. Currently, spinlocks and rwlocks are initialized in two different ways: lock = SPIN_LOCK_UNLOCKED spin_lock_init(&lock) rwlock = RW_LOCK_UNLOCKED rwlock_init(&rwlock) this patch converts all explicit lock initializations to spin_lock_init() or rwlock_init(). (Besides consistency this also helps automatic lock validators and debugging code.) The conversion was done with a script, it was verified manually and it was reviewed, compiled and tested as far as possible on x86, ARM, PPC. There is no runtime overhead or actual code change resulting out of this patch, because spin_lock_init() and rwlock_init() are macros and are thus equivalent to the explicit initialization method. That's the second batch of the unifying patches. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Acked-by: Dave Airlie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer unifying: character devices To make spinlock/rwlock initialization consistent all over the kernel, this patch converts explicit lock-initializers into spin_lock_init() and rwlock_init() calls. Currently, spinlocks and rwlocks are initialized in two different ways: lock = SPIN_LOCK_UNLOCKED spin_lock_init(&lock) rwlock = RW_LOCK_UNLOCKED rwlock_init(&rwlock) this patch converts all explicit lock initializations to spin_lock_init() or rwlock_init(). (Besides consistency this also helps automatic lock validators and debugging code.) The conversion was done with a script, it was verified manually and it was reviewed, compiled and tested as far as possible on x86, ARM, PPC. There is no runtime overhead or actual code change resulting out of this patch, because spin_lock_init() and rwlock_init() are macros and are thus equivalent to the explicit initialization method. That's the second batch of the unifying patches. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer unifying: RIO To make spinlock/rwlock initialization consistent all over the kernel, this patch converts explicit lock-initializers into spin_lock_init() and rwlock_init() calls. Currently, spinlocks and rwlocks are initialized in two different ways: lock = SPIN_LOCK_UNLOCKED spin_lock_init(&lock) rwlock = RW_LOCK_UNLOCKED rwlock_init(&rwlock) this patch converts all explicit lock initializations to spin_lock_init() or rwlock_init(). (Besides consistency this also helps automatic lock validators and debugging code.) The conversion was done with a script, it was verified manually and it was reviewed, compiled and tested as far as possible on x86, ARM, PPC. There is no runtime overhead or actual code change resulting out of this patch, because spin_lock_init() and rwlock_init() are macros and are thus equivalent to the explicit initialization method. That's the second batch of the unifying patches. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer unifying: Firewire To make spinlock/rwlock initialization consistent all over the kernel, this patch converts explicit lock-initializers into spin_lock_init() and rwlock_init() calls. Currently, spinlocks and rwlocks are initialized in two different ways: lock = SPIN_LOCK_UNLOCKED spin_lock_init(&lock) rwlock = RW_LOCK_UNLOCKED rwlock_init(&rwlock) this patch converts all explicit lock initializations to spin_lock_init() or rwlock_init(). (Besides consistency this also helps automatic lock validators and debugging code.) The conversion was done with a script, it was verified manually and it was reviewed, compiled and tested as far as possible on x86, ARM, PPC. There is no runtime overhead or actual code change resulting out of this patch, because spin_lock_init() and rwlock_init() are macros and are thus equivalent to the explicit initialization method. That's the second batch of the unifying patches. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer unifying: ISDN To make spinlock/rwlock initialization consistent all over the kernel, this patch converts explicit lock-initializers into spin_lock_init() and rwlock_init() calls. Currently, spinlocks and rwlocks are initialized in two different ways: lock = SPIN_LOCK_UNLOCKED spin_lock_init(&lock) rwlock = RW_LOCK_UNLOCKED rwlock_init(&rwlock) this patch converts all explicit lock initializations to spin_lock_init() or rwlock_init(). (Besides consistency this also helps automatic lock validators and debugging code.) The conversion was done with a script, it was verified manually and it was reviewed, compiled and tested as far as possible on x86, ARM, PPC. There is no runtime overhead or actual code change resulting out of this patch, because spin_lock_init() and rwlock_init() are macros and are thus equivalent to the explicit initialization method. That's the second batch of the unifying patches. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer unifying: Raid To make spinlock/rwlock initialization consistent all over the kernel, this patch converts explicit lock-initializers into spin_lock_init() and rwlock_init() calls. Currently, spinlocks and rwlocks are initialized in two different ways: lock = SPIN_LOCK_UNLOCKED spin_lock_init(&lock) rwlock = RW_LOCK_UNLOCKED rwlock_init(&rwlock) this patch converts all explicit lock initializations to spin_lock_init() or rwlock_init(). (Besides consistency this also helps automatic lock validators and debugging code.) The conversion was done with a script, it was verified manually and it was reviewed, compiled and tested as far as possible on x86, ARM, PPC. There is no runtime overhead or actual code change resulting out of this patch, because spin_lock_init() and rwlock_init() are macros and are thus equivalent to the explicit initialization method. That's the second batch of the unifying patches. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer unifying: media drivers To make spinlock/rwlock initialization consistent all over the kernel, this patch converts explicit lock-initializers into spin_lock_init() and rwlock_init() calls. Currently, spinlocks and rwlocks are initialized in two different ways: lock = SPIN_LOCK_UNLOCKED spin_lock_init(&lock) rwlock = RW_LOCK_UNLOCKED rwlock_init(&rwlock) this patch converts all explicit lock initializations to spin_lock_init() or rwlock_init(). (Besides consistency this also helps automatic lock validators and debugging code.) The conversion was done with a script, it was verified manually and it was reviewed, compiled and tested as far as possible on x86, ARM, PPC. There is no runtime overhead or actual code change resulting out of this patch, because spin_lock_init() and rwlock_init() are macros and are thus equivalent to the explicit initialization method. That's the second batch of the unifying patches. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer unifying: drivers/serial To make spinlock/rwlock initialization consistent all over the kernel, this patch converts explicit lock-initializers into spin_lock_init() and rwlock_init() calls. Currently, spinlocks and rwlocks are initialized in two different ways: lock = SPIN_LOCK_UNLOCKED spin_lock_init(&lock) rwlock = RW_LOCK_UNLOCKED rwlock_init(&rwlock) this patch converts all explicit lock initializations to spin_lock_init() or rwlock_init(). (Besides consistency this also helps automatic lock validators and debugging code.) The conversion was done with a script, it was verified manually and it was reviewed, compiled and tested as far as possible on x86, ARM, PPC. There is no runtime overhead or actual code change resulting out of this patch, because spin_lock_init() and rwlock_init() are macros and are thus equivalent to the explicit initialization method. That's the second batch of the unifying patches. This patch removes also a double init in icom.c Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer unifying: Filesystems To make spinlock/rwlock initialization consistent all over the kernel, this patch converts explicit lock-initializers into spin_lock_init() and rwlock_init() calls. Currently, spinlocks and rwlocks are initialized in two different ways: lock = SPIN_LOCK_UNLOCKED spin_lock_init(&lock) rwlock = RW_LOCK_UNLOCKED rwlock_init(&rwlock) this patch converts all explicit lock initializations to spin_lock_init() or rwlock_init(). (Besides consistency this also helps automatic lock validators and debugging code.) The conversion was done with a script, it was verified manually and it was reviewed, compiled and tested as far as possible on x86, ARM, PPC. There is no runtime overhead or actual code change resulting out of this patch, because spin_lock_init() and rwlock_init() are macros and are thus equivalent to the explicit initialization method. That's the second batch of the unifying patches. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer unifying: Video To make spinlock/rwlock initialization consistent all over the kernel, this patch converts explicit lock-initializers into spin_lock_init() and rwlock_init() calls. Currently, spinlocks and rwlocks are initialized in two different ways: lock = SPIN_LOCK_UNLOCKED spin_lock_init(&lock) rwlock = RW_LOCK_UNLOCKED rwlock_init(&rwlock) this patch converts all explicit lock initializations to spin_lock_init() or rwlock_init(). (Besides consistency this also helps automatic lock validators and debugging code.) The conversion was done with a script, it was verified manually and it was reviewed, compiled and tested as far as possible on x86, ARM, PPC. There is no runtime overhead or actual code change resulting out of this patch, because spin_lock_init() and rwlock_init() are macros and are thus equivalent to the explicit initialization method. That's the second batch of the unifying patches. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer unifying: sound To make spinlock/rwlock initialization consistent all over the kernel, this patch converts explicit lock-initializers into spin_lock_init() and rwlock_init() calls. Currently, spinlocks and rwlocks are initialized in two different ways: lock = SPIN_LOCK_UNLOCKED spin_lock_init(&lock) rwlock = RW_LOCK_UNLOCKED rwlock_init(&rwlock) this patch converts all explicit lock initializations to spin_lock_init() or rwlock_init(). (Besides consistency this also helps automatic lock validators and debugging code.) The conversion was done with a script, it was verified manually and it was reviewed, compiled and tested as far as possible on x86, ARM, PPC. There is no runtime overhead or actual code change resulting out of this patch, because spin_lock_init() and rwlock_init() are macros and are thus equivalent to the explicit initialization method. That's the second batch of the unifying patches. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup (common headers) First part of the patch series. Define initializer macros Often used structures in the kernel are almost all declared and initialized by macros in the form: DEFINE_TYPE(name) Spinlocks and rwlocks are declared and initialized by: type name = INITIALIZER; After converting the runtime initialization of spinlocks/rwlocks to macro form it is consequent to change the declaration and initializion of global and static locks to the macro form too. This conversion identifies those variables as "special", common code controlled entities similar to list_heads, mutexes... Besides consistency and code clearness this also helps automatic lock validators and debugging code. The patch converts -rwlock_t snd_card_rwlock = RW_LOCK_UNLOCKED; +DEFINE_RWLOCK(snd_card_rwlock); and -static spinlock_t slave_active_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(slave_active_lock); There is no runtime overhead or actual code change resulting out of this patch, other than a small reduction in the kernel source code size. The conversion was done with a script, it was verified manually and it was reviewed, compiled and tested as far as possible on x86, ARM, PPC. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup (character devices) Character devices converted to use the new lock initializers. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup (Core) Kernel core files converted to use the new lock initializers. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] moxa: Remove ancient changelog README.moxa The driver at Moxa's website is version 1.8. There is no need for this file. Signed-off-by: James Nelson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] moxa: Remove README.moxa from Documentation/00-INDEX Signed-off-by: James Nelson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] specialix: remove bouncing e-mail address Signed-off-by: James Nelson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] stallion: Update to Documentation/stallion.txt Some updating and removal of dead links in the text file. The 5.5 package is not carried on the sunsite.unc.edu or tsx-11.mit.edu FTP servers, and the support@stallion.com address bounces. Signed-off-by: James Nelson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] riscom8: Update staus and documentation of driver I could not locate the original author or any active support effort being done. This is definitely an orphaned driver. Signed-off-by: James Nelson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pm: remove outdated docs pm_access / pm_dev_idle was removed from recent kernels. This should stop confusion. Signed-off-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] docs: add sparse howto Installing / using sparse is not exactly trivial, this should make setting it up easier. Adapted From: Linus Torvalds Signed-off-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] cciss: Documentation update Updates to cciss documentation. mkdev.cciss is no longer needed, since it is handled by the MAKEDEV program. Signed-off-by: James Nelson Acked-by: Mike Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] cciss: Correct mailing list address in source code Correct mailing list address in cciss source code. Signed-off-by: James Nelson Acked-by: Mike Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] cpqarray: Correct mailing list address in source code Correct mailing list address in cpqarray source code. Signed-off-by: James Nelson Acked-by: Mike Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sh: Remove x86-specific help in Kconfig Remove x86-specific bus refernces in arch/sh/drivers/pci/Kconfig. Signed-off-by: James Nelson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] cyclades: Put README.cycladeZ in Documentation/serial Put README.cycladesZ in Documentation/serial. Firmware is still needed, but the README file shouldn't be in drivers/char. Signed-off-by: James Nelson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] tipar: Document driver options Document kernel parameters for tipar driver. Signed-off-by: James Nelson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] tipar: Code cleanup Correct the following issues: - Remove reference to 2.5 kernel code. - Switch some ints to unsigned ints. - Correct KERN_ constants in printk's, and move most to pr_debug & pr_info Fix some >80 column lines and indenting. Compile tested. Signed-off-by: James Nelson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] update hugetlb documentation The hugetlb documentation includes two example programs however they need some attention. At the moment they are ia64 specific (they use MAP_FIXED which will fail on other architectures), and they contain a number of compiler warnings. Also update the documentation to include the ppc64 page sizes. Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] eth1394 MODULE_PARM conversion Convert MODULE_PARM to module_param Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] isapnp module_param conversion module_param conversion for isapnp Signed-off-by: Jan Dittmer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sr module_param conversion module_param conversion for SCSI cdrom driver Signed-off-by: Jan Dittmer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] media/video module_param conversion Convert module_param in tda7432 and tda9875. I hope I got the file permissions right. Signed-off-by: Jan Dittmer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] btaudio module_param conversion btaudio module_param conversion Signed-off-by: Jan Dittmer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] small drivers/char/rio/ cleanups The patch below does cleanups under drivers/char/rio/ including the following: - remove some completely unused code - make some needlessly global code static - remove #ifndef linux code - remove never enabled #ifdef XPRINT_SUPPORT code - RIOStrlen -> string.h strlen - RIOStrCmp -> string.h strcmp Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] small char/generic_serial.c cleanup The patch below does the following changes to drivers/char/generic_serial.c : - make two needlessly global functions static - remove the completely unused EXPORT_SYMBOL'ed function gs_do_softint AFAIR the latter should be safe, since drivers are moving away from generic_serial.c. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] DEBUG_BUGVERBOSE for i386 The patch below implements CONFIG_DEBUG_BUGVERBOSE for i386 (more exactly, it allows disabling the verbose BUG() reporting). Also, require CONFIG_EMBEDDED for this option: we don't want to make it easy for people to disable useful debug info. (With lots of help from Roman Zippel ) Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] telephony/ixj.c cleanup - remove ixj_register and ixj_unregister. these were EXPORT_SYMBOL'ed static (sic) functions it seems the only reason why this "worked" was that there were exactly zero users of them... - remove four local variables that are after this removal no longer required - make five functions that were needlessly global static Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] char/cyclades.c: remove unused code The patch below removes unused code from drivers/char/cyclades.c Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] oss: AC97 quirk facility Add a quirk facility for AC97 in OSS, and add a quirk list for the i810_audio driver. This allows automatically "correct" behaviour for sound hardware w/ known oddities. For example, many cards have the headphone and line-out outputs swapped or headphone outputs only. The code is stolen shamelessly from ALSA, FWIW... Signed-off-by: John W. Linville From: William Lee Irwin III include/linux/ac97_codec.h:337: warning: `struct pci_dev' declared inside parameter list Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext3: use generic_open_file to fix possible preemption bugs Ext3 is currently using a duplicate version of generic_open_file, and this should be fixed, before it gets out of sync. In fact, it *has* got out of sync. Apart some cosmetic changes (which are not a problem), note that it directly reads inode->i_size, while the generic version uses i_size_read(). I'm not sure if this bug can actually be triggered, but here follows a possible scenario: when - a file is brought into inode cache - that file is either truncated or extended (i.e. inode->i_size is changed) and after this it changes it's "more than 2Gb" property, - and process B opens that file in the meanwhile, I suppose the size check can be hurted by a race condition, doesn't it? Similar checks should probably be done for other FS's. Also, ext2 does not have this problem - someone fixed this problem in ext2 but not ext3? How? Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] bttv-i2c.c: make two functions static The patch below makes two functions in drivers/media/video/bttv-i2c.c without external users static. Signed-off-by: Adrian Bunk Signed-off-by: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] bttv-risc.c: make some functions static The patch below makes some functions in drivers/media/video/bttv-risc.c that currently have no other in-kernel users static. Signed-off-by: Adrian Bunk Signed-off-by: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] bttv help fix I found one mistake in the help of bttv in 2.6.10-rc2-bk4 : "I2C bit-banging interfaces" in the character device section. or it's in the device drivers section since 2.6.X. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] zoran_driver.c: make zoran_num_formats static zoran_num_formats was referenced from two other files as extern, but was used in none of them. Signed-off-by: Adrian Bunk Signed-off-by: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] media/video/msp3400.c: remove unused struct d1 This struct is simply unused. Signed-off-by: Adrian Bunk Signed-off-by: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] zoran_device.c: make zr36057_init_vfe static The patch below makes function zr36057_init_vfe in drivers/media/video/zoran_device.c which has no external users static. Signed-off-by: Adrian Bunk Signed-off-by: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] drivers/media/video: the easy cleanups This patch only makes code that is neither mentioned in a header file nor declared extern in another file static. Additionally, it does remove the unused function stradis_driver from stradis.c (or what should the comment mean?). Signed-off-by: Adrian Bunk Signed-off-by: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] small ftape cleanups The patch below does cleanups under drivers/char/rio/ including the following: - remove some completely unused code - make some needlessly global code static Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] reiser3 cleanups The patch below contains some cleanups for reiser3. It consists of: - removal of unused code - making needlessly global code static Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] cdrom.c: make several functions static (fwd) The patch below makes several functions in cdrom.c static. This includes cdrom_is_mrw and cdrom_is_random_writable which were EXPORT_SYMBOL'ed but weren't used anywhere outside of cdrom.h . Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fs/coda/psdev.c shouldn't include lp.h Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] remove early_param test code Remove some unused test code Signed-off-by: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] MODULE_PARM conversions Rusty Russell MODULE_PARM conversions for x86 `allmodconfig'. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] MODULE_PARM conversions Rusty Russell MODULE_PARM conversions for x86 `allyesconfig'. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] lockd: fix two struct definitions Under fs/lockd/, there are two structs declared extern although they are in the same file. Furtheremore, they don't have to be global since their only users are in the same file. Most of the changes to svc.c are only indent fixes caused by making the struct static. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] small MCA cleanups The patch below does the following cleanups in the MCA code: - make some needlessly global code static - remove three unused global functions from mca-legacy.c (two of them were EXPORT_SYMBOL'ed); this should IMHO be safe since mca-legacy is not an API drivers should move to Signed-off-by: Adrian Bunk Acked-by: James Bottomley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] small drivers/media/radio/ cleanups the patch below makes the following cleanups under drivers/media/radio/ : - remove two unused global variables - make some needlessly global code static Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ifdef typos: arch_ppc_platforms_prep_setup.c CONFIG_PREP_PRESIDUAL is mistyped. Signed-off-by: Domen Puncer Acked-by: Randy Dunlap Signed-off-by: Maximilian Attems Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ifdef typos: arch_ppc_platforms_prep_setup.c -another one Obvious typo, FB_VGA16 is from Kconfig. Signed-off-by: Domen Puncer Acked-by: Randy Dunlap Signed-off-by: Maximilian Attems Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ifdef typos: arch_ppc_syslib_ppc4xx_dma.c ppc4xx_dma.h defines PPC4xx_DMA_64BIT. Signed-off-by: Domen Puncer Acked-by: Randy Dunlap Signed-off-by: Maximilian Attems Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ifdef typos: arch_sh_boards_renesas_hs7751rvoip_io.c CONFIG_HS7751RVOIP_CIDEC is mistyped. Signed-off-by: Domen Puncer Acked-by: Randy Dunlap Signed-off-by: Maximilian Attems Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ifdef typos: drivers_char_ipmi_ipmi_si_intf.c CONFIG_ACPI_INTERPETER is wrong. Signed-off-by: Domen Puncer Acked-by: Randy Dunlap Signed-off-by: Maximilian Attems Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ifdef typos: drivers_net_wireless_wavelan_cs.c wavelan.p.h defines *_ERROR wavelan_cs.p.h defines *_ERRORS Since only second one is included, change #ifdefs Signed-off-by: Domen Puncer Acked-by: Randy Dunlap Signed-off-by: Maximilian Attems Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ifdef typos: drivers_usb_net_usbnet.c Although neither symbol is not defined (yet?); code uses some GENELINK_* (_ACK too), so this seems right. Signed-off-by: Domen Puncer Acked-by: Randy Dunlap Signed-off-by: Maximilian Attems Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ifdef typos mips: AU1[0X]00_USB_DEVICE AU1000_USB_DEVICE appears 3 times. AU1X00_USB_DEVICE appears 44 times, and is nowhere defined. One ifdef starts with "X" version, and ends with "0", so it's quite obvious these is supposed to be one option. Makes you wonder if anybody uses these devices. Signed-off-by: Domen Puncer Acked-by: Randy Dunlap Signed-off-by: Maximilian Attems Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] IPMI: use C99 struct inits. Convert IPMI driver struct usage to C99 initializers. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] DRM: remove unused functions The patch below removes two unused functions from DRM. Signed-off-by: Adrian Bunk Acked-by: Dave Airlie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] floppy.c: remove an unused function The patch below removes an unused function from drivers/block/floppy.c Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] media/video/ir-kbd-i2c.c: remove an unused function The patch below removes an unused function from drivers/media/video/ir-kbd-i2c.c Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] NFS: remove an unused function The patch below removes an unused function from fs/nfsd/nfs3xdr.c Signed-off-by: Adrian Bunk Acked-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] watchdog/machzwd.c: remove unused functions The patch below removes unused functions from drivers/char/watchdog/machzwd.c Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] video drivers: remove unused functions The patch below removes some unused function from drivers/video/ Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ISDN b1pcmcia.c: remove an unused variable drivers/isdn/hardware/avm/b1pcmcia.c: In function `b1pcmcia_init': drivers/isdn/hardware/avm/b1pcmcia.c:203: warning: unused variable `err' Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] binfmt_script.c: make struct script_format static The patch below makes struct script_format in fs/binfmt_script.c static. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] bio.c: make bio_destructor static bio_destructor in fs/bio.c isn't used outside of this file, and after quickly thinking about it I didn't find a reason why it should. The patch below makes it static. Signed-off-by: Adrian Bunk Acked-by: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] devpts/inode.c: make one struct static The patch below makes struct devpts_file_inode_operations in fs/devpts/inode.c static. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] small proc_fs cleanups The patch below does the following cleanups in the proc_fs code: - remove an unused global function - make two functions static Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix kernel/timer.c comment typo Signed-off-by: Vasia Pupkin Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mark QNX4FS_RW as BROKEN Anders Larsen wrote: If you remove any code inside the #ifdef CONFIG_QNX4FS_RW we might as well remove the option "config QNX4FS_RW" altogether. It's horribly broken, and I don't intend to fix it; while I was thinking about how to properly implement write-support, somebody else went away and did it. As that alternative seems to work well and is being actively maintained, I won't try to reinvent it. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] OSS: remove unused functions The patch below removes some unused functions from OSS. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] DVB av7110_hw.c: remove unused functions The patch below removes three unused functions from drivers/media/dvb/ttpci/av7110_hw.c Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched.c: remove an unused macro Signed-off-by: Adrian Bunk Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] scsi/ahci.c: remove an unused function The patch below removes an unused function from drivers/scsi/ahci.c Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] scsi/aic7xxx/aic79xx_osm.c: remove an unused function The patch below removes an unused function from drivers/scsi/aic7xxx/aic79xx_osm.c Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched.c: remove an unused function The patch below removes an unused function from kernel/sched.c Signed-off-by: Adrian Bunk Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] prism54: small prismcompat cleanup - the FW_LOADER is already guaranteed through the Kconfig file - prism54_synchronize_irq is also #define'd to synchronize_irq in prismcompat24.h, so there's no need for it Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] some parport_pc.c cleanups The patch below makes the following changes to drivers/parport/parport_pc.c : - make some needlessly global functions static - #if 0 two currently unused functions Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix typo and email in SAK.txt Signed-off-by: Olaf Hering Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] cris: remove kernel 2.0 #ifdef's Remove some kernel 2.0 #ifdef's from arch/cris/arch-v10/kernel/fasttimer.c Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] AFS: afs_voltypes isn't always required afs_voltypes is only used #ifdef __KDEBUG, and even then it doesn't has to be a global symbol. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] befs: #if 0 two unused global functions The patch below #if 0's two unussed global functions. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] binfmt_script.c: make em86_format static This patch by Chris Wright makes the needlessly global struct em86_format static. Signed-off-by: Chris Wright Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] remove unused include/asm-m68k/adb_mouse.h Remove a completely unused header file. Signed-off-by: Adrian Bunk Acked-by: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] scsi/aic7xxx/: remove two useless variables Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] remove IN_STRING_C IN_STRING_C was an i386-specific hack by Andi Kleen to provide out-of-line versions of some lib/string.c functions that aren't directly used on i386 (because there are inline assembly versions). This can cause problems if gcc chooses to transparently replace a call to one string function with a call to another string function (the example Andi gave was a replacement of a sprintf call with a strcpy call) which generates a function call to the replacement function. The problems observed by Andi only occur in recent kernels without -fno-unit-at-a-time. With -ffreestanding it can't even cause any problems in case we'd one day drop the -fno-unit-at-a-time since gcc mustn't assume in a freestanding environment that all standard C library functions are available. The effect of this patch is a small space saving in the kernel. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] remove CT_TO_SECS()/CT_TO_USECS() CT_TO_SECS() and CT_TO_USECS() are used nowhere in the tree. This patch removes them. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] bttv-driver.c: make some variables static Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] arch/alpha/Kconfig: Kill stale reference to Documentation/smp.tex This reference to the long gone Documentation/smp.tex somehow evaded Randy's cleanup from circa March. This marks off the last of those stale references. Signed-off-by: Arthur Othieno Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] init/initramfs.c: make unpack_to_rootfs static Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] OSS: misc cleanups The patch below contains cleanups under sound/oss/ including the following: - make needlessly global code static - kill cs4232.h (it contained two function prototypes: one is now static and the other one was already stale) - removed the following unused global functions: - cs4232.c: init_cs4281 - emu10k1/hwaccess.c: sumVolumeToAttenuation - emu10k1/hwaccess.c: emu10k1_set_stop_on_loop - sb_common.c: sb_dsp_disable_midi - sb_common.c: sb_dsp_disable_recording - wavfront.c: attach_wffx - cs46xx.c: #ifndef CS46XX_ACPI_SUPPORT cs46xx_pm_callback - emu10k1/hwaccess.c: #ifdef DBGEMU emu10k1_writefn0_2 - opl3sa2.c: remove the unused struct opl3sa2_dev - removed the following unused EXPORT_SYMBOL's: - ac97.c: ac97_set_mixer - ac97.c: ac97_get_register - ac97.c: ac97_get_mixer_scaled - sb_common.c: sb_dsp_disable_midi Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix ppc64 !HOTPLUG_CPU build idle_task_exit() only exists when CONFIG_HOTPLUG_CPU is enabled [PATCH] SDLA firmware upgrade should require CAP_SYS_RAWIO (not just CAP_NET_ADMIN) There were a few variants on the list trying to work out what the valid ranges to verify for write are but they sort of missed the point, if you can load new firmware you can have fun anyway. Re-use the buffer page for pipe data. This brings the latency back to previous levels, and in fact seems to drive it a bit lower. [ARM] Ensure we do not remap pages outside the allocated range. [ARM] Minor white space cleanup [ARM] Rehash initial kernel setup code. Essentially, this set of changes: 1. makes the register usage in head.S more sane 2. makes way for passing the location of the tagged list via "r2" (as the booting document suggests) [ARM] Move common CPU initialisation into head.S [ARM PATCH] 2369/1: remove some cruft Patch from Nicolas Pitre Those defines are incomplete and not using them by instead using the explicit flags makes for clearer code. Signed-off-by: Nicolas Pitre Signed-off-by: Russell King [PATCH] m68knommu: remove use of obsolete MAP_NR macro Remove use of obsolete MAP_NR macro. Signed-off-by: Greg Ungerer Signed-off-by: Linus Torvalds [PATCH] m68knommu: remove unneccessary SUN conditionals from m68knommu/elf.h Remove unneccessary SUN conditionals from m68knommu elf.h. Signed-off-by: Greg Ungerer Signed-off-by: Linus Torvalds [PATCH] m68knommu: remove unused keyboard.h Remove unused keyboard.h include. Signed-off-by: Greg Ungerer Signed-off-by: Linus Torvalds [PATCH] m68knommu: remove duplicate and unused entries in Kconfig Remove duplicate M5275EVB entry. Remove unused HIMEMKERNEL config option. Signed-off-by: Greg Ungerer Signed-off-by: Linus Torvalds [PATCH] m68knommu: export lib udelay symbol for modules Export the udelay symbol so modules get access to it as well. Signed-off-by: Greg Ungerer Signed-off-by: Linus Torvalds [PATCH] m68knommu: comment formating change to linker script Fix comment formatting in m68knommu linker script. Signed-off-by: Greg Ungerer Signed-off-by: Linus Torvalds [PATCH] m68knommu: convert KTHRAD_SIZE to THREAD_SIZE and remove unused macros Convert KTHREAD_SIZE to THREAD_SIZE. Remove obsolate MAP_NR and VALID_PAGE macros. Signed-off-by: Greg Ungerer Signed-off-by: Linus Torvalds [PATCH] m68knommu: optimized bitops operations for m68knommu Here is a patch to provide faster bitops for m68knommu, using bset/bclr/bchg and btst instructions, that do test-and-set on m68k and coldfire processors. We do thus avoid the need for local_irq_save/local_irq_restore. Patch original submitted by Philippe De Muyter . Signed-off-by: Greg Ungerer Signed-off-by: Linus Torvalds [PATCH] m68knommu: convert use of KTHRAD_SIZE to THREAD_SIZE in process.c Convert KTHREAD_SIZE to THREAD_SIZE. Patch original submitted by Philippe De Muyter Signed-off-by: Greg Ungerer Signed-off-by: Linus Torvalds [PATCH] m68knommu: remove unused include/asm-m68knommu/nap.h Remove unused header file from include/asm-m68knommu. Signed-off-by: Greg Ungerer Signed-off-by: Linus Torvalds [PATCH] m68knommu: remove use of obsolete MAP_NR macro processor.h Remove use of obsolate MAP_NR macro. Signed-off-by: Greg Ungerer Signed-off-by: Linus Torvalds [PATCH] m68knommu: include module.h to cleanup warnings in checksum.c Include module.h to cleanup compiler warnings. Signed-off-by: Greg Ungerer Signed-off-by: Linus Torvalds PCI Hotplug: remove my old email address Signed-off-by: Greg Kroah-Hartman [ARM] Add missing nodemask.h includes Signed-off-by: Russell King [PATCH] ppc64: hugepage bugfix Fix a stupid unbalanced lock bug in the ppc64 hugepage code. Lead rapidly to a crash if both CONFIG_HUGETLB_PAGE and CONFIG_PREEMPT were enabled (even without actually using hugepages at all). Signed-off-by: David Gibson Acked-by: William Irwin Signed-off-by: Linus Torvalds [PATCH] m68knommu: common head code for all ColdFire platforms Create a common head.S for all ColdFire architecture platforms. Currently there is 20 (yep 20 of them), and they are 95% the same code. This file with some header file support will replace all of them. Signed-off-by: Greg Ungerer Signed-off-by: Linus Torvalds [PATCH] m68knommu: cache init code for ColdFire CPU's Cache initialization code for the ColdFire CPU's. They are not all identical. This code is used as part of the common head start code for all ColdFire platforms. Signed-off-by: Greg Ungerer Signed-off-by: Linus Torvalds [PATCH] m68knommu: change ColdFire 5206 SDRAM register names Change the SDRAM register names to be consistent across all ColdFire header files. Simplied their use in common memory sizing code at startup time. Signed-off-by: Greg Ungerer Signed-off-by: Linus Torvalds [PATCH] m68knommu: move ColdFire 5249 platform specific startup code Move some platform specific setup code into the ColdFire 5249 header. Doing this for platforms that needs it means the startup code can be identical for all ColdFire based platforms. Signed-off-by: Greg Ungerer Signed-off-by: Linus Torvalds [PATCH] m68knommu: define differences in ColdFire 5270/1 and 5274/5 SDRAM registers The 527[01] ColdFire devices and the 527[45] devices have a very similar SDRAM register setup. But some registers are at different addresses. Define them appropriately so common sizing code can work for all ColdFire platforms. Signed-off-by: Greg Ungerer Signed-off-by: Linus Torvalds [PATCH] m68knommu: definitions for the SDRAM registers on the ColdFire 528x CPU's Add definitions for the SDRAM configuration registers on the 528x ColdFire CPU's. Signed-off-by: Greg Ungerer Signed-off-by: Linus Torvalds [PATCH] m68knommu: remove duplicate THREAD_SIZE define Remove duplicated definition of THREAD_SIZE, it is defined in page.h. Also modify asm constraints to explicilty let gas know that the input arg is a constant in the current_thread_info() function. Patch originally submitted by Philippe De Muyter Signed-off-by: Greg Ungerer Signed-off-by: Linus Torvalds [PATCH] m68knommu: new hardware support and optimizations for the ColdFire serial driver A number of small updates to the ColdFire serial driver: . support the SNEHA platform . set the default baud rate for console different on the FEITH boards . add support for the 527x ColdFire CPU's . schedule_timeout() should not add in current jiffies value . optimize way that receive error characters are processed . fix condition where receiver interrupts could be left disabled after flush Signed-off-by: Greg Ungerer Signed-off-by: Linus Torvalds [PATCH] m68knommu: optimize atomic macros For some reason the asm versions of atomic_dec_and_test and friends were masked by inefficient and big macros. With it I spare up to 8k in the text size of my coldfire linux and 5k on my cpu32 version. Patch originally submitted by Philippe De Muyter Signed-off-by: Greg Ungerer Signed-off-by: Linus Torvalds [PATCH] Fix gcc 4 compilation in ACPI extern declaration of static Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds [PATCH] Fix gcc 4 compilation in DRM extern declaration of static Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds [PATCH] Fix gcc 4 compilation in drivers/eisa Drop -Werror to allow compilation with gcc 4 Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds [PATCH] Fix gcc 4 compilation in bttv extern declaration of static Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds [PATCH] cciss update to version 2.6.4 This patch removes support for 2 controllers that were recently cancelled and it adds support for the P600, a cciss based SAS controller due to ship in late March/early April '05. Neither of these controllers have made it to the field. Signed-off-by: Mike Miller Signed-off-by: James Bottomley Map new page allocations as part of "prep_new_page". This not only makes sense, it fixes DEBUG_PAGEALLOC together with the new page zeroing, since we must map the page before we zero it. As per Chris Wright. Don't use __GFP_CLEAR for user pages. It doesn't do the virtual cache synchronization that clear_user_highpage() does. Pointed out by Hugh Dickins. Make it clear that GFP_ZERO does not work with atomic highmem allocations. We use a non-atomic kmap() to clear the page, which cannot be used from atomic contexts. [PATCH] NLS: Fix overflow of nls_ascii The nls_ascii conversion table is just for 128 entries, but should be 256. Signed-off-by: OGAWA Hirofumi Signed-off-by: Linus Torvalds Clean up stack growth checks and move them into a common function. The grows-up and grows-down cases had all the same issues, but differered in the details. Additionlly, historical evolution of the tests had caused the result to be pretty unreadable with some rather long and complex conditionals. Fix it all up in a more readable helper function. This also adds the missing RLIMIT_MEMLOCK test. [SPARC64]: Update defconfig. Signed-off-by: David S. Miller [SPARC64]: Check copy_to_user() return value in sys_{sparc,sunos}32.c Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [AX25]: Revert to 2.6.9 behavior. I suspect given that someone made the change for a reason that there should probably be a sysctl to switch between AX.25 (as 2.6.9) and "kind of routed AX.25-ish" (as 2.6.10). Signed-off-by: David S. Miller [NET]: pktgen update Signed-off-by: David S. Miller [AX25]: Put back ax25digicmp. Signed-off-by: David S. Miller [BRIDGE-NF]: Check ipv4 vs ipv6 more reliably in ip_sabotage_out(). Signed-off-by: Bart De Schuymer Signed-off-by: David S. Miller [NET]: misc cleanups The patch below contains the following cleanups: - make needlessly global code static - remove the following unused global functions: - datagram.c: skb_copy_datagram - iovec.c: memcpy_tokerneliovec - remove the following unneeded EXPORT_SYMBOL's: - datagram.c: skb_copy_datagram - dev.c: ing_filter - iovec.c: memcpy_tokerneliovec - netpoll.c: netpoll_send_skb - rtnetlink.c: rtnetlink_dump_ifinfo - sock.c: sock_alloc_send_pskb Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [NET]: Fix CMSG_COMPAT_OK length check. Need to check against struct compat_cmsghdr not struct cmsghdr. Signed-off-by: Olaf Kirch Signed-off-by: David S. Miller [NETLINK]: Kill netlink_post, no longer used Signed-off-by: Arjan van de Ven Signed-off-by: David S. Miller [IPVS]: Kill check_for_ip_vs_out, no longer used Signed-off-by: Arjan van de Ven Signed-off-by: David S. Miller [SPARC64]: Remove x86-specific help in arch/sparc64/Kconfig Signed-off by: James Nelson Signed-off-by: Domen Puncer Signed-off-by: David S. Miller [NET]: Add rtnl_lock_interruptible() Signed-off-by: David S. Miller [8139TOO]: Use rtnl_lock_interruptible() The 8139too thread needs to use rtnl_lock_interruptible so it can avoid doing the actual work once it's been kill_proc()ed on module removal time. Based on debugging and an earlier patch that adds a driver-private semaphore from Herbert Xu. Signed-off-by: David S. Miller [ARM PATCH] 2372/1: S3C2410 - remove s3c2410_clock_tick_rate Patch from Ben Dooks This is an old definition, and is no longer used anywhere. Add a comment to that effect in the header file include/asm-arm/arch-s3c2410/timex.h and remove all other references. Thanks to Klaus Fetscher for pointing out that it isn't used anymore Signed-off-by: Ben Dooks Signed-off-by: Russell King [PATCH] Document "new" ia64 maintainer David handed over the keys a few months ago. Time to make sure everyone knows to send stuff to me. Signed-off-by: Linus Torvalds [PKT_SCHED]: rtattr_parse shortcut for nested TLVs Signed-off-by: Thomas Graf Signed-off-by: David S. Miller [PKT_SCHED]: tc filter extension API The tcf_exts API abstracts extensions such as actions/policers into a generic layer and reduces the knowledge inside classifiers to the minimum required. It isolates the validation code into its own function to allow classifiers to validate all input data before making changes and thus avoids the need to undo changes if a extension configuration request cannot be fullfilled. Adds missing locking when adding a action/police extension to an already existing filter. Acquiring dev->queue_lock makes sure we don't change the action/police in the middle of a classification. Noted by Patrick McHardy. As a nice side effect, using this API removes the existing ifdef clutter. Usage: The classifier holds struct tcf_exts which may be empty if no extensions are compiled in. It then calls tcf_exts_validate when a new change request was received and provides a temporary tcf_exts copy to store the change requests. Given it succeeded the classifier may change its own parameters and at the end call tcf_exts_change to commit the changes and replace the existing extension configuration with the new one. The classifier is responsible to destroy his temporary copy if any of its own validation checks fail. The classifier specific TLV types must be exported to the extensions API via tcf_ext_map. Destroying the extensions is as easy as calling tcf_exts_destroy. The extensions are executed by the classifier by calling tcf_exts_exec which must be done as the last thing after making sure the filter matches. Note: A classifier might take further actions after the execution to tcf_exts_exec such as correcting its own cache to avoid caching results which could have been influenced by the extensions. tcf_exts_exec returns a negative error code if the filter must be considered unmatched, 0 on normal execution or a positive classifier return code (TC_ACT_*) which must be returned to the underlying layer as-is. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller [PKT_SCHED]: u32: make use of tcf_exts API Transforms u32 to use tcf_exts API. Makes the u32 changing procedure consistent upon failures except for indev failures but indev will be removed very soon. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller [PKT_SCHED]: fw: make use of tcf_exts API Transforms fw to use tcf_exts API. Makes the fw changing procedure consistent upon failures except for indev failures but indev will be removed very soon. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller [ARM PATCH] 2373/1: S3C2410 - fix possible loop in irq macro Patch from Ben Dooks If we read the INTPEND register and get the wrong result (details below) then it looks like a possible loop to go back and re-read it after calculating the possible correct value for it. It seems that the INTPEND register, which should show the unique number of the interrupt that we need to handle. However, it seems that this register can show the wrong interrupt under certain conditions. Shannon's research shows that it is very possible that the occurence of an external interrupt can end up merging with the base interrupt number, causing the wrong result in the register. This patch also fixes the end position of the #ifdef block and ensures as many registers as possible are stacked before calling printk() for debug. Original patch for 2.6.9 by Shannon Holland re-written for 2.6.10 by Ben Dooks. Signed-off-by: Shannon Holland Signed-off-by: Ben Dooks Signed-off-by: Russell King [PKT_SCHED]: route: allow changing parameters for existing filters and use tcf_exts API Transforms route to use tcf_exts API and thus adds support for actions. Replaces the existing change implementation with a new one supporting changes for existing filters which allows to change a classifier without letting a single packet pass by unclassified. Fixes various cases where a error is returned but the filter was changed already. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller [PKT_SCHED]: tcindex: allow changing parameters for existing filters and use tcf_exts API Transforms tcindex to use tcf_exts API and thus adds support for actions. Replaces the existing change implementation with a new one supporting changes for existing filters which allows to change a classifier without letting a single packet pass by unclassified. Fixes various cases where a error is returned but the filter was changed already. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller [PKT_SCHED]: rsvp: use tcf_exts API Transforms tcindex to use tcf_exts API and thus adds support for actions. Needs more work to allow changing parameters for existing filters. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller [PKT_SCHED]: Remove old action/police helpers Signed-off-by: Thomas Graf Signed-off-by: David S. Miller [PKT_SCHED]: Actions are now available for all classifiers & Fix police Kconfig dependencies Removes outdated comment and make action and old compat policer mutually exclusive to reflect the code. Noted by Jamal Hadi Salim. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller [PKT_SCHED]: Restore net/sched/ipt.c After iptables Kmod Cleanup Thomas Graf points out that I broke net/sched/ipt.c when I removed __ipt_find_target_lock. In fact, those routines don't need to keep the lock held, so we can simplify them, and expose an interface (ipt_find_target) which does module loading correctly for net/sched/ipt.c. Signed-off-by: Rusty Russell Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [PKT_SCHED]: act_api.c: whitespace and coding style cleanup Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [PKT_SCHED]: act_api.c: use consistent comparison style Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [PKT_SCHED]: act_api.c: remove checks for impossible conditions Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [PKT_SCHED]: act_api.c: remove unnecessary initializations Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [PKT_SCHED]: Add rtattr_strlcpy, use it where appropriate Add rtattr_strlcpy to handle unterminated strings. The destination is nulled out entirely to avoid possible leaks when dumping. The return value can be checked for >= size to detect truncated strings. Currently strings equal to the size of the destination are accepted everywhere even if not null-terminated. Sometimes they are silently truncated, sometimes the unterminated string is used. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [RTNETLINK]: Use rtattr_strcmp where appropriate Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [PKT_SCHED]: act_api.c: clean up init path, propagate errors properly Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [PKT_SCHED]: tc actions: whitespace and coding style cleanup Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [PKT_SCHED]: tc actions: remove checks for impossible conditions Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller Revert moxa status update As Alan says: "The '1.8' version is for the Moxa mxser driver. Moxa haven't released any 2.6 driver for the ancient 'smartio' hardware" so the smartio driver stil remains valid. Cset exclude: james4765@gmail.com[torvalds]|ChangeSet|20050108220924|25457 [PKT_SCHED]: gact action: fix multiple bugs in init path - rta can be NULL - Attribute sizes are not checked - No locking when replacing an action - The action is inserted into the hash before its parameters are set Also return proper error codes. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [ARM PATCH] 2374/1: S3C2410 - remove unused code from entry-macro.S Patch from Ben Dooks Remove code for decoding LCD Frame/FIFO IRQs from the include/asm-arm/arch-s3c2410/entry-macro.S file. These are not currently implemented, and should be decoded by a chained IRQ handler from the irq code. Signed-off-by: Ben Dooks Signed-off-by: Russell King [PKT_SCHED]: ipt action: fix multiple bugs in init path - Return proper error codes - Attribute sizes are not checked - rta may be NULL - Several leaks and locking errors - When replacement fails the old action is freed while in use This patch makes replacement atomic, so the old action is either replaced entirely or not touched at all. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [PKT_SCHED]: mirred action: fix multiple bugs in init path - Return proper error codes - Attribute sizes are not checked - rta may by NULL - The action is inserted into the hash before its parameters are set - action in hash is freed on error path - action is modified outside of the locked section This patch makes replacement atomic, so the old action is either replaced entirely or not touched at all. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [PKT_SCHED]: pedit action: fix multiple bugs in init path - Return proper error codes - Attribute sizes are not checked - rta may by NULL - The action is inserted into the hash before its parameters are set - replacement happens without locking - no reallocation on replacement for possibly changed numbers of keys Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [PKT_SCHED]: police action: fix multiple bugs in init path - Return proper error codes - Some attribute sizes are not checked - rta may by NULL - multiple leaks - possible unbalanced unlock - used action is freed after if an error happens while trying to replace - estimator can't be replaced This patch makes replacement atomic, so the old action is either replaced entirely or not touched at all. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [PKT_SCHED]: ipt action: fix missing unlock on error path Simply kill the pskb_expand_head, iptables targets already take care of cloned packets. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [PKT_SCHED]: tc actions: remove unnecessary locking for refcnt changes refcnt/bindcnt are only used in user context under the rtnl, no additional locking is necessary. Besides it was only done in some places, so kill it. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [PKT_SCHED]: ipt action: fix module refcount underflow/mem leaks in tcf_ipt_cleanup Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [PKT_SCHED]: act_api.c: remove module loading from get/delete operations If get/delete can't find the action we can assume there is nothing to get/delete. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [PKT_SCHED]: act_api.c: push memory allocation to tcf_action_get_1 Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [PKT_SCHED]: act_api.c: sync multi action order processing Sync tcf_action_init and tca_action_gd. Rename a few variables to make the code more easily understandable and rename the rtattr_failure/nlmsg_failure labels. These are usually called from the netlink macros, it is misleading to use them in a larger function without actually using netlink macros. Multi action orders were processed differently before, tcf_action_init skipped empty ones while tca_action_gd stopped at the first empty one. This patch makes both stop at the first empty one. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [ARM PATCH] 2370/1: Add common Sharp SCOOP driver code Patch from Richard Purdie Add common driver code for the SCOOP I/O interface found on various Sharp PDAs (Collie, Poodle and Corgi models). It will be used by both SA1100 and PXA machines. [A patch to update Collie to use this driver will follow.] Signed-off-by: Richard Purdie Signed-off-by: Russell King [ARM PATCH] 2371/1: PXA: Add machine support for the Sharp SL-C7xx series of PDAs Patch from Richard Purdie Add base machine support for the Sharp SL-C7xx series of PDAs (Corgi - SL-C700, Shepherd - SL-C750 and Husky - SL-C760). See linux-arm-kernel for a support commitment for this code. Depends on 2370/1 (SCOOP Driver). Signed-off-by: Richard Purdie Signed-off-by: Russell King [IA64] implements the features required for the HAVE_PCI_LEGACY code in sysfs This patch implements the features required for the HAVE_PCI_LEGACY code in sysfs. It allows userspace applications to access legacy I/O ports an memory space using files in sysfs on a per-bus basis. Tested on sn2, but it *should* work on other ia64 platforms as well (though zx1 will probably need machine vectors to do routing of non-base busses). Signed-off-by: Jesse Barnes Signed-off-by: Tony Luck [ARM PATCH] 2366/1: PXA: Add machine type detection for the Sharp SL-C7xx series Patch from Richard Purdie The Sharp SL-C7xx series of PDAs (Corgi, Shepherd, Husky) don't set the machine type upon startup. Fixing this isn't possible as the devices have been produced and the bootloaders are in ROM. This header code detects the differences between them and sets the machine type accordingly. By doing this one kernel can support the series of PXA25x machines. The code also detects Poodle (Sharp SL-5600) which is also a PXA25x device allowing a common kernel to support that device as well. (The base machine code is under development for this device). Signed-off-by: Richard Purdie Signed-off-by: Russell King [PATCH] fix __ptrace_unlink TASK_TRACED recovery for real parent The __ptrace_unlink code that checks for TASK_TRACED fixed the problem of a thread being left in TASK_TRACED when no longer being ptraced. However, an oversight in the original fix made it fail to handle the case where the child is ptraced by its real parent. Fixed thus. Signed-off-by: Roland McGrath Signed-off-by: Linus Torvalds [PATCH] remove duplicate rlim assignment in acct_stack_growth() Signed-off-by: Chris Wright Signed-off-by: Linus Torvalds [NETFILTER]: Fix stack leakage in ip6tables ip6tables version of Rusty's iptables fix. Signed-off-by: Patrick McHardy [NETFILTER]: Remove skb_linearize in ip6tables Signed-off-by: Patrick McHardy [NETFILTER]: Add --log-uid option to ipt_LOG/ip6t_LOG Signed-off-by: Patrick McHardy [NETFILTER]: Fix ip6tables ESP matching with "-p all" Signed-off-by: Patrick McHardy [NETFILTER]: move ipt_error and ipt_standard to iptables.h Signed-off-by: Pablo Neira Ayuso Signed-off-by: Patrick McHardy [NETFILTER] re-introduce __initdata to {arp,ip,ip6}_tables Instead of just removing the (correct) __initdata as introduced by http://linux.bkbits.net:8080/linux-2.5/cset@1.2055.4.50 we rework the code in order to not trigger some misinterpretation by static code checkers. Signed-off-by: Harald Welte Signed-off-by: Patrick McHardy [PATCH] wl3501: fix module_param types/warnings Fix gcc warning: drivers/net/wireless/wl3501_cs.c:2282: warning: return from incompatible pointer type module_param() isn't happy about different types for irq_mask; unsigned long vs. int. Make it uint consistently. Signed-off-by: Randy Dunlap [PATCH] Fix gcc4 compilation in s2io net driver Signed-off-by: Andi Kleen [PATCH] smc-ultra.c too-verbose driver [PATCH] mark arcdev_setup static It's only used in arcnet.c, and following the model of the other link layers it doesn't make sense to use it outside alloc_arcdev() either. [XFS] Fix a performance and scaling problem in xfs_iget_core. Improved the inode hash table sizing heuristics, and allow these to be manually tweaked as well. SGI-PV: 923092 SGI-Modid: xfs-linux:xfs-kern:20766a Signed-off-by: Nathan Scott [XFS] make sure to always reclaim inodes in xfs_finish_reclaim SGI-PV: 921072 SGI-Modid: xfs-linux:xfs-kern:184505a Signed-off-by: Christoph Hellwig Signed-off-by: Nathan Scott [XFS] Prevent attempts to mount 512 byte sector filesystems with 64KB pagesizes, until fixed. SGI-PV: 926724 SGI-Modid: xfs-linux:xfs-kern:20780a Signed-off-by: Nathan Scott [XFS] Move to per-device hash tables (scalability), and use Bill Irwins hash (quicker). SGI-PV: 927536 SGI-Modid: xfs-linux:xfs-kern:20989a Signed-off-by: Nathan Scott [XFS] Add sanity checks before use of attr_multi opcount parameter. SGI-PV: 927535 SGI-Modid: xfs-linux:xfs-kern:20991a Signed-off-by: Nathan Scott [UDP] merge udp_sock with udp_opt No need for two structs, follow the new inet_sock layout style. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller e1000/ixgb net drivers: rename global symbol to fix 'make allyesconfig' [XFS] Fix NFS inode data corruption SGI-PV: 923968 SGI-Modid: xfs-linux:xfs-kern:185126a Signed-off-by: Christoph Hellwig Signed-off-by: Nathan Scott [XFS] Move xfs configs to xfs directory, different flavors of xfs have different configs, this way fs/Kconfig does not have to changed if different xfs's are swapped in and out SGI-PV: 926404 SGI-Modid: xfs-linux:xfs-kern:185134a Signed-off-by: Russell Cattelan Signed-off-by: Nathan Scott [XFS] Use generic_readlink SGI-PV: 927939 SGI-Modid: xfs-linux:xfs-kern:185295a Signed-off-by: Christoph Hellwig Signed-off-by: Nathan Scott [XFS] Move support code for NFS exporting to a conditionally built file SGI-PV: 923968 SGI-Modid: xfs-linux:xfs-kern:185437a Signed-off-by: Christoph Hellwig Signed-off-by: Nathan Scott [XFS] Fix compilations for parisc SGI-PV: 928101 SGI-Modid: xfs-linux:xfs-kern:185439a Signed-off-by: Christoph Hellwig Signed-off-by: Nathan Scott [XFS] Switch to using a separate Kconfig file for XFS. Signed-off-by: Russell Cattelan Signed-off-by: Nathan Scott [PATCH] acct_stack_growth nitpicks - allow CAP_IPC_LOCK to override mlock rlimit during stack expansion as in all other cases Signed-off-by: Chris Wright Signed-off-by: Linus Torvalds [PATCH] let SIGKILL wake TASK_TRACED Upon reevaluation we think it is indeed safe to permit the race between a ptrace call and the traced thread waking up, as long as it will never get back to user mode. This patch makes SIGKILL wake up threads in TASK_TRACED. That alone resolves most of the deadlock issues that became possible with the introduction of TASK_TRACED, getting us back to the killing behavior of 2.6.8 and before. This patch also further cleans up ptrace detaching, so that threads are left in TASK_STOPPED only if a job control stop is actually in effect, and otherwise resume. This removes the past nuisances requiring a SIGCONT to resume a thread even when it had a pending SIGKILL. Signed-off-by: Roland McGrath Signed-off-by: Linus Torvalds [PATCH] don't let PTRACE_EVENT_EXIT stop hold up SIGKILL When a thread stops for ptrace exit tracing, it cannot be resumed by SIGKILL. Once PF_EXITING is set, SIGKILL will not cause a wakeup from stop (see wants_signal in kernel/signal.c). This patch moves the ptrace stop for exit tracing before the setting of PF_EXITING. Signed-off-by: Roland McGrath Signed-off-by: Linus Torvalds input: Add support for H-Wheel on Microsoft Explorer and Logitech MX USB HID mice. Signed-off-by: Vojtech Pavlik [PATCH] quota: make some code static The patch below makes some needlessly global code static. The most interesting part is that dquot_cachep can become static, since it isn't used outside of dquot.c . Signed-off-by: Adrian Bunk Acked-by: Jan Kara Signed-off-by: Linus Torvalds [PATCH] Fix maintainers entry This fixes the entry in the MAINTAINERS file. I guess Marco agrees with such change as he's not doing a maintaince for some time. [PATCH] cpufreq 2.4 interface removal schedule Even though these 2.4. interfaces are already gone in Dave Jones' cpufreq bitkeeper tree, here's a patch which properly announces it in Documentation/feature-removal-schedule.txt: Add meaningful content concerning the removal of deprecated interfaces to the cpufreq core. Signed-off-by: Dominik Brodowski Signed-off-by: Linus Torvalds [ARM] Add show_ipi_list() call. [ARM] Add synchronize_irq() support. [PATCH] sn2 trivial nodemask.h include fix Recent changes mean nodemask.h is required in places it previously wasn't. Signed-off-by: Chris Wedgwood Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] split bprm_apply_creds into two functions The following patch splits bprm_apply_creds into two functions, bprm_apply_creds and bprm_post_apply_creds. The latter is called after the task_lock has been dropped. Without this patch, SELinux must drop the task_lock and re-acquire it during apply_creds, making the 'unsafe' flag meaningless to any later security modules. Please apply. Signed-off-by: Serge Hallyn Signed-off-by: Stephen Smalley Signed-off-by: Chris Wright Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] merge *_vm_enough_memory()s into a common helper The vm_enough_memory functionality was replicated in three separate places, and not always kept in sync. It also used capable() for authorization checks. This caused any process which ends up checking for this permission to have PF_SUPERPRIV set (inappropriately), and caused poor dependencies between stacked modules, since each LSM was generically asked to moderate capable(CAP_SYS_ADMIN) without knowing why. Signed-off-by: Serge Hallyn Signed-off-by: Chris Wright Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: fix iommu cleanup regression In the recent IOMMU cleanup, the new LPAR code assumes that all PHBs must have a dma window assigned to it. On some machines we don't have a window assinged unless there's an adapter in the slot. In other words, a PHB without a ibm,dma-window property is not a bug and must be tolerated. This patch fixes that, and also removes a redundant check for the dma-window being defined. Signed-off-by: Olof Johansson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: rename perf counter register #defines This patch makes some cleanups to the #defines for various fields in the MMCR0 performance monitor control register. Specifically, the names of a couple of bits are changed so that: a) they are a bit less cumbersomely long and b) they match the names used in the hardware documentation. Signed-off-by: David Gibson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] dmi_iterate() fix Comment on why iounmap is not appropriate in the early-boot legacy ISA region dmi scan. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] arch/i386/kernel/cpu/mtrr: too many bits are masked off from CR4 The old code cuts off the higher bits in CR4 (such as X86_CR4_OSFXSR, X86_CR4_OSXMMEXCPT). Signed-off-by: leendert@watson.ibm.com Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pm: introduce pm_message_t This introduces pm_message_t. For now, it is only good for type-safety and sparse checking, but plan is to turn pm_message_t into structure soon. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mark older power managment as deprecated Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] swsusp: device power management fix Since at least kernel 2.6.9, if not earlier, swsusp fails to properly suspend and resume all devices. The most notable effect is that resuming fails to properly reconfigure interrupt routers. In 2.6.9 this was obscured by other kernel code, but in 2.6.10 this often causes post-resume APIC errors and near-total failure of some PCI devices (e.g. network, sound and USB controllers). Even in cases where interrupt routing is unaffected, this bug causes other problems. For instance, on one of my systems I have to run "ifdown eth0;ifup eth0" after resume in order to have functional networking, if I do not apply this patch. By itself, this patch is not theoretically complete; my next patch fixes that. However, this patch is the critical one for fixing swsusp's behavior in the real world. Signed-off-by: Barry K. Nathan Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] swsusp: properly suspend and resume all devices During resume, my previous patch switches over to the saved swsusp image without suspending all devices first. This patch fixes that oversight, so that the state of the hardware upon resume more closely matches the state it had at suspend time. While my previous patch alone seemed to work fine in my testing, it is not fully correct without this as well. Signed-off-by: Barry K. Nathan Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] m32r: employ new kernel API/ABI We, Linux/M32R project members, decided to change the kernel API/ABI. This modification is not small, but if we don't change it now, perhaps we have no chance to change them hereafter. * Why change the m32r kernel API/ABI? - The m32r port has many old-style syscall interfaces, because we made m32r port refering to the other traditional archs. Some old syscalls are no longer used or can be safely removed by upgrading the GNU C library. - To make the m32r kernel more secure, it is preferable to prevent stack region from being executed. (e.g. stack overflow) * API/ABI changes - include/asm-m32r/unistd.h: Upgrade to the new kernel API. - arch/m32r/entry.S: Minimum update to the new ABI. - Don't use UID16 syscalls. - To make stack noexecutable: 1) Don't use trampoline for signal handlers for kernel space (cf. sparc64): sys_signal: remove. sys_sigaction, sys_rt_sigaction: use glibc's restorer. 2) Don't generate trampoline code by GCC in userspace: Support non-executable stack by the m32r gcc. --> done (for gcc-3.4.3/gcc-4.0) * New userland - This modification does *not* keep backward compatibility. So we have been prepared new userland, based on the new API/ABI. Already, more than 200 new Debian deb binary packages are available on the Linux/M32R site: http://debian.linux-m32r.org/dists/04_ordovician/ (for this new ABI) Signed-off-by: NIIBE Yutaka Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] M68k: Update defconfigs for 2.6.10 M68k: Update defconfigs for 2.6.10 Signed-off-by: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] MMC_WBSD depends on ISA MMC_WBSD depends on ISA (needs isa_virt_to_bus()) Signed-off-by: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] M68k: Remove nowhere referenced files M68k: Remove nowhere referenced files Signed-off-by: Domen Puncer Signed-off-by: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Direct write vs truncate deadlock On Fri, Dec 10, 2004 at 11:04:22AM +1100, Nathan Scott wrote: > The bug# for the write deadlock I mentioned earlier -- 925836. I finally found some time to look at it, and this fix is almost trivial. XFS doesn't need the i_alloc_sem at all, so we should avoid taking it in direct-io.c completely. As a side-effect it makes the code a little bit simpler even. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] random: whitespace cleanups Whitespace cleanups trailing whitespace removal superfluous brace removal Signed-off-by: Matt Mackall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] random: remove pool resizing sysctl Remove random pool resizing sysctl. It's racy in hard to fix ways and doesn't really warrant fixing. It also only allows adjusting the input pool size so it's either obsolete or incomplete. The default 4kbits (512 bytes) of entropy pool should be more than big enough for all purposes and too small to be a memory concern. This patch removes the resizing code and marks the sysctl read-only. Signed-off-by: Matt Mackall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] cciss update to version 2.6.4 This patch removes support for 2 controllers that were recently cancelled and it adds support for the P600, a cciss based SAS controller due to ship in late March/early April '05. Neither of these controllers have made it to the field. Signed-off-by: Mike Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] reiserfs vs-8115 test adjustment This patch below is needed to suppress the warning, with more than one indirect block insertion at a time, it is now possible to split indirect items as well and there were reports on lkml from people who seen this warning and were worried about it. To be on the safe side, I consulted with Vladimir Saveliev and he said that the change is safe to do indeed. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Export get_sb_pseudo() Export get_sb_pseudo() so that modules can create unmountable pseudo-filesystems cleanly. Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] proc_kcore: Correct double accounting of elf_buflen Correct double accounting of elf_buflen in read_kcore:get_kcore_size(). Signed-off-by: Prasanna Meda Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Remove InterMezzo MAINTAINERS entry InterMezzo was removed in 2.6, so there's no reason for keeping a MAINTAINERS entry. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] 3c59x: reload EEPROM values at rmmod for needy cards Enable reload of EEPROM values in reset at rmmod for cards that need it, similar to old EEPROM_NORESET flag but in reverse. (Most?) 3c905 and (some?) 3c905B cards need an additional bit unmasked in the reset at rmmod or else they don't get reinitialized properly when the driver is reloaded. Signed-of-by: John W. Linville Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] 3c59x: remove EEPROM_RESET for 3c905B Remove the EEPROM_RESET flag for the 3c905B cards. Signed-off-by: John W. Linville Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] 3c59x: Add EEPROM_RESET for 3c900 Boomerang Add 3c900 Boomerang to list of devices needing EEPROM_RESET Signed-off-by: John W. Linville Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] 3c59x: enable power management unconditionally The problem is that under the new PCI driver model, cards are required to always restore state and call pci_enable_device() on resume. So the patch changes the driver to do its restore state calls unconditionally (it used to only do them when it was configured for wake-on-lan) and adds a call to pci_enable_device(). Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] 3c59x: missing pci_disable_device It is possible to remove the device without calling pci_disable_device(). A leak can take place during the init as well. Signed-off-by: Francois Romieu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] 3c59x: use netdev_priv Patch changes the two remaining direct accessing of dev->priv to netdev_priv. Signed-off-by: Steffen Klassert Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] 3c59x: Make use of generic_mii_ioctl With this patch the driver makes use of the MII lib helper function generic_mii_ioctl. Patch is tested with the mii-diag tool and a 3c905-TX, 3c905B-TX NIC. Signed-off-by: Steffen Klassert Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] 3c59x: VORTEX select MII 3c59x now uses generic_mii_ioctl, so VORTEX should select MII. Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] 3c59x: support more ethtool_ops With this the driver supports the ethtool_ops {get,set}_msglvl, {get,set}_settings, get_stats, get_link, and nway_reset. Unlike the first patch, the userspace ioctl functions are protected with spin_lock_irqsave. Furter I moved the spin_lock_bh from the mdio_{read,write} functions to vortex_timer(). All the locks acquire vp->lock now, vp->mdio_lock is not used any more. Signed-off-by: Steffen Klassert Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fs/proc/base.c: array size proc_pid_wchan() uses a 128-Byte array for something that can change its size via define. Signed-off-by: walter harms Signed-off-by: Domen Puncer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fs/proc/proc_tty.c: avoid array No need for an array here. Therefore no need to worry about possible overflows. seq_printf() can handle this. Signed-off-by: walter harms Signed-off-by: Domen Puncer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] optimize prefetch() usage in list_for_each_xxx This patch changes list_for_each_xxx iterators from: for (pos = (head)->next, prefetch(pos->next); pos != (head); pos = pos->next, prefetch(pos->next)) to: for (pos = (head)->next; prefetch(pos->next), pos != (head); pos = pos->next) Reduces my vmlinux .text size by 4401 bytes. Signed-off-by: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] signal.c: convert assertion to BUG_ON() Signed-off-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Right severity level for fatal message Telling user machine will crash with default loglevel is nice joke, it at least needs worse severity. Signed-off-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] remove unused drivers/char/rio/cdproto.h Remove nowhere referenced file. (egrep "filename\." didn't find anything) Signed-off-by: Domen Puncer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] remove unused drivers/char/rsf16fmi.h Remove nowhere referenced file. (egrep "filename\." didn't find anything) Signed-off-by: Domen Puncer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mtd: added NEC uPD29F064115 support This patch has added NEC uPD29F064115 support to jedec_probe.c. Signed-off-by: Yoichi Yuasa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] IDE CD is very noisy The ide-cd code has never been updated over the years to include printk levels. This patch extracts the printk level updating from the -ac tree seperated from other changes. Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] signedness fix in deadline-iosched.c There is some (obvious) mess with "unsigned int" and "int" in the deadline-io-scheduler (sysfs-section). Try to change the attribute "writes_starved": root@ezs-mobil:/sys/block/hda/queue# cat scheduler noop anticipatory [deadline] root@ezs-mobil:/sys/block/hda/queue# cd iosched/ root@ezs-mobil:/sys/block/hda/queue/iosched# ls fifo_batch front_merges read_expire write_expire writes_starved root@ezs-mobil:/sys/block/hda/queue/iosched# cat writes_starved 2 root@ezs-mobil:/sys/block/hda/queue/iosched# echo 4 >writes_starved root@ezs-mobil:/sys/block/hda/queue/iosched# cat writes_starved -2147483648 root@ezs-mobil:/sys/block/hda/queue/iosched# Because all attribute-variables are defined as "int", the patch below changes them to "int". Now it works as expected... Signed-off-by: Juergen Quade Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] cleanup virtual console <-> selection.c interface Pass around pointers instead of indices into a global array between various files of the virtual console implementation and stop using obsfucting macros that expect certain variables to be in scope. This is a first step to get rid of the various global arrays in the VC code. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] warn about cli, sti & co uses even on UP These don't exist on SMP at all, at least warn on compiling for UP. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] remove umsdos from tree UMSDOS has been non-function since early 2.5 and would need a major rewrite to be resurrected (which I don't hope anyone plans as it's a really horrible hack) From: Adrian Bunk With umsdos gone, there's no longer a MAINTAINERS entry required. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] kill quota_v2.c printk() of size_t warning The printk() of a size_t is off, tripping a warning. This patch qualifies the integer format with a 'z' to suppress the warning. Signed-off-by: William Irwin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] silence numerous size_t warnings in drivers/acpi/processor_idle.c Multiple format -related warnings arise from size_t issues. This patch peppers the seq_printf()'s with 'z' qualifiers and casts to silence them all. Signed-off-by: Wililam Irwin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] make IRDA string tables conditional on CONFIG_IRDA_DEBUG There are some string tables only used for debugging printk()'s in IRDA that trip warnings when CONFIG_IRDA_DEBUG is not set. This patch makes them conditional on CONFIG_IRDA_DEBUG to silence warnings. Signed-off-by: William Irwin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix unresolved MTD symbols in scx200_docflash.c This driver is using some private #ifdef to try to control the use of partitions and calling functions that get compiled out of the kernel if it's set (which it is by default). This results in unresolved module symbols, which are bad. This patch synchronizes the conditional compilation of partition management in the driver with the global config option for MTD partition management and thereby fixes the unresolved symbol problem. Signed-off-by: William Irwin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix module_param() type mismatch in drivers/char/n_hdlc.c maxframe is a variable of type ssize_t; this patch repairs the warning arising from the type mismatch in the module_param() declaration. Signed-off-by: William Irwin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] drivers/char/: misc cleanups below are as requested my drivers/char/ cleanups in one big patch for better merging. Each of the patches included was already sent three times without any objections to linux-kernel. The n_tty.c patch is Approved-by: Alan Cox The patch below makes changes under drivers/char/ including the following: - make needlessly global code static - remove completely unused code Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pktcdvd: make two functions static Make two needlessly global functions static. Signed-off-by: Adrian Bunk Signed-off-by: Peter Osterlund Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pktcdvd: grep-friendly function prototypes Put function prototypes on a single source line to make them more grep-friendly. Signed-off-by: Peter Osterlund Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pktcdvd: Small documentation update Mention that a new DVD+RW disc has to be formatted before first use. Signed-off-by: Peter Osterlund Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] isofs: Remove useless include When I was editing cdrom.h, I noticed that fs/isofs/compress.c was recompiled. This patch removes the useless #include that caused the unnecessary recompilation. Signed-off-by: Peter Osterlund Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] synaptics: Remove unused struct member variable This patch removes an unused variable in the synaptics_data struct and deletes a no longer helpful comment. I don't think this has been used since the very first synaptics kernel patch I submitted that did all processing in kernel space instead of delegating most of it to the X server. Signed-off-by: Peter Osterlund Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] kill one "if (X) vfree(X)" usage Signed-off-by: Vincent Hanquez Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] smbfs: make some functions static The patch below makes some needlessly global functions static. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: fixed build error about NEC VR4100 series This patch had fixed build error about NEC VR4100 series. * add #include for printk() This patch had already applied to Ralf's cvs tree. Signed-off-by: Yoichi Yuasa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] efs: make a struct static (fwd) The patch below makes a needessly global struct in the efs code static. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext3 cleanups - make some needlessly global code static - super.c: remove the unused global function ext3_panic Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fs/ext2/xattr.c: make ext2_xattr_list static The patch below makes the needlessly global function ext2_xattr_list static. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fs/hugetlbfs/inode.c: make 4 functions static The patch below makes four needlessly global functions static. Signed-off-by: Adrian Bunk Acked-by: William Irwin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] remove NR_SUPER define Last month I removed the "or too many mounted filesystems" part from an error message in mount(8) - NR_SUPER has not been used in a very long time. Also NR_RESERVED_FILES is unused today. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] i2o: fix init/exit section usage Fix 3 instances of bad calls to i2o_pci_free(), from init to exit code sections: Error: ./drivers/message/i2o/pci.o .init.text refers to 000000f7 R_386_PC32 .exit.text Error: ./drivers/message/i2o/pci.o .init.text refers to 000003bc R_386_PC32 .exit.text Error: ./drivers/message/i2o/pci.o .init.text refers to 00000572 R_386_PC32 .exit.text Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] use modern format for PCI->APIC IRQ transform printks Use pci_name() rather than "(B%d,I%d,P%d)" when printing PCI IRQ information. Compiled but untested. Signed-off-by: Bjorn Helgaas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] coda: bounds checking This patch adds bounds checks for tainted scalars (reported by Brian Fulton and Ted Unangst, Coverity Inc.). Signed-off-by: Jan Harkes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] code: ulist_for_each_entry_safe() Use list_for_each_entry_safe to make code more readable. Compile tested. Signed-off-by: Domen Puncer Signed-off-by: Maximilian Attems Signed-off-by: Jan Harkes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] coda: make global code static The patch below makes some needlessly global code static. Signed-off-by: Adrian Bunk Signed-off-by: Jan Harkes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] coda: remove unused coda_mknod Remove coda_mknod as the code was never used, coda_hasmknod was always 0. (reported by Adrian Bunk) Signed-off-by: Jan Harkes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] coda: rename coda_psdev to coda Remove '_psdev' from the Coda sysfs device class name. Signed-off-by: Jan Harkes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] remove outdated smbfs ChangeLog The patch below removes an outdated samba ChangeLog file. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Update Geert's address in CREDITS Signed-off-by: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PKT_SCHED]: Use rtattr_parse_nested where appropriate Signed-off-by: Patrick McHardy [PKT_SCHED]: Fix memory leaks in cls_u32.c error path Also silence an unused-variable warning when CONFIG_CLS_U32_MARK is not set. Signed-off-by: Patrick McHardy [PKT_SCHED]: tc actions: disable bhs while lock is held in init path Signed-off-by: Patrick McHardy [IA64] update sn2_defconfig (fix initrd, add IB support) Don't know what happened to initrd support, but 'make sn2_defconfig' no longer enables it. This patch should fix that, along with enabling modular IB support. Signed-off-by: Jesse Barnes Signed-off-by: Tony Luck [IA64] simeth.c: Remove unneeded casts of (void *) pointers. Signed-off-by: Domen Puncer Signed-off-by: Tony Luck [PKT_SCHED]: act_api.c: drop rtnl for loading modules Signed-off-by: Patrick McHardy [PKT_SCHED]: tcf_exts: rate_tlv is optional Signed-off-by: Patrick McHardy [PKT_SCHED]: act_api.c: kill some exports init, destroy, dump etc. should be performed through Thomas's tcf_exts, don't export the act_api.c functions to modules. tcf_action_dump_1 will follow once tcf_dump_walker is converted to callbacks. Signed-off-by: Patrick McHardy [XFS] Update Makefile for separate export source file. Signed-off-by: Christoph Hellwig Signed-off-by: Nathan Scott Move extern find_exported_dentry declaration into a common header. Signed-off-by: Christoph Hellwig Signed-off-by: Nathan Scott [ARM] Add SMP IRQ affinity and routing support. Provide /proc/irq/*/smp_affinity support, and add necessary methods to allow a machine to route the interrupt to the desired CPU. [IA64-SGI] Update SN2 code for running on simulator Update the hack in sn_io_addr() that is used when running on the system simulator. The change is needed for running on systems with the new shub2 chipset. Note that this change affects simulator runs only. Signed-off-by: Jack Steiner Signed-off-by: Tony Luck [IA64-SGI] Delete unneeded SN2 header file router.h Delete unused header file. The file became obsolete after the IO reorg code was completed. Signed-off-by: Jack Steiner Signed-off-by: Tony Luck [ARM] Relocate ipi_count into ipi data structures. This removes ipi_count from the globally visible per-cpu cpu data structure. [IA64] defconfig update This adds support for a few new modules (e.g. Infiniband, new ACPI stuff, etc.) and also enables initrd support (required for Fedora for example--it's really not that painful, I use the same initrd for most of my kernels). Signed-off-by: Jesse Barnes Signed-off-by: Tony Luck [IA64] reset console_loglevel so INIT output always goes to console Reset console_loglevel early in INIT handler. Otherwise, if it has been turned down (i.e., with "dmesg -n1"), the user may see no effect at all from issuing an INIT. We're never going to run any more user code, so there won't be any opportunity for anything to collect the output from the dmesg buffer. Signed-off-by: Bjorn Helgaas Signed-off-by: Tony Luck [IA64] clear all region registers at boot If we initialize *all* of the region registers to be non-identity mapped we can catch a few more bugs that might be covered up by whatever their previous state was. This patch sets them all up to use VHPT (i.e. non alt-tlb) address translation. It already helped me find one bug in the sn2 initialization code. Signed-off-by: Jesse Barnes Signed-off-by: Tony Luck [IA64-SGI] fix bogus address dereference in sn/setup.c Some code in sn/setup.c was trying to dereference a physical address, which usually doesn't work (esp. not with the region register init patch I posted). This patch converts the function used to find the klconfig to return virtual char * instead of a physical address and updates the caller to deal with it. Signed-off-by: Jesse Barnes Signed-off-by: Tony Luck [IA64] Fix PTRACE_GETEVENTMSG ia32 emulation This patch fixes PTRACE_GETEVENTMSG for the ia32 emulation. The parameter is a pointer, thus needs to be converted. Signed-off-by: Andreas Schwab Signed-off-by: Tony Luck [ARM] Fix smp.c includes Remove asm/smp.h include, use linux/smp.h instead. Add linux/cpu.h include. [IA64] sn_hwperf.c: vfree() checking cleanups Signed-off by: James Lamanna Signed-off-by: Domen Puncer Signed-off-by: Tony Luck [IA64] sba_iommu.c: pci_find_device is going away Here is the reroll of the sba_iommu.c patch to use for_each_pci_dev. Signed-off-by: Hanna Linder Signed-off-by: Tony Luck [ARM PATCH] 2376/1: S3C2410 - cleanup 2410/2440 distinctions, fix build Patch from Ben Dooks This cleans up a few items in arch/arm/mach-s3c2410 with naming of functions and a build problem. Items which are general to s3c2410 and s3c2440 are now named s3c24xx_ instead of s3c2410_, as well as moving them to the correct headers. The patch also fixes a problem where at least one s3c2410 target had to be selected to allow an s3c2440 target to build without error. The following have been renamed: s3c2410_init_irq -> s3c24xx_init_irq s3c2410_timer -> s3c24xx_timer Signed-off-by: Ben Dooks Signed-off-by: Russell King [IA64] pci.c: pci_find_device is going away Ok. Here is the reroll of the original patch to us for_each_pci_dev: Signed-off-by: Hanna Linder Signed-off-by: Tony Luck [ARM PATCH] 2378/1: Trivial: Update my info in CREDITS file Patch from Deepak Saxena Signed-off-by: Deepak Saxena Signed-off-by: Russell King [IA64] pci.c: fix warning Fix a 'mixing code and declarations' warning in pci.c by creating a small function that's a no-op if CONFIG_NUMA=n but otherwise includes the proper extern. Similar patch also submitted by Signed-off-by: Jesse Barnes [IA64-SGI] io_init.c: gcc4 fixes for sn2 This patch is needed since "warning: use of cast expressions as lvalues is deprecated" turned into an error in gcc4. We can use the convenience macros for read access and explicit assignments for initialization. I thought about using Alexandre's fixes, but this seemed a little simpler. Signed-off-by: Jesse Barnes Signed-off-by: Tony Luck [ARM PATCH] 2381/1: Add to IXP4xx source files Patch from Deepak Saxena We should be including to pick up various important constants that might be needed by other include files. Signed-off-by: Deepak Saxena Signed-off-by: Russell King [IA64-SGI] Altix BTE error handling fix This patch fixes BTE off node error handling. Signed-off-by: Russ Anderson Acked-by: Robin Holt Signed-off-by: Tony Luck [ARM PATCH] 2386/1: Tidy up Sharp SCOOP driver coding style Patch from Richard Purdie Tidy up a couple of coding style issues in the Sharp SCOOP Driver Signed-off-by: Richard Purdie Signed-off-by: Russell King [XFS] Switch to managing uptodate state on a region within a page, rather than a sector within a page. Fixes 64K pagesize kernels with 512 byte sectors. SGI-PV: 926724 SGI-Modid: xfs-linux:xfs-kern:20990a Signed-off-by: Nathan Scott [PATCH] uninline __do_page_cache_readahead() erk, this monster has three callsites. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] acct_update_integrals speedup This patch is to provide extra check in acct_update_integrals() function. The routine would return if 'delta' is 0 to take quick exit if nothing to be done. Signed-off-by: Jay Lan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix index calculations in clear_page_range. pgd_index(end + PGDIR_SIZE - 1) returns 0 if end + PGDIR_SIZE - 1 is beyond the end of the address space. Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] m32r: include nodemask.h for build fix Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] acpi_smp_processor_id() warning fix Suppress an "using smp_processor_id in preemptible code" warning. The idle thread isn't preemptible, so we can simply use _smp_processor_id(). Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] cputime: introduce cputime This patch introduces the concept of (virtual) cputime. Each architecture can define its method to measure cputime. The main idea is to define a cputime_t type and a set of operations on it (see asm-generic/cputime.h). Then use the type for utime, stime, cutime, cstime, it_virt_value, it_virt_incr, it_prof_value and it_prof_incr and use the cputime operations for each access to these variables. The default implementation is jiffies based and the effect of this patch for architectures which use the default implementation should be neglectible. There is a second type cputime64_t which is necessary for the kernel_stat cpu statistics. The default cputime_t is 32 bit and based on HZ, this will overflow after 49.7 days. This is not enough for kernel_stat (ihmo not enough for a processes too), so it is necessary to have a 64 bit type. The third thing that gets introduced by this patch is an additional field for the /proc/stat interface: cpu steal time. An architecture can account cpu steal time by calls to the account_stealtime function. The cpu which backs a virtual processor doesn't spent all of its time for the virtual cpu. To get meaningful cpu usage numbers this involuntary wait time needs to be accounted and exported to user space. From: Hugh Dickins The p->signal check in account_system_time is insufficient. If the timer interrupt hits near the end of exit_notify, after EXIT_ZOMBIE has been set, another cpu may release_task (NULLifying p->signal) in between account_system_time's check and check_rlimit's dereference. Nor should account_it_prof risk send_sig. But surely account_user_time is safe? Signed-off-by: Hugh Dickins Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] cputime: microsecond based cputime for s390 This patch adds the architecture magic to replace the jiffies based cputime with microsecond based cputime and it adds code to calculate involuntary wait time. With this patch the numbers reported by top and ps when running on LPAR or z/VM are finally not junk anymore. Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] 4level swapoff hang fix The 4level mods have caused 2level swapoff to miss entries and hang. There's probably a one-line fix for that, but the error is really caused by previous awkwardness - each mask applied on two levels, an "address" that's an offset plus an "offset" that's an address. Simplify the four levels to behave in the same address/next/end way and the bug vanishes. Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc: fix idle with interrupts disabled The idle-thread-preemption-fix.patch in mm1/2 leads to a stalled box on PPC machines which do not provide a powersave function and therefor poll the idle loop with interrupts disabled. The patch reenables interrupts. Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc: remove duplicate define The MMCR0_PMXE is already defined in reg.h, so no need to redefine it here. Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc; include missing header Include missing header to avoid implicit function declaration warnings Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: Move hotplug cpu functions to smp_ops This should allow for easier adding of hotplug cpu support for other PPC64 subarchs. The patch is untested but does compile with and without hotplug cpu on pSeries and G5 configs. What can get slightly confusing is the fact that both ppc_md and smp_ops have cpu_die members. Signed-off-by: Zwane Mwaikambo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: kprobes breaks BUG() handling I was running some tests and noticed BUG() handling wasnt working as expected. The kprobes code has some code to check for breakpoint removal races and only checks for one opcode. It turns out there are many forms of the breakpoint instruction, comparing against one is not good enough. For the momemt remove the code in question so BUG()s work again and we can discuss a better solution (I thought kprobes was emulating instructions or running them out of line). Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: Fix NUMA build We were missing an include of the new nodemask.h and NUMA enabled builds broke. Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] : ppc64: enhance oops printing Here are some changes to the oops printout, stuff that would have been useful when I was chasing various bugs. - print out instructions around the fail (3/4 before 1/4 after). - print out CTR and CR registers, make some space by cutting down XER (its only 32bit) - always print the DAR and DSISR, its sometimes useful - print_modules() like x86 Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: fix xmon longjmp handling It turns out gcc decides to allocate a stack frame in the current xmon setjmp function. This means the stack linkage we save away is destroyed when returning from it and its just a matter of time before another function stomps on it. This should fix the problem Linas reported this week. Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: make xmon print BUG() warnings I've had to explain to a number of people that a 0x700 exception is often a BUG(). Make this crystal clear by printing the BUG information in the xmon exception printout. Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: xtime <-> gettimeofday can get out of sync I've noticed a problem where xtime and gettimeofday could get out of sync if interrupts are disabled for too long (eg long kernel code paths or dropping into the debugger for a while). We correctly replay lost jiffies but in that loop time_sync_xtime syncs the intermediate values of xtime up with the current value of gettimeofday. So xtime jumps by a bunch and from then on it is ahead of gettimeofday and we never resync the two. I guess this is to avoid xtime going backwards. The patch below creates a __do_gettimeofday where you can pass in a tb value and sync the intermediate values of xtime properly. Note that the time_sync_xtime check only stops the seconds from going backwards, the ns component still could couldnt it? Considering this is hard to get right, should we switch to the time interpolator stuff? The only problem there is it might be trouble for systemcfg (which exports stuff to do userspace gettimeofday). Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: PCI cleanup - remove pci_fix_bus_sysdata. We required it for the old pci dma subsystem, but now it is useless. - remove PCI_GET_PHB_PTR and use pci_bus_to_host instead - remove pci_find_hose_for_OF_device - remove some unused fields in struct pci_controller - remove pci_device_loc stale prototype - remove an old mask of pci bus number that was left around from the pre PCI domains days Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: Remove flush_instruction_cache Remove flush_instruction_cache, we cant touch HID bits on LPAR machines. Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: interrupt code cleanup - Move some function prototypes into header files. - Remove late_setup_cpu, put the set indicator and vpa init into xics probe instead - rtas-proc was doing weird stuff with the 9005 indicator. Get rid of it. - Dont open code the set_indicator call in the hotplug code Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: Fix rtas_set_indicator(9005) It turns out we were passing in the wrong thing to the rtas_set_indicator call. Luckily we got away with it because it looks like firmware does not check arguments and just inserts or removes the current cpu from the global server group. Fix it. Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: Make NUMA code handle unexpected layouts From: Nathan Lynch Ran into this on a 4GB partition - all but about ~300MB was thrown away. It works for me, but I've not tested on firmware without the bug. Fall back to non-numa setup upon discovering unexpected memory layout as presented by firmware, instead of throwing away regions. Signed-off-by: Nathan Lynch Acked-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: semicolon in rtasd.c From: Domen Puncer semicolon in rtasd.c Signed-off-by: Domen Puncer Acked-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: reduce paca[] where possible On UP builds we include lots of spare pacas. Lets get rid of them and save some space. Also catch the small SMP case. Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] improved wait_8254_wraparound() hopefully 'better' fix for broken Intel Mercury/Neptune in wait_8254_wraparound() ... Rationale: changing HZ to higher values (like 5k,10k or 20k) will hang machines using wait_8254_wraparound() indefinitely, because a suboptimal workaround for buggy Intel Mercury/Neptune chipsets is in place. this was tested on several machines, unfortunately none with a broken Intel Mercury/Neptune chipset, and it works fine with various HZ values ... Signed-off-by: Herbert Pötzl Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] kprobes: dont steal interrupts from vm86 The address used by the kprobes handler was not correct if the application was using LDT entries for code segment. This patch fixes the above problem by calculating the address using base address of the current code segment. Also this patch removes the inline prefix of kprobe_handler() . Signed-off-by: Prasanna S Panchamukhi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] APIC/LAPIC hanging problems on nForce2 system current state: Systems with Nforce2 could freeze on high disk i/o activity in APIC mode when CPU Disconnect is enabled. If bios doesn't fix this, current kernel fix changes the registers according to follwing table: * Chip Old value New value * C17 0x1F0FFF01 0x1F01FF01 * C18D 0x9F0FFF01 0x9F01FF01 But this is only done, if cpu disconnect has been enabled in bios. why change this: If CPU disconnect is not enabled in bios, and bios is broken (some manufacturers like Abit don't care about their customers and even the latest bios doesn't fix this; I have an Abit mainboard), the kernel doesn't apply the fix, so if cpu disconnect is enabled at a later stage (in userspace), the system will be unstable and most likely freeze. new behaviour: The fix is now applied regardless of cpu disconnect being enabled at boot time, or not. As you only have to change byte 3 to 0x01, reading out chipset version isn't needed, so the patch simplifies the fix. Now turning cpu disconnect on, at later stage won't break the system, and if it was already enabled, it gets fixed, as the old version did. Signed-off-by: Prakash Punnoor Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Work around another aperture BIOS bug on Opteron Work around another aperture BIOS bug on Opteron Based on debugging&code from Vincent ETIENNE >> I have some problem with AGP initialization with my board : IWILL DK8N (Bi opteron chipset NFORCE3 ). I use kernel 2.6.10-rc3-mm1, but i have try with IOMMU reports a 128MB aperture for CPU0 ( that's the value i used in my bios) at F0000000 but only 32MB at 4000000 for CPU1 << This patch checks for this condition and fixes the other CPUs up. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Hack to disable clustered mode on AMD systems Hack to disable clustered mode on AMD systems Make sure AMD big flat apic mode is not confused with clustered APIC mode. Ugly hack, but no better way found. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Updates for x86-64 boot-options.txt Updates for x86-64 boot-options.txt Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Update defconfig Update x86-64 defconfig Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Remove old-checksum.c Remove old-checksum.c Remove nowhere referenced file. (egrep "filename\." didn't find anything) Signed-off-by: Domen Puncer Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Fix sparse warnings Fix sparse warnings warning: cast removes address space of expression for uses of put_user() on x86_64 caused by doing __m(addr) in __put_user_asm() with addr a __user pointer. Signed-off-by: Roland Dreier Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Fix some gcc 4 warnings in arch/x86_64 Fix some gcc 4 warnings in arch/x86_64 There are tons more outside though. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] i386: Port missing cpuid bits from x86-64 to i386 Port missing cpuid bits from x86-64 to i386 Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] i386: AMD dual core support for i386 AMD dual core support for i386 Run HT initialization on AMD dual core CPUs on i386. They fake being HT CPUs. This patch makes the HT detection run on AMD CPUs too. I moved the HT detection code into a common file from intel.c for that. It would be actually better to run HT detection always on all CPUs but this would need a second callback afterwards to AMD code, which I avoided for now. It adds a cpuinfo->x86_num_cores field. This sets up the phys_proc_id[] array. This overloads this array with HT, but when smp_num_siblings is 1 It is currently only used for /proc/cpuinfo printing. The reason we want to behave this like SMT is that there are some license managers in user space that license according to number of physical CPUs, and when they handle HT they should handle CMP with this hack too. Another reason we need this is that the powernow k8 driver needs this information to properly manage dual core CPUs. When there are ever dual core HT CPUs this will need small changes in smpboot.c. I didn't do this for now to keep the patch simple. Then we set smp_num_siblings to 1 on these systems again to prevent the scheduler from setting up HT scheduling (which is not a very good match for dual core). This is a port of the CMP support code from x86-64 (minus the NUMA bits) Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] i386: Count both multi cores and SMP siblings in /proc/cpuinfo siblings. Count both multi cores and SMP siblings in /proc/cpuinfo siblings. This avoids breaking user space licensing managers who license by CPU on dual core systems. Port of the equivalent code on x86-64. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] i386: Export phys_proc_id. This is needed for the powernow k8 driver to manage AMD dual core systems. (see explanation in previous CMP patch for more details) Signed-off-by: Andi Kleen Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Move memset_io out of line to avoid warnings. Move memset_io out of line to avoid warnings. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Fix ioremap attribute restoration on i386 and x86-64 We need to save the access flags to properly restore the direct mapping on unmap. For that we use some upper bits in vm_flags Also add a comment for that to the header file. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Fix TLB reporting on K8 On K8 L1 TLB is inclusive, so don't include it in the TLB count. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: change_page_attr logic fixes from Andrea change_page_attr logic fixes from Andrea This avoids reference counting leaks and adds BUGs for more wrong cases. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Fix mptables printk This fixes the erroneous No mptables found printk on x86_64 mpparse. We will only print the message now if no mptables are found after all scans complete. Signed-off-by: Justin M. Forbes Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Add new key syscalls. Add new key syscalls. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Remove direct mem_map references This removes all but one direct reference to mem_map for x86-64. This is needed on systems where we break the mem_map up and directly indexing into mem_map to get the page structure doesn't work anymore. Signed-off-by: Matt Tolentino Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Remove check that limited max number of IO-APIC to 8. The original check was apparently to work around some old BIOS bugs and we just assume x86-64 machines don't have this class of problems. Originally found by Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Prevent gcc from generating MMX code by mistake. This will help only on gcc 4+. On older gccs there is a workaround too, but it is so ugly and there are no actual observed failures that I didn't apply it. Signed-off-by: Andi Kleen Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Don't sync APIC ARBs on P4s. Merged from i386 Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Cleanups preparing for memory hotplug From: Matt Tolentino Some cleanup work in early page table init preparing for memory hotplug. Hacked up by AK Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Remove unused prototypes. Pointed out by Matthew Wilcox. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Fix a lot of broken white space in arch/x86_64/kernel/setup.c Fix a lot of broken white space in arch/x86_64/kernel/setup.c Only touches white space, no functional changes. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Fix signal FPU leak on i386 and x86-64 Found by Bodo Stroesser. Description from Bodo: >> On i386, if a signal handler is started, the kernel saves the fpu-state of the interrupted routine in the sigcontext on the stack. Calling unlazy_fpu() and setting current->used_math=0, the kernel supplies the signal-handler with a cleared virtual fpu. On sigreturn(), the old fpu-state of the interrupted routine is restored. If a process never used the fpu, it virtually has a cleared fpu. If such a process is interrupted by a signal handler, no fpu-context is saved and sigcontext->fpstate is set to NULL. Assume, that the signal handler uses the fpu. Then, AFAICS, on sigreturn current->used_math will be 1. Since sigcontext->fpstate still is NULL, restore_sigcontext() doesn't call restore_i387(). Thus, no clear_fpu() is done, current->used_math is not reset. Now, the interrupted processes fpu no longer is cleared! << Fix by AK. Just clear the FPU again when this happens. patch for i386 and x86-64. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Disable conforming bit on USER32_CS segment Disable conforming bit on USER32_CS segment No difference, but it's more consistent. Pointed out by Petr Vandrovec and some VMWare people Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Notify user of MCE events. x86_64 uses a userspace mce utility to decode MCEs, this patch will ensure that the user is notified of MCE events being logged too. Signed-off-by: Zwane Mwaikambo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: add some pudding This adds pud_t support to UML. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: Use va_end wherever va_args are used Finish using va_list correctly, by calling va_end. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: split out arch-specific syscalls from generic ones This factors out a bunch of non-generic system calls into i386-specific code. It also adds the x86_64-specific system calls. A couple of generic system calls handlers are declared in sysdep-i386 because x86 has no declarations for them, but x86_64 has incompatible ones. Also splits out syscalls on behalf on UML/S390 from Bodo Stroesser Signed-off-by: Bodo Stroesser Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: Three-level page table support This is the three-level page table support from the x86_64 patch. It can be enabled on x86, although it's not particularly needed at this point. However, it can be used to implement very large physical memory (with almost all of it in highmem) on UML. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: x86-64 core support This adds the new files from the x86_64 port which just drop in and don't require any work anywhere else. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: x86-64 config support This adds architecture-specific Kconfig support, plus Kconfig_i386 and Kconfig_x86_64. Currently the only option defined there is CONFIG_64_BIT. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: Factor out register saving and restoring This moves the register shuffling code into arch/um/os-Linux/sys-$(SUBARCH), making it purely userspace code. It also adds an x86_64 implementation of registers.c. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: x86_64 ptrace support This adds the x86_64 ptrace support. It also cleans up the existing code somewhat, eliminating a couple of simple header files, and generalizing the mk_ptregs buils to accomodate multiple architectures. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: Separate out signal reception This patch moves most of the signal handlers to os-Linux, adds an arch-specific mechanism to get the address of the sigcontext structure, and implements it for i386 and x86_64. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: Make a common misconfiguration impossible This patch makes UML produce error messages instead of silently exiting when one of several configuration mistakes are made. FD_CHAN is now mandatory so that people don't turn it off and complain about no boot messages. Some printks were turned into printfs in the tt mode gdb code so that they appear on the screen. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: Separate out the time code Move the i386 __delay to sys-i386 and add an implementation for x86_64. Also get rid of the definition of um_udelay_t. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: x86-64 headers Add a bunch of headers to include/asm-um to support x86_64. Also move some arch-specific things from generic files to x86-specific ones. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: Split out arch link address definitions Define addresses at which UML will link and make them settable by the arch. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: Don't use __NR_waitpid on arches which don't have it Some architectures (e.g. s390) don't have __NR_waitpid. Thus, it must not be used in arch/um/kernel/tt/ptproxy/proxy.c Signed-off-by: Bodo Stroesser Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: Use va_copy In arch/um/kernel/skas/uaccess.c, the simple assignment va_list args = *((va_list *) arg_ptr); is used in do_buffer_op() to obtain a copy of a va_list, that was delivered as a pointer only. But this construction doesn't compile on s390. Instead, va_copy() and va_end() should be used (see "man va_start"). Signed-off-by: Bodo Stroesser Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: code tidying Some small cleanups that resulted from the x86_64 merge: Some unneeded includes were removed Some overlong lines were shortened current_thread_info was replaced by a generic version. Some warnings were fixed Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: use for_each_cpu Use for_each_cpu rather than iterating over processors by hand. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: 2.6.10 ptrace updates Add some of the 2.6.10 ptrace updates. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: add the new syscalls Add the new 2.6.10 syscalls. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: 64-bit cleanups This makes a bunch of 64-bit cleanups exposed by x86_64. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: Silence some message from the console driver This shuts up some messages about ioctls being called when they are handled by the line discipline. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: Allow arches to opt out of !SA_INFO signals x86_64 only delivers signals in the SA_INFO style, whether you ask for it or not. This patch adds a config option which says whether the arch is SA_INFO-only or not, and ifdefs out the sigcontext signal delivery if so. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: Add a missing include Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: sparse annotations Lots of sparse annotations from Chris Wright. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: Fix sys_call_table syntax From: Chris Wright - Fix the syntax of the sys_call_table initializers. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: Fix make clean From: Chris Wright - make clean gets rid of more stuff Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: define CONFIG_INPUT better From: Chris Wright - define CONFIG_INPUT to shut up a config warning. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] UML: Fix a compile warning An eliminated warning from Chris Wright. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] seclvl: add missing dependency *** Warning: "crypto_free_tfm" [security/seclvl.ko] undefined! *** Warning: "crypto_alloc_tfm" [security/seclvl.ko] undefined! *** Warning: "crypto_unregister_alg" [crypto/sha1.ko] undefined! *** Warning: "crypto_register_alg" [crypto/sha1.ko] undefined! Signed-off-by: Akinobu Mita Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] audit return code and log format fix A couple of one liners to resolve two issues that have come up regarding audit. Roger reported a problem with audit.c:audit_receive_skb which improperly negates the errno argument when netlink_ack is called. The second issue was reported by Steve on the linux-audit list, auditsc.s:audit_log_exit using %u instead of %d in the audit_log_format call. Please note, there is a mailing list available for audit discussion at https://www.redhat.com/archives/linux-audit/ Signed-off-by: Peter Martuccelli Signed-off-by: Steve Grubb Signed-off-by: Roger Luethi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] easily tweakable comm length This change still keeps the comm length at 16, but allows easier patching for local modifications, and also introduces a macro to use instead of magic 16, where sizeof(comm) is not preferable to use. Not able to use killall, pidof etc. effectively, when long process names are used for scripts. Just changing the command length from 16 to 32 breaks a.out coredump logic. Deamonise and get_task_comm helped in other places in 2.6.10. Signed-off-by: Prasanna Meda Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Catch module parameter parsing failures Radheka Godse pointed out that parameter parsing failures allow a module still to be loaded. Trivial fix. Signed-off-by: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] binfmt_elf fix return error codes and early corrupt binary detection With Solar Designer The following patch changes the following on ELF parsing/loading code (fs/binfmt_elf): - Stronger validity checks on ELF files: treat e_phnum (program header count) < 1 as invalid treat p_filesz (file size) < 2 invalid on program header interp. case - Saner return error codes - Make sure SIGKILL is delivered on error handling Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix ->setattr ATTR_SIZE locking for nfsd Since the big direct I/O rework do_truncate takes i_alloc_sem before calling into ->setattr. Unfortunately the other callers of ->setattr with ATTR_SIZE, most notably nfsd don't take it. The (out of tree) XFS dmapi code relies wants to release i_alloc_sem and thus gets into problems like http://oss.sgi.com/bugzilla/show_bug.cgi?id=365 This patch moves acquiring and releasing i_alloc_sem into notify_change() to make the locking behaviour consistant. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: new ds - cs interface Add a new registration function to register the PCMCIA 16-bit subsystem (ds a.k.a. pcmcia) with the PCMICA core (cs a.k.a. pcmcia_core). As send_event is only called with skt->sem held, we can use that to safeguard skt->callback(), too. Note that the class_device_register() call by pccardd() is done _before_ skt->sem() is held, and the pcmcia_socket_register() doesn't hold skt->sem() as well, so there is no chance for a deadlock. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: call device drivers from ds, not from cs Call the PCMCIA 16-bit device drivers from ds.c instead of cs.c. Also, remove the delayed handling of CS_REMOVAL events, but keep the ordering the same as it used to be due to the delay. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: unify bind_mtd and pcmcia_bind_mtd Unify the pcmcia_bind_mtd and bind_mtd functions. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: unfiy bind_device and pcmcia_bind_device Unify bind_device and pcmcia_bind_device. Also, change bind_device so that it conforms to CodingStyle. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: device model integration can only be submitted under GPL As discussed previously, my integration of ds.c with the driver model can and will only be available under the GPL, as it's too much derived of other buses' implementation of integration with the driver model. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: add pcmcia_device(s) Add pcmcia_device(s). Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: remove socket_bind_t, use pcmcia_devices instead Remove struct socket_bind_t by moving "dev_link_t *instance" to struct pcmcia_device, and transforming all users of socket_bind_t to use struct pcmcia_device instead. Also, CodingStyle updates for get_device_info and unbind_request. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: remove internal module use count, use module_refcount instead Remove the internal driver use_count in ds.c, as the reference counting is done in the module core anyways, and that reference count is available for cardmgr's usage by a call to module_refcount. And if !CONFIG_MODULE_UNLOAD, rmmod is useless anyways, so avoid that call by cardmgr at all. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: set driver's .owner field Properly set the "owner" field in pcmcia-related struct device_driver. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: move pcmcia_(un,)register_client to ds Move pcmcia_{de,}register_client() from cs.c to ds.c, and remove the unused pcmcia_get_{first,next}_client() calls -- they would be an unnecessary hassle to deal with in the next patches. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: device model integration can only be submitted under GPL, part 2 As discussed previously, my integration of ds.c and cs.c with the driver model can and will only be available under the GPL, as it's too much derived of other buses' implementation of integration with the driver model. cs_internal.h did only contain the MPL header before - I contacted Dave Hinds because of this, and as far as he can tell, it was just an oversight that this was not marked as dual-licensed as the other files are. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: use kref instead of native atomic counter Switch pcmcia_bus_socket's reference counting to struct kref. Also, split the access by number into two calls, so that get_bus_socket can be used in a more generic way. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: add pcmcia_(put,get)_socket Add pcmcia_{put,get}_socket Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: grab a reference to the cs-socket in ds Grab a reference of struct pcmcia_socket for every struct pcmcia_bus_socket. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: get a reference to ds-socket for each pcmcia_device Obtain a reference to struct pcmcia_bus_socket for each pcmcia_device. This means that pcmcia_device always holds an indirect reference to struct pcmcia_socket as well. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: add a pointer to client in struct pcmcia_device Add a pointer to the "client" structure to struct pcmcia_device. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: use pcmcia_device in send_event Use a struct pcmcia_device-based approach to inform "clients" of events. It needs to be done using bus_for_each_device() so that we don't need to take the device_list spinlock. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: use pcmcia_device to mark clients as stale Use pcmcia_dev instead of the "client" single-linked list to mark clients as stale. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: code moving in ds Move some code around in ds.c. Avoids forward-declarations, and keeps related code close to each other. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: use pcmcia_device in register_client Search the devices_list for an UNBOUND client in register_client, instead of the single linked list clients. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: direct-ordered unbind of devices Restructure unbind_request(): Before, unbind_request was called by cardmgr on the following occasions: a) if the CS_EVENT_CARD_INSERTION event failed b) during do_remove(), which is called on 1) when cardmgr is informed of a CS_EVENT_CARD_REMOVAL event 2) when cardmgr is informed of a CS_EVENT_EJECTION_REQUEST event, if do_check() succeeds 3) cardmgr exit (SIGINT/SIGTERM), if do_check() succeeds We can ignore a), as the user is informed of the problem anyway, and can take appropriate action then (eject the card, update config, write new driver, insert card...). b1) can be done directly, even before the userspace cardmgr is informed. This speeds up the call to ->detach(). b2) All drivers I checked were based on the assumption that a CS_EVENT_CARD_REMOVAL event is received _first_, before a call to ->detach(). Most notably, some drivers issue first a call to their release() function [which else is called during EVENT_CARD_REMOVAL] during ->detach() if it hasn't been issued before. So, it doesn't hurt if unbind is only called during the EVENT_CARD_REMOVAL step, and not during EJECTION_REQUEST. The REMOVAL step is only called anyway if EJECTION_REQUEST succeeds, and the latter can only succeed if do_check() succeeds. b3) If cardmgr exits from daemon mode, ds_release() is called. I can't see a reason why this is good behaviour, especially as cards don't need cardmgr while running, only for setup. Consequences: - call unbind_request during CARD_REMOVAL handling, even before userspace is informed. - return "0" if UNBIND_REQUEST is called from userspace. - the driver's event handler is called with CARD_REMOVAL _always_ before ->detach() is called. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: BUG on dev_list != NULL All in-kernel PCMCIA devices do unregister their client in their respective ->detach() function after a REMOVAL event. So, AFAICS, the dev_list iteration should always be false. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: BUG() if clients are kept too long BUG if the socket's list of clients is not empty on shutdown and/or removal. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: move struct client_t inside struct pcmcia_device Move the struct client_t inside struct pcmcia_device. This means it gets proper reference counting as well. The clients list inside struct pcmcia_socket can be removed now. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: use driver_find in ds Use driver_find() in ds.c instead of legacy implementation, and make use of its reference counting awareness. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: SET_NETDEV for network devices This patch updates pcmcia network drivers so that their class devices are linked to the correct physical device. Based on an patch by Adam Belay, but adapted to a different pcmcia driver model implementation. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: SET_NETDEV for wireless network devices This patch updates pcmcia wireless drivers so that their class devices are linked to the correct physical device. Based on an patch by Adam Belay, but adapted to a different pcmcia driver model implementation. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: reduce stack usage in ds_ioctl (Randy Dunlap) Reduce stack usage from 696 (0x2b8) to 24 (0x18) (on x86-32). Signed-off-by: Randy Dunlap Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: Add disable_clkrun option I received report that transmission of Realtek 8139 doesn't work. The cause of this problem was CLKRUN protocols of laptop's TI 12xx CardBus bridge. CLKRUN is used for controlling the PCI clock by PCI devices (for power saving). If device has bug, probably it becomes the cause of stopping the PCI clock at an unexpected timing. In the problem of realtek 8139 case, the TX packet which the driver set to the device was not sent out (still pending state in device). If "disable_clkrun" is enabled, the problem of TX stopped occurring. So, I thought the cause is CLKRUN, and is hardware bug of Cardbus or realtek 8139. (8139 seems only can control by rewriting EEPROM) And looks like also http://support.microsoft.com/default.aspx?scid=kb;en-us;q294465 http://support.microsoft.com/default.aspx?scid=kb;en-us;182591 has the problem of CLKRUN. And I remember that this problem had happened on Thinkpad before. In the case, problem seems solved by similar workaround of sound/oss/cs46xx.c. This patch adds "disable_clkrun" option as workaround of problem to yenta_socket. Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: rename PCMCIA devices As per the default usage in the driver model, don't embed the bus name into the device name Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: pd6729: e-mail update From: Komuro e-mail update Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: pd6729: cleanups From: Komuro line length fixes and x = x | y => x |= y cleanups Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: pd6729: isa_irq handling From: Komuro Allow for ISA interrupt routing on pd6729 pcmcia sockets. This is necessary for correct operation of (certain?) PCI card readers. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: remove obsolete code Remove the code marked as obsolete -- nobody complained. Signed-off-by: Dominik Broodwski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: remove pending_events PendingEvents is unused, so remove it Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: remove client_attributes Remove the "Attributes" entry of struct client_t -- _all_ in-kernel drivers did set it to INFO_IO_CLIENT | INFO_CARD_SHARE anyway, and the pcmcia core didn't care at all what this value was set to. Also, remove the setting of the respective request field in all in-kernel drivers -- the request structure is kept the same, though, to keep external drivers compiling. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: remove unneeded parameter from rsrc_mgr Remove the no longer used "name" parameter from alloc_io_space, find_{io,mem}_region. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: remove dev_info from client Remove the dev_info - contained name from struct client_t Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: remove mtd and bulkmem (replaced by pcmciamtd) Instead of "memory_cs", BIND_MTD, {FIRST,NEXT}_REGION, 2.6. kernels use the "pcmciamtd" driver which doesn't need these functions. Cardmgr still calls it in default configuration, so warn the user about changes necessary to /etc/pcmcia/config , and remove the now unused code. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: per-socket resource database Make the io and mem db per-socket, as different sockets may have different requirements or may not even need the resource db at all (SS_CAP_STATIC_MAP). Updated to make rsrc_mem_probe per-socket and to remove unnecessary and even broken check for empty list as per Russell King's suggestions. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: validate_mem only for non-statically mapped sockets validate_mem() does only make sense for !SS_CAP_STATIC_MAP sockets. Therefore, re-direct validate_mem() calls only for those. The newly added redirection layer will allow for a "library" module named "rsrc_nonstatic" which contains the resource database handling code, and it will only need to be loaded for the drivers which need it. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: adjust_io_region only for non-statically mapped sockets Calls to adjust_io_region only happen if !SS_CAP_STATIC_MAP. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: find_io_region only for non-statically mapped sockets Calls to find_io_region only happen if !SS_CAP_STATIC_MAP. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: find_mem_region only for non-statically mapped sockets Calls to adjust_mem_region only happen if !SS_CAP_STATIC_MAP. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: adjust_ and release_resources only for non-statically mapped sockets re-direct calls to adjust_resource_info for MEM and IO. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: move resource handling code only for non-statically mapped sockets to other file Move all the "nonstatic" code to a new file, and link it into pcmcia_core.ko Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: make rsrc_nonstatic an independend module Make rsrc_nonstatic an independent module. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: allocate resource database per-socket Move the resource databases and the "mem_probe" flag into a struct specific to rsrc_nonstatic, as it is not needed for the SS_CAP_STATIC_MAP case. Saves a few bytes, and makes code clearer (in my opinion) Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: remove typedef Remove the typedef'ing of struct resource_map. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: grab lock in resource_release Also lock the ->exit() function in rsrc_nostatic Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: yenta override to re-allocate resources From: Manfred Spraul One bios assigns a small window for i/o access to yenta bridges. But there are Cardbus cards that needs lots of i/o ports. yenta usually honors the bios selected values, except if the bios choice is clearly invalid. The patch allows an override from the command line. Signed-Off-By: Manfred Spraul Signed-Off-By: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: Make PREEMPT_BKL depend on PREEMPT alone Make PREEMPT_BKL depend on PREEMPT alone - doesnt make sense to enable it on SMP && !PREEMPT kernels. (other than testing.) Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] BUG on error handlings in Ext3 under I/O failure condition I found bugs on error handlings in the functions arround the ext3 file system, which cause inadequate completions of synchronous write I/O operations when disk I/O failures occur. Both 2.4 and 2.6 have this problem. I carried out following experiment: 1. Mount a ext3 file system on a SCSI disk with ordered mode. 2. Open a file on the file system with O_SYNC|O_RDWR|O_TRUNC|O_CREAT flag. 3. Write 512 bytes data to the file by calling write() every 5 seconds, and examine return values from the syscall. from write(). 4. Disconnect the SCSI cable, and examine messages from the kernel. After the SCSI cable is disconnected, write() must fail. But the result was different: write() succeeded for a while even though messages of the kernel notified SCSI I/O error. By applying following modifications, the above problem was solved. Signed-off-by: Hisashi Hifumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Linux 2.6.11-rc1 [PATCH] eepro build fix drivers/net/eepro.c:1799: initializer element is not constant drivers/net/eepro.c:1799: (near initialization for `__param_arr_io.num') drivers/net/eepro.c:1800: initializer element is not constant drivers/net/eepro.c:1800: (near initialization for `__param_arr_irq.num') drivers/net/eepro.c:1801: initializer element is not constant drivers/net/eepro.c:1801: (near initialization for `__param_arr_mem.num') Signed-off-by: Andrew Morton [PATCH] ixgb whitespace fix Signed-off-by: Andrew Morton [PATCH] 3c515 warning fix drivers/net/3c515.c: In function `__check_rx_copybreak': drivers/net/3c515.c:406: warning: return discards qualifiers from pointer target type drivers/net/3c515.c: At top level: drivers/net/3c515.c:406: warning: initialization discards qualifiers from pointer target type Signed-off-by: Andrew Morton [libata sata_sil] support ATI IXP300/IXP400 SATA [ALSA] Fix ioctl arguments RawMidi Midlevel Fixed the wrong pointer types passed to get_user() for DROP and DRAIN ioctls. Signed-off-by: Takashi Iwai [ALSA] ac97 quirk entries for HP xw6200 & xw8000 Intel8x0 driver Add AC97 quick list entries to snd-intel8x0 for HP xw6200 and xw8000. Signed-off-by: John W. Linville Signed-off-by: Takashi Iwai [ALSA] Fix description of ALSA/OSS device mapping Documentation Fixed the description of ALSA/OSS device mapping. The direction suffix was missing in ALSA devices. Signed-off-by: Takashi Iwai [ALSA] Fix float format support MIXART driver Fixed typos in float format support. Signed-off-by: Markus Bollinger Signed-off-by: Takashi Iwai [ALSA] Add quirk for HP zv5000 Intel8x0 driver Added the quirk for HP zv5000 (mute LED with EAPD). Signed-off-by: Takashi Iwai [ALSA] remove compatibility code for 2.2.x kernels CA0106 driver Signed-off-by: Clemens Ladisch [ALSA] Fix Oops at resume AC97 Codec Core Fixed Oops at resume on certain codecs. Set null ops when no patch exists or the patch doesn't set build_ops. Signed-off-by: Takashi Iwai [ALSA] Adapt SPDIF Input selection for Realtek ALC658 AC97 Codec Core This fixes the SPDIF Input selection for ALC658 as Realtek has changed the meaning betweenALC655 and ALC658. Signed-off-by: Stefan Macher Signed-off-by: Takashi Iwai [ALSA] Fixed description about ac97_quirk Documentation Fixed the description about ac97_quirk option. Now it accepts string, too. Signed-off-by: Takashi Iwai [ALSA] Remove & from function pointers AC97 Codec Core Remove & from function pointers (it works but not common to add it...) Signed-off-by: Takashi Iwai [ALSA] Add suspend callback AC97 Codec Core Add suspend callback for each codec patch. Signed-off-by: Takashi Iwai [ARM] Don't use __init for function prototypes. [PKT_SCHED]: cls_api.c: drop rtnl for loading modules Signed-off-by: Patrick McHardy [ARM] Remove include. asm/processor.h doesn't use atomic operations nor types, so there's no need to include asm/atomic.h. Signed-off-by: Russell King [ARM PATCH] 2388/1: Add SSP control code for Sharp SL-C7xx Series (Corgi) Patch from Richard Purdie The Sharp SL-C7xx Series (Corgi) has 3 devices connected to the SSP interface each needing different configurations of the port. This code provides the necessary access and locking so drivers can access these components. It uses the functions provided by the PXA SSP driver to access the port. It also adds some machine specific GPIO definitions used by this code and adds some comments to existing definitions. Signed-off-by: Richard Purdie Signed-off-by: Russell King [ARM PATCH] 2389/1: semaphore.c warning fixed Patch from Catalin Marinas The patch adds the "ax" attributes to the .sched.text section to avoid a compiler warning. Signed-off-by: Catalin Marinas Signed-off-by: Russell King [PATCH] SCSI aic7xxx: kill kernel 2.2 #ifdef's From: Adrian Bunk The patch below kills kernel 2.2 #ifdef's from the SCSI aic7xxx driver. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: James Bottomley [PATCH] x86_64: Fix ACPI SRAT NUMA parsing Fix fallout from the recent nodemask_t changes. The node ids assigned in the SRAT parser were off by one. I added a new first_unset_node() function to nodemask.h to allocate IDs sanely. Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds [PATCH] use mmiowb in qla1280.c From: Jesse Barnes There are a few spots in qla1280.c that don't need a full PCI write flush to the device, but rather a simple write ordering guarantee. This patch changes some of the PIO reads that cause write flushes into mmiowb calls instead, which is a lighter weight way of ensuring ordering. Signed-off-by: Jeremy Higdon Signed-off-by: Jesse Barnes Signed-off-by: Andrew Morton Signed-off-by: James Bottomley [PATCH] x86_64: Fix K8 NUMA discovery Fix K8 node discovery after nodemask changes. Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds [PATCH] [3/4] x86_64: Fix NUMA hash setup Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds [PATCH] [4/4] Fix numa=off command line parsing Fix a long standing bug: numa=off only worked as last argument on the command line. Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds [ARM PATCH] 2390/1: Simtec Electronics MAINTAINERS file entries Patch from Ben Dooks MAINTAINERS entries for currently supported Simtec Electronics development boards. Signed-off-by: Ben Dooks Signed-off-by: Russell King SCSI: add starget_for_each_device From: James.Smart@Emulex.Com This patch deprecates the use of device_for_each_child() with stargets. The reasoning behind this is due to issues regarding: Semaphores that device_for_each_child() takes Implicit assumptions that each child is an sdev device. The patch adds a new helper function, starget_for_each_device(), and replaces all previous uses of device_for_each_child(). Signed-off-by: James Bottomley Handle two threads both trying to expand their stack simultaneously. We had all the locking right, but we didn't check whether one of the threads now no longer needed to expand, so we could incorrectly _shrink_ the stack in the other thread instead (not only causing segfaults, but since we didn't do a proper unmap, we'd possibly leak pages too). So re-check the need for expand after getting the lock. Noticed by Paul Starzetz. FC Transport updates - additional fc host attributes From: James.Smart@Emulex.Com This patch adds 5 more FC transport host attributes in support of HBAAPI. Signed-off-by: James Bottomley [PATCH] do_brk() needs mmap_sem write-locked It seems to be general consensus that its safer to require all do_brk() callers to grab mmap_sem, and have do_brk to warn otherwise. This is what the following patch does. Similar version has been changed to in v2.4. Signed-off-by: Linus Torvalds Make mm writelock testing less intrusive. This enables it only for debug kernels, and also makes sure that if some external module is still broken, we don't leave the mmap-sem locked after warning about it. [PATCH] Alpha: typos in io_trivial.h This apparently explains some weird IO failures reported in last two months. Only non-bwx (including generic) kernels were affected. Acked-by: Richard Henderson Signed-off-by: Linus Torvalds [PATCH] ia64: export pcibios_resource_to_bus to match other architectures. Signed-off-by: Keith Owens Signed-off-by: Linus Torvalds [PATCH] cfq-iosched: fix scsi requeue accounting The accounting can go bad in the requeue hook, it must check the accounted flag to make sure it was previously considered in the driver. Signed-off-by: Jens Axboe Signed-off-by: Linus Torvalds [IA64] reorder functions to define ia64_pci_get_legacy_mem() before using it Signed-off-by: Tony Luck [PATCH] elevator: print default selection Currently we only print the default io scheduler if the kernel chooses, not if the user/bootloader has specified one. This patch saves the extra line in dmesg but always notified of the default choice by appending (default) to that line: .. io scheduler noop registered io scheduler anticipatory registered io scheduler deadline registered io scheduler cfq registered (default) .. Patch originally from Srihari Vijayaraghavan, modified by me. Signed-off-by: Jens Axboe Signed-off-by: Linus Torvalds [PATCH] PPC64 had _raw_read_trylock already Ingo presumably didn't notice that ppc64 already had a functional _raw_read_trylock when he added the #define to use the generic version. This just removes the #define so we use the ppc64-specific version again. Signed-off-by: Paul Mackerras Signed-off-by: Linus Torvalds [PATCH] ppc: fix removed MMCR0_PMXE define In ChangeSet 1.2370, 2005/01/11 17:41:32-08:00, tglx@linutronix.de wrote: > > [PATCH] ppc: remove duplicate define > > The MMCR0_PMXE is already defined in reg.h... Er, no it's not. But perhaps it should be... [IA64] add hpzx1_swiotlb machine-vector (new files) This is really part of the earlier changeset from David to add the new machine vector to support certain limited range DMA cards on zx1. I just forgot to run "bk new" before the commit, so the newly added files weren't checked into BK. Signed-off-by: David Mosberger-Tang Signed-off-by: Tony Luck [ALSA] Fix DMA pointer read ATIIXP driver Try to reread DMA pointer register if the value is invalid. The register shows bogus values on some broken hardwares. Signed-off-by: Takashi Iwai [ALSA] Fix ctl_read/write ioctl wrappers IOCTL32 emulation Fixed bugs with ctl_read/write ioctls. The struct size mismatch due to alignment is fixed. The code is also a bit optimized. Signed-off-by: Takashi Iwai [ALSA] Add ac97_quirk option Documentation,ATIIXP driver Added ac97_quirk option like intel and via drivers. Signed-off-by: Takashi Iwai [ARM] Add missing tlb_migrate_finish() Signed-off-by: Russell King [ARM PATCH] 2391/1: remove obsolete help text Patch from Nicolas Pitre Now that MTD XIP support is merged this part is not relevant anymore. Signed-off-by: Nicolas Pitre Signed-off-by: Russell King [ARM PATCH] 2204/1: bring {read|write}sw up to date with current reality Patch from Nicolas Pitre This patch adds support for all alignments to both endianness. Signed-off-by: Nicolas Pitre Signed-off-by: Russell King [TUN] Add a missing dependency on enabling the crc32 libraries Patch by Steve French Signed-off-by: Max Krasnyansky [Bluetooth] Lock initializer cleanup Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK. Signed-off-by: Thomas Gleixner Signed-off-by: Marcel Holtmann [XFS] Make AIO work again - wait on iocb completion for non-AIO only. SGI-PV: 927929 SGI-Modid: xfs-linux:xfs-kern:185642a Signed-off-by: Christoph Hellwig Signed-off-by: Nathan Scott [XFS] Fix page index to byte calculation result truncation in tracing code. SGI-PV: 928388 SGI-Modid: xfs-linux-melb:xfs-kern:21106a Signed-off-by: Nathan Scott [XFS] Remove write congestion check during metadata readahead. SGI-PV: 928392 SGI-Modid: xfs-linux-melb:xfs-kern:21108a Signed-off-by: Nathan Scott [XFS] Ensure the cluster hash size does not exceed the inode hash size. SGI-PV: 923092 SGI-Modid: xfs-linux-melb:xfs-kern:21109a Signed-off-by: Nathan Scott [PATCH] matroxfb driver broken on non-x86. This broke since the recent MODULE_PARAM conversion on architectures that don't have CONFIG_MTRR Signed-off-by: Dave Jones Signed-off-by: Linus Torvalds [PATCH] contort getdents64 to pacify gcc-2.96 A recent trivial fixup in sys_getdents64 gives gcc-2.96 indigestion in the form of an ICE. While upgrading to a sane gcc would be the preferred solution, rewriting the change as follows eliminates the error for those who cannot do so. Signed-off-by: Adam Kropelin Signed-off-by: Linus Torvalds ALSA 1.0.8 input: Handle -EILSEQ return code in the HID driver completion handlers as unplug. Flush request queue on unplug, too. Signed-off-by: Vojtech Pavlik [PATCH] Don't enable ata over eth by default "ATA over Ethernet support" should not default to 'm', it doesn't make any sense for a special case driver to do so. Signed-off-by: Jens Axboe Signed-off-by: Linus Torvalds [PATCH] possible rq starvation on oom I stumbled across this the other day. The block layer only uses a single memory pool for request allocation, so it's very possible for eg writes to have allocated them all at any point in time. If that is the case and the machine is low on memory, a reader attempting to allocate a request and failing in blk_alloc_request() can get stuck for a long time since no one is there to wake it up. The solution is either to add the extra mempool so both reads and writes have one, or attempt to handle the situation. I chose the latter, to save the extra memory required for the additional mempool with BLKDEV_MIN_RQ statically allocated requests per-queue. If a read allocation fails and we have no readers in flight for this queue, mark us rq-starved so that the next write being freed will wake up the sleeping reader(s). Same situation would happen for writes as well of course, it's just a lot more unlikely. Signed-off-by: Jens Axboe Signed-off-by: Linus Torvalds [PATCH] PPC64 Disable preemption in flush_tlb_pending The preempt debug stuff found a place where we were using smp_processor_id() without having preemption disabled, in flush_tlb_pending. This patch fixes it by using get_cpu_var and put_cpu_var instead of the __get_cpu_var variant. Signed-off-by: Paul Mackerras Signed-off-by: Linus Torvalds [PATCH] PPC64 Call preempt_schedule on exception exit This patch mirrors the recent changes on x86 to call preempt_schedule rather than schedule in the exception exit path, in the case where the preempt_count is zero and the TIF_NEED_RESCHED bit is set. I'm a little concerned that this means that we have a window where interrupts are enabled and we are on our way into preempt_schedule, but preempt_count is still zero. Ingo's proposed preempt_schedule_irq would fix this, and I think something like that should go in. Signed-off-by: Paul Mackerras Signed-off-by: Linus Torvalds [PATCH] PPC64 can do preempt debug too This patch enables the DEBUG_PREEMPT config option for PPC64. I have this turned on on my desktop G5 and it isn't finding any problems. (It did find one problem, in flush_tlb_pending(), that I have just sent a patch for.) BTW, do we really need to restrict which architectures the config option is available on? Signed-off-by: Paul Mackerras Signed-off-by: Linus Torvalds [PATCH] PPC64 Add PREEMPT_BKL option This patch adds the PREEMPT_BKL config option for PPC64, shamelessly stolen from the i386 version. I have this turned on in the kernel on my desktop G5 and it seems to be just fine. Signed-off-by: Paul Mackerras Signed-off-by: Linus Torvalds [PATCH] PPC64 Move thread_info flags to its own cache line This patch fixes a problem I have been seeing since all the preempt changes went in, which is that ppc64 SMP systems would livelock randomly if preempt was enabled. It turns out that what was happening was that one cpu was spinning in spin_lock_irq (the version at line 215 of kernel/spinlock.c) madly doing preempt_enable() and preempt_disable() calls. The other cpu had the lock and was trying to set the TIF_NEED_RESCHED flag for the task running on the first cpu. That is an atomic operation which has to be retried if another cpu writes to the same cacheline between the load and the store, which the other cpu was doing every time it did preempt_enable() or preempt_disable(). I decided to move the thread_info flags field into the next cache line, since it is the only field that would regularly be modified by cpus other than the one running the task that owns the thread_info. (OK possibly the `cpu' field would be on a rebalance; I don't know the rebalancing code, but that should be pretty infrequent.) Thus, moving the flags field seems like a good idea generally as well as solving the immediate problem. For the record I am pretty unhappy with the code we use for spin_lock et al. with preemption turned on (the BUILD_LOCK_OPS stuff in spinlock.c). For a start we do the atomic op (_raw_spin_trylock) each time around the loop. That is going to be generating a lot of unnecessary bus (or fabric) traffic. Instead, after we fail to get the lock we should poll it with simple loads until we see that it is clear and then retry the atomic op. Assuming a reasonable cache design, the loads won't generate any bus traffic until another cpu writes to the cacheline containing the lock. Secondly we have lost the __spin_yield call that we had on ppc64, which is an important optimization when we are running under the hypervisor. I can't just put that in cpu_relax because I need to know which (virtual) cpu is holding the lock, so that I can tell the hypervisor which virtual cpu to give my time slice to. That information is stored in the lock variable, which is why __spin_yield needs the address of the lock. Signed-off-by: Paul Mackerras Signed-off-by: Linus Torvalds [CPUFREQ] cpufreq mailing list changed its DNS entry. Signed-off-by: Dave Jones [ARM PATCH] 2392/1: Add PCMCIA/CF support code for Sharp SL-C7xx Series Patch from Richard Purdie Add support code to enable the Compact Flash socket on the Sharp SL-C7xx series of PDAs. The socket is controlled via the Sharp SCOOP interface. Signed-off-by: Richard Purdie Signed-off-by: Russell King [ARM PATCH] 2394/1: Re: accepting responsibility for Sharp LH ports Patch from Marc Singer Admitting that I'm the maintainer for the Sharp LH ports. Signed-off-by: Marc Singer Signed-off-by: Russell King [ARM PATCH] 2395/1: __ioremap() miscalculates mapping size under certain conditions Patch from Lothar Wassmann Hi, ioremapping a memory range that ends on the first byte of a page (e.g. mapping PAGE_SIZE + 1 bytes on a page boundary) results in a mapping that is one page too short. In particular trying to create a 1 byte mapping at the start of a page results in a BUG_ON() assertion in remap_area_pages() because the calculated mapping size is zero. This bug has been reported on Bugzilla on 2004-02-25: http://bugzilla.kernel.org/show_bug.cgi?id=2188 Signed-off-by: Lothar Wassmann Signed-off-by: Russell King [ARM PATCH] 2399/1: asm/constants.h included in arch/arm/vfp/entry.S Patch from Catalin Marinas The TI_VFPSTATE is otherwise undefined and gas-2.15.90 (and probably earlier versions) assumes 0. Gas-2.15.92 reports an error. Signed-off-by: Catalin Marinas Signed-off-by: Russell King [CPUFREQ] Fix up more instances of the old cpufreq list URLs. Signed-off-by: Dave Jones [TCP]: Fix sk_forward_alloc assertion failures with TSO. do_tcp_sendpages() needs to do skb->truesize et al. accounting just like tcp_sendmsg() does. tcp_sendmsg() works by gradually adjusting these accounting knobs as user data is copied into the packet. do_tcp_sendpages() works differently, when it allocates a new SKB it optimistically adds in tp->mss_cache to these values and then makes no adjustments at all as pages are tacked onto the packet. This does not work at all if tcp_sendmsg() queues a packet onto the send queue, and then do_tcp_sendpages() attaches pages onto the end of that SKB. We are left with a very inaccurate skb->truesize in that case. Consequently, if we were building a TSO frame and it gets partially ACK'd, then since skb->truesize is too small tcp_trim_skb() will potentially underflow it's value and all the accounting becomes corrupted. This is usually seen as sk->sk_forward_alloc being negative at socket destroy time, which triggers an assertion check. Signed-off-by: David S. Miller [EBTABLES]: Use correct printf format for size_t. Signed-off-by: David S. Miller [NETLINK]: netlink_kernel[] no longer used. The netlink_post stuff Arjan removed was the only user of this array. Signed-off-by: David S. Miller [TUN]: Make type explicit in min() usage. Signed-off-by: David S. Miller [IPV6]: Fix tunnel list locking in sit.c Signed-off-by: Hideaki YOSHIFUJI Signed-off-by: David S. Miller [RAW] merge raw_sock with raw_opt No need for two structs, follow the new inet_sock layout style. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller [NET]: Lock initializer cleanup. Use the new lock initializers DEFINE_SPIN_LOCk and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: David S. Miller [DECNET]: Misc cleanups - make needlessly global code static - dn_fib.c: remove the write-only global variable dn_fib_info_cnt - dn_fib.c: remove the unused global function dn_fib_rt_message - dn_neigh.c: remove the unused global function dn_neigh_pointopoint_notify - dn_timer.c: remove the fast timer code that isn't used Signed-off-by: David S. Miller [ATALK]: Add ioctls to allow ifx txqueuelen sets/gets Signed-off-by: Neil Horman Signed-off-by: David S. Miller [NET]: Check for SOL_SOCKET in compat_sys_getsockopt Signed-off-by: David S. Miller [SPARC64]: Make first arg to find_next_zero_bit() const. Signed-off-by: Andrew Morton Signed-off-by: David S. Miller [SPARC64]: Fix brainfart in pci_psycho.c Signed-off-by: Grant Grundler Signed-off-by: David S. Miller [SPARC64]: Need some more SPARC32 ifdeffing in here. Signed-off-by: David S. Miller [PATCH] bio clone memory corruption Doing some raid testing threw a bug in the scsi mid layer, because the segment counts wasn't correct. Initially I worried that we still had problems in this area, but it turns out that is due to the raid usage of bio clones. Currently you have to hold on to the original bio as well, since the clone only maintains a pointer to the bio_vec inside the original bio. If the original bio is freed first, the clone will have garbage in its bio->bi_io_vec as soon as that memory is scribbled. I think the best fix is to maintain flexibility and duplicate the io_vec inside the clone as well. Attached patch does this. Signed-off-by: Jens Axboe Signed-off-by: Linus Torvalds [PATCH] noop-iosched: fix insertion point noop doesn't follow the instructions on where to insert a request, because it uses q->queue_head instead of the *insert assigned. Clean it up so it's easier to read. Signed-off-by: Jens Axboe Signed-off-by: Linus Torvalds [ARM PATCH] 2401/1: asm/thread_info.h removed from arch/arm/vfp/entry.S Patch from Catalin Marinas This file no longer needs to be included in arch/arm/vfp/entry.S because of the inclusion of asm/constants.h. Signed-off-by: Catalin Marinas Signed-off-by: Russell King [ARM PATCH] 2403/1: S3C2410 - clock initialsation tidy Patch from Ben Dooks Update to the s3c2410/s3c2440 clock code to use the naming conventions now used throughout the arch/arm/mach-s3c2410/ directory, as well as a re-organisation of the initialisation of the clocks. The previous method was to initialise the clocks as part of the function that initialised the statically mapped IO regions, which was called from the machine initialisation. This proves a problem if the machine initialisation needs to use these IO areas to determine the frequency of PLL crystal fitted. This patch makes the following changes: - s3c2410_init_clocks renamed s3c24xx_setup_clocks - s3c2410_clkcon_enable renamed s3c24xx_clk_enable - s3c2410_register_clock renamed s3c24xx_register_clock - cpu specific init_clocks to be called from cpu.c - add s3c24xx_init_clocks for machine init to call - split the cpu specific clock code from xxx_map_io - update all machine initialisation methods and the following changes as cleanup which should have been caught by previous patches: - remove s3c2440_hdiv (unused) - remove s3c2440_clock_tick_rate (unused) This patch has been generated from a request by Dimitry Andric. Signed-off-by: Ben Dooks Signed-off-by: Russell King [PATCH] Block: Remove block_subsys.rwsem usage A new, local semaphore is used, and the major_names_lock spinlock is dropped, as it is no longer needed with this patch. The goal is to remove the subsys.rwsem entirely in the future, hence the need for this change. Signed-off-by: Greg Kroah-Hartman [ARM PATCH] 2404/1: BTAC/BTB flushing added in cpu_v6_switch_mm Patch from Catalin Marinas This is needed since ARMv6 branch prediction tagging is done by the virtual address and the ASIDs aren't taken into account. Signed-off-by: Catalin Marinas Signed-off-by: Russell King [PATCH] Block: move struct disk_attribute to genhd.h This allows other block devices to add attributes to their sysfs entries. Signed-off-by: Greg Kroah-Hartman [PATCH] aoe: don't sleep with interrupts on Changes: * get rid of sleeping with interrupts off (I had to re-add the (struct aoedev *)->nopen member because I can't get to bdev->bd_openers without sleeping.) * Scott Feldman suggestions: don't do needless assignment of skb->dev in aoenet_rcv. use skb_push instead of just adding to skb->len. also trivial: make data in struct frame unsigned char array. * Alan Cox suggestion: use net_ratelimit to avoid flooding syslog * documentation updates and corrections * support one-partition per device for compatibility with systems having poor support for large minor device numbers Don't sleep with interrupts on; support no-partition devices. Signed-off-by: Ed L. Cashin Signed-off-by: Greg Kroah-Hartman [PATCH] aoe: fix __init calling __exit Russell King writes: > static void __exit > aoe_exit(void) > { > ... > } > > static int __init > aoe_init(void) > { > ... > aoe_exit(); > ... > } Thanks for catching that. I cleaned up the error handling, too. Don't call __exit functions from __init functions. Signed-off-by: Ed L. Cashin Signed-off-by: Greg Kroah-Hartman [CPUFREQ] ondemand: don't increase to full speed at startup (Bruno Ducrot) From: Bruno Ducrot dbs_timer_init() will schedule_work(&dbs_work) so that do_dbs_timer() is likely called very early at same time slice scheduler, and for each cpu, dbs_check_cpu(cpu) will be called, likely at the same time slice than dbs_timer_init(). So far, we will get total_idle_ticks == idle_ticks == 0 unconditonaly, and the processor will be put at full speed even though it's not needed at startup. Ack'ed by Venkatesh Pallipadi. Signed-off-by: Bruno Ducrot Signed-off-by: Dominik Brodowski Signed-off-by: Dave Jones [CPUFREQ] p4-clockmod: Dothan is 13 not 0x13 Dothan is stepping 13 == 0x0D instead of 0x13 == 19 This bug crept bag in the shadows caused by the debug overhauling patch. Signed-off-by: Dominik Brodowski Signed-off-by: Dave Jones [CPUFREQ] speedstep-centrino and acpi-cpufreq: P4 TSC rate is constant From: "Pallipadi, Venkatesh" In P4, CPU tsc rate won't change with CPU frequency change while using Enhanced Speedstep Technology. Tested with both speedstep-centrino and acpi-cpufreq on both i386 and x86-64. Signed-off-by: Venkatesh Pallipadi Signed-off-by: Dominik Brodowski Signed-off-by: Dave Jones [CPUFREQ] speedstep-centrino: don't loop on transient MSR From: "Pallipadi, Venkatesh" The transient MSR values are for very short duration and so I feel reading out the last set frequency is better than looping until reading something expected. Signed-off-by: Dominik Brodowski Signed-off-by: Venkatesh Pallipadi Signed-off-by: Dave Jones [CPUFREQ] gx-suspmod: fix gx_suspmod_get Fix to return a proper cpu speed. it is caused by mistaking the meaning of on and off. Signed-Off-by: Hiroshi Miura Signed-off-by: Dominik Brodowski Signed-off-by: Dave Jones [CPUFREQ] Fix structure name usage in powernow-k8 With 2.6.10-mm2 (or even with -mm1) some structures in struct psb_s have been renamed in powernow-k8.h, but the renaming has not been done properly for all occurences in powernow-k8.c. This prevents cpufreq from accepting the BIOS PST-tables. The following patch corrects this by renaming the incorrectly named variable in powernow-k8.c, following the definition in the powernow-k8.h header file. Signed-off-by: Hans-Frieder Vogt Signed-off-by: Dominik Brodowski Signed-off-by: Dave Jones [CPUFREQ] Remove reference to obsolete cpufreq bits. Signed-off-by: Dave Jones [NET]: Tone down the verbosity of diverter messages. Signed-off-by: David S. Miller [IPV6]: Misc cleanups. - make some needlessly global code static - remove the following unused functions: - exthdrs.c: ipv6_build_rthdr - exthdrs.c: ipv6_build_exthdr - exthdrs.c: ipv6_build_nfrag_opts - exthdrs.c: ipv6_build_frag_opts - remove the following write-only global variables: - addrconf.c: inet6_dev_count - addrconf.c: inet6_ifa_count - #if 0 the following unused global variable: - addrconf.c: in6addr_any - remove the following unneeded EXPORT_SYMBOL's: - ipv6_syms.c: in6addr_any - ipv6_syms.c: in6addr_loopback Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [IA64/X86_64] swiotlb.c: fix gcc printk warning swiotlb: Fix gcc printk format warning on x86_64, OK for ia64: arch/ia64/lib/swiotlb.c:351: warning: long unsigned int format, long long unsigned int arg (arg 2) Signed-off-by: Randy Dunlap Signed-off-by: Tony Luck [PATCH] I2C: add MODULE_DEVICE_TABLE to via686a.c driver Signed-off-by: Greg Kroah-Hartman [PATCH] I2C support for Intel ICH7 - 2.6.10 - resubmit This patch adds the Intel ICH7 DID to the i2c-i801.c driver and adds an entry to Kconfig for I2C(SMBus) support. Note: This patch relies on the already submitted and accepted PATA patch to pci_ids.h containing all ICH7 DID's. Signed-off-by: Jason Gaston Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: it87 fan update On Tue, Jan 11, 2005 at 10:26:22AM +0100, Jean Delvare wrote: > 1* Jonas, please send a modified version of your original patch to Greg. > The only difference would be that you wouldn't force on/off mode to be > on at driver load time. Instead, disabling PWM for one fan control > output (echo 0 > pwmN_enable) would both set on/off mode to on for that > output (new) and turn that output to on/off mode (same as before). Ok, thanks for doing the thinking ;), here is the modified patch (it87.c_2.6.10-jm3-corrected_manual_pwm_20050111.diff). In addition to the above change, it also refreshes fan_main_ctrl in the update routine, as suggested by Jean on IRC. - adds manual PWM - removes buggy "reset" module parameter - fixes some whitespaces Signed-off-by: Jonas Munsin Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: adm1026.c fixes Ok, take 3 on the adm1026 patch. In this patch: (1) Code has been added which ensures that the fan divisor registers are properly read into the data structure before fan minimum speeds are determined. This prevents a possible divide by zero error. The line which reads the hardware default fan divisor values has been reformatted as suggested by Andreas Dilger to make the intent of the statement clearer. (2) In a similar spirit, an unecessary carriage return from a "dev_dbg" statement in the adm1026_print_gpio() function has been elminated, shortening the statement to a single line and making the code easier to read. Signed-off-by: Justin Thiessen [PATCH] I2C: Fix bogus bitmask in lm63 debug message There is a bitmask error in one debug message of my lm63 chip driver. Nothing critical but still worth fixing, hence comes a patch. Credits go to Mohan Mistry for finding the error. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: Cleanups to the eeprom driver Here comes a cleanup patch to the i2c eeprom client driver: * Get rid of the unused i2c_client client_id. * Get rid of the redundant non-ISA bus check. * Fix the adapter capability check. We were previously using capabilities without checking if they were supported. Document which capabilities are required and which are optional. * Reorder things a bit. In particular, wait to have a valid client before we bother checking if this is a Vaio EEPROM. * Use strlcpy instead of strncpy, because I Heard It Was Better (TM) and all other chip drivers use it. * Take benefit of the auto-increment feature of EEPROMs to speed up the Vaio check. * Display an information message when a Vaio EEPROM is detected. Tested successfully on my laptop, which happens to be a Vaio. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: fix it87 sensor driver stops CPU fan > 2* I would then add a check to the it87 driver, which completely disables > the fan speed control interface if the initial configuration looks weird > (all fans supposedly stopped and polarity set to "active low"). This > should protect users of the driver who have a faulty BIOS. > > When a bogus configuration is detected, we would of course complain in > the logs and invite the user to complain to his/her motherboard maker > too. Here is it87.c_2.6.10-jm4-detect_broken_bios_20050112.diff implementing this. It goes on top of the previous patch. - detects broken bioses, disables the pwm for them and prints a message - fixes an unrelated minor bug in set_fan_div() Signed-off-by: Jean Delvare Signed-off-by: Jonas Munsin Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: add EMC6D100 support in lm85 driver I have ported the support for the EMC6D100 sensor from kernel 2.4 to kernel 2.6. In the process I received some comments from Jean Delvare. Signed-off-by: Rafael Ãvila de Espíndola Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: Improve it87 super-i/o detection This patch improves the detection of Super-I/O it87 chips (IT8712F, IT8705F). * Find the IT8712F and IT8705F address through Super-I/O (as opposed to IT8712F only so far). * Verify that the device is activated. Print info lines if a disactivated or unconfigured chip is found. * Print an info line when finding either chip, with device name, address and revision. * Rearrange code in it87_find() (error path). * (bonus) Get rid of the useless i2c_client id. Successfully tested on two IT8712F and one IT8705F, thanks to Jonas Munsin, Rudolf Marek and Karine Proot. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman [PATCH] I2C-MPC: use wait_event_interruptible_timeout between transactions Use wait_event_interruptible_timeout so we dont waste time waiting between transactions like we use to. Also, we use the adapters timeout so the ioctl cmd I2C_TIMEOUT will now work. Signed-off-by: Kumar Gala Signed-off-by: Greg Kroah-Hartman [PATCH] I2C-MPC: Convert to platform_device driver Converted the driver to work as either a OCP or platform_device driver. The intent in the future (once we convert all PPC sub-archs from OCP to platform_device) is to remove the OCP code. Signed-off-by: Kumar Gala Signed-off-by: Greg Kroah-Hartman [PATCH] w1: add ->search() method. Patch allows w1_search() to be overwritten by bus_master drivers. It is very usefull for several devices, like found in iPaq w1 bus master, which does not support bit operations but has hardware implemented search algorithm. Signed-off-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: add PCI Express Port Bus Driver subsystem Signed-off-by: T. Long Nguyen Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: use modern format for PCI addresses Use pci_name() rather than "%02x:%02x" when printing PCI address information. Signed-off-by: Bjorn Helgaas Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: pci_ids.h correction for Intel ICH7 - 2.6.10-bk13 This patch corrects the ICH7 LPC controller DID in pci_ids.h from x27B0 to x27B8. This patch was build against 2.6.10-bk13. Signed-off-by: Jason Gaston Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: Clean up printks in msi.c Add "PCI:" prefixes and fix up the formatting and grammar of printks in drivers/pci/msi.c. The main motivation was to fix the shouting "MSI INIT SUCCESS" message printed when an MSI-using driver is first started, but while we're at it we might as well tidy up all the messages. Signed-off-by: Roland Dreier Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: rom.c cleanups Greg, here's some whitespace and long line cleanup I wanted to do last time I touched rom.c, but forgot. Does it look ok to you, Jon? Signed-off-by: Jesse Barnes Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: Downgrade printk that complains about unsupported PCI PM caps The attached patch downgrades to KERN_DEBUG level the printk that issues a notification that an unsupported version of the PCI power management registers has been encountered by pci_set_power_state(). Signed-Off-By: David Howells Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: Lock initializer cleanup - batch 4 Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: fix release_pcibus_dev() crash During the course of a hotplug removal of a PCI bus, release_pcibus_dev() attempts to remove attribute files from a kobject directory that no longer exists. This patch moves these calls to pci_remove_bus(), where they can work as intended. Signed-off-by: John Rose Signed-off-by: Greg Kroah-Hartman [PATCH] USB: remove some unneeded exported symbols. Signed-off-by: Greg Kroah-Hartman [PATCH] USB: CDC ACM module and Zoom 2985 modem there's a bug in the acm driver's work arounds. This fixes it. Signed-Off-By: Oliver Neukum Signed-off-by: Greg Kroah-Hartman [PATCH] USB cypress_m8: line setting bugfix, circular write buffer added, misc. fixes This patch brings up to date the driver with the current stable development source. A bug with RTS not raising upon first open was fixed, Al Borcher's circular write buffer from the pl2303 driver was implemented, and various fixes/cleanups were made. Signed-off-by: Lonnie Mendez Signed-off-by: Greg Kroah-Hartman [PATCH] USB unusual_devs addition: Ignore residue for ours-tech disk This "Ours Technology" device incorrectly reports 100% residue on transferred data. Patch originally sent by Daniel Drake , with slight modification by me. Signed-off-by: Daniel Drake Signed-off-by: Phil Dibowitz Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Patch to fix ub looping with a tag mismatch If a command times out, we resubmit a retry. Some devices, however, buffer everything we send and then eventually reply to a command we have timed out already. We receive a bad tag, send a new command, device replies to the one sent before, and so on without end. The fix is to flush pending replies if tags mismatch (by reading them). Signed-off-by: Pete Zaitcev Signed-off-by: Greg Kroah-Hartman [PATCH] USB UHCI: protect DMA-able fields with barriers This is a revised patch to fix a problem in the UHCI driver, in which the compiler incorrectly optimizes certain accesses to DMA-able memory addresses. The patch reorganizes the code to use special accessor routines including a compiler optimization barrier, and stores the results in local variables to help prevent repeated accesses. No use is made of the "volatile" keyword. :-) Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: drivers/usb/*: s/0/NULL/ in pointer context Signed-off-by: Alexey Dobriyan Signed-off-by: Greg Kroah-Hartman [PATCH] USB: usbnet: Olympus R1000 PDA, and blacklisting if CDC && !ZAURUS Add support for the Zaurus-compatible configuration of the Olympus R1000 PDA. (IDs from Todd Blumer, todd@sdgsystems.com) Resolve a FIXME: all the Zaurus support morphs into blacklist entries when CDC Ethernet is enabled and Zaurus isn't (since the Zaurus firmware falsely advertises itself as CDC conformant). Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Lock initializer cleanup - batch 4 Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman [PATCH] USB: SN9C10x driver updates SN9C10x driver updates. Changes: @ Fix the sysfs interface @ Fix allocated minor number after device detection + Add "force_munmap" module parameter + Documentation updates + Add support for old VIDIOC_S_PARM_OLD and VIDIOC_S_CTRL_OLD ioctl's Signed-off-by: Luca Risolia Signed-off-by: Greg Kroah-Hartman [PATCH] pegasus 2.6.10 cset Various fixes to the 'pegasus' driver, notably fixing OSDL bugid #3978 so this can be used with bridges again (or for that matter, other normal usage). * Bugfixes in the status urb completion handler: - Never use garbage that happens to be sitting in the URB data buffer to change the carrier status. - There are two bits which claim to report parts of carrier detect bit. This switches to the one that works sometimes; monitoring through MII might be the best solution. - Stop log spamming ... at least some of these chips seem to get confused about data toggle, no point in warning about each packet error as it's detected. * Report the normal Ethernet MTU. * Better ethtool support: - Save the message level set by userspace - Basic WOL support * Add USB suspend() and resume() methods, to go with WOL. Modeled on what stir4200 does. Also, some of the messages are converted to the more conventional style: "ethN: message text", or driver model style before the device is registered. * removed redundant MII code since CONFIG_MII is always set by Kconfig; * updated the version string; Signed-off-by: David Brownell Signed-off-by: Petko Manolov Signed-off-by: Greg Kroah-Hartman [PATCH] USB: correct and clarify error-code documentation This patch corrects some misconceptions that have persisted in the USB error-code documentation for quite some time. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: add driver for the Siemens ID Mouse fingerprint sensor This patch adds a new usb-misc driver for the fingerprint sensor that can be found in the Siemens ID Mouse USB. "cat /dev/usb/idmouseX" yields a 225x288 greyscale PNM with the fingerprint information. It's now in version 0.5, which uses memcpy() instead of snprintf() and allows interruption of the image acquisition process, in case it should get stuck. It may be considered controversial that it outputs a PNM instead of raw data, but I hold the opinion that the 15 bytes of header, "P5 225 288 256 ", do not do any harm and allow the device to be used in shell scripts or similar, too. The setup packets are not described further, simply because I don"t know anything about them myself. We captured them under Windows using SnoopyPro. Please include this into the main USB kernel tree - I think it has by now been scrutinized and tested quite thoroughly. Signed-off-by: Florian Echtler Signed-off-by: Andreas Deresch [PATCH] USB: fix sparse warnings in the idmouse.c driver Signed-off-by: Greg Kroah-Hartman [PATCH] USB: add Ever UPS vendor/product id to ftdi_sio driver This patch allows to use ftdi_sio driver with Ever ECO Pro CDS UPS. Patch was tested on pre-2.6.10 kernel. Signed-Off: Arkadiusz Miskiewicz [PATCH] USB: give the idmouse the 132 minor number Signed-off-by: Greg Kroah-Hartman [ide] ide-cd: use ssleep() instead of schedule_timeout() Description: Uses ssleep() in place of cdrom_sleep() to guarantee the task delays as expected. Remove cdrom_sleep() definition, as this is the only place where it is called. Signed-off-by: Nishanth Aravamudan Acked-by: Jens Axboe Signed-off-by: Bartlomiej Zolnierkiewicz [ide] ide_dump_atapi_status() printk readability fix From: Gunther Mayer this improves logic and readability: - remove blank from: AbortedCommand (as other flags) - add blank and {} to error= line - clean up: remove 2 lines and extra printk before: hdd: status error: status=0x7f { DriveReady DeviceFault SeekComplete DataRequest CorrectedError Index Error } hdd: status error: error=0x7fIllegalLengthIndication EndOfMedia Aborted Command MediaChangeRequested LastFailedSense 0x07 after: hdd: status error: status=0x7f { DriveReady DeviceFault SeekComplete DataRequest CorrectedError Index Error } hdd: status error: error=0x7f { IllegalLengthIndication EndOfMedia AbortedCommand MediaChangeRequested LastFailedSense=0x07 } Signed-off-by: Bartlomiej Zolnierkiewicz [ide] make try_to_flush_leftover_data() static Hi, now that you cleaned up the ide-io.c code to be all in the right file, try_to_flush_leftover_data can become static since all users are in this file now. bart: also remove declaration from Signed-off-by: Arjan van de Ven Signed-off-by: Bartlomiej Zolnierkiewicz [ide] suppress output of error messages for non-existant interfaces From: Prarit Bhargava Suppress output of "Wait for ready failed before probe !" messages for non-existant interfaces. Please see http://marc.theaimsgroup.com/?l=linux-ide&m=110553792013649&w=2 for further context on this patch. Signed-off-by: Bartlomiej Zolnierkiewicz [ide] piix: add Intel 82801DBL IDE Controller support From: Zhongjun, Wang Signed-off-by: Bartlomiej Zolnierkiewicz [ide] atiixp: add IXP400 support From: Enrico Scholz add IXP400 ID From: Frederick Li update PCI IDs Signed-off-by: Bartlomiej Zolnierkiewicz [ide] kill ide_drive_t->suspend_reset This cruft pre-dates benh's PowerManagement code. Moreover ->suspend_reset is always equal to zero. Signed-off-by: Bartlomiej Zolnierkiewicz [ide] icside: use ide_dma_intr() Make ide_dma_intr() always available if CONFIG_BLK_DEV_IDEDMA=y and use it instead of icside_dmaintr(). Acked by Russell. Signed-off-by: Bartlomiej Zolnierkiewicz [ide] ide-v10: use ide_dma_intr() Use now available ide_dma_intr() in etrax_dma_intr(). Signed-off-by: Bartlomiej Zolnierkiewicz [ide] kill default_{attach,cleanup}() Device drivers are supposed to provide their own ->attach and ->cleanup. Signed-off-by: Bartlomiej Zolnierkiewicz [SCTP] merge sctp_sock with sctp_opt No need for two structs, follow the new inet_sock layout style. Also introduce inet_sk_copy_descendant, to copy just the inet_sock descendant specific area from one sock to another. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller [TCP]: Do not underflow sk_forward_alloc in sendpage(). We need to do the proper checks before we try to pull space out of it, just like sendmsg() does. Signed-off-by: David S. Miller [IPV6]: Fix locking in ip6_dst_lookup(). The caller does not necessarily have the socket locked (udpv6sendmsg() is one such case) so we have to use sk_dst_check() instead of __sk_dst_check(). Signed-off-by: Herbert Xu Signed-off-by: David S. Miller [IPV6] Don't use expired default routes. Signed-off-by: Hideaki YOSHIFUJI [IPV6] Don't update FAILED entries on receipt of NAs. As NAs do not create new entries (RFC2461 7.2.5), NA should not change state of FAILED entries. Signed-off-by: Hideaki YOSHIFUJI [MMC] Add comment about GENHD_FL_REMOVABLE to mmc_block We don't set GENHD_FL_REMOVABLE because this flag indicates that the media may be removed while the block device persists. Since MMC destroys the block device when the card (media + on-board controller) is removed, the block device will never exist without media present. Therefore, setting GENHD_FL_REMOVABLE would be misleading. Signed-off-by: Russell King [SERIAL] Fix serial console resume Don't use uart_change_speed() when trying to restore the serial console settings - the port may not have a tty associated with it. Signed-off-by: Russell King [SERIAL] Clarify documentation for set_termios and pm methods. Signed-off-by: Russell King [PATCH] Make compat_rt_sigtimedwait conform Compat syscalls need to start compat_sys_ otherwise PA-RISC's compat syscall wrappers don't work. Not that the individual involved bothered to patch PA-RISC ... Signed-off-by: Linus Torvalds Make pipe buffer handling more generic. Use a "pipe_buf_operations" structure to describe the ops that can be done on a pipe buffer, so that pipe buffers from different sources can have their own rules. Right now the rules are just about how you map the buffers into kernel virtual memory space, and how to release them (and whether you can append new data to the end of an existing buffer). [IPV6] merge raw6_sock with raw6_opt No need for two structs, follow the new inet_sock layout style. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller [PATCH] cputime: s/390: fix account_steal_time. account_steal_time called for idle doesn't work correctly: 1) steal time while idle needs to be added to the system time of idle to get correct uptime numbers 3) if there is an i/o request outstanding the steal time should be added to iowait, even if the hypervisor scheduled another virtual cpu since we are still waiting for i/o. 2) steal time while idle without an i/o request outstanding has to be added to cpustat->idle and not to cpustat->system. Signed-off-by: Martin Schwidefsky Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] SELinux: fix error handling code for policy load This patch fixes several bugs in the error handling code for SELinux policy loading that were introduced by my earlier patch to eliminate unaligned accesses by that code. Signed-off-by: Stephen Smalley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] SELinux: fix setting of loaded policy version This patch fixes a different bug in the code for SELinux policy loading. It ensures that the loaded policy version number is not updated until the new policy is successfully committed. It also fixes the type on the loaded policy version. Signed-off-by: Stephen Smalley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] generic irq code missing export of probe_irq_mask() Matthew Wilcox just converted parisc over to doing the generic irq code and we ran across the symbol probe_irq_mask being undefined (and thus preventing yenta_socket from loading). It looks like the EXPORT_SYMBOL() was accidentally missed from kernel/irq/autoprobe.c and no-one noticed on x86 because it's still in i386_ksyms.c This patch corrects the problem so that the generic irq code now works completely on parisc. Signed-off-by: James Bottomley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/IPoIB: use correct static rate in IpoIB Calculate static rate for IPoIB address handles based on local width/speed and path rate. Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/mthca: trivial formatting fix Trivial formatting fix for empty for loops. Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/mthca: support RDMA/atomic attributes in QP modify Implement setting of RDMA/atomic enable bits, initiator resources and responder resources for modify QP in low-level Mellanox HCA driver (should complete RDMA/atomic implementation). Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/mthca: clean up allocation mapping of HCA context memory Clean up the way we allocate and map memory for use as ICM ("InfiniHost Context Memory") when running in Arbel MemFree mode. This slightly improves the code for mapping the firmware area and will make future progress towards full MemFree support much easier. Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/mthca: add needed rmb() in event queue poll Add an rmb() between checking the ownership bit of an event queue entry and reading the contents of the EQE. Without this barrier, the CPU could read stale contents of the EQE before HW writes the EQE but have the read of the ownership bit reordered until after HW finishes writing, which leads to the driver processing an incorrect event. This was actually observed to happen when multiple completion queues are in heavy use on an IBM JS20 PowerPC 970 system. Also explain the existing rmb() in completion queue poll (there for the same reason) and slightly improve debugging output. Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/core: remove debug printk Remove debug printk accidentally included. Signed-off-by: Tom Duffy Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand: make more code static Make needlessly global code static. Signed-off-by: Adrian Bunk Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/core: set byte_cnt correctly in MAD completion Integrate Michael Tsirkin's patch to local_completion to set the WC byte_cnt according to the IBA 1.1 spec (include the GRH size regardless of whether it is present or not). Signed-off-by: Hal Rosenstock Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/core: add QP number to work completion struct InfiniBand spec rev 1.2 compliance: add local qp number to work completion structure. Signed-off-by: Michael S. Tsirkin Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/core: add node_type and phys_state sysfs attrs Add per-device "node_type" and per-port "phys_state" sysfs attributes for InfiniBand devices. Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/mthca: clean up computation of HCA memory map Clean up the computation of the HCA context memory map. This serves two purposes: - make it easier to change the HCA "profile" (eg add more QPs) - make it easier to implement mem-free Arbel support Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/core: fix handling of 0-hop directed route MADs Handle outgoing DR 0 hop SMPs properly when provider returns just SUCCESS to process_mad. Signed-off-by: Hal Rosenstock Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/core: add more parameters to process_mad Add parameters to process_mad device method to support full Mellanox firmware capabilities (pass sufficient information for baseboard management trap generation, etc). Signed-off-by: Michael S. Tsirkin Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/core: add qp_type to struct ib_qp Add qp_type to struct ib_qp. Signed-off by: Sean Hefty Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/core: add ib_find_cached_gid function Add a new function to find a port on a device given a GID by searching the cached GID tables. Document all cache functions in ib_cache.h. Rename existing functions to better match format of verb routines. Signed-off by: Sean Hefty Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand: update copyrights for new year Update copyright line (files were modified in 2005). Signed-off-by: Hal Rosenstock Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/ipoib: move structs from stack to device private struct Move the gather list and work request used for posting sends from the stack in ipoib_send() to the private structure. This reduces the stack usage for the data path function ipoib_send() and may speed things up slightly because we don't need to initialize constant members of the structures. Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/core: rename handle_outgoing_smp Change routine name from handle_outgoing_smp to handle_outgoing_dr_smp. Signed-off-by: Hal Rosenstock Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mark-page-accessed in filemap.c not quite right I just discovered there's a thinko in the mark-page-accessed change in do_generic_mapping_read() in 2.6.11-rc1. ra.prev_page is compared to index to see if we read from this page before - except that prev_page is actually set to the recent page or even a page in front of the current page. So we should store ra.prev_page in a seperate variable at the start of do_generic_mapping_read(). Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: Fix mpc8272ads When I reworked the m82xx init functions, I inadvertantly broke the callout we had from ppc_md.setup_arch() that boards can use to poke & prod things, once mappings are set. The following adds in a callback and updates the one m82xx board that needs it. Signed-off-by: Tom Rini Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: Add Freescale PQ2FADS support The following adds support for Freescale's PQ2FADS board to the kernel. (The 'real' changes required for the board are in the ethernet driver, which needs a massive sync-up with mainline as I've been holding out for a better, rewritten one from the Freescale folks, who're waiting for the PHY lib patch sent to the net-dev list to get ack'd) Signed-off-by: Tom Rini Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: fix PPC44x build Fix PPC44x build broken from a latent bug. Signed-off-by: Matt Porter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: make HvLpEvent_unregisterHandler() work When the iseries_veth driver module is unloaded there is the potential for an oops and also some memory leakage. Because the HvLpEvent_unregisterHandler() function did no synchronisation, it was possible for the handler that was being unregistered to be running on another CPU *after* HvLpEvent_unregisterHandler() had returned. This could cause the iseries_veth driver to leave work in the events work queue after the module had been unloaded. When that work was eventually executed we got an oops. In addition some of the data structures in the iseries_veth driver were not being correctly freed when the module was unloaded. This is the first patch, which makes HvLpEvent_unregisterHandler() work. Signed-off-by: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: make iseries_veth call flush_scheduled_work() When the iseries_veth driver module is unloaded there is the potential for an oops and also some memory leakage. Because the HvLpEvent_unregisterHandler() function did no synchronisation, it was possible for the handler that was being unregistered to be running on another CPU *after* HvLpEvent_unregisterHandler() had returned. This could cause the iseries_veth driver to leave work in the events work queue after the module had been unloaded. When that work was eventually executed we got an oops. In addition some of the data structures in the iseries_veth driver were not being correctly freed when the module was unloaded. This is the second patch, we make iseries_veth call flush_scheduled_work() after we are sure the handler is no longer running, and also fix the memory leaks. Signed-off-by: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: iommu: avoid ISA io space on POWER3 On some systems, the first PCI bus has a ISA I/O hole at the first 16MB. We can't use this space for DMA addresses on the bus. On Python-based machines, we'll skip the first 256MB on buses that have the hole, just as we do on later systems. This means that the first bus will have 768MB of DMA space shared between the devices on it. Signed-off-by: Olof Johansson Acked-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: lacks definition of MM_VM_SIZE() With David Woodhouse We don't set MM_VM_SIZE() on ppc64, so it defaults to TASK_SIZE. Which means a 32-bit process ending up in exit_mmap() to kill a 64-bit mm may call tlb_finish_mmu() with an incorrect 'end' argument. Signed-off-by: Anton Blanchard Signed-off-by: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: Remove mandatory single-step debugging diversion The attached patch removes the mandatory single-step diversion code from the FRV syscall handler that was put there for debugging purposes now that it's no longer needed. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FRV: Excess whitespace cleanup The attached patch cleans up some excess whitespace from the FRV entry.S. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Add brackets to bitops Add missing argument brackets in bitop macros Makes these macros somewhat safer to use. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Move early CPU detection earlier Move early CPU detection earlier. Needed for some followup patches and makes sense in general. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Disable uselib when possible Disable sys_uselib for 64bit processes and only enable for 32bit processes when a.out support is compiled in. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Optimize nodemask operations slightly Optimize first/node_node Optimize nodemask_t slightly. The x86-64 find_first/next_bit uses __builtin_constant_p on the size argument to special cases small single long word searches. But most gccs don't make __builtin_constant_p true when an argument is passed through an inline function. Move the constant into the inline function to avoid this. This generates a lot better code for node searches on x86-64. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix a bug in timer_suspend() on x86_64 This patch is intended to fix a bug in timer_suspend() on x86_64 that causes hard lockups on suspend with swsusp and provide some optimizations. It is based on the Nigel Cunningham's patches to to reduce delay in arch/kernel/time.c. Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Acked-by: Nigel Cunningham Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x68: consolidate code segment base calculation Calculating the base address of the segment is tricky and is used in several places as well. This patch moves this tricky part in a common place as suggested by Andi Kleen. Signed-of-by: Prasanna S Panchamukhi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: use cpumask_t instead of unsigned long Another cpumask_t related fix: use cpumask_t instead of unsigned long. Signed-off-by: Suresh Siddha Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] swsusp: more small fixes This adds few missing statics to swsusp.c, prints errors even when non-debugging and fixes last "pmdisk: " message. Fixed few comments. Signed-off-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] swsusp/dm: Use right levels for device_suspend() This almost changes no code (constant is still "3"), but at least it uses right constants for device_suspend() and fixes types at few points. Also puts explanation of constants to the Documentation. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] swsusp: update docs This updates swsusp documentation. Signed-off-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] acpi: comment/whitespace updates This cleans few comments/formatting. Signed-off-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] make suspend work with ioapic IRQ balancing daemon needs try_to_freeze(). Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] swsusp: refrigerator cleanups This patch is from Nigel's swsusp2, it kills ugly #include from all over the tree, and makes code slightly nicer. I only left those parts that do not change any code. From: Nigel Cunningham Signed-off-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: avoid NULL dereference in line.c This patch reorders two lines to check a variable for NULL before using the variable. Signed-off-by: Frank Sorenson Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: readd CONFIG_MAGIC_SYSRQ for UML This config option was lost during the creation of lib/Kconfig.debug, due to a bad expressed dependency; I also moved the option back to its original place for UML (it is near CONFIG_MCONSOLE since it depends on that). Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: Commentary addition to recent SYSEMU fix. Add some comments about the "uml-sysemu-fixes" patch of 2.6.10-mm1 (merged in 2.6.11-rc1). Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: drop unused buffer_head.h header from hostfs Drop that header inclusion - I discovered this header was unused while checking whether I can use the __set_page_dirty_nobuffers speedup suggested by Andrew Morton. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: delete unused header umn.h Remove nowhere referenced header. (egrep "filename\." didn't find anything) Signed-off-by: Domen Puncer Signed-off-by: Paolo 'Blaisorblade' Giarrusso Cc: UML-devel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: commentary about SIGWINCH handling for consoles Explain what happens inside the SIGWINCH handler - it's non-obvious enough that the correct code seemed me to need a cleanup (which was indeed buggy). More info in the comments themselves. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: fail xterm_open when we have no $DISPLAY If UML wants to open an xterm channel and the xterm does not run properly (eg. terminates soon after starting) we will get a hang (a comment added in the patch explains why). This avoids the most common cause for this and adds a comment (which long term will go away with a rewrite of that code); the complete fix would be to catch the xterm process dying, up(&data->sem), and -EIO all requests from that point onwards. That applies for some of the other channels too, so part of the code should probably be abstracted a little and generalized. Signed-off-by: Chris Wedgwood Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: depend on !USERMODE in drivers/block/Kconfig and drop arch/um/Kconfig_block Finally, we end with this the need to update arch/um/Kconfig_block with changes in drivers/block/Kconfig - we include directly that; UML-specific entries were moved into it (they are very few). Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: Makefile simplification and correction. Cleanup: simplify a lot of strange constructs and whatever present in arch/um/Makefile. Also, get rid of redundant cleaning code introduced in "uml-fix-make-clean.patch" from 2.6.10-mm3 - when it was written it made sense, but I fixed most problems it addressed in a more elegant way. Also about that, don't remove $(ARCH_SYMLINKS) in make clean, but rather in make mrproper as we already do, like for include/asm-um and other symlinks. Finally, remove one wrong thing (almost a bug) introduced in that - the usage of the clean-dirs construct: clean-dirs := sys-$(SUBARCH) which is intended to delete one whole folder, rather than to descend to clean it, when used in normal Makefiles (not in the arch Makefile where is used, with no effect). It's also not needed because that folder is cleaned because is listed in either $(core-y) or $(libs-y). Signed-off-by: Paolo 'Blaisorblade' Giarrusso Cc: Chris Wright Cc: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: fix some UML own initcall macros UML has his own initcall mechanism to handle his special userspace initialization (they are called in different moments, so they are indeed It must also duplicate some definition for the benefit of userspace code - but those definition weren't in sync with the main code. Also, the UML own macros missed __attribute_used__. Both problems are fixed by this patch. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: refuse to run without skas if no tt mode in Return an early error message when no TT support is compiled in and no SKAS support is detected. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: for ubd cmdline param use colon as delimiter Currently we can use this syntax ubd[]=file1,file2. However, writing things as ubd0=~/Uml/file1,~/Uml/file2 does not work; in fact, the shell won't expand the second '~', since it's not at a path beginning; possibly even other shell expansions don't work here. So simply allow using, instead of the ',' separator, the ':' separator. The ',' separator can still be used to preserve backward compatibility. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: allow free ubd flag ordering When parsing the section in ubd=file[,file2], instead of requiring that the flags are specified in a certain order, just make the code smarter. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: move code from ubd_user to ubd_kern Most code of ubd_user.c already uses the os_* functions, so it can be moved to ubd_kern.c. This patch simply moves the code without any hidden changes. The only change is inside io_thread(): since it calls signal(), I created a little function in ubd_user.c which just calls signal() with the right parameters. In a later patch (send together) I'll do some changes, to fix the usage of errno (which makes this code break when moved in a kernelspace file) and for some other little cleanups. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: fix and cleanup code in ubd_kern.c coming from ubd_user.c * Fix the use of errno: it refers to the __errno_location glibc definition when in ubd_user.c, and hence works; but in ubd_kern.c it refers to kernel_errno, which is different. So use the return value of os_* functions, as we should always have done. * Remove {read,write}_ubd_fs(), which are just silly. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: add stack content to dumps Copy some code from i386 to print the stack content. Rough form yet, should work although. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: add stack addresses to dumps From: Bodo Stroesser Add stack addresses to print of symbols from stack trace. For stack analysis it's important to have this information. Signed-off-by: Bodo Stroesser For UML, we should also copy the CONFIG_FRAME_POINTER stack walking from i386, and move the result to sys-i386. Another note: this should be done for i386 also, if ksymoops does not have problems. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: update ld scripts to newer binutils It seems that linker script for userspace software are quite toolchain-depending, at least because what we use is a merge between builtin LD scripts (see strings /usr/bin/ld) and normal kernel linking scripts. Plus, a number of people are having toolchain-related troubles building UML (even assertion failures on linking, with Gentoo and Fedora 2). So, let's try to make UML nicer for binutils. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] reintroduce task_nice export for binfmt_elf32 S/390 needs this for its binfmt_elf32 module. Signed-off-by: Christian Borntraeger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: Core changes s390 core changes: - Fix mm_struct leak on cpu hotplug. - Improved cpu detection logic to avoid long delay at system start. - Call cpu_relax() in cpu hotplug wait loop. - Remove #define of account_system_vtime for CONFIG_VIRT_CPU_ACCOUNTING=n. - Regenerate default configuration. Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: cmm interface Collaborative memory management inferface changes: - Allow cmmthread to run on every cpu. Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: Common I/O layer changes Common I/O layer changes: - Check if AIF is available on hardware before enabling the AIF time delay disablement facility. Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: 3270 console 3270 console changes: - Initialize timer element before first use. Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: remove irq_exit from iucv Remove the irq_exit call on error path in iucv_irq_handler. irq_exit is done in do_extint(). Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: dasd driver debug log dasd driver changes: - Fix debug feature usage. The sprinf event/exception functions write a pointer to a format string (%s) to the log. These strings must be valid at the time the DBF-log is read. - Some coding style reformatting. Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: vol1 partition recognition Make the ECKD compatible disk layout labling detection conditional to run only on ECKD compatible disk layout volumes, do a fall back into the default LNX/unlabled case otherwise. Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: use nonseekable_open in z/VM log reader Disable seek on z/VM log reader misc device by using nonseekable_open(). Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] csum_and_copy_from_user gcc4 warning fixes This patch kills tons of gcc4 warnings: pointer targets in passing argument 2 of 'csum_and_copy_from_user' differ in signedness From: Hirokazu Takata * include/asm-m32r/checksum.h: build fix * arch/m32r/lib/csum_partial_copy.c: - update comment - cosmetic changes: change indentation Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] smbfs fixes Fixes for various smbfs data leak bugs from Alan, Chuck Ebbert and various people on various mailing lists. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fixups for block2mtd Fixes to block2mtd.c - the previous driver was only compile-tested: o Corrected copyright statements and some comments. o Renamed blockmtd to block2mtd. o Fixed the newline handling, it oopsed the kernel if no erase size was passed. o Replaced some printk() by INFO(). o Tried (but failed) to replace the readahead code. Signed-off-by: Jörn Engel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] swiotlb: fix gcc printk warning swiotlb: Fix gcc printk format warning on x86_64, OK for ia64: arch/ia64/lib/swiotlb.c:351: warning: long unsigned int format, long long unsigned int arg (arg 2) Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] I2O: fix possible race condition and minor improvements - I2O Block OSM contained a possible race condition (by Wolfram Joost) - In pci.c the memory area which will be synced was wrong (original from Wolfram Joost) - number of OSM's which could be loaded is increased from 4 to 8 Signed-off-by: Markus Lidel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] I2O: printk cleanup and unnecessary code removal - removed commented part in header which is not used anymore - added wrappers for printk to make code more readable - cleaned up logging output and removed unneccessary output Signed-off-by: Markus Lidel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext3/ea: revert old ea-in-inode patch Revert the recently-added (post-2.6.10) ea-in-inode speedup patch. We have a new one. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext3/EA: mbcache cleanup There is no need to export struct mb_cache outside mbcache.c. Move struct mb_cache to fs/mbcache.c and remove the superfluous struct mb_cache_entry_index declaration. Signed-off-by: Andreas Gruenbacher Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext3/EA: Race in ext[23] xattr sharing code Andrew Tridgell and Stephen C. Tweedie have reported two different Oopses caused by a race condition in the mbcache, which is responsible for extended attribute sharing in ext2 and ext3. Stephen tracked down the bug; I did the fix. Explanation: The mbcache caches the locations and content hashes of xattr blocks. There are two access strategies: [1] xattr block disposal via mb_cache_entry_get(), [2] xattr block reuse (sharing) via mb_cache_entry_find_{first,next}(). There is no locking between the two methods, so between one mb_cache_entry_find_x and the next, a mb_cache_entry_get might come in, unhash the cache entry, and change the journaling state of the xattr buffer. Subsequently, two things can happen: [a] the next mb_cache_entry_find_x may try to follow the mbcache hash chain starting from the entry that has become unhashed, which now is a stale pointer, [b] the block may have become deallocated, and then we try to reuse it. Fix this by converting the mbcache into a readers-writer style lock, and protect all block accesses in ext2/ext3 by the mbcache entry lock. This ensures that destroying blocks is an exclusive operation that may not overlap xattr block reuse, while allowing multiple "re-users". Write access to the xattr block's buffer is protected by the buffer lock. Signed-off-by: Andreas Gruenbacher Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext3/EA: Ext3: do not use journal_release_buffer The use of journal_release_buffer is unsafe; it can overflow the journal: When a buffer is stolen from a transaction and later removed from that transaction with journal_release_buffer, the buffer is not accounted to the transaction that now "owns" the buffer, and one extra credit appears to be available. Don't use journal_release_buffer: We did rely on the buffer lock to synchronize xattr block accesses, and get write access to the buffer first to get atomicity. Return the mb_cache_entry from ext3_xattr_cache_find instead, and do the check/update under its lock. Only get write access when we know we will use the buffer. Signed-off-by: Andreas Gruenbacher Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext3/EA: Ext3: factor our common xattr code; unnecessary lock The ext3_xattr_set_handle2 and ext3_xattr_delete_inode functions contain duplicate code to decrease the reference count of an xattr block. Move this to a separate function. Also we know we have exclusive access to the inode in ext3_xattr_delete_inode; there is no need to grab the xattr_sem lock. Signed-off-by: Andreas Gruenbacher Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext3/EA: Ext[23]: no spare xattr handler slots needed The ext3_xattr_set_handle2 and ext3_xattr_delete_inode functions contain duplicate code to decrease the reference count of an xattr block. Move this to a separate function. Also we know we have exclusive access to the inode in ext3_xattr_delete_inode; there is no need to grab the xattr_sem lock. Signed-off-by: Andreas Gruenbacher Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext3/EA: Cleanup and prepare ext3 for in-inode xattrs Clean up several things in the xattr code, and prepare it for in-inode attributes: * Add the ext3_xattr_check_names, ext3_xattr_check_block, and ext3_xattr_check_entry functions for checking xattr data structures. * Add the ext3_xattr_find_entry, ext3_xattr_list_entries, and ext3_xattr_set_entry functions for manipulating xattr entries. Switch to using these functions in ext3_xattr_get, ext3_xattr_list, and ext3_xattr_set_handle. * Merge ext3_xattr_set_handle and ext3_xattr_set_handle2. * Rename the HDR and FIRST_ENTRY macros. * We have no way to deal with a ext3_xattr_cache_insert failure, so make it return void. * Make the debug messages more useful. Signed-off-by: Andreas Gruenbacher Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext3/EA: Hide ext3_get_inode_loc in_mem option The in_mem optimization in ext3_get_inode_loc avoids a disk read when only the requested inode in the block group is allocated: In that case ext3_get_inode_loc assumes that it can recreate the inode from the in-memory inode. This is incorrect with in-inode extended attributes, which don't have a shadow copy in memory. Hide the in_mem option and clarify comments; the subsequent ea-in-inode changes the in_mem check as required. Signed-off-by: Andreas Gruenbacher Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext3/EA: In-inode extended attributes for ext3 This started of as a patch by Alex Tomas and got an overhaul by me. The on-disk structure used is the same as in Alex's original patch. Signed-off-by: Andreas Gruenbacher Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ioctl rework #2 - add ->unlocked_ioctl method and a do_ioctl wrapper in ioctl.c so all places calling ->ioctl get it. THis provides us a patch to migrate away from holding bkl across ioctl implementations. - add ->compat_ioctl method and call it in compat_sys_ioctl before doing the hash lookup for registered handlers. - streamline compat_sys_ioctl and move the complex error reporting into a function of its own From: "Michael S. Tsirkin" Handle generic ioctl commands by falling back on static conversion functions in fs/compat_ioctl.c on -ENOIOCTLCMD code. From: "Michael S. Tsirkin" With new unlocked_ioctl and ioctl_compat, ioctls can now be as fast as read/write. So lets use fget_light/fput_light there, to get some speedup in common case on SMP. Signed-off-by: Michael s. Tsirkin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] macros to detect existance of unlocked_ioctl and ioctl_compat To make life bearable for out-of kernel modules, the following patch adds 2 macros so that existance of unlocked_ioctl and ioctl_compat can be easily detected. Signed-off-by: Michael S. Tsirkin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix coredump_wait deadlock with ptracer & tracee on shared mm In the oddball situation where one thread is using ptrace on another thread sharing the same mm, and then someone sharing that mm causes a coredump, there is a deadlock possible if the traced thread is in TASK_TRACED state. It leaves all the threads sharing that mm wedged and permanently unkillable. This patch checks for that situation and brings a thread out of TASK_TRACED if its tracer is part of the same coredump (i.e. shares the same mm). It's not pretty, but it does the job. Signed-off-by: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix race between core dumping and exec with shared mm When threads are sharing mm via CLONE_VM (linuxthreads, vfork), there is a race condition where one thread doing a core dump and synchronizing all mm-sharing threads for it can deadlock waiting for another thread that just did an exec and will never synchronize. This patch makes the exec_mmap check for a pending core dump and punt the exec to synchronize with that, as if the core dump had struck before entering the execve system call at all. Signed-off-by: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix exec deadlock when ptrace used inside the thread group If one thread uses ptrace on another thread in the same thread group, there can be a deadlock when calling exec. The ptrace_stop change ensures that no tracing stop can be entered for a queued signal, or exit tracing, if the tracer is part of the same dying group. The exit_notify change prevents a ptrace zombie from sticking around if its tracer is in the midst of a group exit (which an exec fakes), so these zombies don't hold up de_thread's synchronization. The de_thread change ensures the new thread group leader doesn't wind up ptracing itself, which would produce its own deadlocks. Signed-off-by: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ptrace: unlocked access to last_siginfo (resending) Since Roland changed now to wakeup tracee with kill, I guess this needs to be fixed. http://linus.bkbits.net:8080/linux-2.5/gnupatch@41e3fe5fIRH-W3aDnXZgfQ-qIvuXYg ptrace_setsiginfo/ptrace_getsiginfo need to do locked access to last_siginfo. ptrace_notify()/ptrace_stop() sets the current->last_siginfo and sleeps on schedule(). It can be waked up by kill signal from signal_wake_up before debugger wakes it up. On return from schedule(), the current->last_siginfo is reset. Signed-off-by: Prasanna Meda Acked-by: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] clear false pending signal indication in core dump When kill is used to force a core dump, __group_complete_signal uses the group_stop_count machinery to stop other threads from doing anything more before the signal-taking thread starts the coredump synchronization. This intentionally results in group_stop_count always still being > 0 when the signal-taking thread gets into do_coredump. However, that has the unintended effect that signal_pending can return true when called from the filesystem code while writing the core dump file. For NFS mounts using the "intr" option, this results in NFS operations bailing out before they even try, so core files never get successfully dumped on such a filesystem when the crash was induced by an asynchronous process-wide signal. This patch fixes the problem by clearing group_stop_count after the coredump synchronization is complete. The locking I threw in is not directly related, but always should have been there and may avoid some potential races with kill. Signed-off-by: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: remove IRQ_TYPE_TIME IRQ_TYPE_TIME is unused in the whole kernel, so remove it. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: ignore driver IRQ mask As its just one pin which can be used for IRQs on PCMCIA/CardBus cards, and only the _socket drivers_ care with which IRQ this pin is connected, only the socket drivers (assisted by the PCCARD core) should care about which IRQ to use. Therefore, ignore the information passed to pcmcia_request_irq() in IRQInfo2. In additional patches, all in-kernel users of IRQInfo2 will be removed; users wishing to influence the usage of IRQs can do so by modifying several driver's irq_mask parameter and/or by adding "exclude irq 3" to /etc/pcmcia/config.opts. Note that a new sysfs-based interface to do so will be added in subsequent patches. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: remove irq_mask and irq_list parameters from PCMCIA drivers Remove the now useless irq_mask and irq_list parameters from PCMCIA drivers. Users should use either the socket driver's irq_mask / irq_list parameter or use /sys/class/pcmcia_socket/pcmcia_socket%n/card_irq_mask which will be added in a subsequent patch. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: use irq_mask to mark IRQs as (un)usable Unset bits in the per-socket irq_mask to mark IRQs as unusable, if asked to do so by the user in /etc/pcmcia/config.opts Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: remove racy try_irq() Remove the racy try_irq/check_irq/undo_irq interface, and try to register the correct handler directly in pcmcia_request_irq(). Also, simplify the IRQ usage database, but avoid using the same IRQ twice. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: modify irq_mask via sysfs Allow to modify the per-socket irq_mask via sysfs. Note that you can only clear bits from the mask, but not re-add bits. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: remove #includes in rsrc_mgr which aren't necessary any longer Remove #includes in rsrc_mgr which are no longer needed. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] serial: MPSC driver Patch for the Marvell MultiProtocol Serial Controller (MPSC). This ctlr is on a series of host bridges (and other things) for PPC and MIPS processors. The ctlr operates similar to a typical network controller with send and receive rings. Unfortunately there are many errata so you will see some "unusual" things in the code. For example: a) An erratum prevents the reading of several registers on the ctlr (writing is okay). To work around that, a local copy of what the registers are is kept and special macros are used to access those mirrored values. b) Another erratum says that the MPSC cannot be used to access cache coherent memory (and many of the systems I use are cache coherent). However, it seems to work okay as long as there are no snoop hits so there are macros in the code to manually manage the caches to prevent snoop hits. Each macro checks a flag to see if the manual cache mgmt is necessary as not all versions have the erratum. The driver seems to work well but more testing is needed and it is lacking KGDB support. I will get to both of those in time. Signed-off-by: Mark A. Greer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fbdev: Cleanup broken edid fixup code Check first if EDID block came from a broken display before fixing. Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fbcon: Catch blank events on both device and console level Call fb_blank() instead of info->fbops->fb_blank() to capture events on both device and console level. Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fbcon: Fix compile error Fix missing symbol (fb_con) Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fbdev: Fbmon cleanup While browsing the video/fbcon.c source file (Linux 2.6.10-rc3) I found some possible cleanups. Patch follows, feel free to apply all or parts of it if it looks OK to you. Remove unnecessary bit operations. Signed-off-by: Jean Delvare Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] i810fb: Module param fix Last parameter is file permition in sysfs, not default value. (If 0, file is not accessible trough sysfs, and that's what i did.) Signed-off-by: Domen Puncer Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] atyfb: Fix module parameter descriptions This patch syncs up the module parameter descriptions in aty128fb for module parameters "mode_option" and "nomtrr". Without the patch bad parameter names are used with MODULE_PARM_DESC(). Signed-off-by: Magnus Damm Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] radeonfb: Fix init/exit section usage Fix 3 instances of calling exit section function from text or init: Error: ./drivers/video/aty/radeon_base.o .text refers to 000029e5 R_386_PC32 .exit.text Error: ./drivers/video/aty/radeon_base.o .text refers to 00002a60 R_386_PC32 .exit.text Error: ./drivers/video/aty/radeon_base.o .init.text refers to 00000192 R_386_PC32 .exit.text Signed-off-by: Randy Dunlap Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pxafb: Reorder add_wait_queue() and set_current_state() Reorder set_current_state() and add_wait_queue(). There is a chance that a signal could be missed in between the two functions currently. Signed-off-by: Nishanth Aravamudan Signed-off-by: Domen Puncer Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sa1100fb: Reorder add_wait_queue() and set_current_state() Reorder add_wait_queue() and set_current_state() as a signal could be lost in between the two functions. Signed-off-by: Nishanth Aravamudan Signed-off-by: Domen Puncer Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] backlight: Add Backlight/LCD device basic support From: Andrew Zabolotny Here's a patch that adds basic support for controlling backlight lamps and lcd panels. The drivers can be controlled via sysfs, which makes it easy to use both from scripts and programs. Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fbdev: Add w100 framebuffer driver Add a framebuffer driver for the ATI w100 as found on several Sharp PDAs Signed-off-by: Richard Purdie Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix typo in arch/i386/Kconfig Signed-off-by: Vadim Lobanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] random: whitespace doh Someone actually spotted this already. Signed-off-by: Matt Mackall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] random: entropy debugging improvements Print pool entropy counts in all entropy debugging messages Signed-off-by: Matt Mackall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] random: run-time configurable debugging Add run-time switchable entropy debugging. Entire debug infrastructure remains compiled out by default. Signed-off-by: Matt Mackall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] random: periodicity detection fix The input layer is now sending us a bunch of events in a row for each actual event. This shows up weaknesses in the periodicity detector and using the high clock rate from get_clock: each keystroke is getting accounted as 10 different maximal-entropy events. A brief touch on a trackpad will generate as much as 2000 maximal entropy events which is more than 2k of /dev/random output. IOW, we're WAY overestimating input entropy. Here's one keystroke: random 0024 0000 0000: mouse event random 0035 0000 0000: added 11 entropy credits to input random 0035 0000 0000: mouse event random 0046 0000 0000: added 11 entropy credits to input random 0046 0000 0000: mouse event random 0056 0000 0000: added 10 entropy credits to input random 0056 0000 0000: keyboard event random 0067 0000 0000: added 11 entropy credits to input random 0067 0000 0000: mouse event random 0078 0000 0000: added 11 entropy credits to input random 0078 0000 0000: awake random 0078 0000 0000: reading 128 bits random 0078 0000 0000: going to reseed blocking with 128 bits (128 of 0 requested) random 0078 0000 0000: trying to extract 128 bits from input random 0006 0000 0000: debiting 72 entropy credits from input random 0006 0072 0000: added 72 entropy credits to blocking random 0006 0072 0000: trying to extract 128 bits from blocking random 0006 0000 0000: debiting 72 entropy credits from blocking random 0006 0000 0000: read got 72 bits (56 still needed) random 0006 0000 0000: reading 56 bits random 0006 0000 0000: going to reseed blocking with 64 bits (56 of 0 requested random 0006 0000 0000: trying to extract 64 bits from input random 0006 0000 0000: debiting 0 entropy credits from input random 0006 0000 0000: trying to extract 56 bits from blocking random 0006 0000 0000: debiting 0 entropy credits from blocking random 0006 0000 0000: read got 0 bits (56 still needed) random 0006 0000 0000: sleeping random 0006 0000 0000: mouse event random 0017 0000 0000: added 11 entropy credits to input random 0017 0000 0000: mouse event random 0028 0000 0000: added 11 entropy credits to input random 0028 0000 0000: mouse event random 0038 0000 0000: added 10 entropy credits to input random 0038 0000 0000: keyboard event random 0049 0000 0000: added 11 entropy credits to input random 0049 0000 0000: mouse event random 0060 0000 0000: added 11 entropy credits to input The first step to fixing this is to check periodicity and estimate entropy against a slow clock like jiffies. We continue to mix in get_clock() rather than jiffies where available. This throws away most of the duplicate events and gives us more sensible entropy estimates, but we still duplicates from input.c and keyboard.c. Signed-off-by: Matt Mackall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] random: add_input_randomness The input layer wants to send us an entropy event per input event and who are we to argue? Create add_input_randomness with an input-friendly interface and kill the remaining two keyboard and mouse sources. This eliminates lots of duplicate entropy events while covering all the input bases nicely. We now get two events per keystroke as we should, one down and one up. Signed-off-by: Matt Mackall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] various Kconfig fixes Here are some Kconfig fixes: - typo fixes - unused token removes (empty or duplicated 'help') - non ASCII characters replaces - e-mail address and URL format corrections Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix typo in drivers/char/Kconfig Signed-off-by: Vadim Lobanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Generic IRQ support for PA-RISC Make PA-RISC use the generic interrupt handling code. We need one tiny change to the generic code -- the addition of a data pointer to irq_desc. This shouldn't be a problem in terms of increasing size of irq_desc for other architectures as the struct is cacheline aligned. It's now 32 bytes on 32-bit platforms and 44/48 bytes on 64-bit platforms (assuming spinlock_t is 4 bytes on 32-bit and 4 or 8 bytes on 64-bit). Signed-off-by: Matthew Wilcox Signed-off-by: Linus Torvalds drm: add r300 microcode support and radeon chip flags This patch adds radeon chip families to the pci ids (they aren't used by this patch - future work will), and also adds support for r300 microcode... The r300 project has work for use the CP for 2D operations in Xorg so this is useful even without 3D. Signed-off-by: Dave Airlie drm: move ioctls to shared file and move interface history to correct place This patch moves the ioctls into a file which is shared with the BSD drm, so we don't duplicate them across both trees, it also fixes up the radeon/r128 interface histories so they are with the driver version strings... It also removes the old interface files that no longer needed. From: Eric Anholt and Dave Airlie Signed-off-by: Dave Airlie drm: fix mga ioctls.. The mga cut-n-paste typo... Signed-off-by: Dave Airlie drm: add drm_pci interface and make i915 use it This adds the drm_pci interface, originally designed for mach64 but used by the i915 driver now for doing cross platform. From: Jose Fonseca, Leif Delglass (drm_pci.c) From: Eric Anholt (i915 changes). Signed-off-by: Dave Airlie drm: add drm specific sysfs support Switch the drm from using class simple to its own sysfs interface. From: Jon Smirl Signed-off-by: Dave Airlie [PATCH] PA-RISC Cache flush optimisation Cache flush optimization for UP/SMP; remove hardcoded threshold for selecting whole cache vs region flush From: Randolph Chung Signed-off-by: Matthew Wilcox Signed-off-by: Linus Torvalds [PATCH] PA-RISC: parisc_device diet - Remove parent/child/sibling links from parisc_device in favour of the ones in the embedded struct device. - Display irq and device IDs through sysfs - Translate a PA-RISC firmware path into a struct device (Thibaut Varene) Signed-off-by: Matthew Wilcox Signed-off-by: Linus Torvalds [PATCH] PA-RISC defconfig updates Defconfig updates from Grant Grundler and Paul Bame Signed-off-by: Matthew Wilcox Signed-off-by: Linus Torvalds [PATCH] PA-RISC: Misc Dino fixes - Removes the hardware path from /proc/interrupts for Dino to make it consistant with the rest of /proc/interrupts Signed-off-by: Ryan Bradetich - Remove iomem related warnings from dino.c Signed-off-by: Kyle McMartin - Convert SPIN_LOCK_UNLOCKED to spin_lock_init (Thomas Gleixner) Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Signed-off-by: Matthew Wilcox Signed-off-by: Linus Torvalds [PATCH] PA-RISC: Misc HPUX emulation cleanups - Remove declaration of sys_setpgid - __user annotations - Rewrite hpux_statfs - Add hpux_fstatfs Signed-off-by: Matthew Wilcox Signed-off-by: Linus Torvalds [PATCH] iomap for PA-RISC Implement the iomap interfaces on PA-RISC Signed-off-by: Matthew Wilcox Signed-off-by: Linus Torvalds [PATCH] PA-RISC: More PDC procedures Add PDC Stable Storage wrappers (Thibaut Varene) Rewrite PDC Initiator (Matthew Wilcox) Signed-off-by: Matthew Wilcox Signed-off-by: Linus Torvalds [PATCH] PA-RISC: Remove unused serial definitions Remove some unused definitions Signed-off-by: Matthew Wilcox Signed-off-by: Linus Torvalds [PATCH] PA-RISC: ptrace fix Fix ptrace(SINGLESTEP) through system call Signed-off-by: Randolph Chung Signed-off-by: Matthew Wilcox Signed-off-by: Linus Torvalds [PATCH] PA-RISC: Fix _syscallN wrappers Fix _syscallN wrappers (Mike Frysinger) Signed-off-by: Matthew Wilcox Signed-off-by: Linus Torvalds [PATCH] PA-RISC: Sort out io accessors - sparse annotations for ioremap/iounmap (Randolph Chung) - Turn gsc_readb, __raw_readb and readb functions into static inline functions (Matthew Wilcox) - Document the difference between the gsc_readb, __raw_readb and readb families of functions (Matthew Wilcox) - Add a debugging option to determine when they are being used incorrectly (Matthew Wilcox) - Make memcpy_fromio's second argument const (Matthew Wilcox) Signed-off-by: Matthew Wilcox Signed-off-by: Linus Torvalds [PATCH] PA-RISC: Remove unused file Remove unreferenced file Signed-off-by: Domen Puncer Signed-off-by: Grant Grundler Signed-off-by: Matthew Wilcox Signed-off-by: Linus Torvalds [PATCH] x86_64: fix crash on get_user_pages of ia32 vsyscall page before it's faulted in God invented symbolic names to help you. Repeating magic constants by hand is begging to lose, especially when you get them wrong. Don't be a loser. [ Editor's hint: 0xfffe000 vs 0xffffe000 ] Signed-off-by: Roland McGrath Signed-off-by: Linus Torvalds [PATCH] final csum_and_copy_from_user gcc4 warning fixes The build is clean now. [ARM] Fix profile_pc() for SMP profile_pc() used thread_saved_fp() with the current task. However, thread_saved_fp() only returns sane values when called for threads which are presently sleeping, so this caused an oops. Instead, use regs->ARM_fp, which correspond with the frame pointer. [PATCH] Fix a BKL imbalance in the NFS locking code. Signed-off-by: Trond Myklebust Signed-off-by: Linus Torvalds [PATCH] Fix an Oopsable condition in the NFS locking Signed-off-by: Trond Myklebust Signed-off-by: Linus Torvalds [PATCH] RPCSEC_GSS: Fix a refcount leak RPC: Fix a module refcount leak in RPCSEC_GSS Signed-off-by: Trond Myklebust Signed-off-by: Linus Torvalds [PATCH] RPC: fix crrefresh() operations for AUTH_NULL and AUTH_SYS Signed-off-by: Trond Myklebust Signed-off-by: Linus Torvalds [ARM PATCH] 2407/1: S3C2410 - remove fixed base from IIS registers Patch from Ben Dooks Remove the fixed base address from the IIS registers, and add missing defines for the IISPSR register Signed-off-by: Ben Dooks Signed-off-by: Russell King [ARM PATCH] 2408/1: S3C2410 - dma get position call Patch from Ben Dooks Add call to find out the current source and destination of the given dma channel Signed-off-by: Ben Dooks Signed-off-by: Russell King [ARM PATCH] 2409/2: BAST - nand slot description Patch from Ben Dooks Add platform device data for the NAND slot and chips on the Simtec BAST (EB2410ITX) for the 3 chips and SmartMedia slot. Note, this does not yet support hot-plug for the SmartMedia slot. Signed-off-by: Ben Dooks Signed-off-by: Russell King [ARM PATCH] 2410/1: pxa-regs.h: Complete/fix I2S GPIO modes definitions Patch from Giorgio Padrin Completes/fixes I2S GPIO modes definitions in file pxa-regs.h . Needed by sound drivers using I2S interface; based onofficial microprocessor documentation. Signed-off-by: Giorgio Padrin Signed-off-by: Russell King [PATCH] delete unused file dpt_osdutil.h Signed-off-by: Domen Puncer Signed-off-by: James Bottomley [PATCH] dpt_i2o: remove schedule_timeout() There was a patch to *remove* that line completely issued about a month ago. It is a case of a second schedule_timeout left over from an editing mistake made long ago in a distant galaxy. Signed-off-by: James Bottomley [PATCH] scsi_debug dsense The dsense switch in the scsi_debug driver selects whether fixed (default) or descriptor format sense data is returned when an error/warning occurs. Due to an oversight dsense was not sysfs visible. Signed-off-by: Douglas Gilbert Signed-off-by: James Bottomley [PATCH] Fix reference to deallocated memory in sd.c This patch: http://linux-scsi.bkbits.net:8080/scsi-for-linus-2.6/cset@1.2034.95.5?nav=index.html|src/|src/drivers|src/drivers/scsi|related/drivers/scsi/sd.c is causing almost as much trouble as it fixed. If kref_put() drops the last reference to the scsi_disk (this happens when the device file is closed after the device has been hot-unplugged) then the call to scsi_device_put() will take its argument from an area of memory that has been deallocated. Signed-off-by: Alan Stern Signed-off-by: James Bottomley PCI: move pcie build into the drivers/pci/ subdirectory Signed-off-by: Greg Kroah-Hartman fix use after potential free in scsi_cd_put kref_put could free the cd structure. We need a copy of cd->device to do a scsi_device_put after the kref_put. Signed-off-by: James Bottomley [ARM PATCH] 2405/1: PXA Corgi - Add w100fb device definition Patch from Richard Purdie Add w100fb device definition to enable the framebuffer device on the corgi machines (Sharp SL-C7xx). Signed-off-by: Richard Purdie Signed-off-by: Russell King [ARM PATCH] 2406/1: PXA Corgi - Add MMC Support Patch from Richard Purdie Add MMC support to enable the MMC device on the corgi machines (Sharp SL-C7xx). This is a standard PXA implementation except the interrupt needs to be delayed to see card removals. Applies after 2405/1. Signed-off-by: Richard Purdie Signed-off-by: Russell King [NETLINK]: Orphan SKBs in netlink_trim(). This makes the skb->truesize modifications always OK. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller [PKT_SCHED]: Fix c99ism in cls_api.c Signed-off-by: Thomas Graf Signed-off-by: David S. Miller [IPV6]: Fix EUI64 generation on S/390. - put a dev_id field in struct net_device, so that it uses space that would be wasted by padding otherwise. - if this fields is non-null let ipv6_generate_eui64 use the algorithm from the QETH code to generate an EUI that's different for each OS instance. See code comments for details. Signed-off-by: David S. Miller [SPARC64]: Missing user access return value checks in fs/binfmt_elf.c and fs/compat.c Signed-off-by: David S. Miller [TG3]: Always copy receive packets when 5701 PCIX workaround enabled. Signed-off-by: Arthur Kepner Signed-off-by: David S. Miller [TG3]: Update driver version and reldate. Signed-off-by: David S. Miller [NETFILTER]: Fix overlapping expectations in existing expectation code Change kmem_cache_free() calls in ip_conntrack_expect_related() to ip_conntrack_expect_put(): they should be equivalent but allows a hack in next patch (caller can keep expect). More importantly, a previous expectation should only be refreshed and return EEXIST if it's owned by the same connection (nfsim found this bug). Signed-off-by: Rusty Russell Signed-off-by: David S. Miller [NETFILTER]: Call NAT helper modules directly from conntrack modules, fixup FTP Currently connection tracking and NAT helper modules for a protocol interact only indirectly (the conntrack module places information in the conntrack structure, which the NAT module pulls out). This leads to several issues: 1) Both modules must know what port to watch, and must match. 2) Identifying the particular packet which created the connection is cumbersome (TCP) or impossible (UDP). 3) The connection tracking code sets up an expectation which the NAT code then has to change. 4) The lack of direct symbol dependencies means we have to contrive one, since they are functionally dependent. Here is the current code flow: FTP CONTROL PACKET: NF_IP_PRE_ROUTING: ip_conntrack_in resolve_normal_ct init_conntrack: sets ct->helper to ip_conntrack_ftp.c:help() ct->help(): if PORT/PASV command: Sets exp->help.exp_ftp_info to tcp seq number of data. ip_conntrack_expect(): expects the connection ip_nat_setup_info: sets ct->nat.info->helper to ip_nat_ftp.c:help() ip_nat_fn: proto->exp_matches_pkt: if packet matches expectation ct->nat.info->helper(): If packet going client->server, and packet data is one in ct_ftp_info: ftp_data_fixup(): ip_conntrack_change_expect(): change the expectation Modify packet contents with new address. NF_IP_POST_ROUTING: ip_nat_fn ct->nat.info->helper(): If packet going server->client, and packet data is one in ct_ftp_info: ftp_data_fixup(): ip_conntrack_change_expect(): change the expectation Modify packet contents with new address. FTP DATA (EXPECTED) CONNECTION FIRST PACKET: NF_IP_PRE_ROUTING: ip_conntrack_in resolve_normal_ct init_conntrack: set ct->master. ip_nat_fn: master->nat.info.helper->expect() Set up source NAT mapping to match FTP control connection. NF_IP_PRE_ROUTING: ip_nat_fn: master->nat.info.helper->expect() Set up dest NAT mapping to match FTP control connection. The new flow looks like this: FTP CONTROL PACKET: NF_IP_PRE_ROUTING: ip_conntrack_in resolve_normal_ct init_conntrack: sets ct->helper to ip_conntrack_ftp.c:help() NF_IP_POST_ROUTING: ip_confirm: ct->helper->help: If !ip_nat_ftp_hook: ip_conntrack_expect(). ip_nat_ftp: set exp->oldproto to old port. ip_conntrack_change_expect(): change the expectation set exp->expectfn to ftp_nat_expected. Modify packet contents with new address. FTP DATA (EXPECTED) CONNECTION FIRST PACKET: NF_IP_PRE_ROUTING: ip_conntrack_in resolve_normal_ct init_conntrack: set ct->master. call exp->expectfn (ftp_nat_expected): call ip_nat_follow_master(). The big changes are that the ip_nat_ftp module sets ip_conntrack_ftp's ip_nat_ftp_hook when it initializes, so it calls the NAT code directly when a packet containing the expect information is found by the conntrack helper: and this interface can carry all the information these two want to share. Also, that conntrack helper is called as the packet leaves the box, so there are no issues with expectations being set up before the packet has been filtered. The NAT helper doesn't need to register and duplicate the conntrack ports. The other trick is ip_nat_follow_master(), which does the NAT setup all at once (source and destination NAT as required) such that the expected connection is NATed the same way the master connection was. We also call ip_conntrack_tcp_update() (which I incidentally neatened) after mangling a TCP packet; ip_nat_seq_adjust() does this, but now mangling is done at the last possible moment, after ip_nat_seq_adjust() was already called. Signed-off-by: Rusty Russell Signed-off-by: David S. Miller [NETFILTER]: Fix up IRC, AMANDA, TFTP and SNMP Fixes up the other helpers for direct conntrack->NAT helper calling. SNMP doesn't really need a conntrack helper, but under this new model, the NAT helper will register at that point anyway: NAT helpers themselves are removed. Signed-off-by: Rusty Russell Signed-off-by: David S. Miller [NETFILTER]: Simplify expect handling Now we've changed expect handling, we can simplify it significantly. 1) struct ip_conntrack_expect only exists until the connection matching it is created. Now NAT is done directly at the time the expectation is matched, we don't need to keep this information around. 2) The term 'master' is used everywhere to mean the connection that expected this connection. The 'master' field in the new connection points straight to the master connection, and holds a reference. 3) There is no direct link from the connection to the expectations it has created: we walk the global list to find them if we need to clean them up. Each expectation holds a reference. 4) The ip_conntrack_expect_tuple_lock is now a proper subset of ip_conntrack_lock, so we can eliminate it. 5) Remove flags from helper: the policy of evicting the oldest expectation seems to be appropriate for everyone. 6) ip_conntrack_expect_find_get() and ip_conntrack_expect_put() are no longer required. 7) Remove reference count from expectations, and don't free when we fail ip_conntrack_expect_related(): have user call ip_conntrack_expect_free(). Signed-off-by: Rusty Russell Signed-off-by: David S. Miller [NETFILTER]: Make expectations timeouts compulsory This patch simplifies the code by always having expectation timeouts. Signed-off-by: Rusty Russell Signed-off-by: David S. Miller [NETFILTER]: Remove remaining multirange related code From: KOVACS Krisztian Hi Rusty, Your recent patch which removed the byipsproto hash left some unused code around. The following patch cleans up that. I'm not sure it's correct, but please take a look at it. Signed-off-by: David S. Miller [NETFILTER]: Adrian Bunk's cleanup patches Adrian Bunk's cleanup patch, updated for after all the Rusty patches. The ip_nat_protocol_register/unregister EXPORT_SYMBOLs() stay, as they are used by future patches. Signed-off-by: Adrian Bunk Signed-off-by: Rusty Russell (modified) Signed-off-by: David S. Miller [NETFILTER]: Remove manip array from conntrack entry Original patch and multo bugfixes by Krisztian Kovacs. Now NAT has been simplified, there is only one place to NAT each packet. That means we can intuit what to do by looking at the difference between this packet and the reply we expect, getting rid of the manips[] array in the connection tracking structure, which is 72 bytes. Rework NAT to be based on 'change this packet to make src/dst look like this tuple'. 1) Each protocol's manip_pkt takes a 'struct ip_conntrack_manip', which is half (the source half) of a tuple. Hand the whole desired tuple to the NAT code and have it use the 'maniptype' arg to decide what part to copy. 2) Krisztian points out that we don't need the NAT lock to read the NAT information (or the tuples) as they never change once set, and while being set we have exclusive access. A lock is only needed to deal with only remaining NAT list: the bysource hash. 3) We don't need to rehash for the bysource hash: it depends on the incoming packet, which we can't change. 4) Many NAT functions only need the maniptype they are to perform, not the actual hook, which makes the code clearer. 5) New status bits to indicate what NAT needs to be done. We can always figure it out by inverting the tuple we expect in the other direction and comparing it, but this is faster. 6) Rename 'do_bindings' to 'nat_packet'. 7) ICMP handing is vastly simplified: we unconditionally change to look the way we want. Signed-off-by: Rusty Russell Signed-off-by: David S. Miller [NETFILTER]: Remove ip_conntrack_tuple_hash 'ctrack' pointer We keep a pointer from the hash table entry into the connection tracking entry it's a part of. However, there's a spare byte in the hash entry anyway, which we can use to indicate which of the two tuples it is, and the simply use container_of() to access the conntrack. This saves two pointers per connection tracking entry. Signed-off-by: Rusty Russell Signed-off-by: David S. Miller [NETFILTER]: Use a bit in conntrack status to indicate sequence number adjustment Rather than calling the sequence adjustment code on every connection which has a helper, we can set a status bit on the conntrack when we change the length of a TCP packet, and use that to indicate that we should call the routine. Signed-off-by: Rusty Russell Signed-off-by: David S. Miller [NETFILTER]: Get rid of 'initialized' in nat structure: use conntrack status bits Fairly simple patch to move the 'initialized' NAT bitfield to bits in the 'status' word. This saves the size of a pointer from the connection tracking structure. Signed-off-by: Rusty Russell Signed-off-by: David S. Miller [NETFILTER]: Don't cacheline align slab allocs Anton points out that cacheline aligning conntrack entries is a wank. He's right: there's lots of them, and they're currently ~200 bytes. Same with the cargo-cult programming in ipt_hashlimit. Signed-off-by: Rusty Russell Signed-off-by: David S. Miller [NET]: net/802/: some cleanups This patch contains the following cleanups: - make some needlessly global code static - net/802/hippi.c: remove the unused global function hippi_net_init - net/8021q/vlan.c: remove the global variable vlan_default_dev_flags that was never changed Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [TCP]: Remove tcp_pcount_t IMHO the TSO stuff has mostly settled down now. As a result tcp_pcount_t is now more of a liability in that it reduces the readability of the code. So here is a patch to remove it. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller [NET]: Use unlocked_ioctl for sock_ioctl. Signed-off-by: Andi Kleen Signed-off-by: David S. Miller [NETFILTER]: Fix build by putting back ip_nat_lock extern in ip_nat.h Signed-off-by: David S. Miller [NETFILTER]: Remove no longer needed symbol exports. Rusty removed ip_nat_helper_{register,unregister} and {__,}ip_nat_find_helper but left the symbol exports in by mistake. Signed-off-by: David S. Miller [IPX] use a private slab cache for socks Renaming ipx_opt to ipx_sock, tested with mars-nwe/ncpmount. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller [ARM] Add CPU number to cache information lines. [ARM PATCH] 2412/1: Fix IXP2000 gettimeofday() implementation (again) Patch from Deepak Saxena Previous fixed showed negative time flow every few hours during extensive testing. This new version is much simpler and has been tested w/o any failures. Signed-off-by: Deepak Saxena Signed-off-by: Russell King [ARM PATCH] 2413/1: VR1000 - add serial ports to vr1000-map.h Patch from Ben Dooks Add definition of the extra serial port area to the file include/asm-arm/arch-s3c2410/vr1000-map.h Signed-off-by: Ben Dooks Signed-off-by: Russell King [ARM PATCH] 2414/1: VR1000 - add serial platform device Patch from Ben Dooks Serial platfrom device to add ttyS0..ttyS4 to the system. Signed-off-by: Ben Dooks Signed-off-by: Russell King [ARM PATCH] 2415/1: VR1000 - add platform device for flash Patch from Ben Dooks Add platform device for the onboard site for NOR flash, similar to the Simtec BAST (EB2410ITX) Signed-off-by: Ben Dooks Signed-off-by: Russell King [ARM PATCH] 2416/1: S3C2410 - default configuration update Patch from Ben Dooks Update default configuraiton, configure support for the common flash chips seen on 2410 board. Signed-off-by: Ben Dooks Signed-off-by: Russell King [ARM PATCH] 2417/1: update collie to use scoop driver Patch from John Lenz Update collie machine to use the new scoop driver written by Richard Purdie. Signed-off-by: John Lenz Signed-off-by: Russell King Add attribute container to generic device model Attribute containers allows a single device to belong to an arbitrary number of classes, each with an arbitrary number of attributes. This will be used as the basis for a generic transport class Signed-off-by: Greg Kroah-Hartman Signed-off-by: James Bottomley add a generic device transport class Transport classes are a mechanism for providing transport specific services to drivers that the more generic command processing layers don't care about. A good example is the SCSI mid-layer not caring about parallel transfer characteristics or providing services for domain validation. Transport classes usually provide a transport specific API at one end and a class interface at the other (for the user to interrogate and set parameters). Originally, transport classes were SCSI specific. However, this code is generic to the device model. As long as you have a generic device representing a storage interface (or device) then you can attach a transport class to it. The new code also allows an arbitrary number of transport classes to be attached to a device, unlike SCSI which only allowed one. This is going to be important for things like SATA and SAS which share the PHY layer (and hence should be capable of sharing a PHY transport class). The generic transport class is designed to operate identically to the current SCSI transport classes, except that it uses generic devices rather than SCSI devices. We have five events: setup add ----- configure ----- remove destroy With callbacks for setup configure and remove. There's also an anonymous transport class which can only respond to configure events (and which has no attributes). Signed-off-by: Greg Kroah-Hartman Signed-off-by: James Bottomley move the SCSI transport classes over to the generic transport class This converts the three transport classes (SPI, FC and iSCSI) over to the generic transport class code. It also converts the internals of the SCSI mid-layer to use generic transport class trigger points and pulls out some of the duplicated code. Signed-off-by: James Bottomley [XFRM]: Unexport xfrm_policy_delete Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [TCP]: Do not try to collapse multi-packet SKBs. Signed-off-by: David S. Miller [NETFILTER]: Fix SNMP nat build. 1) move ip_nat_protocol_register/unregister since lock is now static. 2) fix ip_nat_snmp_basic: may not work, but now compiles. Signed-off-by: David S. Miller [IPV6]: Ensure to learn link-layer address from RA. Signed-off-by: Hideaki YOSHIFUJI Signed-off-by: David S. Miller [IPV6]: IPoIB link addr option needs two byte pad. Anand Parthasarathy pointed out that draft-ietf-ipoib-ip-over-infiniband-09.txt says: [DISC] specifies the length of source/target option in number of 8-octets as indicated by a length of '3' above. Since the IPoIB link-layer address is only 20-octet long, two octets of zero MUST be prepended to fill the total option length of 24 octets. The current Linux neighbour discovery code puts the padding after the link address. This patch fixes up ndisc.c to put the padding in the correct place by adding a general ndisc_addr_option_pad() function (which could be used in the future if someone ever implements RFC 3831 IPv6-over-FC or some other encapsulation that requires padding). Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [ATM]: [drivers] pci_enable_device() before finding irq Signed-off-by: Chas Williams Signed-off-by: David S. Miller [ATM]: [lec] rewrite to eliminate lec_arp_users in favor of lec_arp_lock Signed-off-by: Chas Williams Signed-off-by: David S. Miller [ATM]: [he] remove dead code and unneeded zero initializers Signed-off-by: Marcel Sebek Signed-off-by: Domen Puncer Signed-off-by: Chas Williams Signed-off-by: David S. Miller [ATM]: change atm address functions to use list_add Signed-off-by: Chas Williams Signed-off-by: David S. Miller [ATM]: avoid race between svc_disconnect and sigd exiting Signed-off-by: Chas Williams Signed-off-by: David S. Miller [ATM]: [ambassador] use msleep() instead of schedule_timeout() Signed-off-by: Nishanth Aravamudan Signed-off-by: Domen Puncer Signed-off-by: Chas Williams Signed-off-by: David S. Miller [ATM]: [idt77252] vfree() checking cleanups Signed-off by: James Lamanna Signed-off-by: Domen Puncer Signed-off-by: Chas Williams Signed-off-by: David S. Miller [IA64] contig.c save physical address of MCA save area Ashok Raj uncovered a problem while testing the MCA code on a tiger box with contig memory. The virtual address was getting saved instead of the physical address of the MCA save area. This patch fixes that problem. Signed-off-by: Russ Anderson Signed-off-by: Tony Luck [PKT_SCHED]: cls_rsvp: fix tcf_exts fallout The continue is supposed to continue the outer loop, not break out of the do { } while (0) loop. cls_route.c is also changed in a similar way for clarity, although it behaved correctly. Signed-off-by: Patrick McHardy [PKT_SCHED]: cls_api.c: fix module reference leak on module load Signed-off-by: Patrick McHardy [PKT_SCHED]: cls_route: fix tcf_exts fallout handle is computed wrong, this makes creating a filter not using "from" fail. Signed-off-by: Patrick McHardy [PKT_SCHED]: fix CONFIG_NET_CLS_ACT skb leaks in HFSC/CBQ Both HFSC and CBQ leak unclassified skbs with CONFIG_NET_CLS_ACT. Move freeing to enqueue where it belongs. Same change for in HTB/prio, they just don't leak because they don't have unclassified packets. Signed-off-by: Patrick McHardy [XFS] Fix mapping gfp_flags used on metadata buffer inode. SGI-PV: 914873 SGI-Modid: xfs-linux-melb:xfs-kern:21209a Signed-off-by: Nathan Scott [XFS] Fix preempt-related warnings - based on a Chris Wedgwood patch. SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:21210a Signed-off-by: Nathan Scott [PATCH] sg descriptor sense cleanup lk 2.6.11-rc1-bk1 - expand sense data handling to descriptor format - make module parameters visible in /sys/modules/sg/parameters - add "readable" SCSI commands: READ(16), REPORT LUNS, SERVICE_ACTION_IN, RECEIVE_DIAGNOSTIC, READ_LONG and MAINTENANCE_IN_CMD to list Signed-off-by: Douglas Gilbert Signed-off-by: James Bottomley [PATCH] SCSI NCR53C9x.c: some cleanups - Make esp_bootup_reset() global again, since the Amiga Oktagon SCSI driver needs it, and move its prototype from oktagon_esp.c to NCR53C9x.h - Make esp_cmd() static in the debug case. It's already a local macro in the non-debug case. Signed-off-by: Geert Uytterhoeven Signed-off-by: James Bottomley Fix x87 fnsave Tag Word emulation when using FXSR (SSE) From: Roland McGrath The fxsave instruction does not save the x87 tag word (only the empty bits), and we re-created the old-style x87 tags incorrectly. The registers are saved in "stack order" in the save area, but the tag word bits are in "hardware order", and we need to get the right register state. Both x86 and x86-64 needed this fix. Signed-off-by: Roland McGrath Signed-off-by: Linus Torvalds [PATCH] sense data helpers lk 2.6.11-rc1-bk1 - add sense data helper functions: - scsi_sense_desc_find() to find a given sense descriptor (e.g. type 0 -> information) - scsi_get_sense_info_fld() to get the information field from fixed or descriptor sense data Kai Makisara proposed the "find" function. For example, it will help the st driver find the Filemark, EOM and ILI flags which have been placed in the "stream commands" sense data descriptor. Signed-off-by: Douglas Gilbert Signed-off-by: James Bottomley [PATCH] Add compat_ioctl to scsi host structure Add compat_ioctl vector to scsi_host. Signed-off-by: Andi Kleen Signed-off-by: James Bottomley [ARM] Clean up lookup of processor and machine types. Rather than having an assembly and C version performing the same lookup, re-use the assembly version with a C wrapper around it. This removes the duplication. Signed-off-by: Russell King [ARM] Remove "ipimask" from do_IPI() We don't practically use ipimask for anything anymore; remove it. [IPV6]: kill needless initialization and comparison in icmp.c I believe that compilers are clever enough, but anyway... Signed-off-by: Hideaki YOSHIFUJI Signed-off-by: David S. Miller [NETLINK]: Unshare SKB, as necessary, in netlink_trim() Signed-off-by: Herbert Xu Signed-off-by: David S. Miller [IA64] two trivial build fixes for generic uniprocessor Patches supplied by Dann Frazier. Signed-off-by: Tony Luck [AGPGART] i915GM support From: Alan Hourihane Signed-off-by: Dave Jones [AGPGART] remove leftovers of the inter_module_* drm <-> agp interface From: Christoph Hellwig Signed-off-by: Dave Jones [AGPGART] fix pci_get_device conversion in intel-agp - any device teardown must happen between agp_remove_bridge and agp_put_bridge, before agp_remove_bridge users can still call into the code - it's releasing a reference to the wrong device Original patch from: Christoph Hellwig Further munging from Roland Dreier and myself. Signed-off-by: Dave Jones [AGPGART] Fix CONFIG_AGP dependancies From: Christoph Hellwig Signed-off-by: Dave Jones scsi_ioctl: only warn about unknown opcodes if they are truly unknown. We could screw up and warn for opcodes that weren't write-safe and the user tried to use without having write permissions. Not so bad in itself, but that also destroyed the cmd type information. Noticed by Michal Schmidt [PATCH] ALPS touchpad detection fix My ALPS touchpad is not recognized because the device gets confused by the Kensington ThinkingMouse probe. It responds with "00 00 14" instead of the expected "00 00 64" to the "E6 report". Resetting the device before attempting the ALPS probe fixes the problem. Signed-off-by: Peter Osterlund Signed-off-by: Linus Torvalds Revert "Don't busy-lock-loop in preemptable spinlocks" patch The locking tests were wrong, and the fixes are up in the air. In the meantime, the get-it-working patch is to just not do this. Cset exclude: mingo@elte.hu[torvalds]|ChangeSet|20050115174045|30241 Remove old debugging tests. They had their time and place, but right now they are using infrastructure that is getting re-done, and we're better off just dropping them. [ARM PATCH] 2421/1: bitops.h missing `const` from find calls Patch from Ben Dooks _find_first_zero_bit_le and _find_next_zero_bit_le are missing the const from their pointer arguments, causing the following warnings: In file included from mm/page_alloc.c:34: include/linux/nodemask.h: In function `__first_unset_node': include/linux/nodemask.h:246: warning: passing arg 1 of `_find_first_zero_bit_le' discards qualifiers from pointer target type Signed-off-by: Ben Dooks Signed-off-by: Russell King Remove broken-as-designed "rwlock_is_locked()" macro rwlocks can't be "locked". They can be "locked for read", or "locked for write", but not both. The confusion this caused is evident in the long discussion about this on linux-kernel ;) [ARM PATCH] 2422/1: VR1000 - use UPF_IOREMAP for serial ports Patch from Ben Dooks Remove static mapping for serial ports and change to using UPF_IOREMAP to allow the serial driver to automatically ioremap() the ports for us. Signed-off-by: Ben Dooks Signed-off-by: Russell King Revert "x86_64/i386: increase command line size" patch It's a bootup dependancy, you can't just increase it randomly, and it breaks booting with LILO. Pointed out by Janos Farkas and Adrian Bunk. Cset exclude: ak@suse.de[torvalds]|ChangeSet|20050115232300|01174 [PATCH] minor spinlock cleanups cleanup: remove stale semicolon from linux/spinlock.h and stale space from asm-i386/spinlock.h. Ingo Signed-off-by: Ingo Molnar Signed-off-by: Linus Torvalds [PATCH] x86 rwlock *_can_lock() primitives This introduces the following 3 new locking primitives: spin_can_lock(lock) read_can_lock(lock) write_can_lock(lock) which are a nonintrusive test to check whether the real (intrusive) trylock op would succeed or not. Semantics and naming is completely symmetric to the trylock counterpart. Architectures that want to support PREEMPT will need to add these definitions. Signed-off-by: Ingo Molnar Signed-off-by: Linus Torvalds ppc64: rwlock *_can_lock() primitives ia64: rwlock *_can_lock() primitives Trivial but untested (but also currently unused - wait for BKL PREEMPT to start using them soon). x86-64: rwlock *_can_lock() primitives [PATCH] rename 'lock' to 'slock' in asm-i386/spinlock.h This renames the x86 implementation of the spinlock_t's 'lock' field to 'slock', to protect against spinlock_t/rwlock_t type mismatches. This way, if you use a spinlock where a rwlock is expected (or vice versa), you'll get an obvious compile failure. build- and boot-tested on x86 SMP+PREEMPT and SMP+!PREEMPT. Signed-off-by: Ingo Molnar Signed-off-by: Linus Torvalds Cset exclude: davem@nuts.davemloft.net|ChangeSet|20050120063740|10274 [PATCH] nonintrusive spin-polling loop in kernel/spinlock.c This re-implements the nonintrusive spin-polling loop for the SMP+PREEMPT spinlock/rwlock variants, using the new *_can_lock() primitives. (The patch also adds *_can_lock() to the UP branch of spinlock.h, for completeness.) build- and boot-tested on x86 SMP+PREEMPT and SMP+!PREEMPT. Signed-off-by: Ingo Molnar Signed-off-by: Linus Torvalds [TG3]: add tg3_set_eeprom() - Add nvram size detection - Add appropriate byte swapping to tg3_get_eeprom so that the same byte stream is read in all systems - Fix tg3_get_eeprom to read both eeprom and flash - Add tg3_set_eeprom to write eeprom and flash - Change tg3_nvram_init to detect all supported nvram devices - Change tg3_nvram_read to properly detect Atmel flash that requires address translation - Increase nvram polling delay to account for slower eeprom devices - Remove some of the flushing read that is not required for the production 5750 devices Signed-off-by: Michael Chan Signed-off-by: David S. Miller [CPUFREQ] Fix typo in powernow-k7 voltage table. From: Hendrik Muhs Signed-off-by: Dave Jones [ACPI] Make the bm_activity depend on "jiffies", instead of numbers of the check being called. This means bus mastering activity is assumed if bm_check isn't called; and multiple calls during one jiffy will be |='ed. Signed-off-by: Dominik Brodowski Signed-off-by: Len Brown [AGPGART] Fix silly typo in the i915GM support patch. Spotted by Marco Cipullo Signed-off-by: Dave Jones [ACPI] Add a module parameter to allow tuning how much bus-master activity we remember when entering C3 -- /sys/module/processor/parameters/bm_history Default varies with HZ -- 40ms for 25 - 800 HZ, 32ms for 1000 HZ. Signed-off-by: Len Brown [ACPI] ACPICA 20050114 from Bob Moore Added 2005 copyright to all ACPICA files. Fixed an issue with the String-to-Buffer conversion code where the string null terminator was not included in the buffer after conversion, but there is existing ASL that assumes the string null terminator is included. This is the root of the ACPI_AML_BUFFER_LIMIT regression. This problem was introduced in the previous version when the code was updated to correctly set the converted buffer size as per the ACPI specification. The ACPI spec is ambiguous and will be updated to specify that the null terminator must be included in the converted buffer. This also affects the ToBuffer() ASL operator. Fixed a problem with the Mid() ASL/AML operator where it did not work correctly on Buffer objects. Newly created sub-buffers were not being marked as initialized. Fixed a problem in acpi_tb_find_table where incorrect string compares were performed on the oem_id and oem_table_d table header fields. These fields are not null terminated, so strncmp is now used instead of strcmp. Implemented a restriction on the Store() ASL/AML operator to align the behavior with the ACPI specification. Previously, any object could be used as the source operand. Now, the only objects that may be used are Integers, Buffers, Strings, Packages, Object References, and DDB Handles. As acpi_gbl_enable_interpreter_slack is FALSE by default, "acpi=strict" is needed to enable this check. Enhanced the optional "implicit return" support to allow an implicit return value from methods that are invoked externally via the AcpiEvaluateObject interface. This enables implicit returns from the _STA and _INI methods, for example. Changed the Revision() ASL/AML operator to return the current version of the AML interpreter, in the YYYYMMDD format. Previously, it incorrectly returned the supported ACPI version (This is the function of the _REV method). Updated the _REV predefined method to return the currently supported version of ACPI, now 3. [MMC] wbsd update Patch from Pierre Ossman This patch includes the latest changes to the wbsd driver. * Proper usage of kunmap. * Comment about hw bugs. * Waits for data transfers to finish properly. * Added module version info. * FIFO bug fix for small reads. * Optimised FIFO loop. * DMA demand mode. * IRQ race condition when sending commands fixed. [PATCH] acpi build fix drivers/acpi/debug.c:22: parse error before string constant drivers/acpi/debug.c:22: warning: type defaults to `int' in declaration of `__MODULE_INFO' drivers/acpi/debug.c:22: warning: function declaration isn't a prototype drivers/acpi/debug.c:22: warning: data definition has no type or storage class drivers/acpi/debug.c:23: parse error before string constant drivers/acpi/debug.c:23: warning: type defaults to `int' in declaration of `__MODULE_INFO' drivers/acpi/debug.c:23: warning: function declaration isn't a prototype drivers/acpi/debug.c:23: warning: data definition has no type or storage class Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips default mlock limit fix Mips RLIMIT_MEMLOCK incorrectly defaults to unlimited, it was confused with RLIMIT_NPROC. Found while consolidating resource.h headers. Signed-off-by: Chris Wright Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] shared_policy_replace() fix It appears that this statement got lost during patch merging. We don't want to free the node which we just added. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] generic_file_buffered_write: handle partial DIO writes with multiple iovecs This is a patch to generic_file_buffered_write() to correctly handle partial O_DIRECT writes (because of unallocated blocks) when there is more than 1 iovec. Without this patch, the code is writing the wrong iovec (it writes the first iovec a 2nd time). Included is a test program dio_bug.c that shows the problem by: writing 4k to offset 4k writing 4k to offset 12k writing 8k to offset 4k The result is that 8k write writes the 1st 4k of the buffer twice. $ rm f; ./dio_bug f wrong value offset 8k expected 0x33 got 0x11 wrong value offset 10k expected 0x44 got 0x22 with patch $ rm f; ./dio_bug f #define _GNU_SOURCE #include #include #include #include #include main(int argc, char **argv) { int fd; char *buf; int i; struct iovec v[2]; fd = open(argv[1], O_DIRECT|O_RDWR|O_CREAT, 0666); if (fd < 0) { perror("open"); exit(1); } buf = valloc(8192); lseek(fd, 0x1000, SEEK_SET); memset(buf, 0x11, 2048); memset(buf+2048, 0x22, 2048); i = write(fd, buf, 4096); /* 4k write of 0x11 and 0x22 at 4k */ lseek(fd, 0x3000, SEEK_SET); memset(buf, 0x55, 2048); memset(buf+2048, 0x66, 2048); i = write(fd, buf, 4096); /* 4k write of 0x55 and 0x66 at 12k */ lseek(fd, 0x1000, SEEK_SET); i = read(fd, buf, 4096); memset(buf+4096, 0x33 , 2048); memset(buf+4096+2048, 0x44 , 2048); v[0].iov_base = buf; v[0].iov_len = 4096; v[1].iov_base = buf + 4096; v[1].iov_len = 4096; lseek(fd, 0x1000, SEEK_SET); i = writev(fd, v, 2); /* 8k write of 0x11, 0x22, 0x33, 0x44 at 4k */ lseek(fd, 0x2000, SEEK_SET); i = read(fd, buf, 4096); if (buf[0] != 0x33) printf("wrong value offset 8k expected 0x33 got 0x%x\n", buf[0]); if (buf[2048] != 0x44) printf("wrong value offset 10k expected 0x44 got 0x%x\n", buf[2048]); } Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: Fix pmac kernel build with oprofile The recent oprofile changes for Motorola e500 broke oprofile for other CPUs. This patch fixes the build. Proper support for the G3/G4 PMCs would be interesting, and making sure the basic interrupt PC sampling still works on CPUs that don't have supported PMCs too... Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ioctl compatibility for TIOCMIWAIT and TIOCGICOUNT This patch lets us use TIOCMIWAIT and TIOCGICOUNT from a 32-bit process on a 64-bit processor. TIOCMIWAIT uses the argument as a bitmap of things to wait for. The argument for TIOCGICOUNT points to a struct serial_icounter_struct, which only contains ints and arrays of int. Signed-off-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uninline mod_page_state(offset, delta) Introduces a __mod_page_state(offset, delta) function and converts mod_page_state() to use it. Unexports and staticizes page_states per cpu variable. text data bss dec hex filename 1818704 615884 0 2434588 25261c vmlinux-old 1817632 615884 0 2433516 2521ec vmlinux-new 1072 bytes. (Adds 64 bytes without CONFIG_SMP). Signed-off-by: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix audit control message checks The audit control messages are sent over netlink. Permission checks are done on the process receiving the message, which may not be the same as the process sending the message. This patch switches the netlink_send security hooks to calculate the effective capabilities based on the sender. Then audit_receive_msg performs capability checks based on that. It also introduces the CAP_AUDIT_WRITE and CAP_AUDIT_CONTROL capabilities, and replaces the previous CAP_SYS_ADMIN checks in audit code with the appropriate checks. - Simplified dummy_netlink_send given that dummy now keeps track of capabilities. - Many fixes based on feedback from list. - Removed the netlink_msg_type helper function. - Switch to using CAP_AUDIT_WRITE and CAP_AUDIT_CONTROL. Signed-off-by: Serge Hallyn Signed-off-by: Stephen Smalley Signed-off-by: Chris Wright Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] SELinux: add Netlink message types for the TC action code. This patch adds Netlink message types related to the TC action code, allowing finer grained SELinux control of this. Author: jamal Signed-off-by: James Morris Signed-off-by: Stephen Smalley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: update cpu state save/restore This patch updates the ppc32 cpu state save/restore code to deal with the Motorola/Freescale MPC7447A, used, among others, on recent Apple laptops. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: Add missing prototype This patch fixes a warning by adding a missing function prototype for enable_kernel_altivec(). Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: System platform_device description, discovery and management On most embedded PPC systems we either have a core CPU and chipset (MPC10x, TSI10x, Marvell, etc.) or a system-on-chip device (4xx, 8xx, 82xx, 85xx, etc.). Some of these sub-archs have been using the On Chip Peripheral (OCP) driver model. The functionality that OCP provide has been replaced by the generic driver model and platform_device. Also, some of these device may exist across a number of architectures (PPC, MIPS, ARM) such that some information that is shared between the architecture and driver needs to exist outside of either. The ppc_sys changes add a standard way for PowerPC systems to describe the devices and systems that exist in the sub-arch. Additionally, we are able to discover which system we are and manage which devices are actually registered and any platform specific fixups that may be needed. Signed-off-by: Kumar Gala Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: Infrastructure changes to MPC85xx sub-arch from OCP to platform_device - Described all devices available on current MPC85xx CPUs (mem & irq) - Added cpu descriptions for the MPC8540, MPC8541, MPC8541, MPC8555, MPC8555E, and MPC8560. * Removed OCP usage from MPC85xx sub-arch Signed-off-by: Kumar Gala Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: convert boards from using OCP to platform_device Convert MPC8540 ADS, MPC8560 ADS, MPC8555 CDS and SBC8560 reference boards from using OCP to platform_device. Signed-off-by: Kumar Gala Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: Convert gianfar ethernet driver from using an OCP to platform_device Convert gianfar ethernet driver from using an OCP to platform_device. Signed-off-by: Kumar Gala Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: remove cli()/sti() in arch/ppc/4xx_io/serial_sicc.c Replace save_flags()/restore_flags() with spin_lock_irqsave()/spin_unlock_irqrestore() and document reasons for using spinlocks. Signed-off-by: James Nelson Signed-off-by: Tom Rini Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: remove cli()/sti() in arch/ppc/8xx_io/cs4218_tdm.c Replace save_flags()/resore_flags() with spin_lock_irqsave()/spin_unlock_irqrestore() and document reasons for locking. Signed-off-by: James Nelson Signed-off-by: Tom Rini Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: remove cli()/sti() in arch/ppc/8xx_io/fec.c Replace save_flags()/resore_flags() with spin_lock_irqsave()/spin_unlock_irqrestore() and document reasons for locking. Signed-off-by: James Nelson Signed-off-by: Tom Rini Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: remove cli()/sti() in arch/ppc/platforms/apus_setup.c Replace cli() function call with local_irq_disable() in restart code on APUS. Signed-off-by: James Nelson Signed-off-by: Tom Rini Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: remove cli()/sti() in arch/ppc/platforms/pal4_setup.c Replace cli() function calls with local_irq_disable() in shutdown / restart code for pal4. Signed-off-by: James Nelson Signed-off-by: Tom Rini Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: remove cli()/sti() in arch/ppc/syslib/m8xx_setup.c Replace cli() function call with local_irq_disable() in shutdown code for MPC8xx platforms. Signed-off-by: James Nelson Signed-off-by: Tom Rini Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: remove cli()/sti() in arch/ppc/syslib/qspan_pci.c Replace save_flags()/resore_flags() with spin_lock_irqsave() / spin_unlock_irqrestore() and document reasons for locking in the Qspan PCI code. Signed-off-by: James Nelson Signed-off-by: Tom Rini Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: MPC8xx TLB Miss vs TLB Error fix There is a problem in the TLB Miss (and Error, as they jump to the Miss handler) handlers. The problem is that when an app spans more than one L1 entry, we don't have all of the correct information, and do_page_fault() things a protection fault happened, when it didn't really. The fix for this is to modify the handlers slightly to force a TLB Error in this case. Lots of suggestions from: Joakim Tjernlund Signed-off-by: Tom Rini Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: update_process_times simplification When the update_process_times call was moved out of do_timer for the UP case, the replicator didn't track down the hiding and just added ifndef SMP. This removes the ifdefs and the indirection of calling another file for one function in a third file. I also removed the per-cpu multipler and counter. On some architectures (x86 and sparc64) these are set via /proc/profile setup_profiling_timer to increase the timer interrupt by a factor over HZ. However, this was not not implemented for ppc (like several other architectures), so it was just decrementing, testing, and setting per-cpu variables back to 1. Signed-off-by: Milton Miller Signed-off-by: Tom Rini Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: Remove CONFIG_IRQ_ALL_CPUS Replace CONFIG_IRQ_ALL_CPUS with a boot option (noirqdistrib). Compile options arent much use on a distro kernel. This also removes the ppc64 use of smp_threads_ready. I considered removing the option completely but we have had problems in the past with firmware bugs. In those cases the boot option would have helped. Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: PCI EEH documentation This describes the PCI bus EEH "Extended Error Handling" concepts and operation. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64/ppc: Cleanup PCI skipping The g5 code has special hooks to "hide" some PCI devices when they are off. Currently, this code involves some calls to match a pci_dev from the open firmware node and such things that are causing some problems with the latest version of my sungem driver who wants to do some of this in atomic contexts. This patch moves that to a list of struct device_node instead, which also ends up simplifying the code. Later, I'll go back to manipulating PCI devices in a clean way when Brian King's PCI blocking patch gets in, but only after I change sungem again to never call these in atomic context. This is a 3 step transition basically Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: Minimum hashtable size We werent enforcing the minimum hardware MMU hashtable size. Signed-off-by: Milton Miller Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: remove some unused iSeries functions This patch removes some unused stuff from PPC64 iSeries: - asm-ppc64/iSeries/iSeries_VpdInfo.h - iSeries_GetLocationData() - LocationData structure - device_Location() Signed-off-by: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix xenU kernel crash in dmi_iterate In unprivileged Xen domains, all that __ioremap() does is a "return NULL", which causes dmi_iterate() to crash the kernel at boot time. This trivial check bails dmi_iterate() out of the loop when it finds that the ioremap() returned a NULL pointer. (akpm: this fix goes beyond xen - ioremap can return NULL) Signed-off-by: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86: use cpumask_t instead of unsigned long Current code can lead to corruption. Use cpumask_t instead of unsigned long. Signed-off-by: Suresh Siddha Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] i386: init_intel_cacheinfo() can be __init Correct .text references to .init.data; init_intel_cacheinfo() can be __init. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] arch/i386/kernel/signal.c: fix err test twice Hi, the following patch: - correct the err variable tested twice when _NSIG_WORDS == 1 (unlikely to happen, but ..) - remove some |= in favor of = because we don't need to 'pack' err Signed-off-by: Vincent Hanquez Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix num_online_nodes() warning on NUMA-Q More missing nodemask.h inclusions. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Fix CMP with interleaving Check if node exists during CMP setup and fall back to other node if needed. This avoids a crash when the NUMA node discovery fails (e.g. due to node interleaving in the BIOS or numa=off) Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: fix flush race on context switch Fix a long standing race in x86-64 SMP TLB handling. When a mm is freed and another thread exits to a lazy TLB thread (like idle) the freed user page tables would be still kept loaded in the idle thread. When an interrupt does a prefetch on NULL the CPU would try to follow it and read random data. This could lead to machine checks on Opterons in some cases. Credit goes to some unnamed debugging wizards at AMD who described the problem. All blame to me. I did the fix based on their description. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] i386/x86-64: Fix SMP NMI watchdog race Fix SMP race in NMI watchdog on i386/x86-64 Fix a long standing SMP Setup race in the NMI watchdog. The watchdog would tick from very early and check if all CPUs increase their timer interrupts. For that it would check the cpu_online_map. Now if a CPU took too long to boot the watchdog would trigger prematurely because the CPU didn't increase its timer count yet. Fix is to check cpu_callin_map instead of cpu_online_map because the first is only set when a CPU started its timer interrupt. I fixed it on i386 and x86-64. Description of the problem from Manpreet Singh. Thanks. Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86-64: Fix pud typo in ioremap With Martin Schwidefsky Fix typo in ioremap pud conversion Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86-64: Fix do_suspend_lowlevel do_suspend_lowlevel doesn't have an argument anymore, but the assembly code would still test it and fail randomly. Remove the bogus test. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86-64: Clean up cpuid level detection Small cleanup: save the CPUID level once instead of regetting it all the time. Needed for some other patches. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] kprobes: x86_64 memory allocation changes Minor changes to the kprobes code to provide memory allocation for x86_64 architecture outside kprobes spin lock. Signed-off-by: Prasanna S Panchamukhi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] H8/300 defconfig update Signed-off-by: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] H8/300 mm update o include/asm-h8300/mmu.h: Changeset 1.2053 support o mm/nommu.c: add __vm_enough_memory Signed-off-by: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] swsusp: remove O(n^2) algorithm in page relocation This removes another O(n^2) algorithm from page relocation in swsusp. Relocation took as long as reading pages from disk on my machine, and it took minutes for some poor testers. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] driver model: pass pm_message_t down to pci drivers This passes pm_message_t down to PCI drivers. Ugly translation code can be removed and this will allow PCI devices to do right thing during swsusp snapshot -- like not unneccessarily blanking display. Only obscure /sysfs code passes anything but 3 to pci_device_suspend, anyway, so this is pretty close to a nop. Signed-off-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: provide an arch-specific define for register file size Replace FRAME_SIZE_OFFSET with MAX_REG_OFFSET because different arches have Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: provide some initcall definitions for userspace code Provide definitions of __initcall, __exitcall, and __init_call for userspace code. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: allow ubd devices to provide partial end blocks If the file backing a ubd device is not an even blocklength, then the last partial block is now readable, and it is padded with zeros. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: change for_each_cpu to for_each_online_cpu Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: eliminate unhandled SIGPROF on halt Fixes the "profiling timer expired" message on shutting down with profiling enabled. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: fix __pud_alloc definition to match the declaration Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: fix a stack corruption crash Fix a race where signals could be handled to the parent of a new process on the kernel stack of the child, corrupting that stack, and crashing UML when the next first runs. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: define __HAVE_ARCH_CMPXCHG on x86 Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] file_table:expand_files() code cleanup expand_files() cleanup: Make expand_files() common code for fork.c:fork/copy_files(), open.c:open/get_unused_fd() and fcntl.c:dup/locate_fd(). expand_files() does both expand_fd_array and expand_fd_set based on the need. This is used in dup(). open() and fork() duplicates the work of expand files. At all places we check for expanding fd array, we also check for expanding fdset. There is no need of checking and calling them seperately. This change also moves the expand_files to file.c from fcntl.c, and makes the expand_fd_array and expand_fd_set local to that file. Signed-off-by: Prasanna Meda Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Minor ext3 speedup Remove unnecessary division and modulo from ext3 code in often used paths. Without the patch an oprofile of dbench load shows ext3_get_group_desc() uses 0.84% and ext3_group_sparse() 1.51%, with the patch the numbers are 0.33% and 0.27% respectively. Signed-off-by: Jan Kara Signed-off-by: Andreas Dilger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] move read-only and immutable checks into permission() Currently it's up to the filesystem ->permission method to check whether the filesystem is readonly or the file marked immutable. But this is really a VFS decision, and the distintion becomes more important when moving to per-mountpoint read only flags. For most filesystems that have been using generic_permission this is not change in behaviour. For those that we're missing the check (cifs without CIFS_MOUNT_NO_PERM and coda [1]) this is a bugfix. Both reiserfs and xfs have this check still in their ->permission routine because they call it from other places aswell. I'll try switching them over to generic_permission and will take care of this one. [1] coda_ioctl_permission always returns 0, aka always grants access, which looks more than fishy to me. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] factor out common code around ->follow_link invocation Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] radio-typhoon: use correct module_param data type Use correct data type for module_param: drivers/media/radio/radio-typhoon.c:317: warning: return from incompatible pointer type Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] avoid sparse warning due to time-interpolator The "addr" member in the time-interpolator is sometimes used as a function-pointer and sometimes as an I/O-memory pointer. The attached patch tells sparse that this is OK. Signed-off-by: David Mosberger-Tang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] allow all architectures to set CONFIG_DEBUG_PREEMPT We think it'll work OK. Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] binfmt_elf: allow mips to overrid e_flags arch/mips/kernel/binfmt_elfn32.c needs to override e_flags for elf coredumps. It already defines ELF_CORE_EFLAGS before including binfmt_elf.c, but the latter doesn't pick up the define yet. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] remove bogus softirq_pending() usage in cris Acked by Mikael Starvik. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] switch FRV to use local_soft_irq_pending The newly merged frv do_IRQ code calls softirq_pending(), but always with the current cpu as argument - switch to local_softirq_pending(). Btw, this usage look bogus to me, any reason you need to call do_softirq again after you did four lines above in irq_exit(), David? Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] scripts/reference*.pl - treat built-in.o as conglomerate scripts/reference*.pl - treat built-in.o as conglomerate. Ignore references from altinstructions to init text/data. Signed-off-by: Keith Owens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] vgacon fixes to help font restauration in X11 So far the X.Org/XFree86 Xservers use internal functions to perform saving/restoring of console fonts. This doesn't work under all circumstances and has disadvantages: 1. On some platforms (IA64) X needs to POST the BIOS before it even has a chance to access the hardware itself. This POSTing will usually undo any changes to the graphics hardware that the kernel may have done. 2. More and more drivers fully rely on BIOS support. However the BIOS functions which could be used to save/restore register settings may be broken so the only way of mode save/restore is getting/setting the BIOS mode ID. This will restore the BIOSes default fonts, not the custom font that the user may have loaded. I would like to utilize the kernel's save/restore console fonts ioctls to save/restore the text mode console fonts from inside X. The patch does two things: 1. Eliminates the optimization that returns from vgacon_adjust_height() early (without reprogramming the HW) when the hight of the font hasn't changed. 2. Resets the stored 'from' and 'to' lines for the text cursor in vgacon_adjust_height() to cause vgacon_set_cursor_size() reprogram the textcursor start and end line. These are necessary to sanitize the HW in case something other than the kernel has changed the register values without restoring them properly. I'm fully aware that in the long run we will need to look into a new driver model for graphics where no two instances fight over who gets register access. However such a model won't be created nor will we get the majority of the drivers ported over night. Therefore we need to find an interim solution for the most pressing problems. Signed-off-by: Egbert Eich Approved-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Use official Unicodes for DEC VT characters The use of U+F800 to U+F804 has been deprecated since 2003; this makes the deprecation effective by replacing these characters with the officially assigned U+23BA to U+23BD. It also updates unicode.txt to match the latest version from the LANANA webpage. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext3: commit superblock before panicking I have a problem with errors=panic on ext3. When a panic occurs, the error event is not recorded anywhere. So after the reboot, e2fsck doesn't kick in, the file system gets mounted again and the box panics again... Patch below moves the ERRORS_PANIC test down a bit so the journal is aborted before panic() is called. Signed-off-by: Eric Lammerts Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] consolidate arch specific resource.h headers Most of the include/asm-*/resource.h headers are the same as one another. This patch makes one generic version, include/asm-generic/resource.h, and uses that when appropriate. The only vaguely interesting things here are that the generic version introduces a new _STK_LIM_MAX macro, which can be populated by an arch (ia64 and parisc needed that). Also, some arches hid RLIM_INFINITY under __KERNEL__, while others did not. The generic version does not, so the following arches will see that change: arm, arm26, mips, ppc, ppc64, sh (and hence sh64) And, finally, some arches maintain their own order for the resource numbers. This is now marked by __ARCH_RLIMIT_ORDER, and is used by the following arches: alpha, mips, sparc, and sparc64. This actually uncovered a mips bug (fix already sent, this patch is relative to that fix), where the default RLIMIT_MEMLOCK was set to RLIM_INFINITY and RLIMIT_NPROC set to MLOCK_LIMIT (the latter is no big deal because RLIMIT_NPROC default is overwritten dynamically during bootup in fork_init()). Also, this change makes alpha's default for RLIMIT_NPROC change from RLIM_INFINITY to 0, but again...no problem as it's dynamically overwritten during bootup. The following arches are left untouched: m68knommu: untouched (uses m68k/resource.h) sh64: untouched (uses asm-sh/resource.h) um: untouched (uses arch code already) Signed-off-by: Chris Wright Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Use -Wno-pointer-sign for gcc 4.0 Compiling an allyesconfig kernel straight with a gcc 4.0 snapshot gives nearly 10k new warnings like: warning: pointer targets in passing argument 5 of `cpuid' differ in signedness Since the sheer number of these warnings was too much even for the most determined kernel janitors (I actually asked ;-) and I don't think it's a very serious issue to have these mismatches I submitted an new option to gcc to disable it. It was incorporated in gcc mainline now. This patch makes the kernel compilation use it. There are still quite a lot of new warnings with 4.0 (mostly about uninitialized variables), but the compile log looks much nicer nnow. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix INIT_SIGHAND warning on mips sa_handler isn't the first member of struct sigaction on mips. Use C99 initializers to avoid a compiler warning. (There don't seem to be more serious problems as mips worked with that warning for ages) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] add page_offset to mm.h To convert page->index to a byte index you need to cast it to loff_t first so it's a 64bit value. There have been quite a few places that got it wrong in the kernel. To make it easier a nice little helper would be nice, and in fact the NFS code already has it. Let's move it to pagemap.h so everyone can use it. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Minor IPMI driver updates This patch fixes counting of unhandled messages. Messages that were handled internally by the driver (to the NULL user) were miscounted as unhanlded responses. This counts them properly. This patch also fixes the DMI 16-byte setting, which was set as a 16-bit setting. It also uses the right value to initilize the address memory when using a memory-based interface. Signed-off-by: Corey Minyard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] completion API additions Adds 3 new completion API calls, which are a straightforward extension of the current APIs: int wait_for_completion_interruptible(struct completion *x); unsigned long wait_for_completion_timeout(struct completion *x, unsigned long timeout); unsigned long wait_for_completion_interruptible_timeout( struct completion *x, unsigned long timeout); This enables the conversion of more semaphore-using code to completions. There is code that cannot be converted right now (and is forced to use semaphores) because these primitives are missing. Thomas Gleixner has a bunch of patches to make use of them. Signed-off-by: Ingo Molnar Tested-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Convert XFS to unlocked_ioctl and compat_ioctl Convert the XFS ioctl handlers over to unlocked_ioctl and compat_ioctl. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Some fixes for compat ioctl While doing some compat_ioctl conversions I noticed a few issues in compat_sys_ioctl: - It is not completely compatible to old ->ioctl because the traditional common ioctls are not checked before it. I added a check for those. The main advantage is that the handler now works the same as a traditional handler even when it returns -EINVAL - The private socket ioctl check should only apply for sockets. - There was a security hook missing. Drawback is that it uses the same hook now, and the LSM module cannot distingush between 32bit and 64bit clients. But it'll have to live with that for now. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Convert Infiniband MAD driver to compat/unlocked_ioctl Convert MAD driver to compat/unlocked_ioctl. Streamlines the code a bit. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Support compat_ioctl for block devices Support passing down of compat_ioctl on block devices. This is needed for the compat_ioctl conversion of block drivers. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Convert cciss to compat_ioctl Convert the cciss driver to compat_ioctl. This cleans up a lot of code. I don't have such hardware thus this is only compile tested. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Add compat_ioctl to frame buffer layer Forward compat_ioctl through the frame buffer layer. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Convert sis fb driver to compat_ioctl Convert the sis framebuffer driver to compat ioctl. Signed-off-by: Andi Kleen Acked-by: Thomas Winischhofer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Convert dv1394 driver to compat_ioctl Convert dv1394 driver to compat_ioctl Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Convert video1394 driver to compat_ioctl Convert video1394 driver to compat_ioctl Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Convert amdtp driver to compat_ioctl Convert amdtp driver to compat_ioctl Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fat: kill fatfs_syms.c The patch below removes fatfs_syms.c All EXPORT_SYMBOL's are moved to the files where the actual functions are. Signed-off-by: Adrian Bunk Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fat: merge msdos_fs_{i,sb}.h into msdos_fs.h From Christoph Hellwig We don't have the union in "struct inode" and "struct super_block", so we doesn't need xxx_fs_i.h and xxx_fs_sb.h anymore. Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fat: IS_BADCHAR/IS_REPLACECHR/IS_SKIPCHAR cleanup From Rene Scharfe Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fat: Return better error codes from vfat_valid_longname() From Rene Scharfe Fix error code. Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fat: Manually inline shortname_info_to_lcase() From This patch inlines shortname_info_to_lcase() by hand. At least my compiler (gcc 3.3.4 from Debian) doesn't go all the way, so the compiled text size is decreased by this patch. And IMHO the code gets more readable, too. The terms (base->valid && ext->valid), (ext->lower || ext->upper) and (base->lower || base->upper) are trivially found to be true at the single callsite of shortname_info_to_lcase(). The relevant lines are included in this patch file. Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fat: use vprintk instead of snprintf with static buffer Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fat: kill unnecessary kmap() Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fat: fs/fat/cache.c: make __fat_access static Signed-off-by: Adrian Bunk Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fat: Lindent fs/msdos/namei.c Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fat: Lindent fs/vfat/namei.c Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] FAT: Lindent fs/vfat/namei.c fix Fix typo in comment Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fat: fs/fat/* cleanup This patch is just cleanup (whitespace, and place of functions is changed). No changes of logic. Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fat: reserved clusters cleanup - Replaces the "number of reserved clusters" by FAT_START_ENT. - The ->clusters is total number of clusters. Instead of it, use the maximum cluster number (->max_cluster). By this change, removes the some "->clusters + 2" calculation. - Adds inline function for cluster to block number conversion. And replaces the open-coding for it. Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fat: show current nls config even if it's default. The default config may be set by distributor. With this change, the user can now know the current NLS used by FAT. Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: PPC Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: M32R Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: Video Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: IDE Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: sound Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: SH Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: PPC64 Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: Security Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: Core Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: media drivers Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: Block devices Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: S390 Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: UserMode Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: SCSI Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: SPARC Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: V850 Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: I386 Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: DRM Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: Firewire Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup - (ARM26) Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: M68K Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: Network drivers Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: MTD Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: X86_64 Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: Filesystems Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: IA64 Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: Raid Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: ISDN Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: PARISC Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: SPARC64 Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: ARM Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: Misc drivers Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup - (ALPHA) Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: character devices Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: drivers/serial Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Lock initializer cleanup: FRV Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] convert-cciss-to-compat_ioctl fix Make the declaration match the definition.. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix md using bio on stack with bio clones If md resides on top of a driver using bio_clone() (such as dm), it will oops the kernel due to md submitting a botched bio that has a veclist but doesn't have bio->bi_max_vecs set. Signed-off-by: Jens Axboe Signed-off-by: Linus Torvalds [PATCH] Fix x86-64 vsyscall32 mapping The x86-64 kernel incorrectly marks the 32-bit vsyscall page mapping at virtual address 0xffffe000 as a global one, even though that mapping does not exist globally. As such, task switches do not correctly invalidate the mapping, and strange behaviour ensues if a 64-bit program happens to use that same virtual address for something else. Signed-off-by: Linus Torvalds [NETLINK]: Move nl_nonroot into netlink_table. Signed-off-by: David S. Miller [PATCH] cputime.h seems to assume HZ==1000 There's 1000 msecs in a second. No relation to HZ, which just happens to be 1000 in some cases. Signed-off-by: Linus Torvalds [PATCH] cputime_t patches broke RLIMIT_CPU The RLIMIT_CPU limit is in seconds, not in jiffies. Signed-off-by: Roland McGrath Signed-off-by: Linus Torvalds [SPARC]: Fix asm constraints in muldiv.c Signed-off-by: David S. Miller [SPARC]: Hook up drivers/infiniband/Kconfig to sparc32. Signed-off-by: Roland Dreier Signed-off-by: David S. Miller [ACPI] avoid benign AE_TYPE warnings caused by "implicit return" BIOS workaround returning unsolicited (and thus mis-typed) AML values. Signed-off-by: Bob Moore Signed-off-by: Len Brown [ARM PATCH] 2423/2: more PXA2xx AC97 defines Patch from Nicolas Pitre Signed-off-by: Nicolas Pitre Signed-off-by: Russell King [ARM PATCH] 2424/1: S3C2410 - Document add HP iPAQ rx3715 overview Patch from Ben Dooks Add overview of the HP iPAQ rx3715, as well as listing Shannon Holland in the contributors. Signed-off-by: Ben Dooks Signed-off-by: Russell King [ARM PATCH] 2425/1: PXA Corgi - Flush ssp before suspending Patch from Richard Purdie Make sure the PXA Corgi ssp driver flushes the ssp port before suspending. Signed-off-by: Richard Purdie Signed-off-by: Russell King [ARM PATCH] 2426/1: PXA Corgi - Add USB Device Controller support Patch from Richard Purdie Add USB Device Controller support to the corgi machines (Sharp SL-C7xx series). Signed-off-by: Richard Purdie Signed-off-by: Russell King [PATCH] update mips driver Kconfig bits Signed-off-by: James Bottomley [PATCH] update dec_esp with changes from mips CVS Changes are from Maciej W. Rozycki and not nicely splitup because it's the changes to make it work with 2.6 again. Cosmetic changes by me to avoid obsolete typedefs. Signed-off-by: James Bottomley [PATCH] cosmetic jazz_esp updates small changes from Linux/MIPS CVS and typedef removal from me Signed-off-by: James Bottomley Linux 2.6.11-rc2 [SPARC64]: Update defconfig. Signed-off-by: David S. Miller [PATCH] Fix an error in copy_page_range There is a bug in copy_page_range with 4 level page table change. copy_page_range do a continue without adding pgds and addr when pgd_none(*src_pgd) or pgd_bad(*src_pgd). Signed-off-by: Zou Nan hai Acked-by: Nick Piggin Signed-off-by: Linus Torvalds [PATCH] PPC64: fix stack alignment for signal handlers The PPC64 ABI specifies that the stack should be kept aligned to 16 bytes. However, signal handlers on PPC64 are getting run with the stack misaligned (sp % 16 == 8). This patch fixes that by ensuring that the signal frame allocated is a multiple of 16 bytes. In addition to the PPC64 signal frame itself being of misaligned size, the explicit alignment of the starting stack pointer is also to 8 instead of 16. I've corrected this as well, so signal frames are aligned even if the interrupted registers contained a misaligned stack pointer. Signed-off-by: Roland McGrath [ Paul Mackerras acked the original patch (which also did it for the 32-bit cases), and pointed out that the 32-bit cases all already did the alignment elsewhere and didn't need this. Patch edited down accordingly. ] Signed-off-by: Linus Torvalds [IA64] tiger_defconfig: updated for 2.6.11-rc2 Signed-off-by: Tony Luck [PATCH] dvb: fix RPS init race - [DVB] saa7146: explicitely disable RPS tasks in saa7146_init_one() Signed-off-by: Michael Hunold Signed-off-by: Johannes Stezenbach Signed-off-by: Linus Torvalds [PATCH] dvb: support pinnacle pctv-sat, clean-ups - [DVB] dvb-bt8xx: add support for pinnacle pctv-sat, patch by Peter Hettkamp and Adam Szalkowski - [DVB] dvb-bt8xx: minor code cleanups, patch by Arne Ahrend - [DVB] dvb-bt8xx: make sure to compile all necessary frontend modules, remove misleading comment Signed-off-by: Michael Hunold Signed-off-by: Johannes Stezenbach Signed-off-by: Linus Torvalds [PATCH] dvb: dibusb refactoring, support Yakumo/HAMA/Typhoon/HanfTek clones - [DVB] dvb-dibusb: refactoring of the dibusb driver, support for device clones from Yakumo/HAMA/Typhoon/HanfTek, update the documentation Signed-off-by: Michael Hunold Signed-off-by: Johannes Stezenbach Signed-off-by: Linus Torvalds [PATCH] dvb: support nxt2002 frontend, misc skystar2 fixes - [DVB] nxt2002: add support for nxt2002 frontend (firmware extraction, Kconfig, driver) - [DVB] skystar2: misc cleanup, remove unneeded casts, remove unreachable code, patches by Francois Romieu - [DVB] skystar2: fix mt352 clock setting for VHF (6 and 7 MHz bw channels), patch by Thomas Martin and Dieter Zander: - [DVB] b2c2-usb-core: fix file permissions to be octal, ISO C90 compile fix, temporally repaired the request_types - [DVB] remove remains of dibusb driver after splitup Signed-off-by: Michael Hunold Signed-off-by: Johannes Stezenbach Signed-off-by: Linus Torvalds [PATCH] dvb: add ATSC support, misc fixes - [DVB] dvb-core: vfree() checking cleanups, patch by Domen Puncer - [DVB] dvb-core: fix handling of discontinuity indicator in section filter, bug reported by Frank Rosengart - [DVB] dvb-core: handle PUSI in section filter correctly, patch by Emard, bug reported by Patrick Valsecchi - [DVB] dvb-core: add support for ATSC/VSB frontends, patch by Taylor Jacob - [DVB] dvb-core: removed semi-colon from a very wrong place; FE_ENABLE_HIGH_LNB_VOLTAGE kernel oops; thanks to Christophe Massiot - [DVB] dvb-core: Fixed slow tuning problems, remove frequeny bending support from frontend code, code simplification Signed-off-by: Michael Hunold Signed-off-by: Johannes Stezenbach Signed-off-by: Linus Torvalds [PATCH] dvb: dib3000 refactoring - [DVB] dib3000: driver refactoring, makes it easier to support device clones Signed-off-by: Michael Hunold Signed-off-by: Johannes Stezenbach Signed-off-by: Linus Torvalds [PATCH] dvb: nxt2002: add ATSC support, misc fixes - [DVB] mt352: exported a mt352_read_reg-function, implemented a single byte write_register function (needed for dibusb) - [DVB] nxt2002: patch by Taylor Jacob to add support for ATSC/VSB frontends and the B2C2/BBTI Air2PC-ATSC card - [DVB] stv0297: fix tuning problems and compile time warnings, patch by Markus Breitenberger - [DVB] fix spelling errors in various frontend drivers Signed-off-by: Michael Hunold Signed-off-by: Johannes Stezenbach Signed-off-by: Linus Torvalds [PATCH] dvb: dvb-ttpci: fix SMP race, budget: fixe init race, misc fixes - [DVB] dvb-ttpci: re-added support for Fujitsu-Siemens DVB-S rev 1.6 0x13c2:0x0006 - [DVB] dvb-ttpci: finally clean up debi irq/tasklet handling to make it work on SMP - [DVB] dvb-ttpci: misc. changes to av7110_send_fw_cmd() error handling done along the way - [DVB] dvb-ttpci: budgetpatch integrated into dvb-ttpci: enables full ts option running in parallel with all previous functions of dvb-ttpci - [DVB] dvb-ttpci: fix Oops provoked by insmod/rmmod test loop, patch by Emard - [DVB] budget: Fixed start_ts_capture(): saa7146 will not issue a VPE interrupt if VPE bit is set in PSR and VPE interrupts are enabled afterwards. - [DVB] budget: enable satelco support. code was commented out, but actually it works, patch by Emard - [DVB] budget: Budget patch improved driver, fixed slight packet loss by using different trigger mode Signed-off-by: Michael Hunold Signed-off-by: Johannes Stezenbach Signed-off-by: Linus Torvalds [IA64] fix declaration of __find_next_zero_bit, first arg is "const" Signed-off-by: Bob Picco Signed-off-by: Tony Luck [IA64] Delete duplicate SN2 definition of cpu_logical_id for UP build Signed-off-by: Jack Steiner Signed-off-by: Tony Luck [IA64] Delete: arch/ia64/sn/include/shub.h Signed-off-by: Jack Steiner Signed-off-by: Tony Luck [IA64] fix SN2 hwperf error handling Fix the error handling for the SN2 hardware perf ioctl interface. Signed-off-by: Mark Goodwin Signed-off-by: Tony Luck [IA64] binfmt_elf32.c: BUG if insert_vm_struct fails It seems that in ia64_elf32_init, instead of calling return, if we insert an overlapping vma, we should instead BUG(). We should never get into this code path, because the vma's are set above PAGE_OFFSET, and thus a Xmalicious user can not trigger this code path. This change is being suggested mainly for clarity. Thanks to Stephen Tweedie for pointing out that returning early in ia64_elf32_init could have unpredictable results. Signed-off-by: Tony Luck [IA64] uaccess.h: add missing __user annotation for sparse I was getting a lot of spurious warnings with "make C=1", due to a missing "__user" attribute. I'm not sure whether this got lost or whether earlier versions of sparse failed to warn about it, but it's clearly needed (and the i386 version of uaccess.h does the same). Signed-off-by: David Mosberger-Tang Signed-off-by: Tony Luck [IA64] domain.c: eliminate warning when compiling CONFIG_NUMA=n When compiling for non-NUMA variable "node" ended up not being used, which solicits a warning from GCC. Fix is to evluate cpu_to_node(i) in place. This has the effect of doing cpu_to_node(i) twice on NUMA, but this is init code, so performance is not an issue (and even if it were, you can just declare cpu_to_node() as being a pure function, so the compiler can eliminate the second call). Signed-off-by: David Mosberger-Tang Signed-off-by: Tony Luck [IA64] Sanity check unw_unwind_to_user Signed-off-by: Keith Owens Signed-off-by: Tony Luck [IA64] sys_ia32.c: add missing __user annotation for sparse Signed-off-by: David Mosberger-Tang Signed-off-by: Tony Luck [IA64] increase limit on #pages to isolate for MCA errors The fixed sized array of pages that are isolated because of 2xECC memory errors can run out. Increasing the size of the array is a band-aid measure, the real fix will require changes to generic code to add some bits to page_flags so that pages with errors can be marked so as to prevent them ever being examined. Signed-off-by: Russ Anderson Signed-off-by: Tony Luck [IA64] smpboot.c: use msleep(100) instead of inlined equivalent Use msleep() instead of schedule_timeout() to guarantee the task delays as expected. Signed-off-by: Nishanth Aravamudan Signed-off-by: Tony Luck [IA64] cleanup C uage of global/root-function predicates The patch below is purely a cleanup but it's a prerequisite for the next bug fix patch. Signed-off-by: David Mosberger-Tang Signed-off-by: Tony Luck [IA64] Don't forget to initialize PKStk for kernel-threads Kernel-threads had both pUStk and pKStk set to FALSE, which was unintentional. I don't think the bug has shown any ill effects, but it's clearly wrong and could come around to bite us later, so let's fix it now. Depends on the previous patch to clean up C usage of the global/root-function predicates. Signed-off-by: Tony Luck [IA64] entry.S: Align rse_clear_invalid to double-bundle boundary. Trivial patch: align rse_clear_invalid to 32-byte boundary. Good for a 9 cycle speed up. Signed-off-by: David Mosberger-Tang Signed-off-by: Tony Luck [IA64] Resched skip_rbs_switch to run 4 cycles faster on McKinley-type cores Signed-off-by: David Mosberger-Tang Signed-off-by: Tony Luck [IA64] Improve ia64_leave_syscall() for McKinley-type cores. Optimize ia64_leave_syscall() a bit better for McKinley-type cores. The patch looks big, but that's mostly due to renaming r16/r17 to r2/r3. Good for a 13 cycle improvement. Signed-off-by: David Mosberger-Tang Signed-off-by: Tony Luck [IA64] Use srlz.d instead of srlz.i in ia64_leave_syscall Use srlz.d instead of srlz.i. Safe because we don't care whether the VHPT walker sees the clearing of PSR.ic (if it does, that's fine if it doesn't, it's OK too since the kernel-text is pinned anyhow). Good for another 11+ cycles in (normal) getpid(). Signed-off-by: David Mosberger-Tang Signed-off-by: Tony Luck [IA64] entry.S update the copyright year & fix a comment Signed-off-by: David Mosberger-Tang Signed-off-by: Tony Luck [IA64] mca.c: delete unused "return_to_sal" label Label is unused, and so the compiler generates a warning. Signed-off-by: Tony Luck [IA64] clean up ptrace corner cases Patch from yanmin.zhang@intel.com to fix up some corner cases in ptrace. Many thanks to davidm for reviewing and improving. Signed-off-by: Tony Luck [IA64] entry.S: perfmon psr.pp fix Problem: There exists a case where we stop monitoring, i.e. clear psr.pp/dcr.pp, via IPI. This is when the stop is triggered by a close(), either explicit in the application or implicit via exit_files(). The IPI is necessary because at the time the thread (controlling the context) issues a close() it may not run on the CPU the context is bound to. Yet the call must succeed, hence we need to propagate the call to the right CPU. But what is the problem then? Under IPI, we invoke a perfmon routine which clear the kernel (live) kernel psr.pp bit and also dcr.pp. Then we return from the function and execute the kernel exit path which restores the interrupted state. Unfortunately, this restores the kernel psr from ipsr which now contains a stale value. Therefore monitoring in the kernel will be active even though we stopped it. You cannot modify the "global" psr in an interrupt routine because it will be systematically restored on the way back. Solution: We need to patch ipsr.pp in the kernel exit path to reflect the kernel value of the kernel psr.pp bit. This must be done only when returning to kernel. The proposed patch does patch ipsr.pp such that it is identical to psr.pp. The patch is subtle because the exit path does not have a lot of free registers and also because we need to schedule for a psr read. I had to shuffle things around a little bit. The patch is important because there will be another situation where this problem can occur once we incorporate the support for event set and multiplexing. In this configuration, you may be in the middle of the idle loop and on a timer interrupt, you may stop monitoring. Slightly different condition, yet same problem with ipsr.pp vs. psr.pp. Changelog: - update kernel exit path when returning to kernel to copy psr.pp to ipsr.pp. This is necesary to ensure that if psr.pp was modified during the kernel entry, the change is propagated the the psr.pp of the of the interrupted thread. Psr.pp can be modified as a consequence of an IPI under certain conditions, such as when a system-wide context is closed from a remote CPU. Special thanks to David for reworking the patch to fit into the enhanced exit path. signed-off-by: stephane eranian Signed-off-by: Tony Luck [IA64] fix PAL_PREFETCH_VISIBILITY call The following patch fixes the ia64_pal_prefetch_visibility function to take a transaction type argument for either virtual or physical memory as specified in the System Architechture Manual page 2:358. Signed-Off-By: Jes Sorensen Signed-Off-By: Tony Luck [IA64] new api efi_range_is_wc() Ok, here you go Tony. This one fixes the loop and also fixes drm_vm.c. All of the bits aside from the efi.h bit are ia64 specific (either under arch/ia64 or __ia64__), so your tree is probably the right place for all of it. This patch adds efi_range_is_wc() to efi.h. It's used to determine whether an address range can be mapped with the write coalescing attribute. It also fixes up some ia64 specific callers to use the new routine instead of unconditionally calling pgprot_writecombined, which can be dangerous if used on ranges that don't support it. Signed-off-by: Jesse Barnes Signed-off-by: Tony Luck [IA64] fix early SAL init for sn2 sn2 does early initialization of the SAL so it can use it for early console support. Unfortunately, the loop to find the SAL entry point was buggy so when we tried out new EFI and SAL system table layouts, the loop didn't terminate. Here's the fix (doh!, use two different loop counters instead of one and just return if we find the SAL entry point). Signed-off-by: Jesse Barnes Signed-off-by: Tony Luck [IA64] remove superfluous layer from sn2 DMA API When I converted the sn2 code over to the new DMA API, I left the old routines in place and added wrappers to call them from the generic DMA API functions. This added an unnecessary level of obfuscation since the generic ia64 code calls those functions when any of the old style PCI DMA API functions are called. This patch rectifies the problem making the code much easier to understand and hopefully a little more efficient (though I'm sure gcc was already inlining things pretty well, there were a bunch of unnecessary checks that I took this opportunity to remove). It also shrinks the size of the sn2 pci_dma.c quite a bit. pci_dma.c | 480 +++++++++++++++++++----------------------------------------- 1 files changed, 151 insertions(+), 329 deletions(-) Signed-off-by: Jesse Barnes Signed-off-by: Tony Luck [IA64] irq handling cleanup Patch from Christoph Hellwig to: - irq_desc and irq_to_vector machvecs. SN2 has it's own versions, but they're the same as the generic ones - kill do do_IRQ and use __do_IRQ directly everywhere - kill dead X86 ifdefs - move some variable declarations around in irq.c to recuce # of ifdefs Signed-off-by: Tony Luck [IA64] clean up loose ends from addition of efi_range_is_wc() Signed-off-by: Tony Luck [TG3]: Update driver version and reldate. Signed-off-by: David S. Miller [SPARC64]: Minor memmove refinements. - If dst/src are equal, memcpy can be used. - Eliminate register writes which were unused Signed-off-by: David S. Miller [ARM] msr can take immediate constants. Signed-off-by: Russell King [ARM] Add warning about building fiq.c with gcc >= 3.4 Unfortunately, some changes to GCC prevents fiq.c expressing the constraints for the assembly setting the FIQ register set. Warn people with later gcc toolchains that they can expect failure to occur. Signed-off-by: Russell King [PATCH] streamline block SG_IO error processing - cleanup scsi_end_request() documentation - shorten path for block SG_IO through scsi_io_completion() - for non-SG_IO sense processing in scsi_io_completion(): - ignore deferred errors (report + retry should suffice) - consolidate into a cleaner switch statement Signed-off-by: Douglas Gilbert Signed-off-by: James Bottomley [PATCH] streamline block SG_IO error processing in sd - sd_init_command(): use retry count of 1 for block SG_IO; minor cleanup - sd_rw_init(): bypass sd level error processing for block SG_IO Signed-off-by: Douglas Gilbert Signed-off-by: James Bottomley SCSI: Fix style nitpicks Noticed by: Christoph Hellwig Signed-off-by: James Bottomley [PATCH] aacraid 2.6: add scsi synchronize cache support. This is an update from the Adaptec driver that adds support for the scsi synchronize cache command. It essentially blocks further commands until data has been flushed to the disks. Signed-off-by: Mark Haverkamp Signed-off-by: James Bottomley [PATCH] SCSI NCR_Q720.c: make some code static This patch makes two needlessly global structs static. Signed-off-by: Adrian Bunk Signed-off-by: James Bottomley sd descriptor sense support From: Douglas Gilbert - make all sd driver sense data handling able to use both fixed and descriptor format - permit 64 bit lbas associated with medium (or hardware) errors to be conveyed back to the block layer Signed-off-by: James Bottomley [Bluetooth] Use wait_event_interruptible_timeout() Use wait_event_interruptible_timeout() instead of custom wait queue code. Signed-off-by: Nishanth Aravamudan Signed-off-by: Marcel Holtmann [Bluetooth] Use wait_event_timeout() Use wait_event_timeout() instead of custom wait queue code. The current code uses TASK_INTERRUPTIBLE but only cares about timing out and the wait queue event taking place (does not actively do anything in response to signals), so wait_event_timeout() should be enough. Signed-off-by: Nishanth Aravamudan Signed-off-by: Marcel Holtmann [ARM PATCH] 2431/1: Split arch specifics out of arch/arm/kernel/debug.S Patch from Ben Dooks This patch moves all the machine/arch specific bits out of arch/arm/kernel/debug.S and places them into the include directories for those given architectures. The debug macros are placed into include/asm-arm/arch-*/debug-macro.S. The aim is to clean-up the debug.S code and make it easier to modify a single-architecture without affecting the entire debug.S file. The patch also removes CONFIG_ARCH_FTVPCI, which no longer exists anywhere else in the kernel. All new include files have the original copyright notice from arch/arm/kernel/debug.S. Note, not all architectures modified here have been built and/or tested due to lack of available machines, or problems building for them (no defconfig available, or problems with kernel build). Signed-off-by: Ben Dooks Signed-off-by: Russell King [Bluetooth] Fix too many keys pressed error This patch fixes the problem of keys repeating when too many keys are pressed at the same time (e.g. when typing quickly). This often results in "mount" becoming "mouount". It seems that Bluetooth keyboards send a HID report with the keys all set to 0x01 if too many keys were pressed at the same time. This confuses the previous report handling logic and now these reports are ignored. Signed-off-by: Juha Yrjölä Signed-off-by: Marcel Holtmann [PATCH] x86_64: Fix int3 trap Undo bogus change that was introduced with kprobes. It's not really needed and it breaks some user applications because it changes the signal for int 3 from SIGTRAP to SIGSEGV. Cc: Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds [PATCH] i386/x86-64: Fix ioremap off by one From Terence Ripperda When doing iounmap don't try to change_page_attr back the guard page that ioremap added. Since the last round of change_page_attr changes this would trigger an BUG because the reference count on the changed pages wouldn't match up. The problem would be only visible on machines with >3GB of memory, because only then the PCI memory hole is below end_pfn and change_page_attr is used. Fixed for both i386 and x86-64. This was actually discovered&fixed by Andrea earlier, but I goofed up while doing the last ioremap fixes merge and this change got lost. Poor Terence had to debug it again. Sorry about that. cc: andrea@suse.de Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds [PATCH] x86-64: Fix UP build warning Fix warning: In file included from include/asm/numa.h:5, from arch/x86_64/kernel/setup64.c:27: include/asm/numnodes.h:6:1: warning: "NODES_SHIFT" redefined In file included from include/linux/mmzone.h:13, from include/linux/gfp.h:4, from include/linux/slab.h:15, from include/linux/percpu.h:4, from include/linux/sched.h:33, from arch/x86_64/kernel/setup64.c:11: include/linux/numa.h:11:1: warning: this is the location of the previous definition in UP builds. Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds [PATCH] fix module kallsym lookup breakage Anton Blanchard wrote: >Your recent patch looks to break module kallsyms lookups.... >It looks like if CONFIG_KALLSYMS_ALL is set then we never look up module >addresses. Separate lookups for kernel and modules when CONFIG_KALLSYMS_ALL=y. Signed-off-by: Keith Owens Acked-by: Chris Wedgwood Signed-off-by: Linus Torvalds [Bluetooth] Fix rfcomm_sock_destruct() deadlock The fix for socket unlink race introduced a deadlock in the RFCOMM code. The state change function is always called under the DLC lock and if rfcomm_sock_kill() is called the rfcomm_sock_destruct() will dead lock. So the DLC lock must be dropped first and claimed again afterwards. Signed-off-by: Marcel Holtmann [Bluetooth] Add RFCOMM service level security This patch adds the support for RFCOMM service level security. It allows to request authentication and encryption before a RFCOMM connection is finally established. Signed-off-by: Marcel Holtmann x86-64: don't crash and loop when the user passes an unknown earlyprintk= option. Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds [PATCH] osst: don't use obsolete SCSI APIs this patch gets rid of the need for scsi.h, similar to the recent patch to the st driver. (applies ontop of Willem's patches) Signed-off-by: James Bottomley Signed-off-by: Willem Riede Free temporary pipe page after freeing the main buffers. Duh. Freeing the main buffers can _cause_ the temporary page to be created. [PATCH] removing bcopy... because it's half broken Nothing in the kernel is using bcopy right know, and that is a good thing. Why? Because a lot of the architectures implement a broken bcopy().... the userspace standard bcopy() is basically a memmove() with a weird parameter order, however a bunch of architectures implement a memcpy() not a memmove(). Instead of fixing this inconsistency, I decided to remove it entirely, explicit memcpy() and memmove() are prefered anyway (welcome to the 1990's) and nothing in the kernel is using these functions, so this saves code size as well for everyone. Signed-off-by: Arjan van de Ven Signed-off-by: Adrian Bunk [ Side note: the only reason for bcopy appears to be totally ancient gcc versions for OSF/1, used to originally cross-compile Linux on alpha. Possibly some other similar cases. Time to move on ;-] Signed-off-by: Linus Torvalds [IPV4/IPV6]: In ip_fragment(), reset ip_summed field on SKB sub-frags. If we forward a fragmented packet, we can have ip_summed set to CHECKSUM_HW or similar. This is fine for local protocol processing, but once if we are forwarding this packet we want to reset ip_summed to CHECKSUM_NONE. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller [TG3]: Fix TSO for 5750 - Fix TSO for 5750 chips by setting tcp checksum field to 0 for TSO packets - Add TG3_FLG2_HW_TSO flag for 5750 and newer chips that use the same TSO scheme Signed-off-by: Michael Chan Signed-off-by: David S. Miller [TG3]: Update driver version and reldate. Signed-off-by: David S. Miller [NETFILTER]: Fix SNAT/DNAT target size checks This patch fixes two size checks in the checkentry() for SNAT and DNAT targets. The patch to remove support for multiple ranges forgot to use IPT_ALIGN(). This isn't a problem on x86 but other archs like parisc are affected and thus can't add any SNAT/DNAT rules. Signed-off-by: Martin Josefsson Signed-off-by: Patrick McHardy [NETFILTER]: Fix compile errors without NAT This patch fixes some compile errors with NAT that has appeared after all the recent patches. Move struct ip_conntrack_expect after the definition of struct ip_conntrack. Add #ifdef CONFIG_IP_NF_NAT_NEEDED around ip_nat_initialized() Add lockhelp.h to ipt_CLUSTERIP.c Signed-off-by: Martin Josefsson Signed-off-by: Patrick McHardy [NETFILTER]: Fix compile with NAT but without modules Here's another patch to fix compile-errors, this time with NAT but without modules. There's a missing 'extern' in ip_conntrack_tftp.h Signed-off-by: Martin Josefsson Signed-off-by: Patrick McHardy [NETFILTER]: Add inversion to multiport match Should add this to rev1 of multiport before 2.6.11 comes out. Signed-off-by: Phil Oester Signed-off-by: Patrick McHardy NTFS: Add printk rate limiting for ntfs_warning() and ntfs_error() when compiled without debug. This avoids a possible denial of service attack. Thanks to Carl-Daniel Hailfinger from SuSE for pointing this out. [PATCH] AOE: fix up the block device registration so that it actually works Remove __exit from aoeblk_exit (to allow it to be called from __init code). Remove register_blkdev into aoe_init (it's done in aoemain.c). Signed-off-by: Ed L. Cashin Signed-off-by: Linus Torvalds [PATCH] m68k csum_partial_copy_* gcc4 warning fixes The gcc4 signedness warning fix forgot to update the declarations in include/asm-m68k/checksum.h. [IA64] Ensure that r9 can't be a NaT on return from sys_pipe() This version doesn't cost us any extra cycles. Signed-off-by: Ken Chen Signed-off-by: Rohit Seth Acked-by: David Mosberger Signed-off-by: Tony Luck [IA64] ptrace.c: Format to make it fit in 80 cols. David thinks this might make Jesse and Willy happy (or at least happier). If they can cope with line breaks before a binary operator, rather than after, then maybe it will :-) Signed-off-by: David Mosberger-Tang Signed-off-by: Tony Luck [IA64] clean up pt_regs accesses This patch replaces the idiom: func (args..., long stack) { struct pt_regs *regs = (struct pt_regs *) &stack; with the more commonly used: func (args..., struct pt_regs regs) { The latter didn't used to work with the very earliest kernels and compilers (anybody remember egcs?) but gcc-3.3 and probably even gcc-2.96 don't have a problem with it anymore. The change also makes sparse happier, since it doesn't like it when you access memory past the end of the declared size of that variable. Signed-off-by: David Mosberger-Tang Signed-off-by: Tony Luck [IA64] fix ptrace debug-register handling bug I noticed that the PTRACE_POKEUSR code incorrectly clears bits 56-58 of _all_ debug registers. The intention was to only clear it for odd-numbered registers, to ensure that user-level can only set user-level data/instruction-breakpoints. Patch below fixes this problem. The patch also replaces explicit clearing of the single-step and taken-branch PSR bits with a call to ptrace_disable() for PTRACE_KILL. Signed-off-by: David Mosberger-Tang Signed-off-by: Tony Luck [PATCH] Modules: Allow sysfs module parameters to be written to. This fixes a bug in the current tree preventing the sysfs module parameters from being able to be changed at all from userspace. It's as if someone just forgot to write this function... Signed-off-by: Greg Kroah-Hartman Signed-off-by: Linus Torvalds [IA64] pci_sal_read seg limit is 65535, not 255 Spotted by Andreas Schwab, fix from Matthew Wilcox and David Mosberger. Signed-off-by: Tony Luck [IA64] entry.S: .align in .text sections is broken, use TEXT_ALIGN() A few reports of illegal instruction panics while trying to boot were tracked to this. Fix by David Mosberger. Signed-off-by: Tony Luck [ARM PATCH] 2432/1: include/asm-arm/bitops.h - missing const from find Patch from Ben Dooks the calls _find_first_zero_bit_be() and _find_next_zero_bit_be() are missing const from the pointer argument passed in, causing several build warnings when building an ARM kernel in big-endian mode. Signed-off-by: Ben Dooks Signed-off-by: Russell King [ARM PATCH] 2433/1: debug-macro.S split - fix header filename Patch from Ben Dooks All the headers refer to debug-armv.S, when they where split from debug.S Signed-off-by: Ben Dooks Signed-off-by: Russell King [ARM PATCH] 2435/1: platform data for audio on Mainstone Patch from Nicolas Pitre This enables audio on Mainstone with the ALSA PXA2xx AC97 driver. Signed-off-by: Nicolas Pitre Signed-off-by: Russell King Rename "locks_verify_area()" to "rw_verify_area()" and clean up the arguments. And make it non-inlined. [SPARC64]: Set STRICT_MM_TYPECHECKS and kill ctxd/iopgprot. There is no code generation penalty on sparc64 for STRICT_MM_TYPECHECKS as is present on sparc32. ctxd and iopgprot are totally unused types Signed-off-by: David S. Miller Add 'f_maxcount' to allow filesystems to set a per-file maximum IO size. [PATCH] dib3000mc build fix - Build fix for older gcc's - Don't typecast when assigning between void*'s and other pointers. cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] DVB linkage fix We have two global variables called "debug". The attached patch cleans up various aspects of dibusb module argument handling, so it's a bit larger than just renaming "debug". Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: fixed conflicting types arch/mips/lib/csum_partial_copy.c:21: error: conflicting types for `csum_partial_copy_nocheck' include/asm/checksum.h:65: error: previous declaration of `csum_partial_copy_nocheck' arch/mips/lib/csum_partial_copy.c:38: error: conflicting types for `csum_partial_copy_from_user' include/asm/checksum.h:38: error: previous declaration of `csum_partial_copy_from_user' make[1]: *** [arch/mips/lib/csum_partial_copy.o] Error 1 make: *** [arch/mips/lib] Error 2 Signed-off-by: Yoichi Yuasa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] oprofile: falling back on timer interrupt mode When some hardware setups or architectures do not allow OProfile to use performance counters, OProfile operates in timer mode. But, from 2.6.11-rc1, we need to specify the module parameter "timer=1" to work on timer interrupt mode. Change things so that we detect the absence of the high-resolution timer and fall back to timer-based profiling automatically. Furthermore we can easily get oops by reading /dev/oprofile/cpu_type. Signed-off-by: Akinobu Mita Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] compat ioctl security hook fixup Fix a bug spotted by "Michael S. Tsirkin" Introduce a simple helper, vfs_ioctl(), so that both sys_ioctl() and compat_sys_ioctl() call the security hook in all cases and without duplication. Signed-off-by: Chris Wright Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mm: adjust dirty threshold for lowmem-only mappings With Rik van Riel Simply running "dd if=/dev/zero of=/dev/hd" can cause excessive amounts of dirty lowmem pagecache, due to the blockdev's non-highmem page allocation strategy. This patch effectively lowers the dirty limit for mappings which cannot be cached in highmem, counting the dirty limit as a percentage of lowmem instead. This should prevent heavy block device writers from pushing the VM over the edge and triggering OOM kills. Signed-off-by: Rik van Riel Acked-by: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mm: truncate SMP race fix Fix up an smp race introduced in 2.6.11-rc1 Signed-off-by: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: Add defconfigs for 85xx boards -- updated Adds default config files the MPC8540 ADS, MPC8560 ADS, and MPC8555 CDS reference boards. Hopefully people will stop asking me for mine :) Signed-off-by: Kumar Gala Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: allow usage of gen550 on platforms that do not define SERIAL_PORT_DFNS Allows a platform to initialize serial_state completely from gen550_init and no longer requires it to define SERIAL_PORT_DFNS. Signed-off-by: Kumar Gala Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: missing call to ioremap in pci_iomap() The PPC version of pci_iomap seems to be missing a call to ioremap. This patch corrects that oversight and has been tested on a IBM PPC750FX Eval board. Signed-off-by: Randy Vinson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: fix PCI2 IO space mapping on CDS The ppc pci bus and resource fixups will automatically adjust the IO space mappings by (hose->io_base_virt - isa_io_base). Since we map all of PCI IO space (PCI1 & PCI2) with a single mapping so it is continguious in virtual, physical, and PCI IO space the offset will equal MPC85XX_PCI1_IO_SIZE. There for we needed to reduce the setting by that amount for everything to work properly on CDS. Signed-off-by: Kumar Gala Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [MM]: PTRS_PER_{PUD,PMD} are not necessarily compile time constants. Signed-off-by: David S. Miller [PATCH] ppc32: Add support for Pegasos machines This patch, mostly from Sven Luther and reworked by me, adds support for Pegasos machines to the ppc32 arch. The patch contains all of the arch code. I'll send separately a few driver changes as well. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: limit segment tables on UP kernels We were allocating 48 segment tables on UP kernels. Remove them and save 192kB of kernel memory on UP builds. Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: xmon data breakpoints on partitioned systems This patch is originally from Jake Moilanen , substantially modified by me. On PPC64 systems with a hypervisor, we can't set the Data Address Breakpoint Register (DABR) directly, we have to do it through a hypervisor call. Signed-off-by: Jake Moilanen Signed-off-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: fix in_be64 definition This patch is from Jake Moilanen . The instruction syntax for the in_be64 inline asm was incorrect for the "m" constraint for the address parameter. This patch fixes the instruction in the inline asm. Signed-off-by: Jake Moilanen Signed-off-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: clear MSR_RI earlier in syscall exit path This patch is from Craig Chaney . This patch moves the restoring of the stack pointer in the system call exit path to after the point where we clear the RI (recoverable interrupt) bit in the MSR. Normally, loading the stack pointer before clearing RI doesn't cause any problem because there is no trap that can normally occur in between. But if we are tracing the code using a tool that single-steps instructions, this can cause a problem. In this case, clearing RI serves as an indication that the following code can't be safely single-stepped. Signed-off-by: Craig Chaney Signed-off-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: replace schedule_timeout in iSeries_pci_reset This patch is from Nishanth Aravamudan . Replace schedule_timeout() with msleep to simplify the code and to express the delay in milliseconds instead of HZ. Signed-off-by: Nishanth Aravamudan Signed-off-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: replace schedule_timeout in pSeries_cpu_die This patch is from Nishanth Aravamudan . Replace schedule_timeout() with msleep to simplify the code and to express the delay in milliseconds instead of HZ. Signed-off-by: Nishanth Aravamudan Signed-off-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: replace schedule_timeout in __cpu_up This patch is from Nishanth Aravamudan . Replace schedule_timeout() with msleep to simplify the code and to express the delay in milliseconds instead of HZ. Signed-off-by: Nishanth Aravamudan Signed-off-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: replace schedule_timeout in die This patch is from Nishanth Aravamudan . Replace schedule_timeout() with ssleep to simplify the code and to express the delay in seconds instead of HZ. Signed-off-by: Nishanth Aravamudan Signed-off-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [SPARC64]: Covert over to 4 level page tables Move away from the 4level-fixup stuff. Signed-off-by: David S. Miller [PATCH] ppc64: trivial cleanup: EEH_REGION This patch is originally from Linas Vepstas . This is a dumb, dorky cleanup patch: Per last round of emails, the concept of EEH_REGION is gone, but a few stubs remained. This patch removes them. Signed-off-by: Linas Vepstas Signed-off-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: sparse fixes for cpu feature constants This patch is originally from Nathan Lynch . Sparse gives a warning "constant ... is so big it is long" for every expression where we check bits in the cur_cpu_spec->cpu_features value. This patch removes the warnings by using the ASM_CONST macro. Signed-off-by: Nathan Lynch Signed-off-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: use kref for device_node refcounting This patch is from Nathan Lynch . This changes struct device_node and associated code to use the kref api for object refcounting and freeing. I've given it some testing on pSeries with cpu add/remove and verified that the release function works. The change is somewhat cosmetic but it does make the code easier to understand... at least I think so =) The only real change is that the refcount on all device_nodes is initialized at 1, and the device node is freed when the refcount reaches 0 (of_remove_node has the extra "put" to ensure that this happens). This lets us get rid of the OF_STALE flag and macros in prom.h. Signed-off-by: Nathan Lynch Signed-off-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: allow EEH to be disabled Allow EEH to be disabled for pSeries targets, but only if the EMBEDDED option is enabled. This version incorporates some suggestions from Arnd Bergmann and Linas Vepstas. Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: disable some boot wrapper debug The debug information in the boot wrapper can be quite verbose (it prints an entry for every address it attempts to claim). Disable it. Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: problem disabling SYSVIPC The kernel wouldnt link when SYSVIPC was disabled. x86-64 was already defining a cond_syscall, instead of duplicating it in the ppc64 port move it into the arch specific portion of kernel/sys_ni.c Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: enable virtual ethernet and virtual scsi Enable the virtual ethernet and virtual scsi drivers in the pseries config. Since our root device may be on either we need them compiled in (unless we play initrd tricks). Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: Missing call to ioremap in pci_iomap() This patch adds the missing ioremap call to pci_iomap on ppc64. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86: no interrupts from secondary CPUs until officially online Andi Kleen reported a problem where a very slow boot caused the timer interrupt on a secondary CPU to go off before the CPU was actually brought up by the core code, so the CPU_PREPARE notifier hadn't been called, so the per-cpu timer code wasn't set up. This was caused by enabling interrupts around calibrate_delay() on secondary CPUs, which is not actually neccessary (interrupts on CPU 0 increments jiffies, which is all that is required). So delay enabling interrupts until the actual __cpu_up() call for that CPU. Signed-off-by: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86: Remove unused function Remove unused get_cr2 function (from i386) Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: remove centaur mtrr support Drop unused centaur mtrr support code. Signed-off-by: Adrian Bunk Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: remove duplicated includes There's usually no reason for including the same header file twice. The patch below removes such duplicate includes in x86_64 specific files. Signed-off-by: Adrian Bunk Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Enlarge northbridge numa scan mask Enlarge max nodes mask in k8 northbridge scan code. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Remove earlyprintk help Remove invisible earlyprintk help. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: Speed up suspend The following patch speeds up the restoring of swsusp images on x86-64 and makes the assembly code more readable (tested and works on AMD64). Signed-off-by: Rafael J. Wysocki Changed by AK to not hardcode any C values and get them from offset.h instead and not flushing CR3 needlessly (according to Pavel it was just an old debugging measure that is not needed anymore) Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] h8300: fix warning update argument type Signed-off-by: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] h8300: makefile update Fix build error when .config does not exist Signed-off-by: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] swsusp: fix buggy comment Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Enable swsusp on SMP machines This enables swsusp on SMP machines. It should be working in 2.6.10, already (but you may need noapic in 2.6.10). Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] kill softirq_pending() With Steffen Klassert no more users left, time to kill the various implementations Signed-off-by: Steffen Klassert Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] clean up UTS_RELEASE usage This patch cleans up usage of UTS_RELEASE, by replacing many references with system_utsname.release, and deleting others. This eliminates a dependency on version.h for these files, so they don't get rebuilt if EXTRAVERSION or localversion change. Signed-off-by: Brian Gerst Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] 3c59x ethtool: provide NIC-specific stats With this patch get_ethtool_stats() provides the NIC-specific extra stats. Signed-off-by: Steffen Klassert Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext2/ext3: block allocator startup fix We found strange blocks layout in our mail server, after careful study, we got the reason and tried to fix it. On the very fist attempt to allocate a block to the newly-initialised inode, if we are trying to add a block at logical file offset "1" then ext2_find_goal() will incorrectly assume that this was a next_alloc_block cache hit (because we think the previously-allocated block was at offset zero). Net result: why trying to extend a freshly-opened one-block file we end up deciding to place the second file block at disk block "1", rather than going off and calling ext2_find_near(). Fix it by checking that we actually do have something valid cached in next_alloc_goal. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext3/ea: no lock needed when freeing inode ext3_xattr_delete_inode is called from ext3_free_inode which always has exclusive access to the inode, so there is no need to take the xattr semaphore. Signed-off-by: Andreas Gruenbacher Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext3/ea: set the EXT3_FEATURE_COMPAT_EXT_ATTR for in-inode xattrs The xattr feature was only set when creating an xattr block. Also set it when creating in-inode xattrs. Signed-off-by: Andreas Gruenbacher Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext3/ea: documentation fix In-inode xattr entry descriptors are unsorted. Signed-off-by: Andreas Gruenbacher Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext3/ea: ix i_extra_isize check We are checking for (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE) to find out if we can set in-inode attributes; the test fails for inodes that have been created before the ea-in-inode patch. Those inodes have (i_extra_isize == 0), so we end up with the attributes overlapping the i_extra_isize field. Checking for (i_extra_isize == 0) instead fixes this case. The EXT3_STATE_XATTR flag is only set if (i_extra_isize > 0) and the inodes has in-inode attributes, so that is enough in the first two tests. Signed-off-by: Andreas Gruenbacher Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext3/ea: disallow in-inode attributes for reserved inodes When creating a filesystem with inodes bigger than 128 bytes, mke2fs fails to clear out bytes beyond EXT3_GOOD_OLD_INODE_SIZE in all inodes it creates (the journal, the filesystem root, and lost+found). We would require a zeroed-out i_extra_isize field but we don't get it, so disallow in-inode attributes for those inodes. Add an i_extra_isize sanity check. Signed-off-by: Andreas Gruenbacher Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext3: fix ea-in-inode default ACL creation When a new inode is created, ext3_new_inode sets the EXT3_STATE_NEW flag, which tells ext3_do_update_inode to zero out the inode before filling in the inode's data. When a file is created in a directory with a default acl, the new inode inherits the directory's default acl; this generates attributes. The attributes are created before ext3_do_update_inode is called to write out the inode. In case of in-inode attributes, the new inode's attributes are written, and then zeroed out again by ext3_do_update_inode. Bad thing. Fix this by recognizing the EXT3_STATE_NEW case in ext3_xattr_set_handle, and zeroing out the inode there already when necessary. Signed-off-by: Andreas Gruenbacher Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext2/ext3 ACLs: remove the number of acl entries limit This patch removes the arbitrary limit of 32 acl entries on ext[23] when writing acls. A patch that removes the same check when reding acls is in BK since 12 March 2004, so all kernels since then are already able to read large acls. I think that ten+ months are enough so that we can now also remove the write limit. This is the read-limit patch: http://linux.bkbits.net:8080/linux-2.6/cset%404051e2863UsuQEgAQShmimgBooAXkg?nav=index.html Even without this patch the xattr block could already contain less space than needed for the acl, because other attributes might already use up almost all space. So this patch does not introduce additional error conditions. We have been shipping with this patch the last year (almost). Signed-off-by: Andreas Gruenbacher Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Minor ext2 speedup Port Andreas Dilger's and Jan Kara's patch for ext3 to ext2. Also some whitespace changes to get ext2/ext3 closer in sync. Signed-off-by: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] i810_audio: offset LVI from CIV to avoid stalled start This fixes a "no sound" problem with Wolfenstein Enemy Territory and (apparently) other games using the Quake3 engine. It probably affects some other OSS applications as well. This recreates some code that had been removed from the i810_audio driver around 5/2004. (This is the 2.6-based version of this patch.) Acked-by: Herbert Xu Acked-by: Thomas Voegtle Signed-off-by: John W. Linville Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Configurable delay before mounting root device Adds a boot parameter which can be used to specify a delay (in seconds) before the root device is decoded/discovered/mounted. Example usage for 10 second delay: rootdelay=10 Useful for usb-storage devices which no longer make their partitions immediately available, and for other storage devices which require some "spin-up" time. Signed-off-by: Daniel Drake Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fs/mbcache.c: Remove an unused wait queue variable This one slipped me. The "real" wait queue is defined some lines further down inside the loop. Signed-off-by: Andreas Gruenbacher Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] device-mapper: fix mirror log type module ref count Fix module reference counting for mirror log type. Signed-Off-By: Alasdair G Kergon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] device-mapper: remove unused bs_bio_init() Remove unused bs_bio_init(). Signed-Off-By: Alasdair G Kergon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] device-mapper: Add presuspend hook Add optional callback before each device gets suspended (called 'presuspend'). Rename existing callback used by dm-mirror from 'suspend' to 'postsuspend'. dm-multipath will use the new callback. (Any kernel module using device-mapper must be recompiled after this patch.) Signed-Off-By: Alasdair G Kergon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] device-mapper: optionally bypass a bdget Improve performance by optionally bypassing some code that uses bdget. Signed-Off-By: Alasdair G Kergon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] device-mapper: fix TB stripe data corruption In stripe_map(), change chunk to 64-bit and use do_div to divide and mod by the number of stripes. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] arm26: new maintainer of Archimedes floppy and hard disk drivers After getting in touch with the listed maintainer of the ARM26 floppy and hard drive maintainer, I found out that he had passed it on to Ian Molton. Signed-off-by: James Nelson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Problems disabling SYSCTL Create a cond_syscall for sys32_sysctl and make all architectures use it. Also fix the architectures that dont wrap their 32bit compat sysctl code. Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] genhd: rename device_init Rename device_init to make it more unique. Useful when looking through debug initcall bootlogs. While I'm in the area, also make it static. Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/core: compat_ioctl conversion minor fixes Slightly tidy up Andi Kleen's compat_ioctl conversion for the InfiniBand MAD driver by removing the no-longer-needed include of ioctl32.h, killing unreachable code and doing some really anal whitespace fixing. Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/mthca: more Arbel Mem-Free support Continue development of Arbel Mem-Free support: we now compute a valid profile, allocate context memory, map sufficient aux memory for HCA page tables, map sufficient context memory to cover all reserved firmware resources and successfully call the INIT_HCA and QUERY_ADAPTER firmware commands. Fix a few error gotos that unwound the wrong things. Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/mthca: implement modifying port attributes Implement the port_modify() device method for mthca using the SET_IB firmware command. In particular this allows changing the port capability mask. Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/core: fix port capability enums bit order Correct defines of port capability mask enum values (bits were ordered backwards) and add new capability bits from IBA spec version 1.2. Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/mthca: don't write ECR in MSI-X mode From: "Michael S. Tsirkin" We don't need to write to the ECR to clear events when using MSI-X, since we never read the ECR anyway. Signed-off-by: Michael S. Tsirkin Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/mthca: pass full process_mad info to firmware From: "Michael S. Tsirkin" Pass full extended MAD information to firmware when a work completion is supplied to the MAD_IFC command. This allows B_Key checking/trap generation. Signed-off-by: Michael S. Tsirkin Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/mthca: optimize event queue handling From: "Michael S. Tsirkin" Event queue handling performance improvements: - Only calculate EQ entry address once, and don't truncate the consumer index until we really need to. - Only read ECR once. If a new event occurs while we're in the interrupt handler, we'll get another interrupt anyway, since we only clear events once. Signed-off-by: Michael S. Tsirkin Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/mthca: test IRQ routing during initialization When we switch to interrupt-driven command mode, test interrupt generation with a NOP firmware command. Broken MSI/MSI-X and interrupt line routing problems seem to be very common, and this makes the error message much clearer -- before this change we would mysteriously fail when initializing the QP table. Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/ipoib: remove uses of yield() Replace uses of yield() with msleep(1) as suggested by kernel janitors. Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/core: add IsSM userspace support Implement setting/clearing IsSM port capability bit from userspace via "issm" special files (set IsSM bit on open, clear on close). Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/mthca: clean up ioremap()/request_region() usage From: "Michael S. Tsirkin" Here are misc fixes for mthca mapping: 1. Thinkably, MSI tables or another region could fall between HCR and ECR tables. Thus its arguably wrong to map both tables in one region. So, do it separately. I think its also more readable to have ecr_base and access ecr there, not access ecr with hcr pointer. 2. mthca_request_regions error handling was borken (wrong order of cleanups). For example on all errors pci_release_region was called which is wrong if the region was not yet mapped. And other such cleanups. 3. Fixed some error messages too. Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/mthca: remove x86 SSE pessimization Get rid of the x86 SSE code for atomic 64-bit writes to doorbell registers. Saving/setting CR0 plus a clts instruction are too expensive for it to ever be a win, and the config option was just confusing. Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand/mthca: initialize mutex earlier The cap_mask_mutex needs to be initialized before ib_register_device(), because device registration will call client init functions that may try to modify the capability mask. Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: tcic: eleminate deprecated check_region() From: Randy Dunlap tcic: eliminate deprecated check_region(); Signed-off-by: Randy Dunlap Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: i82365: use CONFIG_PNP instead of __ISAPNP__ From: Randy Dunlap Use CONFIG_PNP consistenly, for allocating and freeing resources, drop __ISAPNP__. Signed-off-by: Randy Dunlap Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: i82092: fix checking of return value from request_region From: Randy Dunlap i82092: check return value from request_region() correctly; apparently unused for awhile now; Signed-off-by: Randy Dunlap Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: socket->{a,c}region are unused From: Christoph Hellwig socket->{a,c}_region aren't ever touched elsewhere, so let's kill this. Signed-off-by: Christoph Hellwig Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: use unsigned long for IO port address With Randy Dunlap PCMCIA: convert internal I/O port addresses to unsigned long (kio_addr_t). Dominik pointed out that some ioaddr_t data are exposed to userspace, so don't touch those structures. Linus said: But the right thing is definitely to make an IO port pointer be "unsigned int" or even "unsigned long". URL: http://lkml.org/lkml/2005/1/11/168 Signed-off-by: Randy Dunlap Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] videotext: ioctls changed to use _IO macros From: Michael Geng This patch switches the videotext drivers over to use the _IO macros for ioctls. video_usercopy() works correctly then. The drivers will also map the old to the new ioctl numbers to make sure old apps don't break. The patch also updates Documentation/ioctl.h to reflect that change. and deletes a unused struct in include/linux/videotext.h. Signed-off-by: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] video/arv: remove casts Remove unneeded casts of (void *) pointers. Signed-off-by: Domen Puncer Signed-off-by: Gerd Knorr - Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] video/w9966: remove casts Remove unneeded casts of (void *) pointers. Signed-off-by: Domen Puncer Signed-off-by: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] video/zr36120: remove casts Remove unneeded casts of (void *) pointers. Signed-off-by: Domen Puncer Signed-off-by: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] v4l: video-buf update - Fix a memory leak in video-buf.c - Small update for the video-buf-dvb.c module. Signed-off-by: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] v4l2 tuner api update Add new tuner type to the v4l2 API. Signed-off-by: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] v4l: tuner update - add new tuner types. - add support for digital tv tuning. - make tda9887 output ports more configurable. Signed-off-by: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] v4l: add tveeprom module. Add a module which can parse config informations out of TV card eeproms. Will be used by bttv, cx88 and ivtv. Signed-off-by: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] v4l: tvaudio update - minor msp3400 updates. - add tea6320 support. Signed-off-by: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] v4l: bttv IR input driver update This patch enables IR support for one AverMedia card and drops a obsolete function. Signed-off-by: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] v4l: bttv update - some cleanups merged. - use new tveeprom module to configure Hauppauge cards. - add new tv cards. Signed-off-by: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] v4l: saa7134 module - fix saa7134 module loading issues. Signed-off-by: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] v4l-saa7134-module fix New version, this time using a #define, which should kill the reference to need_* as well ... Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] add i2c adapter id for the cx88 driver. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] radeonfb: Set accelerator id Set accelerator id for radeonfb. This id is checked by some user apps such as DirectFB. Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] vesafb: Change return error id With I'm getting a message in dmesg: "localhost kernel: vesafb: probe of vesafb0 failed with error -6" I searched the web, and found that a lot of people are getting this, but I couldn't find an answer, so I looked into it. This appears to be because "vesafb" returns -ENXIO ("No such device or address") when its probe function fails. However, driverse/base/bus.c spews an error message during device_attach() if a matching driver's probe function returns anything but -ENODEV ("No such device"). Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] intelfb: Workaround for 830M This is a work around for the 830M with intelfb. Relative to 2.6.10. Without this patch, updates to the DSPACNTR register will be ignored. On the 830M, the display plane needs to be enabled before writing to any of the other bits in the DSPACNTR register. This patch detects the specific case, temporarily enables the plane, updates the register, and then disables the plane. It also appears to require some settling time, but not an entire frame's time. Without this change, the pixel format fields in DSPACNTR won't get written on the 830M. Signed-off-by: Andrew Pfiffer Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fbcon: Save blank state last Save blank state after do_blank|unblank_screen() since this flag is checked in fbcon_blank(). Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] backlight: Fix compile error if CONFIG_FB is unset With Andrew Zabolotny LD init/built-in.o LD .tmp_vmlinux1 drivers/built-in.o(.text+0x9bfa): In function `lcd_device_register': : undefined reference to `fb_register_client' drivers/built-in.o(.text+0x9ce3): In function `lcd_device_unregister': : undefined reference to `fb_unregister_client' drivers/built-in.o(.text+0xa16a): In function `backlight_device_register': : undefined reference to `fb_register_client' drivers/built-in.o(.text+0xa253): In function `backlight_device_unregister': : undefined reference to `fb_unregister_client' make: *** [.tmp_vmlinux1] Error 1 Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] matroxfb: FB_MATROX_G Kconfig changes The current Kconfig entries for the Matrox G cards are quite confusing: config FB_MATROX_G450 bool "G100/G200/G400/G450/G550 support" depends on FB_MATROX config FB_MATROX_G100A bool "G100/G200/G400 support" depends on FB_MATROX && !FB_MATROX_G450 The patch below contains: - remove FB_MATROX_G100{,A} and rename FB_MATROX_G to FB_MATROX_G450 (FB_MATROX_G450 included support from the G100 to the G550, so I don't see any non-historic reason why to call it G450) - small update for the FB_MATROX_G Kconfig text The disadvantage of this patch is, that you can no longer select support only for the G100-G400 without supporting the G450 and G550. But compared with the current confusing Kconfig setup, I don't think that's a big issue. Signed-off-by: Adrian Bunk Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Include type information as module info where possible Module parameters no longer have a type in general, as we use a callback system (module_param_call()). However, it's useful to include type information in the commonly-used wrappers: module_param, module_param_string and module_param_array. Signed-off-by: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix architecture names in hugetlbpage.txt Anton fixed the code recently, but forgot to fix the documentation. There is no "ia32" thing, its i386. The other thing is named 'ia64' in arch/ Signed-off-by: Olaf Hering Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: fix use kref for device_node refcounting (fix) The recent ppc64 patch to use kref for device_node refcounting introduced an unbalanced get/put in of_add_node which would cause newly-added device nodes to be prematurely freed. Sorry for the screwup, a more rigorously tested fix follows. Signed-off-by: Nathan Lynch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [VLAN]: Eliminate gcc warnings with PROC_FS=n Signed-off-by: Randy Dunlap Signed-off-by: David S. Miller [NETFILTER]: IRC Zero Port Fix Ian Kumlien reported that new NAT code started sending out DCC requests with 0 as the IP address. That prompted me to write a simple IRC test case, which both illustrated the bug, and found another one in that the wrong expectation was being set up when NAT occurred. Signed-off-by: Rusty Russell Signed-off-by: David S. Miller [NETFILTER]: Avoid breaking userspace due to tuple change Andreas Schwab points out that the ipt_conntrack match exposes struct [MAINTAINERS]: Fix my email address in PPPOE entry. Signed-off-by: David S. Miller [NET]: netpoll: Fix NAPI polling race on SMP From: Matt Mackall This avoids a nasty NAPI race by checking that work was actually scheduled for the CPU netpoll is running on and pulls the NAPI-specific code out into a separate function. Original idea from Jeff Moyer Tested by Andrew Tridgell Signed-off-by: Matt Mackall Signed-off-by: Andrew Morton Signed-off-by: David S. Miller [TUN/TAP]: Add missing trans_start and last_rx setting. But as stated in bonding.txt, the ARP monitor requires the underlying driver to update dev->trans_start and dev->last_rx. The patch below adds the required functionality to the TUN/TAP driver. Please test if this helps in your case. Signed-off-by: Andrew Morton Signed-off-by: David S. Miller [XFRM]: Probe selected algorithm only. This patch removes an annoying problem in xfrm_user. As it is every time an SA is added it probes every known algorithm in the universe. Now if they all existed it would be OK. However, for the ones which don't actually exist this causes multiple /sbin/modprobe processes to be spawned which slows the system down when you're adding hundreds of SAs. Since we know the type of algorithm required when we're adding a new SA, we can get away with only probing the selected algorithms. This is what the following patch does for xfrm_user. Signed-off-by: Herbert Xu Signed-off-by: James Morris Signed-off-by: David S. Miller [PATCH] fix broken cross compiles The change to kbuild to use -isystem `gcc -print-file-name=include` broke our parisc crosscompile (and presumably everyone else's). The reason is that you have a := in the NOSTDINC_FLAGS rule, which is evaluated in situ (i.e. before we've had a chance to set CROSSCOMPILE on CC) so the gcc include path is actually the native one not the crosscompiler one. On parisc this causes us to be unable to handle _builtin_va functions, but I bet there are a heap of other problems. Acked-by: Sam Ravnborg Signed-off-by: Linus Torvalds [NET]: Set NLM_F_MULTI for neighbour rtnetlink messages to userspace. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller [ACPI] ACPICA 20050125 from Bob Moore Fixed a recently introduced problem with the Global Lock where the underlying semaphore was not created. This problem was introduced in version 20050114, and caused an AE_AML_NO_OPERAND exception during an Acquire() operation on _GL. The local object cache is now optional, and is disabled by default. #define ACPI_ENABLE_OBJECT_CACHE to enable the local cache. Fixed an issue in the internal function acpi_ut_evaluate_object() concerning the optional "implicit return" support where an error was returned if no return object was expected, but one was implicitly returned. AE_OK is now returned in this case and the implicitly returned object is deleted. acpi_ut_evaluate_object() is only occasionally used, and only to execute reserved methods such as _STA and _INI where the return type is known up front. Fixed a few issues with the internal convert-to-integer code. It now returns an error if an attempt is made to convert a null string, a string of only blanks/tabs, or a zero-length buffer. This affects both implicit conversion and explicit conversion via the ToInteger() operator. The internal debug code in acpi_ut_acquire_mutex() has been commented out. It is not needed for normal operation and should increase the performance of the entire subsystem. The code remains in case it is needed for debug purposes again. acpica-unix-20050125.patch [IA64] fix per-CPU MCA mess and make UP kernels work again This patch cleans up the per-CPU MCA mess with the following changes (and yields a UP kernel that actually boots again): - In percpu.h, make per_cpu_init() a function-call even for the UP case. - In contig.c, enable per_cpu_init() even for UP since we need to allocate the per-CPU MCA data in that case as well. - Move the MCA-related stuff out of the cpuinfo structure into per-CPU variables defined by mca.c. - Rename IA64_KR_PA_CPU_INFO to IA64_KR_PER_CPU_DATA, since it really is a per-CPU pointer now. - In mca.h, move IA64_MCA_STACK_SIZE early enough so it gets defined for assembly-code, too. Tidy up struct ia64_mca_struct. Add declaration of ia64_mca_cpu_init(). - In mca_asm.[hS], replace various GET_*() macros with a single GET_PERCPU_ADDR() which loads the physical address of an arbitrary per-CPU variable. Remove all dependencies on the layout of the cpuinfo structure. Replace hardcoded stack-size with IA64_MCA_STACK_SIZE constant. Replace hardcoded references to ar.k3 with IA64_KR(PER_CPU_DATA). - In setup.c:cpu_init(), initialize ar.k3 to be the physical equivalent of the per-CPU data pointer. - Nuke silly ia64_mca_cpu_t typedef and just use struct ia64_mca_cpu instead. - Move __per_cpu_mca[] from setup.c to mca.c. - Rename set_mca_pointer() to ia64_mca_cpu_init() and sanitize it. - Rename efi.c:pal_code_memdesc() to efi_get_pal_addr() and make it return the PAL address, rather than a memory-descriptor. - Make efi_map_pal_code() use efi_get_pal_addr(). Signed-off-by: David Mosberger-Tang Signed-off-by: Tony Luck [PATCH] fix ext3 quota allocation bug on error path ... looking at ext3_xattr_block_set() [fs/ext3/xattr.c] ... I see that error = -EDQUOT; if (DQUOT_ALLOC_BLOCK(inode, 1)) goto cleanup; allocates a quota block, but right after that several error echecks happen ... if (error) goto cleanup; and I don't see any DQUOT_FREE_BLOCK() in the errorpath cleanup: if (ce) mb_cache_entry_release(ce); brelse(new_bh); if (!(bs->bh && s->base == bs->bh->b_data)) kfree(s->base); return error; I'd suggest the attached fix. Acked-by: Jan Kara Acked-by: Andreas Gruenbacher Signed-off-by: Linus Torvalds [IA64] r23 was used without being set There is one small problem. In mca_asm.S, r23 was used without being set and the hardcoded value 40 is no longer valid (patch below). With linux-ia64-test-2.6.11 plus David's patch plus the patch below, 1024 memory uncorectable errors were injected and sucessfully recovered on an SGI Altix test machine. 1024 is the number of entries in the page_isolate[] array in arch/ia64/kernel/mca_drv.c. When the array is full, the recovery code says the error is not recoverable and the system reboots. Signed-off-by: Russ Anderson Signed-off-by: Tony Luck [TG3]: 5750 fixes Some misc. fixes for 5750. The first 2 fixes below are for correctness. - Do not set extended MAC addresses for 5750 - Do not set NIC ring addresses in send ring and receive return ring RCBs for 5750 - Check eeprom write protect bit for 5750 Signed-off-by: Michael Chan Signed-off-by: David S. Miller [TG3]: Update driver version and reldate. Signed-off-by: David S. Miller [MM]: Do not even do the runtime PTRS_PER_{PMD,PUD} checks. Based upon suggestions from Nick Piggin. Signed-off-by: David S. Miller [XFS] Fix NFS exporting with modular nfsd SGI-PV: 923968 SGI-Modid: xfs-linux:xfs-kern:186566a Signed-off-by: Christoph Hellwig Signed-off-by: Nathan Scott [ATM]: Fix IRQ flags type in lec_arp_expire_vcc It should be unsigned long. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller [IPV4]: Keep fragment queues private to each user. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller drm: fix setversion in drm core model Setversion ioctl was broken for drm core, fix this. Signed-off-by: Dave Airlie [IPSEC]: Fix processing of error from crypto module. ESP needs to check for error returns from calls to crypto_cipher_setkey(). Signed-off-by: David S. Miller Input: ACK/NAK processing rules in libps2 were too strict - while it is a good idea to discard any character other than ACK/NAK during probe it causes missing releases and keys getting "stuck" when a command issued on enabled device. The effect is easily demonstrated with the following command: while true; do xset led 3; xset -led 3; done With this change extra characters will be discarded only if device has not been marked as "enabled" yet. Signed-off-by: Dmitry Torokhov [ATM]: [fore200e] can't cleap in transmit routine Signed-off-by: Chas Williams Signed-off-by: David S. Miller [ATM]: [he] reorder add_wait_queue() and set_current_state() Signed-off-by: Nishanth Aravamudan Signed-off-by: Chas Williams Signed-off-by: David S. Miller [ATM]: [nicstar] small cleanup for some globals Signed-off-by: Adrian Bunk Signed-off-by: Chas Williams Signed-off-by: David S. Miller [ATM]: [svc] get accounting right when we remove skb Signed-off-by: Chas Williams Signed-off-by: David S. Miller drm: add support for radeon flags Add flags to the radeon driver, needed for HyperZ patch. Signed-off-by: Dave Airlie [ATM]: replace schedule_timeout() with msleep() Signed-off-by: Nishanth Aravamudan Signed-off-by: Chas Williams Signed-off-by: David S. Miller [NET]: Remove mandoc reference to deleted file net_init.c This patch by Jesper Juhl is still required in 2.6.11-rc2-mm1. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [ATALK]: Remove gcc warning when PROC_FS=n Signed-off-by: Randy Dunlap Signed-off-by: David S. Miller drm: fix minor bug on X recycling with freeing io buffer The previous checkin missed an issue on X recycling. Signed-off-by: Dave Airlie drm: add R200_EMIT_TCL_POINT_SPRITE_CNTL add support for new packet. won't be used until hyper-z version number increase. Signed-off-by: Dave Airlie drm: radeon hyperz support.. HyperZ is an undocumented feature (outside of ATI) of the radeon chips, this is a reverse engineered implementation. From: Roland Scheidegger and Stephane Marchesin Signed-off-by: Dave Airlie drm: add radeon framebuffer tiling support and surface management Add support to the radeon drm for framebuffer tiling, requires a new DDX and 3D driver. From: Stephane Marchesin and Roland Scheidegger Signed-off-by: Dave Airlie drm: update pci ids.. add missing radeon pci id add i915gm pci ids. Signed-off-by: Dave Airlie input: Always bring the i8042 multiplexer out of multiplexing mode before rebooting. Signed-off-by: Vojtech Pavlik input: Enable scancode event generation in the HID driver. This should allow changing HID->event mappings (via EVIOCS*) in the future and make debugging easier now. Signed-off-by: Vojtech Pavlik input: Add missing input_sync() calls to atkbd.c. Signed-off-by: Vojtech Pavlik [ARM] Make vector labels consistent with naming scheme Signed-off-by: Russell King [NET]: Kill excess initializer Signed-off-by: David S. Miller [ARM] Replace duplicate sets of vector code with assembler macro. Signed-off-by: Russell King [NET]: Kill now unused local var from sock_init(). Signed-off-by: David S. Miller [libata sata_sil] add another Seagate driver to blacklist [PATCH] dscc4: use of uncompletely initialized struct dscc4_set_quartz() is issued with an argument in an unitialized state and the kernel does not like it. Signed-off-by: Francois Romieu Signed-off-by: Jeff Garzik [PATCH] dscc4: code factorisation Small code factorization. Signed-off-by: Francois Romieu Signed-off-by: Jeff Garzik [PATCH] dscc4: error status checking and pci janitoring Error status checking and PCI janitoring - propagation of the error code; - pci_request_region use in dscc4_init_one; - missing pci_disable_device() added to the error path; Signed-off-by: Francois Romieu Signed-off-by: Jeff Garzik [PATCH] dscc4: removal of unneeded casts Removal of unneeded casts. Signed-off-by: Francois Romieu Signed-off-by: Jeff Garzik [PATCH] dscc4: removal of unneeded variable Removal of unneeded variable and more spaces for my eyes. Signed-off-by: Francois Romieu Signed-off-by: Jeff Garzik [PATCH] de2104x: Fixes breakage in getting MAC address Fixes breakage in getting MAC address on built-in tulip in alphastation 200 - without delay we are skipping bytes. Signed-off-by: Al Viro Signed-off-by: Jeff Garzik [PATCH] SATA AHCI support for Intel ICH7R This patch adds the Intel ICH7R DID's to the ahci.c SATA AHCI driver for ICH7R SATA support. Signed-off-by:  Jason Gaston Signed-off-by: Jeff Garzik [PATCH] e100 locking up netconsole. From: Steven Rostedt If the transmit buffer of the e100 overflowed, then the system would hang. This was caused because the e100 driver would stop the queue, and netpoll_send_pkt in netpoll.c would then loop forever. This is because the e100 net_poll would never start the queue again after the transmits have completed. For those that use the e100 and netconsole, all you need to do is a sysreq 't' to lock up the system. Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik [PATCH] netdrv gianfar: Fix usage of gfar_read in debug code Fixes instances where gfar_read() was invoked in debug codewith a value, rather than a pointer. Signed-of-by: Andy Fleming Signed-of-by: Kumar Gala Signed-off-by: Jeff Garzik [PATCH] (1/2) skfddi: initialization When the skfddi driver was converted to the new PCI netdevice interface, it never got tested with real hardware. The initialization got broken, this should fix it. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik [PATCH] (2/2) skfddi: netdev_priv and cast cleanup Use netdev_priv() and get rid of the PRIV() macro by using the correct data element. Also eliminate casts, where type is correct. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik [ACPI] reduce stack usage http://bugzilla.kernel.org/show_bug.cgi?id=2901 Written-by: Luming Yu Signed-off-by: Len Brown [ACPI] ACPI_FUTURE_USAGE for acpi_ut_create_pkg_state_and_push() Signed-off-by: Adrian Bunk Signed-off-by: Len Brown [ARM PATCH] 2437/1: ixp4xx: cosmetic change to arch_reset() Patch from David Vrabel Use some #define'd constants in the ixp4xx's arch_reset(). Signed-off-by: David Vrabel Signed-off-by: Russell King Fix permissions on drivers/scsi/a100u2w.c Input: libps2 - fix timeout handling in ps2_command, switch to using wait_event_timeout instead of wait_event_interruptible_timeout now that first form is available. Signed-off-by: Dmitry Torokhov input: Only root should be able to set the N_MOUSE line discipline. Signed-off-by: Vojtech Pavlik input: Fix MUX mode disabling. Signed-off-by: Vojtech Pavlik [WATCHDOG] i8xx_tco.c-ICH4/6/7-patch Added support for the ICH4-M, ICH6, ICH6R, ICH6-M, ICH6W and ICH6RW chipsets. Also added support for the "undocumented" ICH7. [ARM PATCH] 2438/1: S3C2410 - fix IO address calculations Patch from Ben Dooks Patch from Dimitry Andric. The include/asm-arm/arch-s3c2410/io.h file converts PC style port addresses to real ARM addresses, and needs to return an `void __iomem *` to avoid a number of warnings: CC drivers/ide/ide-iops.o drivers/ide/ide-iops.c: In function `ide_insw': drivers/ide/ide-iops.c:49: warning: passing arg 1 of `__raw_readsw' makes pointer from integer without a cast drivers/ide/ide-iops.c: In function `ide_insl': drivers/ide/ide-iops.c:59: warning: passing arg 1 of `__raw_readsl' makes pointer from integer without a cast drivers/ide/ide-iops.c: In function `ide_outsw': drivers/ide/ide-iops.c:79: warning: passing arg 1 of `__raw_writesw' makes pointer from integer without a cast drivers/ide/ide-iops.c: In function `ide_outsl': drivers/ide/ide-iops.c:89: warning: passing arg 1 of `__raw_writesl' makes pointer from integer without a cast CC lib/iomap.o lib/iomap.c: In function `ioread8_rep': lib/iomap.c:140: warning: passing arg 1 of `__raw_readsb' makes pointer from integer without a cast lib/iomap.c: In function `ioread16_rep': lib/iomap.c:144: warning: passing arg 1 of `__raw_readsw' makes pointer from integer without a cast lib/iomap.c: In function `ioread32_rep': lib/iomap.c:148: warning: passing arg 1 of `__raw_readsl' makes pointer from integer without a cast lib/iomap.c: In function `iowrite8_rep': lib/iomap.c:156: warning: passing arg 1 of `__raw_writesb' makes pointer from integer without a cast lib/iomap.c: In function `iowrite16_rep': lib/iomap.c:160: warning: passing arg 1 of `__raw_writesw' makes pointer from integer without a cast lib/iomap.c: In function `iowrite32_rep': lib/iomap.c:164: warning: passing arg 1 of `__raw_writesl' makes pointer from integer without a cast Signed-off-by: Dimitry Andric Signed-off-by: Ben Dooks Signed-off-by: Russell King [ARM PATCH] 2439/1: S3C2410 - serial driver parity selection Patch from Ben Dooks Patch from Dimitry Andric. The s3c2410 serial driver selects the opposite parity mode if parity is enabled. Signed-off-by: Dimitry Andric Signed-off-by: Ben Dooks Signed-off-by: Russell King [ARM PATCH] 2440/1: S3C2410 - serial auto-flow-control enable Patch from Ben Dooks Patch from Shannon Holland Enable automatic flow control if requested. Signed-off-by: Shannon Holland Signed-off-by: Ben Dooks Signed-off-by: Russell King [ARM PATCH] 2442/1: Simplifying NODES_SHIFT Patch from Marc Singer The special case for the Sharp LH processors is unnecessary. A macro override makes it cleaner and concentrates the change where it ought to be. The default in include/asm-arm/numnodes.h means that only platforms that care to change the default need to do anything. Signed-off-by: Marc Singer Signed-off-by: Russell King [IA64] entry.S: another syscall exit path optimization David Mosberger wrote on Wednesday, January 26, 2005 1:31 PM > Couldn't you restore r8/r10 after .work_pending is done in if > pLvSys is TRUE? That way, .work_processed would simply preserve > (save _and_ restore) r8/r10. Thank you for reviewing and the suggestion. Here is the updated patch, net saving for 6 cycles compares to 4 with earlier version. Signed-off-by: Ken Chen Signed-off-by: Rohit Seth Signed-off-by: Tony Luck [ARM] [1/4] Introduce svc_entry macro for common entry code This is the first of 4 patches which factor out common code in the ARM exception entry assembly code, aiming towards a reduction in the size of the changes required here for SMP support. These patches are low impact, and will be merged over the coarse of the next 4 days. This patch addresses the code handling exception entry from supervisor (kernel) mode. [IA64] mca.c: make cpu hot add work again Recent mca percpu changes broke a cpu being brought up after initial boot which is required for cpu hotplug. ia64_mca_cpu_init() must be __devinit so it is not discarded in a hotplug kernel. Signed-off-by: Ashok Raj Signed-off-by: Tony Luck [IA64] Remove Merced B-step support Remove left-over support for Merced B-step CPUs as suggested by Jim Wilson. Signed-off-by: David Mosberger-Tang Signed-off-by: Tony Luck [IA64-SGI] move shubio.h into include/asm-ia64/sn/ We have a few drivers that want to include shubio.h, like mmtimer and the xp* drivers. Moving it from arch/ia64/sn/include to include/asm-ia64/sn makes it a little easier for drivers to get at. Signed-off-by: Jesse Barnes Signed-off-by: Tony Luck [IA64] ptrace.c small comment fix Seems like I can't spll... Signed-off-by: David Mosberger-Tang Signed-off-by: Tony Luck [IA64] head.S: clean away dead code (EARLY_PRINTK) While working on something else, I noticed that there are still some CONFIG_IA64_EARLY_PRINTK bits left over in head.S, even though that option is long gone (replaced by console=uart etc.) While at it, I also added a "hint @pause" in the endless loop at the end of _start. Not that it ever should get executed, but if it ever does, why waste power/cycles? Signed-off-by: David Mosberger-Tang Signed-off-by: Tony Luck [PATCH] document atkbd.softraw Document atkbd.softraw (and shorten a few long lines nearby). [Bluetooth] Remove MTU check for the L2CAP raw socket The L2CAP raw socket is associated with the signal channel and the check for the maximum transfer unit makes no sense here. Signed-off-by: Marcel Holtmann [Bluetooth] Update inquiry cache from clock offset event The HCI clock offset event contains the actual clock offset for the connection. It is the same value that is received from an inquiry response and it can be used to make further reconnections faster. Signed-off-by: Marcel Holtmann [Bluetooth] Support raw mode only devices This patch introduces a quirk flag for turning a device into a raw mode only device. Signed-off-by: Marcel Holtmann [Bluetooth] Use raw mode for the CSR sniffer device The CSR sniffer device looks like a normal H:2 Bluetooth device, but it is not and so mark it as raw mode device. Signed-off-by: Marcel Holtmann [PATCH] fix an oops in ata_to_sense_error Signed-off-by: Jeff Garzik input: Document the atkbd.softraw module parameter. From: Andries Brouwer Signed-off-by: Vojtech Pavlik input: Ignore non-LED events in hid-input hidinput_event(). This gets rid of the "event field not found" message caused by EV_MSC type events. Signed-off-by: Vojtech Pavlik [ARM] [2/4] Introduce inv_entry macro to contain common entry code This is the second of 4 patches which factor out common code in the ARM exception entry assembly code, aiming towards a reduction in the size of the changes required here for SMP support. These patches are low impact, and will be merged over the coarse of the next 3 days. This patch addresses the code handling exception entry from invalid (irq, fiq, abort) modes. However, in converting to a macro, a minor bug has been fixed which would merely cause a misleading register dump. [PATCH] x86-64: Fix missing TLB flushes in change_page_attr Fix bug in change_page_attr - with multiple pages it would not flush correctly. Also add a small optimization of not flushing when not needed. Found and fixed by Andrea. Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds [PATCH] x86-64: Fix empty nodes handling with SRAT Handle empty nodes in SRAT parsing. Avoids an oops at boot time. Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds [PATCH] cfq-iosched: in_driver accounting bug Yet another accounting bug, this time hits on requeue. It is possible for ->accounted to be set with ->in_flight, so don't nest the cfq_account_completion() inside the ->in_flight check. Signed-off-by: Jens Axboe Signed-off-by: Linus Torvalds [Bluetooth] Skip raw mode devices when choosing source device When selecting the best source device for outgoing connections the devices in raw mode should be skipped. Signed-off-by: Marcel Holtmann [ARM] [3/4] Introduce usr_entry macro to contain common entry code This is the third of 4 patches which factor out common code in the ARM exception entry assembly code, aiming towards a reduction in the size of the changes required here for SMP support. These patches are low impact, and will be merged over the coarse of the next few days. This patch addresses the code handling exception entry from user modes. [PATCH] Fix conntrack fragment route cache memory leak Thanks to Russell King for some excellent debugging. Conntrack defragments locally generated packets before they hit ip_fragment. In this case the fragments have skb->dst set, and that needs to be released. Signed-off-by: Linus Torvalds [IPV4]: Do not leak dst entries in ip_copy_metadata(). Netfilter conntrack can defragment locally generated packets before they hit ip_fragment(). In this case the fragments have skb->dst set already, so we have to release that existing reference before overwriting skb->dst. Signed-off-by: David S. Miller [IPV6]: Fix ip6_copy_metadata potential dst leak too. Same fix as per ipv4 ip_copy_metadata(). Signed-off-by: Hideaki YOSHIFUJI Signed-off-by: David S. Miller [ACPI] add "pnpacpi=off" Signed-off-by: David Shaohua Li Signed-off-by: Len Brown [NETFILTER]: Fix TCP header offset used in tcp_manip_pkt(). Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [NETFILTER]: Fix ICMP checksumming in icmp_reply_translation() The function returns before recalculating the checksum in some cases. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [NET]: Fix kernel oops if base_reachable_time is set to zero. Signed-off-by: Hideaki YOSHIFUJI Signed-off-by: David S. Miller [ACPI] tell parse_cmdline_early() that "pnpacpi=off" != "acpi=off" Signed-off-by: Len Brown [ARM] [4/4] Reformat assembly code to be consistent. [PATCH] gdth: fix module_param() type for 'irq' Fix 'irq' module_param: it is an array: drivers/scsi/gdth.c:679: warning: return from incompatible pointer type Signed-off-by: Randy Dunlap Signed-off-by: James Bottomley SCSI Fix oops with faulty DVD There's a refcounting problem on the error leg of sr_open(). fix it. Signed-off-by: James Bottomley [XFS] Fix selection of EXPORTFS when using XFS to get a good build when XFS=y and EXPORTFS=m. SGI-PV: 923968 SGI-Modid: xfs-linux-melb:xfs-kern:21326a Signed-off-by: Nathan Scott [ARM] Improve commenting in entry-armv.S The SMP patch set for ARM contained a fair amount of comments in addition to code changes. Merge relevant comments separately from the code. [ARM PATCH] 2434/1: Adds new machine: ixp4xx based gtwx5715 Patch from George Joseph Machine number 641 already assigned. Changes... arch/arm/boot/compressed/head-xscale.S arch/arm/mach-ixp4xx/Kconfig arch/arm/mach-ixp4xx/Makefile include/asm-arm/arch-ixp4xx/uncompress.h Adds... arch/arm/mach-ixp4xx/gtwx5715-pci.c arch/arm/mach-ixp4xx/gtwx5715-setup.c include/asm-arm/arch-ixp4xx/gtwx5715.h Includes changes requested by Russell King Signed-off-by: George T Joseph Signed-off-by: Deepak Saxena Signed-off-by: Russell King [ARM PATCH] 2429/1: PXA Corgi - Bugfix + Cleanups Patch from Richard Purdie PXA Corgi - Bugfix + Cleanups: * Make sure the MMC timer init is called *before* enabling the interrupt (thanks Nicholas for pointing this out). * Add externs for the exported ssp functions * Finish commenting Corgi specific GPIOs [Applies after 2428/1] Signed-off-by: Richard Purdie Signed-off-by: Russell King [ARM PATCH] 2428/1: PXA Corgi - Add Backlight Device Definition Patch from Richard Purdie Add a device definition to enable the backlight on the corgi machines (Sharp SL-C7xx series). [The backlight driver has been submitted to linux-fbdev-devel] [Applies after 2426/1] Signed-off-by: Richard Purdie Signed-off-by: Russell King drm: fix drm_sysfs lock initializer... unify the initializer. Signed-off-by: Dave Airlie drm_memory.h doesn't need to #include tlbflush.h The flush_tlb_kernel_range call in drm_memory.h was removed in 2003, so there's no more reason for this #include. Signed-off-by: Adrian Bunk Signed-off-by: Dave Airlie [ARM] Remove adrsvc macro. The adrsvc macro was used to allow the entry-* files to be built on ARM32 and ARM26 processors. Since we no longer support ARM26 CPUs, eliminate this macro. [NETFILTER]: Improve TCP window tracking retransmission detection Under certain circumstances (high latency WAN links for instance), ack packets get stacked up and arrive in bulk. The current TCP window tracking code interprets these numerous acks as retransmits, and if there are >= 3 retransmits sequentially, it resets the timeout on a conntrack to 5 minutes. The problem lies in the fact that the code currently only examines the seq number of the arriving packet, but does not also look at the seq number being acked. The patch below adds this additional check. Unfortunately, it adds another int32 to ip_ct_tcp, but I could think of no other fool-proof way of fixing it (short of ripping out the retransmission test altogether). Signed-off-by: Phil Oester Signed-off-by: Patrick McHardy [NETFILTER]: fix iptables userspace build Signed-off-by: Pablo Neira Ayuso Signed-off-by: Patrick McHardy [NETFILTER]: Fix ip_conntrack_ftp crash with debugging enabled Signed-off-by: Nicolas Bouliane Signed-off-by: Patrick McHardy [NETFILTER]: Use GFP_ATOMIC in ipt_hashlimit Signed-off-by: Samuel Jean Signed-off-by: Patrick McHardy [ARM PATCH] 2430/3: TLS support for ARM Patch from Nicolas Pitre This implements TLS support in the most efficient way for all ARM processors in use today. The trick is to define a specific address in kernel area that is made readable from user space to hold the TLS pointer so it is highly efficient to retrieve it with no overhead. Since the kernel already maps a page at 0xffff0000 to hold the exception vectors, we can use the top of that page for storing the TLS ptr at 0xffff0ffc. This address has the advantage of fitting optimally with the ARM load addressing mode as follows: mov rd, #0xffff0fff ldr rd, [rd, #-3] Considering load scheduling, this means 2 cycles to retrieve the TLS value which is even faster than a coprocessor access. Even gcc generates the above assembly when given: void *tls = *((void **)0xffff0ffc); This is fine to make the vector page readable from user space since it contains nothing that could compromize security and doesn't require an extra memory page to be allocated. On SMP (which should be ARMv6 and above only) the special reg for TLS will be available. Since ARMv6 binaries are most likely to use strex/ldrex insns instead of swp to implement user space atomic primitives, those ARMv6 binaries won't execute on pre ARMv6 processors anyway. So the abscence of a tls reg is a non issue for them already. Also on SMP targets, since the hivec page can't be relied upon to get the TLS value, we'll have the kernel emulate access to it through the data abort vector for backward compatibility with pre ARMv6 binaries. Otherwise, non SMP ARMv6 kernels will support both methods simultaneously. So the decision to use hivec or tlsreg could depend on whether given library is optimized for ARMv6+ or not. And since ARM SMP devices are still far from becoming mainstream we can safely go with the hivec (and hivec emulation on SMP) for the time being. Signed-off-by: Nicolas Pitre Signed-off-by: Russell King [ARM PATCH] 2443/1: enable iWMMXt on EABI binaries Patch from Nicolas Pitre It appears that the EF_ARM_SOFT_FLOAT is a reserved bit with the new ARM EABI. Since EABI is said to not support FPA (FPA emulation being the reason why we'd want to disable iWMMXt access) we now test for any EABI version as well to turn on iWMMXt access. Signed-off-by: Nicolas Pitre Signed-off-by: Russell King SCSI: fix multiple HBA problem with transport classes All of the transport class patches contain a thinko in device matching (and, unfortunately, one I exhorted everyone not to make in the generic transport class comments): The match matches every container in the class instead of the specific container belonging to the HBA. This causes a oops when there are two or more HBAs in the system. Signed-off-by: James Bottomley Fix missed class_remove_file in attribute_container This moves attribute addition (and removal) to where it should have been in the first place, namely in the attribute_container class. Without this, the transport classes were leaving dangling attributes when the devices were removed. Signed-off-by: James Bottomley [PATCH] MAINTAINERS: add entry for qla2xxx driver. From: Andrew Vasquez Add entry for QLogic qla2xxx driver. Signed-off-by: Andrew Vasquez Signed-off-by: Andrew Morton Signed-off-by: James Bottomley [PATCH] fix scsi cdrom problem I'm not sure what I was thinking in scsi_io_completion(). This small reversion fixes my k3b problem; tested with a USB external burner. Signed-off-by: Douglas Gilbert Signed-off-by: James Bottomley [SPARC64]: __atomic_{add,sub}() must sign-extend return value. Even though we declare these functions as returning a 32-bit signed integer, the sparc64 ABI states that such functions must properly sign-extend the return value to the full 64-bits. Due to this bug, parts of mm/rmap.c were misbehaving when compiled with gcc-3.4 on sparc64. gcc-3.4 was legally using a 64-bit comparison against zero with the return value of __atomic_add(). I would like to thank Hugh Daniels and others for helping to track down this peculiar bug. Signed-off-by: David S. Miller SCSI: fix HBA removal problem with transport classes James Smart pointed out that if you insert and remove a HBA driver a few times, eventually the system oopses. The reason is that the transport classes all kfree their attribute containers, but don't actually unregister them first (so we have freed memory on the container list). The attached should fix this. Signed-off-by: James Bottomley [ARM PATCH] 2445/1: Add OMAP serial registers Patch from Tony Lindgren This patch adds the missing serial port registers to build a bootable OMAP configuration. Signed-off-by: Tony Lindgren Signed-off-by: Russell King [ARM PATCH] 2446/1: Add OMAP H2 defconfig Patch from Tony Lindgren This patch adds a defconfig for OMAP H2 board to build a bootable kernel. Signed-off-by: Tony Lindgren Signed-off-by: Russell King [libata] Remove CDROM drive from PATA DMA blacklist Mirrors changeset from Bart to drivers/ide/* [PATCH] sata_nv: enable generic class support for future NVIDIA SATA This patch adds a new entry in the pci_device_id table that filters by class code, in order to cause unlisted NVIDIA SATA controllers to be probed. In the probe function, we determine whether the device is a SATA or IDE controller by checking the device's bars (NVIDIA SATA controllers will always have 6 bars). Bar5 I/O mapped vs. memory mapped is now determined programmatically by looking at the resource flags of the bar. Signed-off-by: Andrew Chew Signed-off-by: Jeff Garzik [libata] SCSI-to-ATA translation fixes Fixes lesser-used READ VERIFY and READ_16/WRITE_16 translations. Changes: #1. ata_scsi_rw_xlat(): Fix incorrect SCSI to ATA translation for 16 bytes SCSI Read/Write commands. #2. Fix ata_scsi_verify_xlat(): Fix incorrect tf->hob_lbax translation. Signed-off-by: Albert Lee [libata sata_promise] support Promise SATAII TX2/TX4 cards Originally from Peter Smith, with testing and additional contributions from Jens Axboe. [ARM PATCH] 2444/1: GPIO23_SCLK_md now in uppercase in pxa-regs.h Patch from Michael Opdenacker "GPIO23_SCLK_md" renamed to "GPIO23_SCLK_MD" (uppercase) in include/asm-arm/arch-pxa/pxa-regs.h. Done for consistency with all other GPIO_*_MD settings. No other file impacted in mainstream kernel sources. Reported by Nicolas Pouillon. Signed-off-by: Michael Opdenacker Signed-off-by: Russell King [ARM PATCH] 2447/1: IOP3xx PCI resource setup cleanup Patch from Dave Jiang This cleans up the PCI mem and I/O resources assignments for all IOP platforms. All addresses should be cleanly defined and correctly assigned now. Signed-off-by: Dave Jiang Signed-off-by: Russell King [PATCH] Remove unnecessary ";" in schedstat_ macros With Joe Perches Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] alpha: nodemask build fix nodemask.h wants find_next_zero_bit() to take a const address. Fix that up and modify find_next_bit() to suit. (These functions seem too big to be inlined...) Cc: Richard Henderson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] alpha: pgd_index() warning fix mm/memory.c: In function `clear_page_range': mm/memory.c:185: warning: suggest parentheses around + or - inside shift Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] 8250_pnp: 64bit warning fix drivers/serial/8250_pnp.c: In function `serial_pnp_probe': drivers/serial/8250_pnp.c:424: warning: cast to pointer from integer of different size drivers/serial/8250_pnp.c: In function `serial_pnp_remove': drivers/serial/8250_pnp.c:431: warning: cast from pointer to integer of different size Cc: Russell King Cc: Adam Belay Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ftape syntax error 2.6.11-rc2-bk5 introduces two syntax errors under drivers/char/ftape. The following patch replaces ");" at the end of two printks which were accidentally removed. Signed-off-by: Serge Hallyn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] kobject build fix include/linux/kobject.h: In function `to_kset': include/linux/kobject.h:116: warning: implicit declaration of function `container_of' Signed-off-by: Manish Lachwani Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] crypto: fix test vectors Looks like a cleanup broke the test vectors: http://linux.bkbits.net:8080/linux-2.5/gnupatch@41ad5cd9EXGuUhmmotTFBIZdIkTm0A Signed-off-by: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ptrace: last_siginfo also needs tasklist_lock Looks like we fixed only part of the problem earlier. When the child moves away from ptrace notify and resets the last_siginfo, sighand lock helps. But if the child goes further in exit and releases the sighand, we need to test that case too. See ptrace_check_attach() and exit_sighand(). They also use the tasklist_lock. Followed Roland's suggestions on lock primitive and struct assignment. Signed-Off-by: Prasanna Meda Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] random: overflow fix Zwane reports an oops duie to add_entropy_words running off the top of the stack reading its input. The overrun is harmless until it causes a page fault. Looks like I introduced this bug in Aug 2003, but it was hard to trigger until the recent changes. Signed-off-by: Matt Mackall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext2 quota leak fix Fix a subtle bug in error handling of ext2 xattrs. When ext2_sync_inode() fails because of ENOSPC (it could not write inode's dirty data) we want to keep xattrs in a consistent state and release the old block properly. Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] irq_affinity: fix build when CONFIG_PROC_FS=n Need 'irq_affinity' array when CONFIG_PROC_FS=n. With CONFIG_PROC_FS=n, the irq_affinity[NR_IRQS] array is not available in arch/i386/kernel code: arch/i386/kernel/built-in.o(.text+0x10037): In function `do_irq_balance': : undefined reference to `irq_affinity' arch/i386/kernel/built-in.o(.text+0x101a9): In function `do_irq_balance': : undefined reference to `irq_affinity' Signed-off-by: Randy Dunlap Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix audit skb leak on congested netlink socket When auditd is congested the kernel's audit system leaks skb's. First, it takes them off the audit_buffer sklist at which point they are lost, second, it allocates a new skb with 0 length payload. Then (likely still congested), it repeats this losing the new skb. Plug the leak by making sure to requeue the skb, and avoid audit_log_move() on 0 len audit_buffer. Signed-off-by: Chris Wright Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] some minor cleanups for audit_log_lost() messages Some minor cleanups for audit_log_lost() messages. Signed-off-by: Chris Wright Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] wait_for_completion API extension addition fixes Fix up signal_pending and timeout paths for wait_for_completion API extensions. Signed-off-by: Mike Waychison Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] rest_init() local irq fix It's not necessary to keep IRQs disabled after the BKL has been dropped. In fact i think IRQ-disabling doesnt have to be done at all, the patch below ought to solve this scenario equally well, and should solve the PPC side-effects too. Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: back out idle patch for non-powersaving CPU's Back out previous patch to ppc idle that handled CPU's that did not have powersavings. Ingo's fixes to cpu_rest, cause this fix to no longer be needed. Signed-off-by: Kumar Gala Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: (Updated) Pegasos support Here's an updated version of the pegasos support patch for ppc32, fixing a typo in the previous one. Driver patches to come soon. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] i810_audio comment fix Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix BUG in io_destroy With Suparna Bhattacharya I was running a random system call generator against mainline the other day and got this bug report about AIO in dmesg: kernel BUG at fs/aio.c:1249! Each ioctx structure has a "users" field that acts as a reference counter for the ioctx, and a "dead" flag that seems to indicate that the ioctx isn't associated with any particular list of IO requests. The problem, then, lies in aio.c:1247. The io_destroy function checks the (old) value of the dead flag--if it's false (i.e. the ioctx is alive), then the function calls put_ioctx to decrease the reference count on the assumption that the ioctx is no longer associated with any requests. Later, it calls put_ioctx again, on the assumption that someone called lookup_ioctx to perform some operation at some point. This BUG is caused by the reference counts being off. The testcase that I provided looks for a chunk of user memory that's read-only and passes that to the sys_io_setup syscall. sys_io_setup checks that the pointer is readable, creates the ioctx and then tries to write the ioctx handle back to userland. This is where the problems start to surface. Since the pointer points to a non-writable region of memory, the write fails. The syscall handler then destroys the ioctx. The dead flag is zero, so io_destroy calls put_ioctx...but wait! Nobody ever put the ioctx into a request list. The ioctx is alive but not in a list, yet the io_destroy code assumes that being alive implies being in a request list somewhere. Hence, calling put_ioctx is bogus; the reference count becomes 0, and the ioctx is freed. Worse yet, put_ioctx is called again (on a freed pointer!) to clear up the lookup_ioctx that never happened. put_ioctx sees that the reference count has become negative and BUGs. Suparna's patch simply takes that additional ref so that io_destroy() will dtrt. Signed-off-by: Darrick Wong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Disable Sidewinder debug messages Signed-off-by: Michael Marineau Cc: Vojtech Pavlik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mm: oom-killer tunable With This is protect-pids, a patch to allow the admin to tune the oom killer. The tweak is inherited between parent and child so it's easy to write a wrapper for complex apps. I made used_math a char at the light of later patches. Current patch breaks alpha, but future patches will fix it. Signed-off-by: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mm: rework lower-zone protection initialisation - Rename various fields related to the lower-zone protection code to sync up with 2.4. - Remove the automatic determination of the values of the per-zone protection levels from a single tunable. Replace this with a simple per-zone sysctl. Signed-off-by: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mm: fix several oom killer bugs Fix several oom killer bugs, most important avoid spurious oom kills badness algorithm tweaked by Thomas Gleixner to deal with fork bombs This is the core of the oom-killer fixes I developed partly taking the idea from Thomas's patches of getting feedback from the exit path, plus I moved the oom killer into page_alloc.c as it should to be able to check the watermarks before killing more stuff. This also tweaks the badness to take thread bombs more into account (that change to badness is from Thomas, from my part I'd rather rewrite badness from scratch instead, but that's an orthgonal issue ;). With this applied the oom killer is very sane, no more 5 sec waits and suprious oom kills. Signed-off-by: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mm: convert memdie to an atomic thread bitflag This makes memdie a TIF_MEMDIE. memdie will not be modified by the current task, so it cannot be a PF_MEMDIE but it must be a TIF_MEMDIE. Signed-off-by: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] make used_math SMP-safe Convert the unsafe signed (16bit) used_math to a safe and optimal PF_USED_MATH I might have broken arm, see the very first change in the patch to asm-offsets.c, rest looks ok at first glance. If you want used_math to return 0 or 1 (instead of 0 or PF_USED_MATH), just s/!!// in the below patch and place !! in sched.h::*used_math() accordingly after applying the patch, it should work just fine. Using !! only when necessary as the below is optimal. From: Yoichi Yuasa This patch had fixed restore_sigcontext/restore_sigcontext32 about MIPS. Signed-off-by: Yoichi Yuasa Signed-off-by: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] alloc_zeroed_user_highpage() to fix the clear_user_highpage issue This patch adds a new function alloc_zeroed_user_highpage that is then used in the anonymous page fault handler and in the COW code to allocate zeroed pages. The function can be defined per arch to setup special processing for user pages by defining __HAVE_ARCH_ALLOC_ZEROED_USER_PAGE. For arches that do not need to do special things for user pages, alloc_zeroed_user_highpage is defined to simply do alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO, vma, vaddr) This patch needs to update a number of archs. Wish there was a better way to do this. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Make slab use alloc_pages directly __get_free_pages() calls alloc_pages, finds the page_address() and throws away the struct page *. Slab then calls virt_to_page to get it back again. Much more efficient for slab to call alloc_pages itself, as well as making the NUMA and non-NUMA cases more similarr to each other. Signed-off-by: Matthew Wilcox Signed-off-by: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: mv64x60 updates This patch briges the mv64x60 related code up to the latest that I have. It: - adds MPSC support to some ppc bootwrapper files - adds an erratum workaround for the mv64460 - changes some platform_data related structure names - cleans up a bunch of whitespace Signed-off-by: Mark A. Greer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: pmac sleep support update This patch updates the PowerMac sleep support. The ability to sleep is now broken into 2 different flags, one, "may sleep" is set for all motherboards that we know how to put to sleep and wakeup. It gets turned into "can sleep" upon a call from the video driver indicating the ability to wakeup the video card. This doesn't deal with head-less machines, but this can be improved later. It also adds better cache flush code, which improves stability with cpufreq as well as sleep. This patch actually breaks sleep support until the video drivers for the affected machines have been updated. This will come as separate patches. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: katana update This patch updates support for the katana 750i, 752i, and 3750. It: - supports more bus frequencies - uses platform_notify hook to update platform_data entries - does some misc cleanup Signed-off-by: Mark A. Greer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: ev64260 update This patch updates the support for the ev64260 eval platform from Marvell. It: - uses the platform_notify hook to update platform_data - fixes a bug where a window to a device is disabled instead of enabled - does some misc fixups Signed-off-by: Mark A. Greer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: cpci690 update This patch updates the cpci690 platform file. The platform file now uses the platform_notify hook to update platform_data. Signed-off-by: Mark A. Greer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: perfctl-ppc: fix duplicate mmcr0 define Fix a compilation warning due to a duplicate definition of MMCR0_PMXE. The definition comes in perfctr-ppc.patch, but was recently introduced too in Linus tree. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: STx GP3 port Adds support for the STx GP3 board with an MPC8560. Thanks to Dan Malek for the original 2.4 port. Signed-off-by: Matt Porter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: Fix via IDE driver for pegasos The Pegasos machines have the VIA IDE controller configured in a strange way by the firmware. It claims to be fully native, but is actually routed to legacy irqs 14 and 15. This patch works around that in the driver. In the future, I'll try to do an ifdef-less patch by detecting that setup from the chip, and using the new pci_get_legacy_ide_irq() in that case, but I don't have proper HW infos. This patch is good enough in the meantime, I'll come up with a better one later eventually. Signed-off-by: Benjamin Herrenschmidt Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: oprofile timer-mode fallback fix This is oprofile timer-mode fallback fix for ppc. Signed-off-by: Akinobu Mita Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: workaround for mpc10x speculative PCI read erratum 824x and 107 bridges from Freescale/Tundra have an erratum where speculative PCI reads may return stale data. One of the two documented workarounds is to turn of speculative PCI reads. This patch does that. Signed-off-by: Mark A. Greer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: add platform specific machine check output handlers Patch adds generic way for platform port to extend MachineCheckException print-out and adds 44x bus error registers output. It also removes 40x #ifdefs from show_regs and makes 40x use this new platform extension. Signed-off-by: Eugene Surovegin Signed-off-by: Matt Porter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: use platform device style initialization for 85xx serial8250 ports Converts the initialization of serial8250 ports on various 85xx parts from using the old ISA style to a platform device. Signed-off-by: Kumar Gala Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Add Eugene Surovegin to CREDITS Eugene has been contributing kernel code for PPC4xx and embedded stuff in general for some time. Please apply this CREDITS entry for him. Signed-off-by: Matt Porter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: MPC8245 erratum 28 workaround The 8241/8245 have an erratum where PCI reads from local memory may return stale data. One of the two workarounds is to set PICR2[0]. This patch does that. Signed-off-by: Mark A. Greer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: mask lower bits in tlbie We werent masking the lower bits of the VA in a tlbie(l) instruction. While most CPUs ignore this we should play it safe and follow the spec. Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: iSeries buildbreak fix Looks like a build break on iSeries after the xmon-dabr patch: arch/ppc64/xmon/xmon.c:632: undefined reference to `.plpar_hcall_norets' Since iSeries cannot use xmon, a simple fix is to turn it off. Signed-off-by: Jake Moilanen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: p615 IOMMU fix pSeries p615 happens to have a bus hierarchy where the IDE controller for the built-in CD is connected directly to the PHB without an intermediate EADS bridge. The new iommu/bus setup code assumed that all systems with EADS will have all devices under them, so this resulted in the IDE controller not having an iommu table allocated. To avoid this, always allocate a small table at the PHB level. It will never be used for regular devices, and it's allocated out of the 256MB that we previously skipped. Signed-off-by: Olof Johansson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: generic MIPS updates Update the generic MIPS code. Highlights are oprofile for MIPS, initially for the PMC-Sierra RM9000. We're also taking a significantly more aggressive approach to the TLB exception handlers which now are runtime generated and provide an upto 20% speedup on certain micro benchmarks. From: Yoichi Yuasa This patch had fixed restore_sigcontext about MIPS. Signed-off-by: Yoichi Yuasa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: IRIX 5 compat fixes Start to resurrect the IRIX 5 binary compatibility code. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: build script fixes Ignore a few MIPS specific sections that otherwise would cause a large number of false warnings in the kernel's scripts. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: sibyte updates o Updates for the Sibyte Swarm aka BCM91250 eval board. Mostly trivial changes except the sound driver. o Add the PCI IDS for the HT interface and the HT-to-PCI bridge used on the Swarm and relatives. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: RM200 updates Minor RM200 updates. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: SGI IP27 updates o Fix what got broken by 2.6.11-rc1 o Support for KGDB o Misc minor fixes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: DVH fixes o Make CONFIG_SGI_PARTITION the default for those systems where firmware or host OS require it. o Check earlier for DVH aka SGI partitions to avoid confusing them with an MSDOS partition. o Detect RAID partitions on IRIX volumes. Caveat: this uses one of the officially unused partition types which are not recogniced by the IRIX or RISC/os tools. Doesn't seem to matter but should be mentioned for completeness. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: TX49 updates o Handle big and little endian configurations in PCI code o Get rid of superfluous bug checks o The usual cleanups of spinlock definitions Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: TXX9 serieal driver rewrite Replace the old drivers/char/ serial driver for the Toshiba TX series of SOCs with a modern style drivers/serial/ one. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: aMD Alchemy update Update for the AMD Alchemy SOCs, platforms based on those and drivers specific to the SOC and platforms. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: ITE 8172 updates Minor updates for the ITE 8172 evaluation board, mostly to keep the bitrotting code somewhat in touch with the rest of the universe. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: AMD Alchemy I2C driver Add I2C drivers for the AMD Alchemy SOCs. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: SGI IP32 updates SGI IP32 aka O2 Updates: o Handle all possibly memory configurations o Fix PS/2 handling o Sysfs magic for IP32's GBE frame buffer driver. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: DECstation updates Update DECstation code. This still isn't usable but updates the code from rotten to less rotten and most importantly eleminates the diff between kernel.org and linux-mips.org tree to easy future work. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: DECstation Turbochannel updates Update Turbochannel code. Right now the code is basically still at the state of 2.3; with this patch applied it'll roughly on the level of the TC code in early 2.4 with a bunch of 2.6 fixes on top. Not great but will bring the code closer into touch with reality until Maciej has a chance to finally tackle things. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: jazz updates Get the Jazz platform back to build and mostly working. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: mIPS Technologies board updates Update the code for the three MIPS Technologies evaluation platforms. Untangle the support for the three platforms, keep up with changes elsewhere in the kernel and getting Atlas back to work even with the most esotheric configurations. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: cobalt updates o Cobalt boxes have a i8159 in their Galileo GT-64011 system controller o Update defconfig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: vR41xx updates Update support for the bazillion of variants of NEC VR41xx devices, including on-SOC device drivers. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: VR4181 updates o Cleanup lock definitions o Fix config.h use o Update defconfig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: NEC DDB board updates Update the code for the NEC DDB family. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: TX39 series updates o Delobotomize JMR 3927 interrupt code o Remove last remaining bits of code for the Philips Nino Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: galileo updates Minor updates for the evaluation boards made by Galileo Technologies. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: PMC-Sierra updates SMP support for the PMC-Sierra Yosemite evaluation board. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: Momentum updates Updates kernel and CPU configuration Momentum systems. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: Lasat updates Minor update to the code for the Lasat, a Cobalt-like server. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: fix SERIAL_TXX9 dependencies Ask for SERIAL_TXX9 only on those devices that actually have one. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: iomap This patch adds iomap functions to MIPS system. Some MIPS systems are unable to define PIO space by PIO_MASK/PIO_RESERVED. This is the reason that I didn't use the general iomap implementation. Signed-off-by: Yoichi Yuasa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Devices.txt, update with LANANA Attached is diff for bringing devices.txt uptodate with lanana. Please note: The devices.txt file in your tree will now be for 2.6+ kernels only. 2.6 specific allocations will now be given out more freely, and some of the stuff marked for obsolete for 2.6 has been removed. I put a note in the file to let people know its for 2.6+ kernels only. I wanted to rename the new file to devices-2.6+.txt and then make a link from the old devices.txt to this new file, but diffing it became too ugly. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] cputime: simplifiy generic cputime_to_secs/secs_to_cputime The cputime_to_secs and secs_to_cputime primitives in include/asm-generic/cputime.h can be simplified since the default cputime implementation assumes that cputime is measured in jiffies. The intermediate conversion to milliseconds is superflous. Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mpsc updates This patch: - replaces several macros with the actual code - change the type of pointer variables from u32 to void * - removes unecessary casts - puts the contents of mpsc_defs.h into mpsc.h and removes the mpsc_defs.h - reflects the new names of some structs - cleans up some whitespace Signed-off-by: Mark A. Greer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] unexport register_cpu and unregister_cpu We introduced exports for register_cpu and unregister_cpu right after 2.6.10. As far as I can tell these are not called from any code which can be built as a module, and I can't think of a good reason why any out of tree code would use them. Signed-off-by: Nathan Lynch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Add a usecs_to_jiffies() function Add a usecs_to_jiffies() function. This will be used in one of my subsequent patches. With the potential for dynamic HZ values much higher than 1000, we may need to consider times as small as usecs in terms of jiffies. We have msecs_to_jiffies(), jiffies_to_msecs() and jiffies_to_usecs(), but no usecs_to_jiffies(). Signed-off-by: Nishanth Aravamudan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] initramfs: move inode hash table to __initdata No need to waste 128B of kmem. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] idmouse min() fix This got caught by gcc on 64bit boxen - IMGSIZE is size_t and that means range not covered by that of signed 64bit, so we get an unsigned type for IMGSIZE-*ppos. On 32bit boxen IMGSIZE-*ppos ends up being loff_t, so the warning gets silenced. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] assert_spin_locked() Consolidate the various private implementations of this into a kernel-wide implementation. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] infiniband: use LANANA-assigned major in ib_umad Update the ib_umad module to use major 231 instead of a dynamic major, as assigned in the LANANA Linux 2.6+ Device List (http://lanana.org/docs/device-list/devices-2.6+.txt). Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] audit: handle loginuid through proc The audit subsystem uses netlink messages to request loginuid changes. Due to the sensitivity of loginuid, netlink appears to be insufficient. For instance, it is not easy to guarantee that the loginuid message will be handled before any other auditable actions, and there is even the remote possibility of the process terminating and another process with the same pid being created before the message is handled. Finally, other kernel code, in particular selinux, is interested in easily querying the loginuid for inclusion in its own messages. The following patch moves loginuid handling from netlink to the /proc/$$/loginuid file, and adds a audit_get_loginuid() function. It also includes Stephen Smalley's patch to correctly inherit the loginuid on fork. It has been actively discussed on the linux-audit mailing list. Signed-off-by: Serge Hallyn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] OProfile: Use profile_pc in oprofile_add_sample We should be using profile_pc in oprofile_add_sample so that lock contention is attibuted to the correct function in profile output. Also fix SH7750 support. Signed-off-by: Zwane Mwaikambo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] OProfile: Support model 4 P4 The following processor was marked as unsupported, there are no documented changes in the performance counter interface for this processor. Hardware courtesy of Intel Corporation processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 4 model name : Genuine Intel(R) CPU 3.60GHz stepping : 1 cpu MHz : 3600.761 cache size : 1024 KB physical id : 0 siblings : 2 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 5 wp : yes flags : fpu vme de tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm pni monitor ds_cpl tm2 cid cx16 xtpr bogomips : 7110.65 CPU: P4 / Xeon with 2 hyper-threads, speed 3601.79 MHz (estimated) Counted GLOBAL_POWER_EVENTS events (time during which processor is not stopped) with a unit mask of 0x01 (count cycles when processor is active) count 10000 Signed-off-by: Zwane Mwaikambo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] udf deadlock fix Yes, me too. generic_shutdown_super() takes lock_super(). And udf uses lock_super for protecting its block allocation data strutures. Trivial deadlock on unmount. Below is a fix to switch udf to it's own private locking. It's safe because it doesn't intefere with VFS lock_super usage anywhere. udf_free_inode has some more updates than simply switching the used lock: - clear_inode() call moved outside locked section to avoid another deadlock - unused variable ino killed - is_directory moved into the conditional it's actually used in Signed-off-by: Christoph Hellwig (note that I see memory corruption in UDF_I_DATA(inode), but I've reproduced that with a kernel without all recent udf changes. I'll debug that one further) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] dvb: follow USB __le16 changes - dibusb: follow USB changes (idVendor, idProduct, bcdDevice and bcdUSB fields are now __le16) Signed-off-by: Johannes Stezenbach Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] dvb: fix access to freed memory - core: fix access to freed memory when unloading frontend drivers (fix by Gerd Knorr) Signed-off-by: Johannes Stezenbach Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] dvb: support up to six DVB cards - core: add support for up to six DVB cards by using 32bit dev_t capabilities Signed-off-by: Johannes Stezenbach Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] dvb: cleanup firmware loading printks - frontends: sp887x: improve confusing firmware loading messages Signed-off-by: Johannes Stezenbach Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: fix preemption race (Core/i386) The idle-thread-preemption-fix.patch introduced a race, which is not critical, but might give us an extra turn through the scheduler. When interrupts are reenabled in entry.c and an interrupt occures before we reach the add_preempt_schedule() in preempt_schedule we get rescheduled again in the return from interrupt path. The patch prevents this by leaving interrupts disabled and calling a a seperate function preempt_schedule_irq(). This split adds different plausibility checks for irq context calls and kernel calls. Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: make use of preempt_schedule_irq() (PPC) Make use of the new preempt_schedule_irq function. Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sched: make use of preempt_schedule_irq (ARM) Make use of the new preempt_schedule_irq function. Signed-off-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fbdev: Fix return code of edid_checksum edid_checksum always return success (1) although it can fail. Fix. Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] backlight: Add backlight driver for Sharp Corgi PDAs Add a backlight driver for the Sharp Corgi PDAs (SL-C7xx series) using the backlight class. Signed-off-by: Richard Purdie Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ext2-quota-leak-fix fix Jan points out that this should have been -ENOSPC. Cc: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds input: Fix HID LED mapping. LEDs were ignored because the usage value contains the page code in high 16 bits. Signed-off-by: Vojtech Pavlik [IA64] Move allocation of per-CPU MCA data out of per_cpu_init() This patch moves the per-CPU MCA data allocation out of per_cpu_init() so the code can be shared for contig and discontig memory architectures. Also, it means we can revert back to the old way of doing per_cpu_init() on UP. Also cleanup initialization of ar.k3 in setup.c. Need to use ia64_tpa() rather than __pa() because address will be in region 5 on UP build. Signed-off-by: David Mosberger-Tang Signed-off-by: Tony Luck [PKT_SCHED]: Fix ingress qdisc to pick up IPv6 packets when using netfilter hooks. Fixes the ingress qdisc to pick up IPv6 packets when using the old style netfilter hooks, i.e. when CONFIG_NET_CLS_ACT is not enabled. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller [IPV4]: Add gc_min_interval_ms sysctl. The existing seconds based gc_min_interval is barely usable. Signed-off-by: David S. Miller [PATCH] openpromfs property_read() fix openpromfs property_read() is slightly abused by property_write() - the latter calls property_read(file, NULL, 0, NULL) if we still hadn't done any IO on that file; property_read() will do setup work and, since it's called with count equal to 0, do nothing else. That stopped working - now we check if *ppos is sane before doing anything else and that, of course, oopses. Trivial fix is to move the check past that for count == 0... Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] missing include in fore200e.c We need delay.h there - on a lot of platforms it doesn't get pulled indirectly and since we use udelay() now... Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] isp16 missing initcalls * isp16_init() should be an initcall in non-modular case - it's not called directly anymore (not since 2.5.1-pre2). * isp16_init() and isp16_exit() made static, while we are at it. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] wrong include in tda80xx.c should include asm/irq.h, not linux/irq.h (the latter should be moved to asm-generic, IMO - we are getting *way* too many bugs of that sort). As it is, tda80xx breaks on some platforms (at least on ARM). Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] matrox_fb trivial compile fix for pmac module_param() used when module_param_named() should've been. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] rme9562 big-endian compile fix (dumb typo) hdsp->data used when fw->data should've been (BTW, another branch of that ifdef is memcpy from fw->data to ->firmware_cache; this one byteswaps). Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] *really* dumb typo in aacraid (cast to pointer to structure that doesn't exist ;-) spot the typo... It's harmless, in a sense that code compiles right, but... Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] block2mtd 64bit bug Passing pointer to size_t to function that expects u32 * and actually stores a value there... Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] missing include in r8169 Missing include, breaks e.g. sparc64 Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] cs461x iomem fixes and annotations Annotated, fixed dereferncing iomem pointers (see note in driver re testing it got) Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] 64bit fixes (printks) the usual %d -> %zu for size_t Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] icom iomem annotations and NULL noise removals Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] pktgen __user annotations trivial __user annotations + C99 initializer in one struct... Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] missing declaration in firmware.h Not all users of firmware.h care about struct device (or include device.h, for that matter). Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] more missing const in bitops prototypes Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] uaccess.h annotations the usual - __iomem in definition of __mm() on several platforms that haven't got it by now, s/long/unsigned long/ for __gu_val in get_user(), __force on places where we pass pointers to low-level __user-agnostic primitive (__copy_tofrom_user() and its ilk). Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] missing export (_tlbie()) on some ppc subarchitectures flush_tlb_page() et.al. are inlines implemented via _tlbie(), so it should share the status... Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] shpchprm_legacy.c trivial iomem annotations trivial iomem annotations + missing void in several declarations Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] long constants on amd64 missing UL in several places (and no, none of these constants is ever seen by as(1)) Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] misc mtd sparse fixes * jedec - switched to C99 initializers * sun_uflash - removed bogus cast to void * in argument of iounmap() + NULL noise removal. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] utter weirdness in drivers/media/dvb/frontends/cx22700.c OK, #/* */ is legitimate C, but WTF had these guys been smoking? Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] av7110_hw.c __user annotation Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] amd64 compat annotations * new helper - ptr_to_compat(); inverse to compat_ptr(), with proper typechecking. A lot of open-coded equivalents replaced with using that one. * a couple of severely misguiding places got back to sanity - we had basically put_user((long)p, &foo->compat_uptr_t_field); That will, of course, cast (long)p further - to u32, but that fact is carefully obfuscated... Sanitized by replacing (long)p in such places with ptr_to_compat(p); fortunately, there hadn't been many of those... Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] sparc64 compat annotations same story as for amd64 - ptr_to_compat() + normal __user annotations Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] several isdn trivial iomem annotations Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] a couple of trivial sound/pci iomem annotations Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] missing () in macros (alpha pgtable.h) Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [ide] remove WAIT_READY dependency on APM On the one hand APM isn't enabled on all laptops. On the other hand, this also affects regular PCs with APM support (or using a distribution kernel with APM support). The time for the !APM case was already increased from 30msec in 2.4 . Isn't there a timeout that is suitable for all cases? Alan Cox answered: > The five seconds should be just fine for all cases. The smaller value > with no > power manglement should help speed up recovery however. It probably > doesn't belong CONFIG_APM now ACPI and friends are involved either. Until someone has a real good solution (consider e.g. that most PC users might have ACPI support enabled), this patch unconditionally sets WAIT_READY to 5 seconds. Signed-off-by: Adrian Bunk Signed-off-by: Bartlomiej Zolnierkiewicz [PATCH] zfcp: bugfixes (without kfree) for -bk From: Andreas Herrmann From: Maxim Shchetynin zfcp changes: - don't call del_timer_sync() in interrupt context - correct residual count handling for data underruns - mark LUN as ACCESS_DENIED on status LUN_SHARING_VIOLATION Signed-off-by: Heiko Carstens Signed-off-by: James Bottomley [IA64] ivt.S: typo s/idirty_bit/dirty_bit/ Patch submitted by H.J. Lu New ia64 assembler complains if the END(tag) doesn't match the ENTRY(tag). Signed-off-by: Tony Luck [TG3]: 5704 serdes fixes - Fix capacitive coupling detection by reading the correct offset in sram - Add support for different signal pre-emphasis on 5704S (used in some blade servers) - Improve 5704S link parallel detection. When autonegotiation fails, we only detect link-up if we have PCS_SYNC and we are not receiving config code words. This will prevent false link-up when only the rx cable is attached. Signed-off-by: Michael Chan Signed-off-by: David S. Miller [TG3]: Update driver version and reldate. Signed-off-by: David S. Miller [PATCH] ppc64 iseries: can't remove viocd module when no cdroms This fixes a bug where attempting to remove the viocd module when no virtual cdroms where actually present would cause an oops. The driver was not completing its initialisation in this case. Signed-off-by: Stephen Rothwell Signed-off-by: Linus Torvalds [PATCH] arch/i386/kernel/apic.c Kill a sparse warning This replaces a K&R-style function definition with its ANSI counterpart. [PATCH] A BTFIXUP'd fix for pte_read() This adds BTFIXUPs needed for sparc32. Signed-off-by: Tom 'spot' Callaway Acked-by: William Irwin Signed-off-by: Linus Torvalds [PATCH] Fix sign checks in copy_from_read_buf() Fix signedness and remove the now unnecessary cast. Acked-by: Marcelo Tosatti Signed-off-by: Linus Torvalds [PATCH] Fix signed compare in fs/proc/generic.c::proc_file_read() Acked-by: Marcelo Tosatti Signed-off-by: Linus Torvalds [PATCH] reiserfs: use proper 64-bit clean types reiserfs_file_write() casts its (size_t) count parameter to int, which can become a problem on 64-bit architectures This attempts to fix this by changing the variables dealing with count and offset and the "min_t" comparisons to use "size_t" through-out. Acked-by: Marcelo Tosatti Signed-off-by: Linus Torvalds [PATCH] Eicon driver: add missing uaccess This patch adds asm/uaccess.h to files which uses copy_to/from_user() and adds the use of the drivers internal API call to copy_to/from_user() in platform independent code. Signed-off-by: Armin Schindler Signed-off-by: Linus Torvalds [PATCH] Eicon driver: vfree() Removed check for NULL pointer before doing vfree(), it's done in vfree(). Signed-off-by: Armin Schindler Signed-off-by: Linus Torvalds [PATCH] Eicon driver: remove unused code Remove code from platform independent code, which is not used in Linux. Signed-off-by: Armin Schindler Signed-off-by: Linus Torvalds Linux 2.6.11-rc3 [PATCH] I2C: Fix DS1621 detection Dallas Semiconductors as recently changed the design of their DS1621 chips, including the bits that were checked in the kernel driver to detect it. The patch below fixes the detection by checking an other bit of the configuration register instead. Signed-off-by: Aurelien Jarno Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: Resolve resource conflict between i2c-viapro and via686a Here comes the finalized version of our patch solving the PCI device resource conflict between the i2c-viapro bus driver and and the via686a chip driver. It is based on your original work and the IRC conversation we had yesterday. The retained solution is to not permanently register the PCI device in either driver. This is legitimate since we only need it at init time to retrieve the ISA address of a sub-device (SMBus master or integrated sensors), and possibly change that address on user request. Once this is done we can safely release the PCI device for others to use. I am really glad to see this problem finally solved, as this was the last remaining annoying issue left from the Linux 2.6 migration (missing drivers left apart), and was generating many complaints both at our level and at the distributions' support. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: Use standard temperature converters for as99127f When support for the Asus AS99127F chip was once added to the w83781d driver, it was decided that we would treat temp2 and temp3 as having a LSB of 0.25 degree C, as opposed to 0.5 degree C for the compatible Winbond chips. The reason why this was done seems to be a couple of users reporting that these temperatures were reading twice as high as it should for them in the first place. We had much more feedback about the A99127F chip since, and it turns out that the exact conversion required for temp2 and temp3 depends on the motherboard model. For some models (including my A7V133-C), we now have to multiply the readings by 2, effectively negating the change that was once done in the driver. For other models, a linear conversion formula is needed. The bottom line is that the raw readings from the driver are correct for no known board, while it would be for at least some of them if we had kept the same LSB as the Winbond chips are known to have. Thus I believe that the standard LSB of 0.5 degree C should be restored. There is no datasheet available for the AS99127F chip, so whatever was done was guess work (and still is). I see no reason why we would keep additional code in the w83781d driver to handle this former supposed difference, especially when the facts now tend to prove that this difference doesn't exist. The following patch drops the additional code and treats temp2 and temp3 the same way for all chips supported by the w83781d driver. A similar change will be made to the 2.4 version of this driver, and the default sensors.conf will be updated accordingly. Users will have to update their configuration file, or their readings will of course read twice as high as they should due to the old conversion formulae. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: Reduce it87 i2c address range IT87xxF chips were never seen at any other I2C address than the default (0x2d) so I think that we could safely reduce the range of addresses the it87 drivers accepts. Currently it accepts 0x20-0x2f, I believe that 0x28-0x2f would already be more than sufficient. (In theory, any address is possible, so whatever range we choose is arbitrary anyway.) Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: Fix i2c-sis5595 pci configuration accesses The i2c-sis5595 bus driver has logic errors on pci configuration accesses. It returns an error on success and vice versa. The 2.4 kernel version of the driver, as found in the lm_sensors CVS repository, is correct, so the problem was introducted when the driver was ported to the 2.6 kernel tree (in 2.6.0-test6). As odd as it sounds, the driver has been sitting here broken and unusable for 17 months and nobody ever reported, until yesterday. Credits go to Sebastian Hesselbarth for discovering and analyzing the problem. Here is a patch that fixes the problem, succesfully tested by Aurelien Jarno and Sebastian Hesselbarth. Please apply. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: Do not show disabled pc87360 fans The pc87360 driver create sysfs files even for disabled fans. Since data won't ever be updated, it doesn't make much sense. The following patch adds some tests to only create the interface files that are actually needed. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: Prevent buffer overflow on SMBus block read in Hi Greg, Linus, all, I just hit a buffer overflow while playing around with i2cdump and i2c-viapro through i2c-dev. This is caused by a missing length check on a buffer operation when doing a SMBus block read in the i2c-viapro driver. The problem was already known and had been fixed upon report by Sergey Vlasov back in August 2003 in lm_sensors (2.4 kernel version of the driver) but for some reason it was never ported to the 2.6 kernel version. I am not a security expert but I would guess that such a buffer overflow could possibly be used to run arbitrary code in kernel space from user space through i2c-dev. The severity obviously depends on the permisions set on the i2c device files in /dev. Maybe it wouldn't be a bad idea to push this patch upstream rather sooner than later. While I was at it, I also changed a similar size check (for SMBus block write this time) in the same driver to use the correct constant I2C_SMBUS_BLOCK_MAX instead of its current numerical value. This doesn't change a thing at the moment but prevents another potential buffer overflow in case the value of I2C_SMBUS_BLOCK_MAX were to be changed in the future (admittedly unlikely though). > Now if we have broken hardware, then we might have a problem here, but > otherwise I don't see it as a security issue right now. It doesn't take broken hardware. (Warning: I am going technical at this point, people not interested in the gory details of the I2C and SMBus protocols should better stop here ;)) It just depends on what part of the SMBus and I2C specifications a given client chip supports. SMBus block reads are no different from SMBus byte reads, except that the master (here the VIA Pro) goes on reading after the first byte sent by the slave (which could be about anything, from hardware monitoring chip to EEPROM). In that respect, it also doesn't much differ from the I2C block read, which also starts in the exact same way. The difference between SMBus block read and I2C block read is that the first byte returned by the slave on SMBus block read is supposed to be the remaining number of data byte to be sent, while this is simply the first data byte for I2C block reads. To make it clearer, here comes the detail of the byte read, SMBus block read and I2C block read commands (-> means from master to slave, <- means from slave to master). See the official specifications for I2C and SMBus for nicer graphics and additional details. Byte read: -> client address, write mode -> register address -> client address, read mode <- data byte SMBus block read: -> client address, write mode -> register address -> client address, read mode <- length byte (1 <=3D N <=3D 32) <- first byte <- next byte <- ... <- last (Nth) byte I2C block read: -> client address, write mode -> register address -> client address, read mode <- first byte <- next byte <- ... <- last byte In each case, the *master* decides when to stop the transfer, not the slave. There are two consequences for us here: 1* The client chip cannot differenciate between byte read and SMBus block read until after it sent a first byte - which basically means that a given register address is specified to be read with either command, not both, and not using the correct one returns bogus results. i2c-dev allows arbitrary commands so it is possible to ask for a SMBus block read on a register that expects a simple byte read. The client innocently will answer with the register value - which the master will interpret as a length, and the master will then request that many additional data bytes. If the client features autoincrement in this register address range, it will most likely provide the value of the next registers, if not it will dumbly return the same register value again and again. This illustrates the fact that it doesn't take a broken chip to cause a buffer overflow. It only takes a SMBus block read command on a register for which the client did not expect it (and almost no client actually supports SMBus block reads at the moment). If it happens that the register value was greater than 32, the buffer overflow will occur (without Sergey's fix, that is). So, with write access to the i2c device files, it is actually very easy to trigger the buffer overflow, providing there is at least one chip on the VIA Pro SMBus. 2* A client chip can obviously only implement SMBus block read or I2C block read for a given register address, since the sequence sent by the master is exactly the same. Not a big deal since a client chip is designed either as an I2C slave or as a SMBus slave. However the master doesn't know this, and i2c-dev allows arbitrary commands, so it is possible to use an SMBus block read on an I2C slave which expected instead an I2C block read, causing weird results. EEPROMs are such I2C slaves and they support I2C block reads. Now, imagine that a non-write-protected EEPROM hangs on my VIA Pro SMBus (a memory module SPD EEPROM would probably do), and for some reason i2c-dev gives me access to it. I can write arbitrary bytes to the EEPROM using simple byte writes. I could write the following bytes, in order, at some location: 0x80, 34 null bytes, 94 bytes of nasty code. Then, still through i2c-dev, I request a SMBus block read from the same location. The EEPROM will answer as if it were an I2C block read (it can't differenciate and doesn't support SMBus block reads anyway), i.e. it will return as many bytes as requested, in order. The VIA Pro master will however interpret the first byte (0x80) as a length, and will read 128 bytes from the EEPROM, 34 of which will fill the data buffer, and 94 will overflow. Providing I know how the kernel works, these 94 bytes could be used for doing presumably bad things. This illustrates the fact that the user may actually control the buffer overflow, indirectly, depending on what hardware is present on the bus. EEPROMs are the most obvious way to do it, but some hardware monitoring chips have RAM arrays that could presumably be used in a similar way. As a conclusion, I definitely agree that this buffer overflow isn't easy to exploit, as it takes a particular combination of hardware and non-standard permissions on i2c device files, and also requires very good knowledge of the I2C and SMBus protocols; it is not impossible though. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: typo in pci_scan_bus_parented From: Olaf Hering printk format string misses a x Signed-off-by: Olaf Hering Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman [PATCH] pci: Add Citrine quirk The IBM Citrine chipset has a feature that if PCI config register 0xA0 is read while DMAs are being performed to it, there is the possiblity that the parity will be wrong on the PCI bus, causing a parity error and a master abort. On this chipset, this register is simply a debug register for the chip developers and the registers after it are not defined. Patch sets cfg_size to 0xA0 to prevent this problem from being seen. Signed-off-by: Brian King Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: memset rom attribute before using it Initialize the allocated bin_attribute structure, otherwise unused fields are pointing to random places. Signed-off-by: Kay Sievers Signed-off-by: Greg Kroah-Hartman [PATCH] PCI Hotplug: remove incorrect rpaphp firmware dependency The RPA PCI Hotplug module incorrectly uses a certain firmware property when determining the hotplug capabilities of a slot. Recent firmware changes have demonstrated that this property should not be referenced or depended upon by the OS. This patch removes the dependency, and implements a correct set of logic for determining hotplug capabilities. Signed-off-by: John Rose Signed-off-by: Greg Kroah-Hartman diff -puN drivers/pci/hotplug/rpadlpar_core.c~02_rpadebug drivers/pci/hotplug/rpadlpar_core.c [PATCH] PCI: add linux-pci mailing list to PCI maintainers entry. Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: change sysfs representation of PCI-E devices Before changes: The patch makes the parent of the device pointing to the pci_dev structure. The parents portX devices are in /sys/devices which should be removed based on your suggestions. Below is /sys/devices before any changes made. /sys/devices | __ ide0 | __ pci0000:00 | __ pnp0 | __ port1 | | | __ port1.00 | | | __ port1.01 | . | . | . | __ port2 | __ port3 | __ system After changes: The parents portX devices are no longer necessary because port1.00 and port1.01 devices shoud have the parent of the pci_dev structure (based on your suggestion). The patch does the following changes: - remove code creating and handling the parent portX devices. - rename portX.YZ to pcieYZ (for example port1.00 renamed to pcie00) since portX is no longer needed. - make pcieYZ have the parent of the pci_dev structure. Below is /sys/devices after changes made to the patch. /sys/devices | __ ide0 | __ pci0000:00 | | | __ 0000:00:00.0 | | | __ 0000:00:04.0 | | | | . __ class | . | | . __ pcie00 | | | __ pcie01 | . | . | . | __ platform | __ pnp0 | __ system Signed-off-by: T. Long Nguyen Signed-off-by: Greg Kroah-Hartman [PATCH] Re: Bug when using custom baud rates.... When using custom baud rates, the code does: if ((new_serial.baud_base != priv->baud_base) || (new_serial.baud_base < 9600)) return -EINVAL; Which translates to english as: If you changed the baud-base, OR the new one is invalid, return invalid. but it should be: If you changed the baud-base, OR the new one is invalid, return invalid. From: Rogier Wolff Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Fix EHCI boot oops on AMD > > ----- Forwarded message from Andi Kleen ----- > > Someone added an test for AMD 8111 in EHCI, returning > > an error in reset. > > > > When triggered it would cause an NULL pointer oops because > > it would usb_hcd_put an half initialized hcd without > > initialized class. I added a new usb_hcd_free function > > to handle such half baked objects. Andi's diagnosis is correct -- the embedded class_device was not fully initialized -- but the solution is wrong. The correct patch is below. This was clearly my fault, an error in driver-model programming brought on by lack of documentation about which fields in the driver-model structures need to be set for which API calls. (Greg, long ago I sent you a documentation patch to try and help remedy this problem, but it seems to have fallen by the wayside.) Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: fix libusb endian issues On Wed, 2005-01-19 at 15:39 -0800, John Mock wrote: > New to 2.6.11-rc1 is that 'lsusb' exhibits 'endian' problems on the > PowerMac. Is that really new to 2.6.11-rc1? The kernel byte-swaps the bcdUSB, idVendor, idProduct, and bcdDevice fields in the device descriptor. It should probably swap them back before copying it up to userspace. From: David Woodhouse Signed-off-by: Greg Kroah-Hartman [PATCH] USB: another usbnet ax8817x device (goodway docking station) Add support for another AX8817x network device, found in a docking station. T: Bus=01 Lev=02 Prnt=03 Port=00 Cnt=01 Dev#= 4 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1631 ProdID=6200 Rev= 0.01 S: Manufacturer=goodway corp usb S: Product=gwusb2e S: SerialNumber=01 C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=450mA I: If#= 0 Alt= 0 #EPs= 3 Cls=00(>ifc ) Sub=00 Prot=00 Driver=(none) E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=128ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms Signed-off-by: Olaf Hering Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: fix for open/disconnect race in acm open takes the semaphore too late. This fixes it. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman [PATCH] USB: unusual_devs.h update This patch updates the unusual_devs entry for the SCM multimedia card adapter. Apparently earlier versions of the device included wrong descriptors but later versions did not. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] TIGLUSB Cleanups 1/3 This removes the tiusb boot-parameter from kernel-parameters.txt. Signed-off-by: Mikkel Krautz Signed-off-by: Greg Kroah-Hartman [PATCH] TIGLUSB Cleanups 2/3 This removes the TIGLUSB-maintainers from the MAINTAINERS-file. Signed-off-by: Mikkel Krautz Signed-off-by: Greg Kroah-Hartman [PATCH] TIGLUSB Cleanups 3/3 This removes the TIGLUSB-documentation, silverlink.txt. Signed-off-by: Mikkel Krautz Signed-off-by: Greg Kroah-Hartman [PATCH] USB: hid-core: possible buffer overflow in hid-core.c Peter Bartosch wrote: > Hello all, > > > i think i found a possible buffer overflow in hid-core (2.6.10-rc2): Agreed, and sorry it took so long to reply/patch this. (from 2004-DEC-01) > when i interpret this code right, the buffer (buf) will overflow when > the iManufacturer stringlength is 0 and the iProduct stringlength > is > 64! Thanks, here's a patch for it. Fix potential buffer overflow (by a device descriptor): buf size is only 64 bytes. Signed-off-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Logitech Cordeless Desktop Keyboard fails to report class descriptor From: Nico Huber The receiver of my Logitech Cordeless Desktop fails to report the keyboard's class descriptor most times I insert the usb-hid module since I changed to linux 2.6. The modell of the receiver is C-BD9-DUAL REV C. The request seems not to fail but the count of received characters is zero. As I said it only fails most times, I worked around making the following changes in drivers/usb/input/hid-core.c from linux-2.6.11-rc2: Following the good example of drivers/usb/core/message.c line 575, I initialized the buffer in hid_get_class_descriptor() to zero. In the loop of hid_get_class_descriptor() not waiting for any result but waiting for a result wich is lower the requested size of the class descriptor (line 1290). usb_hid_configure() should not try to parse the expected length but the received (line 1653). Attached is a patch with these changes Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman [PATCH] USB: garmin_gps tweak attached is a new patch for the garmin_gps driver. It only updates my email address in the header, as i am in the process of changing my isp and the listed address will be offline sometime soon. The second change makes the configuration entry look more like the other entries in the menu. Signed-off-by: Greg Kroah-Hartman [ide] unexport atapi_*_bytes() and ide_read_24() From: Arjan van de Ven * make atapi_{input,output}_bytes() static, fix users to use drive->hwif * remove ide_read_24() export; it's unused since the ide-io.c reorganization * add a FIXME comment to the ide_fix_driveid() export slightly changed by me (bart) Signed-off-by: Bartlomiej Zolnierkiewicz [ide] possible cleanups This patch contains the following possible cleanups: - make some needlessly global code static - ide-dma.c: remove the unneeded EXPORT_SYMBOL(__ide_dma_test_irq) slightly changed by me (bart) Signed-off-by: Adrian Bunk Signed-off-by: Bartlomiej Zolnierkiewicz [ide] remove adma100 Removes drivers/ide/pci/adma100.[hc]. The driver isn't compilable (missing functions) and no Kconfig actually enables CONFIG_BLK_DEV_ADMA100. On Wed, 02 Feb 2005 03:31:59 -0500, Jeff Garzik wrote: > Also, the libata-dev-2.6 tree has an "ata_adma" driver which is > complete, but needs some testing (and I have h/w). Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [ide] cleanup it8172 In drivers/ide/pci/it8172.h, it8172_ratefilter() and init_setup_it8172() are declared and the latter is referenced in it8172_chipsets. Both functions are not defined or used anywhere. This patch removes the prototypes and reference. it8172 should be compilable now. Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [ide] fix it8172 build for real Signed-off-by: Bartlomiej Zolnierkiewicz [ide] cleanup opti621 In drivers/ide/pci/opti612.[hc], init_setup_opti621() is declared, defined and referenced but never actually used. This patch removes the function. Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [ide] cleanup piix In drivers/ide/pci/piix.[hc], init_setup_piix() is defined and used but only one init_setup function is defined and no demultiplexing is done using init_setup callback. As other drivers call ide_setup_pci_device() directly in such cases, this patch removes init_setup_piix() and makes piix_init_one() call ide_setup_pci_device() directly. Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [ide] __ide_do_rw_disk() lba48 dma check fix In __ide_do_rw_disk(), the shifted block, instead of the original rq->sector, should be used when checking range for lba48 dma. Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [ide] __ide_do_rw_disk() return value fix In __ide_do_rw_disk(), ide_started used to be returned blindly after issusing PIO write. This can cause hang if pre_task_out_intr() returns ide_stopped due to failed ide_wait_stat() test. Fixed to pass the return value of pre_task_out_intr(). Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [ide] ide-tape: use time_after() macro Explicit jiffy comparision converted to time_after() macro. Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [ide] remove NULL checking in ide_error() In ide_error(), drive cannot be NULL. ide_dump_status() can't handle NULL drive. From: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [ide] comment fixes Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [ide] add ide_drive_t.sleeping ide_drive_t.sleeping field added. 0 in sleep field used to indicate inactive sleeping but because 0 is a valid jiffy value, though slim, there's a chance that something can go weird. And while at it, explicit jiffy comparisons are converted to use time_before() macros. Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [ide] add ide_hwgroup_t.polling ide_hwgroup_t.polling field added. 0 in poll_timeout field used to indicate inactive polling but because 0 is a valid jiffy value, though slim, there's a chance that something weird can happen. Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [ide] fix error handling in probe_hwif_init() and sgiioc4 driver From: Prarit Bhargava I discovered an issue where a hwif_init() failure lead to /proc/ide files being created for devices that failed probes. This resulted in oops/WARN_ON/BUG_ON executions through the kernel depending on what actions were on going. slightly changed by me (bart) Signed-off-by: Bartlomiej Zolnierkiewicz [ide] fix printk in ide_allocate_dma_engine() With Olaf Hering . Parameters were interchanged. Signed-off-by: Bartlomiej Zolnierkiewicz [PATCH] Fix ISDN4Linux bug in isdnhdlc.c isdnhdlc_decode is called multiple times for bigger frames, so decrementing dsize is a bad idea and can cause a overflow of the dst buffer. Signed-off-by: Karsten Keil Signed-off-by: Linus Torvalds [PATCH] DVB: No signal with bt848/tda9887 Markus Trippelsdorf reported a non-working bt848 card with the recent DVB update. It's an initialization order bug which changes the default state of the tda9887 output ports. Verified to fix the problem by Markus Trippelsdorf Signed-off-by: Linus Torvalds [PATCH] md sync_page_io bio leak I accidentally introduced a leak in there, because the end_io function doesn't do a bio_put() like most others. Fortunately it's not critical, as it only happens on the md super block read. So just drop the initial bio_get(), since it's sync we can just bio_put() safely at the end after it has completed. Signed-off-by: Jens Axboe Signed-off-by: Linus Torvalds [PATCH] sparc64: fix compile with strict mm types compile fix on sparc64 - missed pgd_val() bites now that we have STRICT_MM_TYPECHECKS set. Incidentally, shifting _by_ unsigned long is useless - type of result is determined by the type of first argument... Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] via82cxxx: fix ppc32 multiplatform config test PPC_MULTIPLATFORM exists both for ppc32 and ppc64; chrp and pegasos, OTOH, are ppc32-only. The ifdef in via82cxxx should be for PPC_MULTIPLATFORM and PPC32 - it makes no sense for ppc64 multiplatform and, as the matter of fact, simply won't compile there. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds Make read/write always do the full "access_ok()" tests. The actual user copy will do them too, but only for the range that ends up being actually copied. That hides bugs when the range has been clamped by file size or other issues. Make generic rw_verify_area check against file offset overflows. Not that low-level code really tends to care, but since loff_t is a signed 64-bit entity and size_t is unsigned (and potentially 64-bit), mixing the two isn't very well-defined.. [ARM] Fix sys_syscall Signed-off-by: Russell King [ARM PATCH] 2456/1: fix futex syscall argument passing Patch from Nicolas Pitre sys_futex wrapper to store its sixth argument on the stack. Also fix a typo with sys_clone_wapper. Signed-off-by: Nicolas Pitre Signed-off-by: Russell King [XFRM]: Fix inverted strcmp() test in xfrm_get_byname(). Signed-off-by: Herbert Xu Signed-off-by: David S. Miller [PATCH] pnpacpi build fix - Fix it for older C compilers. - Extern decls always, always, always go in header files, please. Cc: "Brown, Len" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand: add missing break between cases Add a missing break statement between RC and UD cases in mthca_post_send(). This fixes a possible oops for protocols that use the RC transport. Signed-off-by: Libor Michalek Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] InfiniBand: remove unbalance refcnt decrement Fix unbalanced QP reference count decrement (introduced with QP lock optimization patch) Signed-off-by: Michael S. Tsirkin Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: unbreak perfctr build Signed-off-by: Dave Jones Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] device-mapper: stripe_width should be sector_t stripe_width should be sector_t to support large devices. Signed-Off-By: Alasdair G Kergon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] device-mapper: Fixes for 64-bit sector_t Fix some bugs in device-mapper handling of 64-bit values, replacing dm_div_up() and dm_round_up() inlines with macros and removing some avoidable divisions of 64-bit numbers. The mirror region size is the granularity used to manage and monitor the data copying, typically 512KB, so 32 bits (of sectors) should be plenty to hold this. Taken together with the two earlier patches: "fix TB stripe data corruption" (a missing cast) and "stripe_width should be sector_t", I've now had 3 independent reports that this fixes device-mapper for devices with large stripes. Still awaiting test results for dm-crypt and dm-raid1. Signed-Off-By: Alasdair G Kergon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix reiserfs quota SMP locks From: Vladimir Saveliev , Jan Kara Add missing SMP locking and one lock_buffer() to the reiserfs quota code. Signed-off-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Move down in is unsafe for inclusion by userland apps, but it is in the userland-exposed portion of . It's only needed in the __KERNEL__ protected portion of the file, so move the #include down to there. lmbench-2.0.4 runs into this issue in 'flushdisk'. Signed-off-by: Tom Rini Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] avma1_cs: Inverted parameter order in outb avma1_cs detect routine for AVM A1 based PCMCIA cards has its "outb" parameters inverted - switch to "byteout" define to be conformant with the rest of the driver, fixing the order. This was noticed on PPC, which triggers an MCE in case of invalid IO port access, which is not the case on x86. Signed-off-by: Marcelo Tosatti Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] SERIAL_TXX9 fix The earlier patch forgot to add the Makefile change. Signed-off-by: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] cpufreq_resume() fix Since acpi_cpufreq_resume and speedstep_resume appear to return 0 upon success, it seems like the attached patch is what the desired behavior would be. Otherwise, cpufreq_resume() always prints an error and exits early if using a cpufreq_driver that supports resume. Signed-off-by: Dominik Brodowski Signed-off-by: Dave Jones Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] SELinux: define execmod permission for character devices This patch regenerates the SELinux module headers to define the execmod permission for character device files in order to provide proper auditing of such checks on /dev/zero. Signed-off-by: Stephen Smalley Signed-off-by: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] SELinux: audit any unmapped permissions This patch changes SELinux to display any permission values that could not be mapped to names as a hex value when generating an audit message. Signed-off-by: Stephen Smalley Signed-off-by: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: PPC4xx DMA fixes, burst, and sg improvements This fixes several issues with the PPC4xx DMA library as well as adding support for bursting and some improvements to SG handling. Signed-off-by: Colin Wernham Signed-off-by: Matt Porter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: add PPC440SP and Luan ref board support Adds support for the IBM/AMCC PPC440SP SoC. Also adds support for the Luan reference board that has a 440SP on it. Signed-off-by: Matt Porter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: include/asm-ppc/rwsem.h RWSEM_DEBUG usage include/asm-ppc/rwsem.h has '#ifdef RWSEM_DEBUG' but RWSEM_DEBUG is always defined (as 0) in include/linux/rwsem.h. The #ifdef's should be #if's. This also brings the ppc usage in line with the the other architectures. Signed-off-by: Mark A. Greer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: fix locking bugs in mv64x60 code This patch fixes 2 SMP deadlocks. The first is that mv64x60_read() was returning before the unlock. The second was mv64x60_modify() locks the spin lock and calls mv64x60_read() and mv64x60_write() which also lock the same spin lock. Signed-Off-By: Brian Waite Signed-off-by: Mark A. Greer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: core changes From: Christian Bornträger From: Heiko Carstens From: Michael Holzheu From: Martin Schwidefsky s390 core changes: - Export arch_pick_mmap_layout as GPL symbol for binfmt_elf32. - Remove unnecessary include from cmm. - Allow only root to read the debug feature logs. - Register all RAM resources, this fixes output of /proc/iomem. - Add read_can_lock and write_can_lock primitives. - Regenerate default configuration. Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: vfree checking cleanup arch/s390/kernel/module.c vfree() checking cleanup. Signed-off-by: James Lamanna Signed-off-by: Domen Puncer Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: cpcmd interface - Diagnose 8 needs a response buffer below 2GB real storage. As the caller cannot always allocate the buffer with GFP_DMA the best solution is to rewrite cpcmd to use a bounce buffer if necessary. The old function was renamed to __cpcmd and can be called if appropriate. The early boot code does not provide kmalloc but need cpcmd functionality. These places have been converted to use __cpcmd, as the init code and data are below 2GB. - In case of an 31 bit system, cpcmd is defined as __cpcmd. - EXPORT_SYMBOL(cpcmd) moved into cpcmd.c - some whitespace fixes in cpcmd.[c/h] Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: dasd i/o scheduler & debug logs dasd driver change: - Set default i/o scheduler to 'deadline'. Latest performance results indicate that this works fastest. - Set default debug feature level to DBF_EMERG. Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: common i/o layer Common i/o layer changes: - Allow ccw_device_halt() and ccw_device_clear() in state WAIT4IO. Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: key protected i/o Add interface for key protected i/o. Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: qeth network driver From: Steffen Thoss From: Frank Pavlic qeth network driver changes: - Improve performance by omitting svs. - Use function callback mechanism to set layer 2 parameters when getting a reply for a Layer 2 command. - dev->hard_header must not be NULL when fake_ll is no set since IPv6 and Layer2 needs the default function set by network stack. - ping6 works now when running in layer 2 mode. - Save original dev->hard_header to restore it when the user doesn't want to use fake_ll anymore. - Fake ethernet header in outgoing packets. This currently works only if qeth is compiled without ipv6 support. - Add more debug information in case of failures in qeth_set_offline. - Using fake_ll with HiperSockets devices results in misaligned ip packets and thus no traffic over HiperSockets. - Start qeth_remove_device only after the qeth recovery completed. Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: compat SI_TIMER conversion tst-timer4 from the glibc fails in the 32bit compat execution environment. This is due to a incomplete siginfo structure for POSIX.1b timers in compat_signal.c. Signed-off-by: Hannes Reinecke Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] s390: compat_sys_old_readdir and compat_sys_getdents s390 should use the generic compat functions for compat_sys_old_readdir and compat_sys_getdents. The s390 specific ones are buggy and superflous. Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: i82365 registration failure fixup Fix a bug which was diagnosed by David Howard . The pseudo-unregistration of PCMCIA sockets in case the registration of any such socket failed causes lockups. See http://bugme.osdl.org/show_bug.cgi?id=4115 for details Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: m32 registration failure fixup The pseudo-unregistration of PCMCIA sockets in case the registration of any such socket failed causes lockups. See http://bugme.osdl.org/show_bug.cgi?id=4115 for details (same problem, Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: SGI IP22 updates o Remove old unused header files o Update the VINO video driver to something that's vaguely working o Bug fixes for the IP22 Zilog driver o Fix use of config.h Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds megaraid_mbox 2.20.4.3 patch From: Ju, Seokmann - sysfs support for drive addition/removal - Tape drive timeout issue - Made some code static Signed-off-by: James Bottomley [PATCH] tv-card tuner fixup disable + comment current secam tweak, will not work that way ... Signed-off-by: Gerd Knorr Signed-off-by: Linus Torvalds [PATCH] UML: remove not-yet-merged system calls This fixes UML's sys_call_table to delete some entries for system calls which have not yet made it into mainline from -mm. I also delete UML's __pud_alloc implementation since the memory.c one is now enabled. Signed-off-by: Jeff Dike Signed-off-by: Linus Torvalds [PATCH] Fix kswapd spinning When a zone (usually DMA) has no active pages, pages_scanned (which triggers all_unreclaimable) is only incremented when scanning the active list. Make sure it's incremented for scanned cache entries too. Tested-by: Terje Fåberg Signed-off-by: Linus Torvalds [PATCH] more fixes for the Moxa driver One user hit problems on SMP that are caused by long standing mxser violations of the tty rules. Another report including problems with request_irq being called with locks held (legal in 2.4 but not 2.6 due to procfs). This fixes both of them Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds [PATCH] FRV: Make switch_to() return previous task This makes switch_to() on the FRV pass through and return the previous task pointer rather than trusting to luck that it'll be left in the correct register/variable. Signed-Off-By: David Howells Signed-off-by: Linus Torvalds [PATCH] FRV: cli/sti cleanup This cleans up the remaining references to the cli() and sti() functions from the FRV arch now they're deprecated. Signed-Off-By: David Howells Signed-off-by: Linus Torvalds [PATCH] FRV: Semaphore implementation race fix This fixes a race in the FRV arch's semaphore implementation. The same type of fixes were applied to the rw-semaphore implementations to fix the same races there. The race involved the on-stack record linked into the semaphore's queue by the down() executed by a process now sleeping on the semaphore going away and the sleeping task going away before the process that woke it up during up() processing had finished with those structures. Signed-Off-By: David Howells Signed-off-by: Linus Torvalds [PATCH] FRV: Add TIF_MEMDIE This adds TIF_MEMDIE for FRV. Could whoever added it to include/asm-i386/thread_info.h comment this flag there please? I've given it a comment here, but I'm not sure it's correct. Signed-Off-By: David Howells Signed-off-by: Linus Torvalds [PATCH] FRV: Make the bit finding functions take const pointers This makes the bit finding functions in asm/bitops.h take const pointers since they don't modify what they access. Signed-Off-By: David Howells Signed-off-by: Linus Torvalds [PATCH] FRV: vmlinux.lds.S comment cleanup This cleans up a comment in vmlinux.lds.S - emacs now has an LD script mode, so it shouldn't be forced into C mode. Signed-Off-By: David Howells Signed-off-by: Linus Torvalds [PATCH] Update greg's email address I have a new job. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Linus Torvalds [Bluetooth] Support Broadcom BCM92035 USB dongles This patch adds support for special initialization commands inside the Bluetooth core layer. It is used for the BCM92035 USB dongles from Broadcom to switch them from HID mode into HCI mode. Signed-off-by: Marcel Holtmann [Bluetooth] Support for Digianswer BPA 100/105 sniffers This adds a driver for the Digianswer BPA 100/105 USB sniffer devices. These devices are using a H:4 over H:2 host transport protocol for the HCI communication. Signed-off-by: Marcel Holtmann [PATCH] SELinux: fix selinux_inode_setattr hook This fixes the selinux_inode_setattr hook function to honor the ATTR_FORCE flag, skipping any permission checking in that case. Otherwise, it is possible though unlikely for a denial from the hook to prevent proper updating, e.g. for remove_suid upon writing to a file. This would only occur if the process had write permission to a suid file but lacked setattr permission to it. Signed-off-by: Stephen Smalley Signed-off-by: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] pcmcia: ds.c initialisation fix A wrong ordering of operators in pcmica_register_client() causes initialization problems with multiple PCMCIA cards. Signed-off-by: Josh Green Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix an error in /proc/slabinfo print There is an obvious error in the header of /proc/slabinfo Signed-off-by: Zou Nan hai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ibmveth inlining failure. Yet another ppc64 build failure.. Move the function before its first usage, and the failure goes away. Signed-off-by: Dave Jones Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix devfs name for the hvcs driver The hvcs driver does not register a devfs_name resulting in devfs creating /dev/* entries. The following one line patch remedies the problem. Signed-off-by: Jimi Xenidis Signed-off-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] include/jiffies: fix usecs_to_jiffies()/jiffies_to_usecs() math Fixes the math of both jiffies_to_usecs() and usecs_to_jiffies() which improperly assume the same rounding point -- 1,000 -- as jiffies_to_msecs() and msecs_to_jiffies(), when in fact it should be 1,000,000. Furthermore, the actual math of both functions is actually wrong and will lead to more than just rounding errors. Signed-off-by: Nishanth Aravamudan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Update Michal Ludvig details Signed-off-by: Michal Ludvig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] nfsd needs exportfs With NFSD=y, EXPORTFS=m: fs/built-in.o(.text+0x7fff5): In function `fh_verify': /usr/src/25/fs/nfsd/nfsfh.c:221: undefined reference to `export_op_default' So it seems that nfsd requires exportfs. For consistency we should tidy up the definition of EXPORTFS too. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: makefile fix arch/um/Kconfig_arch is actually a symlink, so * Remove it from the tree. * Make sure it is removed during make mrproper. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: fix compilation for missing headers Re-add some needed headers inclusion deleted in http://linux.bkbits.net:8080/linux-2.5/cset@41e49628dGbOWX-bT9yZII4f19GT6A If you think it cannot make sense to include both and (as userspace process, i.e. host includes), go complaining with glibc, or follow the linux-abi includes idea. However, the compilation failure is possibly glibc-version (or better glibc includes version) related - what I now is that the failure happens on my system with a glibc 2.3.4 (from Gentoo). Also, fix the syscall table to both compile and have no empty slot (which could cause Oopses). Acked-by: Jeff Dike Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: kconfig fixes Change some config text (hide CONFIG_MODVERSION which is broken on UML and fix a dummy prompt). Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: Fix SKAS sig-handler reentrancy This adds code which enables SIGSEGV reception to the SKAS sig_handler_common, which matches the tt code. I still need to figure out why the SA_NODEFER flag was backed out in favor of this. Signed-off-by: Paolo 'Blaisorblade' Giarrusso CC: uml-devel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: disallow stack access below $esp like i386 / x86_64 When a page fault occurs on an address below the stack-vma, UML tries to expand the stack. On i386 and x86_64, the failing address is compared to the current userspace stack pointer. If the failing address is below "esp-32" resp. "rsp-128", stack expansion is not allowed, and a SIGSEGV is given to the user. This patch makes UML behave like i386/x86_64. Signed-off-by: Bodo Stroesser Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: fix jiffies initialization Initialize jiffies_64 to INITIAL_JIFFIES. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: fix broken #ifdef clause causing crashes The previous ifdef to check whether to use the host's vsyscall page was buggy. This bug can cause crashes. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: fix STATIC_LINK compilation This fixes a bug which assumes that __binary_start starts on a page boundary, which isn't true when UML is configured to load into the normal executable area. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: fix x86_64 submode compilation Forgot to use ARCH_USER_CFLAGS after defining it for x86_64. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: MPC82xx PCI9 errata workaround broken Changeset 1.1938.196.11 broke MPC8260 PCI9 Errata workaround. This pach makes it work again. Signed-off-by: Rune Torgersen Signed-off-by: Tom Rini Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] TASK_SIZE is variable. Bad things can happen if a 32-bit process is the last user of a 64-bit mm. TASK_SIZE isn't a constant, and we can end up clearing page tables only up to the 32-bit TASK_SIZE instead of all the way. We should probably double-check every instance of TASK_SIZE or USER_PTRS_PER_PGD for this kind of problem. We should also double-check that MM_VM_SIZE() and other such things are correctly defined on all architectures. I already fixed ppc64 which let it stay as TASK_SIZE, and hence dependent on the _current_ context instead of the mm in the argument. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Use MM_VM_SIZE in exit_mmap The 4 level pagetable code changed the exit_mmap code to rely on TASK_SIZE. On some architectures (eg ppc64 and ia64), this is a per task property and bad things can happen in certain circumstances when using it. It is possible for one task to end up "owning" an mm from another - we have seen this with the procfs code when process 1 accesses /proc/pid/cmdline of process 2 while it is exiting. Process 2 exits but does not tear its mm down. Later on process 1 finishes with the proc file and the mm gets torn down at this point. Now if process 1 was 32bit and process 2 was 64bit then we end up using a bad value for TASK_SIZE in exit_mmap. We only tear down part of the address space and leave half initialised pagetables and entries in the MMU etc. MM_VM_SIZE() was created for this purpose (and is used in the next line for tlb_finish_mmu), so use it. I moved the PGD round up of TASK_SIZE into the default MM_VM_SIZE. Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: correct return code in syscall auditing This patch is from David Woodhouse . We were pretending that every syscall returned zero. Don't do that. Signed-Off-By: David Woodhouse Signed-off-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: show -1 for physical_id of non-present cpus Make the physical_id cpu sysfs attribute on ppc64 show -1 instead of 65535 for non-present cpus. Signed-off-by: Nathan Lynch Signed-off-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: replace last usage of vio dma mapping routines This patch just replaces the last usage of the vio dma mapping routines with the equivalent generic dma mapping routines. Signed-off-by: Stephen Rothwell Signed-off-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86: HPET setup, duplicate HPET_T0_CMP needed for some platforms This patch fixes the issue with HPET on some platforms. According to Vojtech Pavlik: The first write after writing TN_SETVAL to the config register sets the counter value, the second write sets the threshold. When you only do the first write you never set the threshold and interrupts won't be generated properly. Thanks to John Stultz and Andrew Walrond for reporting, root causing the issue and verifying this fix. Signed-off-by: Venkatesh Pallipadi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix PPC rwlock code on SMP Currently, the kernel won't compile for SMP ppc32 if preempt is enabled. This patch adds suitable read_can_lock and write_can_lock definitions. This patch also adds a real _raw_read_trylock (inline and out-of-line versions), changes the rwlock->lock field to a signed int, which is what it really was all along, and cleans up the out-of-line rwlock code in arch/ppc/lib/locks.c. It removes the debug fields from the rwlock struct because we were never using them, even with CONFIG_DEBUG_SPINLOCK set. I have compile and boot tested this with the four combinations of CONFIG_DEBUG_SPINLOCKS on and off, and CONFIG_PREEMPT on and off. Please put this patch into 2.6.11 so that 2.6.11 will work for ppc32 with CONFIG_SMP and CONFIG_PREEMPT. Signed-off-by: Paul Mackerras Signed-off-by: Linus Torvalds Add extra debugging help for bad user accesses. [SPARC]: Fix crashing of cg14 driver when serial console and vsimm installed. Signed-off-by: David S. Miller [SPARC64]: Consolidate pgd_cache calculations. Do it in one spot, a macro named get_pgd_cache(), instead of three different places. Signed-off-by: David S. Miller [PATCH] tmpfs caused truncate BUG Just before removing truncate_complete_page's BUG_ON(page_mapped(page)), thought I'd recheck on a few filesystems. The shame! Easily triggered with tmpfs: not because of recent changes, but because shmem_nopage omitted the i_size_read from Andrea's careful truncate_count/i_size_read /cachelookup/truncate_count sequence. For varying reasons, other users of shmem_getpage can't go beyond i_size, so just add it to shmem_nopage. Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] remove truncate mapped BUG It's time to remove truncate_complete_page's BUG_ON(page_mapped(page)): it was there to give confidence in the new vm_truncate_count mechanism. Earlier releases had no such check, and it wouldn't be at all helpful if it ever bugged up file truncation on a production system - though we don't know of any scenario in which that could happen now. Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Long-standing xattr sharing bug When looking for identical xattr blocks to share, we were not comparing the name_index fields. This could lead to false sharing when two xattr blocks ended up with identical attribute names and values, and the only default acls. Because acls are cached, the bug was hidden until the next reload of the affected inode. $ mkdir -m 700 a b $ setfacl -m u:bin:rwx a < acl of a goes in the mbcache $ setfacl -dm u:bin:rwx b < acl of b differs only in name_index, so a's acl is reused $ getfacl b < shows the result from the inode cache < empty inode cache (remount, etc.) $ getfacl b < shows an access acl instead of a default acl. Signed-off-by: Andreas Gruenbacher Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] do_munmap() hugetlb fix The hugetlb_page test in do_munmap is too permissive. It checks start vma, but forgets that end vma might be different and huge though start is not: so hits unmap_hugepage_range BUG if misaligned end was given. And it's too restrictive: munmap has always succeeded on unmapped areas within its range, why should it behave differently near a hugepage vma? And the additional checks in is_aligned_hugepage_range are irrelevant here, when the hugepage vma already exists. But the function is still required (on some arches), as the default for prepare_hugepage_range - leave renaming cleanup to another occasion. Signed-off-by: Hugh Dickins Acked-by: William Irwin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] speedstep-lib.c: fix frequency multiplier for Pentium4 models 0&1 The Pentium4 models 0&1 have a longer MSR_EBC_FREQUENCY_ID register as the models 2&3, so the bit shift must be bigger. Signed-off-by: Matthias-Christian Ott Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86-64: CONFIG_PM=n build fix This patch fixes a compile problem on x86-64 when CONFIG_PM is turned off. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: parse noexec=[on|off] The patch fixes the noexec= boot option on x86_64 to actually work when other options come after it. Credits (if any ;)) should go to Matt Zimmerman and Colin Watson for spotting the problem and providing/testing the fix. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [ide] fix hwif_init() to not return error for "empty" interfaces Return success if no device is connected to the interface. Signed-off-by: Jean Delvare Signed-off-by: Bartlomiej Zolnierkiewicz FRV: "len" is size_t Georgi Guninski has some tools that warn about bad user accesses. This one was harmless, but still.. [SPARC64]: atomic and bitop fixes. 1) Correct memory barriers. Routines not returning a value need no memory barriers, however routines returning values do need them. 2) Actually implement non-atomic ext2 bitops. Thanks to Anton Blanchard for pointing out the memory barrier requirements. Signed-off-by: David S. Miller [DOC]: Add asm/atomic.h asm/bitops.h implementation specification. Signed-off-by: David S. Miller [ide] fix ide_dump_atapi_status() From: Al Viro On Fri, 4 Feb 2005, Al Viro wrote: > BTW, ide-lib.c code that triggers the ICE happens to be completely broken. > Jens, it's your patch from September 2002 - what used to be > if ((stat & (BUSY_STAT|ERR_STAT)) == ERR_STAT) { > became > if ((status.all & (status.b.bsy|status.b.check)) == status.b.check) { > and that's *not* an equivalent transformation. Fixing it doesn't get rid > of ICE, but it certainly deserves fixing. Signed-off-by: Bartlomiej Zolnierkiewicz [ide aec62xx] remove SPLIT_BYTE() and MAKE_WORD() macros bart: leave BUSCLOCK() alone for now Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [ide aec62xx] merge aec62xx.h into aec62xx.c bart: s/byte/u8/ Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [ide cmd64x] merge cmd64x.h into cmd64x.c Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [ide cy82c693] merge cy82c693.h into cy82c693.c bart: do small whitespace cleanup while at it Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [ide pci generic] remove dead unknown_chipset[] table from generic.h Signed-off-by: Bartlomiej Zolnierkiewicz [ide pci generic] remove dummy init_chipset_generic() ->init_chipset is optional Signed-off-by: Bartlomiej Zolnierkiewicz [ide pci generic] merge generic.h into generic.c Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [ide hpt366] remove dead fifty_base_hpt374[] table Signed-off-by: Bartlomiej Zolnierkiewicz [libata scsi] verify cmd bug fixes/support Also, trim trailing whitespace. [ide hpt366] merge hpt366.h into hpt366.c bart: while at it do whitespace cleanup and add missing FIXME Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [ide it8172] merge it8172.h into it8172.c Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [ide opti621] merge opti621.h into opti621.c Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [ide pdc202xx_new] merge pdc202xx_new.h into pdc202xx_new.c Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [libata] fix probe object allocation bugs The code previously alloced a 2-entry array, then freed each entry individually, for users of "combined mode". Convert code to use allocation function that only allocates one object at a time. Also, un-export ata_pci_init_legacy_mode(), as its only user is libata-core. [ide pdc202xx_old] remove SPLIT_BYTE() macro Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [libata sata_sil] add another Seagate drive to blacklist [libata sata_promise] add PCI ID for new SATAII TX2 card [NET]: Add missing memory barrier to kfree_skb(). Also kill kfree_skb_fast(), that is a relic from fast switching which was killed off years ago. The bug is that in the case where we do the atomic_read() optimization, we need to make sure that reads of skb state later in __kfree_skb() processing (particularly the skb->list BUG check) are not reordered to occur before the counter read by the cpu. Thanks to Olaf Kirch and Anton Blanchard for discovering and helping fix this bug. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller [NET]: Add barriers for dst refcnt. In light of the recent discussion about sk_buff, I think we need the following patch for dst_entry. This adds a memory barrier before dst_release drops the refcnt, and a read memory barrier before dst_destroy starts destroying the entry. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller [SPARC64]: Kill spurious semicolons in some system.h macros Signed-off-by: David S. Miller [PATCH] libata: fix ata_piix on ICH6R in RAID mode Here is the cleaned up patch (as you suggested) that enables ata_piix to work in RAID mode on ICH6R. I tested it and it seems to behave correctly in all the modes---sees all 4 disks in IDE and RAID modes, doesn't see any in Compatibility mode (which is right, because only two are available and the regular IDE driver has picked them up already). Change description: only test for PCI IDE legacy mode, via the PCI programming interface register, if the PCI device is of class PCI_CLASS_STORAGE_IDE. Signed-off-by: Martins Krikis Signed-off-by: Jeff Garzik [libata ahci] Add support for ULi M5288 Contributed by Peer Chen @ ULi [ide pdc202xx_old] merge pdc202xx_old.h into pdc202xx_old.c Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [ide piix] remove useless comment Signed-off-by: Bartlomiej Zolnierkiewicz [ide piix] merge piix.h into piix.c Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [ide serverworks] remove unused SVWKS_DEBUG_DRIVE_INFO Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [ide serverworks] merge serverworks.h into serverworks.c Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [ide] remove unused pkt_task_t definition from ide.h Signed-off-by: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz [ARM PATCH] 2458/1: prevent PXA2xx defines from clashing with SA1111's Patch from Nicolas Pitre A more elegant solution could be applied which would require more work. However there is only one platform using both chips (Lubbock) and half of the SA1111 features are unusable due to botched DMA support at the PCB level anyway. Therefore this solution should be sufficient for now. Also removed the SADIV defines which use would not constitute good programming practice. Divisors should be computed directly in the code especially since different PXA2xx versions have different clock source frequencies. No in-tree driver uses them so this is low impact.. Finally changed alignment to fit rest of file. Signed-off-by: Nicolas Pitre Signed-off-by: Russell King [ARM] Re-order lubbock includes Include asm/hardware/*.h before asm/arch/*.h Signed-off-by: Russell King [XFS] Reinstate missing frozen check on write, fixes snapshots and xfs_freeze. SGI-PV: 925910 SGI-Modid: xfs-linux-melb:xfs-kern:21407a Signed-off-by: Nathan Scott [XFS] Prevent releasepage from releasing pages early, while they still have delayed allocate buffers. Affects filesystem blocksizes smaller than the pagesize only. SGI-PV: 929309 SGI-Modid: xfs-linux-melb:xfs-kern:21409a Signed-off-by: Nathan Scott [SPARC64]: Add missing membars for xchg() and cmpxchg(). Signed-off-by: David S. Miller [SPARC64]: Correct rwlock membars. read_unlock should order all previous memory operations before the atomic counter update to drop the lock. The debugging version of write_unlock had a similar error. Signed-off-by: David S. Miller [DOC]: Some atomic_ops.txt updates. Based upon feedback from Linus: - Touch on xchg(), cmpxchg() and spinlocks lightly. - Discuss atomic_dec_and_test() - Add some historical platform notes. Signed-off-by: David S. Miller [PKT_SCHED]: ipt action: add back pskb_expand_head() call Jamal asked me to add back the call to pskb_expand_head before 2.6.11. This fixes a regression caused by my tc action cleanup patches, the tc actions most not replace packets, so it must prevent netfilter from doing so. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [IPV6]: Fix tunnel list locking in ip6_tunnel.c We need to fix tunnel list locking in ip6_tunnel.c as well. Noticed by jean-mickael guerin . Signed-off-by: Hideaki YOSHIFUJI Signed-off-by: David S. Miller [PKT_SCHED]: netem: memory leak Good catch.. netem needs to free skb's that are dropped due to loss simulation. Signed-off-by: David S. Miller [NETFILTER]: Clean NAT status bits on module unload another patch which I think should go in 2.6.11, it fixes a crash when unloading, then reloading iptable_nat. ip_nat_core doesn't clear the status bits in struct ip_conntrack on module unload, but zeroes out the nat area. When the module is loaded again and a connection times out ip_nat_cleanup_conntrack tries to list_del the zeroed list-head and crashes. There are probably more conditions under which it can crash or cause other misbehaviour. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [NETLINK]: Use SKB_MAXORDER to calculate NLMSG_GOODSIZE NLMSG_GOODSIZE specifies a good default size for the skb tailroom used in netlink messages when the size is unknown at the time of the allocation. The current value doesn't make much sense anymore because skb_shared_info isn't taken into account which means that depending on the architecture NLMSG_GOOSIZE can exceed PAGE_SIZE resulting in a waste of almost a complete page. Using SKB_MAXORDER solves this potential leak at the cost of slightly smaller but safer sizes for some architectures. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller [CRYPTO]: Make some code static in i386 crypto AES. This patch makes some needlessly global code static. Signed-off-by: Adrian Bunk Signed-off-by: James Morris Signed-off-by: David S. Miller [ATM]: [horizon] replace interruptible_sleep_on() with wait_event_interruptible() Signed-off-by: Nishanth Aravamudan Signed-off-by: Chas Williams Signed-off-by: David S. Miller [ATM]: [iphase] remove sleep_on*() usage Signed-off-by: Nishanth Aravamudan Signed-off-by: Chas Williams Signed-off-by: David S. Miller [ATM]: [zatm] replace sleep_on() with wait_event() Signed-off-by: Nishanth Aravamudan Signed-off-by: Chas Williams Signed-off-by: David S. Miller [IPV4]: ipconfig should use memmove() instead of strcpy() strcpy is undefined if src and dest overlap. That's clearly possible here with a sufficiently deep path on the server. Use memmove instead. Signed-off-by: Matthew Wilcox Signed-off-by: David S. Miller [block sx8] fix warning As 'i' and 'host->id' are of different types (signed vs. unsigned), we need a cast. Eventually host->id should probably be made unsigned, but this requires further analysis. [BK] ignore drivers/md/raid6altivec[1248].c [PATCH] Make mousedev.c report all events to user space immediately mousedev_packet() clears list->ready too early when called with "tail == head - 1". The effect is that the last mouse event from the hardware isn't reported to userspace until another hardware mouse event arrives. This can make the left mouse button get stuck when tapping on a touchpad. When this happens, the butten doesn't unstick until you interact with the touchpad again. Signed-off-by: Peter Osterlund Signed-off-by: Linus Torvalds Undo recent tty_io.c "fix". The fix was just trying to hide the real bug, which was in an old udev script. The change made matters worse. Cset exclude: pavenis@latnet.lv[torvalds]|ChangeSet|20050202164823|05506 [SPARC64]: Fix off-by-one handling of size in user_fixup.c Noticed by Jurij Smakov Signed-off-by: David S. Miller [SPARC64]: Update defconfig. Signed-off-by: David S. Miller [PATCH] PCI Hotplug: fix rpaphp firmware dependency Noted by David Woodhouse Here's a fix for the ppc64 crash during boot. This corrects the offending function to use more conventional error codes. I'll follow up with return code cleanups for the entire module, and for RTAS code, since these are probably too big for 2.6.11. Signed-off-by: John Rose Signed-off-by: Linus Torvalds [SPARC64]: Mask off stack ptr in compat_alloc_user_space() for 32-bit. Signed-off-by: David S. Miller [PATCH] add MAP_POPULATE/sys_remap_file_pages support to XFS filemap_populate needs to be exported so that filesystems with their own vm_operations (like XFS) can use it. Cc: Nathan Scott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Add missing configure calls to intel agp resume code. Fix for resume on i850. Maybe for i855GM. Signed-off by: Nigel Cunningham Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix wait_task_inactive race When a task is put to sleep, it is dequeued from the runqueue while it is still running. The problem is that one some arches that have non-atomic scheduling, the runqueue lock can be dropped and retaken in schedule() before the task actually schedules off, and wait_task_inactive did not account for this. Signed-off-by: Nick Piggin Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] add design comment to kick_process() Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: kbuild: add further cleaning Descend into arch/um/kernel/skas/util during make clean. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: hostfs: (security) fix chmod +s permission check Frank Fricke reported that hostfs does not verify that a chmod +s, for instance, is done by a sufficiently privileged user, as long as the UML kernel itself can complete the operation on the host. So, for instance, if UML is run as root and under /mnt/host we have a hostfs mount, this works successfully: paolo@zion:~ (0)$ chmod 4755 /mnt/host/bin/bash paolo@zion:~ (0)$ ll /mnt/host/bin/bash -rwsr-xr-x 1 root root 662724 2004-10-20 02:15 /mnt/host/bin/bash* (bash refuses running as setuid, but you could have another shell on the host, as dash or whatever). In general, if UML is run as uid 500 on the host, a hostfs mount is done and under the hostfs mount there is a file with uid 500 on the host, I can freely make it setuid (if it's executable). This is especially bad when UML is run as root (which you should not do), but is a problem in general, since it allows any user to create setuid 500 (in this example) executables on the host filesystem. Finally, while I was looking at the chmod() implementation, I spotted a kludge in the code and explained it with a comment. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Cc: Frank 'xraz' Fricke Cc: Alexander Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: missing lock prefix in switch_to Add the missing "lock" prefix in switch_to macro. Signed-off-by: Suresh Siddha Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] serial: fix low-latency mode deadlock We presently deadlock in low-latency mode because the receive code holds port.lock while calling into the tty code to perform echoing. The tty code calls back into the driver, which then takes port.lock. Fix that by dropping the lock around the echo call. Acked-by: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: add unknown page size string This patch had fixed the following warning. arch/mips/lib-32/dump_tlb.c: In function 'dump_tlb': arch/mips/lib-32/dump_tlb.c:69: warning: control may reach end of non-void function 'msk2str' being inlined This patch adds return value, when page size is not match. Signed-off-by: Yoichi Yuasa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] qlogic nonatomic warning fix The qlogic driver complains about the use of smp_processor_id() in preemptible code. And it's right. But it's just for an affinity optimisation and we can validly quash the warning. Signed-off-by: Andrew Vasquez Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Invalid bound check of driver defined ioctls in drm_ioctl Bug fd.o 2489 Reporter: Aapo Tahkola Signed-off-by: Dave Airlie drm: fix race condition in radeon driver Close a race which could allow for privilege escalation by users with DRI privileges on Radeon hardware. Essentially, a malicious program could submit a packet containing an offset (possibly in main memory) to be rendered from/to, while a separate thread switched that offset in userspace rapidly between a valid value and an invalid one. radeon_check_and_fixup_offset() would pull the offset in from user space, check it, and spit it back out to user space to be copied in later by the emit code. It would sometimes catch the bad value, but sometimes the malicious program could modify it after the check and get an invalid offset rendered from/to. Fix this by allocating a temporary buffer and copying the data in at once. While here, make the cliprects stuff not do the VERIFYAREA_READ and COPY_FROM_USER_UNCHECKED gymnastics, avoiding a lock order reversal on FreeBSD. Performance impact is negligible -- no difference on r200 to ~1% improvement on rv200 in quake3 tests (P4 1Ghz, demofour at 1024x768, n=4 or 5) From: Eric Anholt Signed-off-by: Dave Airlie [PATCH] md: fix problems with verion-1 superblock code - off-by-one error - missing recalc of checksum Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] md: prevent oops when drive set faulty in inactive md array. hot_add_disk and hot_remove_disk check mddev->pers before proceeding. set_disk_faulty should too. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] md: make md work a bit better with devfs - set ->devfs_name - create initial devfs names slightly differently so as not to conflict - re-read partition table when an array is assembled at boot time - not sure why this is needed, but it is. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] md: fix endless loop when syncing an array that doesn't need any resync. If the resync checkpoint for an array is at the end of the array, It doesn't get set to MAX_SECTOR, so resyncing will be retried. By updating curr_resync early, this problem is fixed. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] md: remove extra loop from copy_data copy_data currently loops over bio's in a list, but the caller also does the same looping, sometimes with extra work. So remove the loop from copy_data. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] raid5 overlapping read hack If we detect an overlap, we set a flag and wait for a wakeup. When requests are handled, if the flag was set, we perform the wakeup. Note that the code currently in -mm is badly broken. With this patch applied, it passes tests the use O_DIRECT to cause lots of overlapping requests. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] nfsd: Don't try to cache reply to nfsv2 readdir. As readdir returns the reply in a separate page, the cache code cannot find the reply (and it would probably be too big anyway) so flag readdir for NOCACHE Signed-off-by: Olaf Kirch Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] nfsd: Allow read access over NFS to files with APPEND bit set. Write access cannot safely be allowed as NFS doesn't support append, but read access should be ok. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Fix ATM copy-to-user usage. More of the Guninski "copy_to_user() takes a size_t" series. [PATCH] NOMMU: Improved handling of get_unmapped_area() errors The attached patch does two things: (1) We no longer check the return value of file->f_op->get_unmapped_area() unless we actually called it. We know addr is zero otherwise because we'd've given an error earlier if it wasn't. (2) If -ENOSYS was returned by that operation, then we assume we actually called a driver (such as the framebuffer driver) that might want to invoke the operation in a lower level driver (such as matroxfb) if one exists, and that it found that one didn't. We translate the -ENOSYS error into -ENODEV - the error we would have given if the operation was not supplied in the file ops. Doing this permits us an opportunity for arch_get_unmapped_area() or something else to be called if we want that to happen, particularly in the MMU case. Signed-Off-By: David Howells Signed-Off-By: Linus Torvalds [PATCH] NOMMU: Documentation of no-MMU mmap The attached patch adds documentation for the behaviour of the no-MMU mmap. Signed-Off-By: David Howells Signed-Off-By: Linus Torvalds [IA64] mca_asm.S: Correctly dereference ia64_mca_data arch/ia64/kernel/mca_asm.S is treating per_cpu__ia64_mca_data as the start of the mca data, instead of as a pointer to the mca data. It ends up overwriting the rest of the per cpu area with the MCA stack and bspstore. Since we dereference ia64_mca_data several times, make it a macro. Signed-off-by: Keith Owens Signed-off-by: Tony Luck [ARM PATCH] 2457/1: fix two typos in arch/arm/mm/tlb*.S Patch from Lennert Buytenhek Fix two typos in arch/arm/mm/tlb*.S Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King [TG3]: Clean up grc_local_ctrl usage. Make the code more readable by only flipping the specific bits that need to change each register write. Signed-off-by: Grant Grundler (grundler@parisc-linux.org) Signed-off-by: David S. Miller [TG3]: Update driver version and reldate. Signed-off-by: David S. Miller [XFRM]: Kill xfrm_export.c This patch removes xfrm_export.c and moves the EXPORT_SYMBOL{,_GPL}'s to the files where the actual functions are. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller [NET]: Replace schedule_timeout() with msleep() in netdev_wait_allrefs() Description: Use msleep() instead of schedule_timeout() to guarantee the task delays as expected. The current code uses TASK_INTERRUPTIBLE, but does not respond to signals, so msleep() should be ok. Signed-off-by: Nishanth Aravamudan Signed-off-by: David S. Miller [IPVS]: Replace schedule_timeout() with ssleep() Description: Use ssleep() instead of schedule_timeout() to guarantee the task delays as expected. The first two replacements use TASK_INTERRUPTIBLE but do not check for signals, so ssleep() should be appropriate. Signed-off-by: Nishanth Aravamudan Signed-off-by: David S. Miller [IPV4]: ipconfig: Replace schedule_timeout() with msleep() Description: Use msleep() instead of schedule_timeout() to guarantee the task delays as expected. Change the units of the two constants to be msecs and secs respectively. Signed-off-by: Nishanth Aravamudan Signed-off-by: David S. Miller [TCP]: Fix calculation for collapsed skb size Noticed by Denis V. Lunev and based upon original patch by Alexey Kuznetsov Signed-off-by: Thomas Graf Signed-off-by: David S. Miller [PKT_SCHED]: Fix u32 double listing. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller [ARM PATCH] 2462/1: IXP2000 - fixes for warnings from io.h Patch from Ben Dooks Fix the include/asm-arm/arch-ipx2000/io.h to remove the warnings generated due to the IO addresses not being of the type `void __iomem *` Signed-off-by: Ben Dooks Signed-off-by: Russell King [ARM PATCH] 2463/1: Hynix h7202 serial ports fixes Patch from Sascha Hauer This patch fixes the membase/mapbase of serial ports 1-4 and actually enables them. Signed-off-by: Sascha Hauer Signed-off-by: Russell King [ARM PATCH] 2454/1: cleanup shark_defconfig Patch from Ben Dooks remove a number of warnings from the default shark build Signed-off-by: Ben Dooks Signed-off-by: Russell King [ARM PATCH] 2455/1: shark: fix uninitialised variable in head Patch from Ben Dooks stop compiler warning about uninitialised variable Signed-off-by: Ben Dooks Signed-off-by: Russell King [PATCH] Fix oops in alloc_zeroed_user_highpage() when page is NULL The generic and IA-64 versions of alloc_zeroed_user_highpage() don't check the return value from alloc_page_vma(). This can lead to an oops if we're OOM. This fixes my oops on PPC64, but I haven't got an IA-64 machine/compiler handy. Signed-off-by: Michael Ellerman Signed-off-by: Linus Torvalds [SERIAL] discover PNP ports before PCI, etc Patch from Bjorn Helgaas PNP ports tend to be built-in, and discovering them after PCI ports means the names of the built-in ports can change if you add or remove PCI ports. (And yes, we should look at getting rid of 8250_acpi.c now that we have PNPACPI, but that's for another patch.) Signed-off-by: Bjorn Helgaas [ARM] Fix VFP for entry-armv.S macro-isation. Unfortunately, VFP got forgotten with when entry-armv.S was updated to use macros, and the PC value changed from being passed in r5 to r2. This fixes VFP. Signed-off-by: Russell King qla2xxx: fix BUG's for smp_processor_id() on interrupt From: Andrew Vasquez replace them with _smp_processor_id() Signed-off-by: James Bottomley [PATCH] cciss: handle scsi_add_host failure Signed-off-by: Mike Miller Signed-off-by: James Bottomley [PATCH] [ALSA] Add quirk for HP pavilion ZV5030US Added ac97 quirk for HP Pavilion ZV5030US to bind the control with mute-LED. Signed-off-by: Takashi Iwai Signed-off-by: Linus Torvalds [PATCH] [ALSA] Add quirk for HP nc8000 Added ac97 quirk for HP nc8000. The list is sorted again. Signed-off-by: Takashi Iwai Signed-off-by: Linus Torvalds [PATCH] [ALSA] Special AC97 patch for ASUS W1000/CMI9739 laptop This patch fixes sound output on the ASUS W1000 laptop with the CMI9739 chip. It wrongly reports that it has a SPDIF in, when in fact we wish to use the EAPD pin. Signed-off-by: James Courtier-Dutton Signed-off-by: Takashi Iwai Signed-off-by: Linus Torvalds [PATCH] [ALSA] Fix silent output on some machines with AD1981x codecs Fixed the default state of 'Headphone Jack Sense' switch on AD1981x codecs. Setting this on affects the output of some machines (e.g. Thindpads). The default value is set on only hardwares which are known to work. Signed-off-by: Takashi Iwai Signed-off-by: Linus Torvalds [PATCH] [ALSA] Enable HP jack sense for FSC Scenic-W Enable 'Headphone Jack Sense' control on FSC Scenic-W as default, too. Signed-off-by: Takashi Iwai Signed-off-by: Linus Torvalds [PATCH] [ALSA] AC'97 Audio support for Intel ICH7 This patch adds the ICH7 AC'97 DID the the intel8x0.c AC'97 audio driver. This patch was build against 2.6.11-rc1. Signed-off-by: Jason Gaston Signed-off-by: Takashi Iwai Signed-off-by: Linus Torvalds [PATCH] [ALSA] Fix struct alignment on PPC64 Fixed the struct size mismatch (due to alignment) of snd_ctl_elem_value_t for PPC64 and SPARC64. Signed-off-by: Takashi Iwai Signed-off-by: Linus Torvalds [PATCH] [ALSA] Add missing FORWARD ioctl Added the missing PCM FORWARD ioctl. Signed-off-by: Takashi Iwai Signed-off-by: Linus Torvalds [PATCH] sonypi: replace schedule_timeout() with msleep() Replace schedule_timeout() with msleep() - from janitors. Signed-off-by: Stelian Pop Signed-off-by: Linus Torvalds [PATCH] sonypi: add another HELP button event Add another HELP button event. Increment the version number. Signed-off-by: Stelian Pop Signed-off-by: Linus Torvalds [PATCH] sonypi: use MISC_DYNAMIC_MINOR in miscdevice.minor assignment. Use MISC_DYNAMIC_MINOR in miscdevice.minor assignment. Patch-from: Olaf Hering Signed-off-by: Stelian Pop Signed-off-by: Linus Torvalds [PATCH] sonypi: fold the contents of sonypi.h into sonypi.c Fold the contents of sonypi.h into sonypi.c making some structures static. Partly-from: Adrian Bunk Suggested-by: Dmitry Torokhov Signed-off-by: Stelian Pop Signed-off-by: Linus Torvalds [PATCH] sonypi: add fan and temperature status/control 1. FAN Status/Control: you can now get the fan status (running or not) and also set the fan speed (for <5 seconds only). The problem is that there is an auto regulator that kicks in within about 5 seconds after that to restart the fan if it is above a threshold temperature (39 Degree C in my Vaio). It is useful just to get the fan status (primarily). It also appears that you can change the speed by increasing the values (much like the LCD control) - there are effectively only about 6 speeds (it seems - not sure, but from what I've played with on my Vaio). 2. Temperature: you can get the current temperature (same as reported by ACPI). This is primarily useful for APM users (since ACPI already gives this). I have used this to detect when the fan comes on in my Vaio (39 Degree C). From: Narayanan R S Signed-off-by: Stelian Pop Signed-off-by: Linus Torvalds [gen_init_cpio] When outputting a buffer, don't use char-at-a-time I/O. [PATCH] L18 flash corruption fix Another fix to the put_chip() concurrency logic. Problem was occurring when: 1) one thread was erasing a block in partition x; 2) another thread suspended the erase in order to write to partition y; 3) a third thread came along to read a different block from partition x and, when it called put_chip(), chip->oldstate was FL_ERASING and the erase (mistakenly) resumed; 4) the write in partition y obviously failed at that point. Incidentally, the fix for this problem also fixed the case where suspending writes for MTD XIP usage was not working properly. Signed-off-by: Nicolas Pitre Signed-off-by: David Woodhouse Signed-off-by: Linus Torvalds [PATCH] alpha: add missing dma_mapping_error Attached patch defines dma_mapping_error on alpha. Without this libata-core.c won't compile. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix compat shmget overflow This fixes an incorrect sign extension in the compat layer that breaks 32bit shmget that are >2GB. sys_shmget has a signed size_t size argument, and the int size argument coming from 32bit user space would get sign extended to 64bit, which is wrong. I fixed it on all compat architectures, except PPC64 which was already ok. It was originally debugged and fixed by Karl Rister @ IBM for SLES9 on x86-64. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix shmget for ppc64, s390-64 & sparc64. The second parameter of the sys_ipc system wrapper on ppc64, s390-64 and sparc64 is an "int". sys_shmget gets called with this 32 bit value as the size parameter. This limits the maximum shared memory segment on these three architectures to 2GB. To fix this the second parameter is declared as an "unsigned long" and is then casted to the type required by the The same int vs. unsigned long bug is fixed for sys_msgsnd and sys_msgrcv as well. Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] binfmt_elf: clearing bss may fail So we discover that Borland's Kylix application builder emits weird elf files which describe a non-writeable bss segment. So remove the clear_user() check at the place where we zero out the bss. I don't _think_ there are any security implications here (plus we've never checked that clear_user() return value, so whoops if it is a problem). Signed-off-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] OProfile: exit.text referenced in init.text The linker doesn't complain, but i got this error on ARM which has similar code. oprofile_arch_exit: discarded in section `.exit.text' from arch/arm/oprofile/built-in.o arch/arm/oprofile/built-in.o(.init.text+0x4c): In function `oprofile_init': : relocation truncated to fit: R_ARM_PC24 oprofile_arch_exit oprofile_arch_init() oprofile_arch_exit() __exit nmi_exit() __exit exit_driverfs() Signed-off-by: Zwane Mwaikambo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Force read implies exec for all 32bit processes in x86-64 This effectively enables executable stack and executable heap for all 32bit programs on x86-64, except if noexec32=on is specified. This does not support changing this with personality right now, this would need more intrusive changes. A 64bit process will always turn it off and a 32bit process turn it on. Also readd the noexec32=on option to turn this off and fix a minor bug in noexec=... (would be reported as unknown option) Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] OProfile: ARM/XScale1 PMU support fix Richard Purdie provided a patch to fix support for XScale1 processors (this is the PMU version i never had access to initially), we weren't clearing the overflow flags after an overflow interrupt had triggered resulting in no additional interrupts occuring. Additionally i've added basic power management support. Signed-off-by: Zwane Mwaikambo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: typo in arch/ppc64/kernel/prom_init.c prom_debug local variable is base, not vbase. Signed-off-by: Olaf Hering Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] nls_cp936.c is not synchronized with M$'s translation table The nls_cp936.c is not synchronized with MS's translation table, there are some characters have different code from the code in updated table of MS. For example, the unicode for character 0xB8A3 (GBK) should be U+798F, but the code is U+FA1B in nls_cp936.c. Regenerated the tables. The number of differences is rather large, so I did not check every change, but looking at a random sample the changes seem OK. Mostly the CJK Compatibility Ideographs have been replaced by their ordinary equivalents. Some code points that were unassigned now got a meaning. Acked-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [XFS] Fix problems with synchronous writes returning EAGAIN incorrectly for pinned inodes. SGI-PV: 930364 SGI-Modid: xfs-linux-melb:xfs-kern:21460a Signed-off-by: Nathan Scott [TCP]: Set PSH bit on all outgoing TSO frames. Helps with crazy Mac OS-X TCP implementations which delay the recvmsg() wakeup of the user until push is seen. Based upon ideas from Alexey Kuznetsov, and a preliminary patch by Stephen Hemminger. Signed-off-by: David S. Miller [SPARC32]: Fix syntax errors from smp_{mb,rmb,wmb} on sparc32. smp_mb(), smp_rmp() and smp_wmb() definitions have a trailing semicolon and cause compilation errors in single statement context, like if-then-else on line 358 in include/linux/skbuff.h. This patch removes all three offending semicolons to make it compile. Signed-off-by: Meelis Roos Acked-by: William Irwin Signed-off-by: David S. Miller [SPARC32]: Fix SPIN_LOCK_UNLOCKED define. Signed-off-by: David S. Miller [SPARC32]: Fix UP build with spinlock debugging enabled. atomic32.c assumes that arbitrary stuff can be passed into spin_lock() on non-SMP builds, which is true except for when spinlock debugging is enabled. Signed-off-by: David S. Miller [SPARC]: nop() macro has bogus trailing semicolon Noticed by Bob Breuer. Signed-off-by: David S. Miller [SPARC]: Trivial annotations in sparc signal.c / svr4.h Signed-off-by: David S. Miller [SPARC]: NULL noise removal from sparc floppy.h Signed-off-by: David S. Miller [SPARC64]: Fix prototype of check_signature() - it already gets a pointer Signed-off-by: Al Viro [SPARC64]: fbio.h __user annotations Signed-off-by: Al Viro [SPARC]: __user annotations around sparc{32,64} ptrace ...succ_return...() Signed-off-by: Al Viro Signed-off-by: David S. Miller [SPARC]: __user annotations in sparc checksum.h Signed-off-by: Al Viro Signed-off-by: David S. Miller [SPARC]: No iBCS2 on sparc, TYVM... Signed-off-by: Al Viro Signed-off-by: David S. Miller [SPARC]: Fix I/O accessor routines. * insb et.al. first argument is unsigned long, not void * (just look at their callers). There _is_ a variant that takes void __iomem *, but that's ioread8_rep() and its friends. * exported the rest of these suckers (insl/outsl already had been). Signed-off-by: Al Viro Signed-off-by: David S. Miller [SPARC]: __user annotations in ELF_CORE_COPY_REGS Signed-off-by: Al Viro Signed-off-by: David S. Miller [SPARC64]: NULL noise removal in arch/sparc64/prom/memory.c Signed-off-by: Al Viro Signed-off-by: David S. Miller [SPARC]: sunlance iomem annotations. Signed-off-by: Al Viro Signed-off-by: David S. Miller [DOC]: Fix typo in atomic_ops.txt s/smb_/smp_/ Noticed by Werner Almesberger. Signed-off-by: David S. Miller [NET]: Use TASK_COMM_LEN instead of magic constant. Signed-off-by: Hideaki YOSHIFUJI Signed-off-by: David S. Miller [PATCH] uml: fix makefile typo Fix a typo in the Makefile cleanup merged earlier, which causes compile failures in some edge cases. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] uml: use PTRACE_OLDSETOPTIONS instead of PTRACE_SETOPTIONS In linux 2.6, PTRACE_SETOPTIONS is redefined to 0x4200, while the old 2.4 value (21) is still available as PTRACE_OLDSETOPTIONS. So, if UML uses PTRACE_SETOPTIONS, an UML-kernel built on a 2.6 won't run on a 2.4 host. Hence we must use PTRACE_OLDSETOPTIONS. For cases when PTRACE_OLDSETOPTIONS does not exists (i.e. 2.4 host or archs which miss it because they don't have a "deprecated" value), we fallback this macro to PTRACE_SETOPTIONS. Signed-off-by: Bodo Stroesser Signed-off-by: Paolo 'Blaisorblade' Giarrusso Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Update to IPMI driver to support old DMI spec The 1999 version of the DMI spec had a different configuration than the newer versions for the IPMI configuration information. This patch handles the differences between the two. Signed-off-by: Corey Minyard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Add try_acquire_console_sem The new PowerMac sleep code provides an arch hook that can be used by video drivers on laptops to bring back the screen very early, pretty much before anything else. This basically turns reports of the style "my laptop doesn't wakeup" to "I get this or this oops/error/panic on wakeup", making fixing the PM related bugs possible on a whole range of them. However, the fbdev wakeup code triggers WARN_ON's in the VT subsystem if called without the console semaphore when redrawing the screen (I added those warnings a couple of kernel versions ago), and we can't call acquire_console_sem() since we are so early in the wakeup process that we are considered as in_atomic() (we hold irqs off too). This patch addds a try_acquire_console_sem() function that can be used by those video drivers that implement this early wakeup hook. If the acquire fails (which should never happen in practice), wakeup is delayed to the normal PCI callback which does a blocking acquire_console_sem(). Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] update aty128fb sleep/wakeup code for new powermac changes This patch updates aty128fb power management code to the changes of the powermac sleep mecanism. It makes the driver use the new hook for early wakeup, adds the call to the arch code indicating wether it can wakeup the chip, etc... This patch shouldn't break non-ppc, but this should be tested. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] radeonfb update It adds the sleep support for newer powermacs, improve power saving on some laptops, makes use of the new fbdev modelist management routines, and fixes a few backlight related issues. I tested it on a thinkpad T30 and a few PPC boxes with success. It should be less invasive than the previous one (I don't try to restore the mode on exit, that is what breaks the thinkpad and possibly other stuffs that boot in VGA text mode), plus fixed a couple of bugs in the mode detection code. I also reverted the memory map fix on ppc since it doesn't work properly on some recent laptops where the firmware sets a tiled display. I'll rework that completely to update the memory map as part of the mode setting later. That should fix various issues when switching with X/DRI on x86. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mark the mcd cdrom driver as BROKEN The mcd driver drives only very old hardware (some single and double speed CD drives that were connected either via the soundcard or a special ISA card), and the mcdx driver offers more functionality for the same hardware. My plan is to mark MCD as broken in 2.6.11 and if noone complains completely remove this driver some time later. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mips: remove TANBAC_TB0219 doubly registered in kernel config This patch removes TANBAC_TB0219 doubly registered in kernel config. Signed-off-by: Yoichi Yuasa Cc: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] portability problem in dm-stripe.c dm-stripe does do_div() on potentially 32bit data. do_div() implementation has every right to be Not Happy(tm) with that... The fix is obvious - that's what sector_div() is for... Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] i2c compat ioctl breakage do_i2c_rdwr_ioctl() does two compat_alloc_user_space(). That doesn't work; no state is kept and second allocation will ignore the first one (i.e. give overlapping chunk of user stack). Fixed by doing allocation at once, slightly cleaned up. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds [PATCH] FRV: Fix sigaltstack handling for RT signals The attached patch fixes sigaltstack handling for RT signal return. It was reading a userspace struct into kernel space and then passing the kernel copy to a generic signalling routine which then assumed it had been passed a userspace pointer... Signed-Off-By: David Howells Signed-Off-By: Alexander Viro Signed-Off-By: Linus Torvalds [PATCH] Fix the mincore() syscall This fixes the mincore syscall in three ways: (1) It moves as much argument checking outside of the semaphore-holding region as possible. (2) It checks the region parameters against TASK_SIZE so that a 32-bit binary on a 64-bit platform will get the right error when calling this syscall on a region that overlaps the end of the 32-bit address space. (3) It tidies up the VMA checking loop a little. Signed-Off-By: David Howells Signed-Off-By: Linus Torvalds [TG3]: capacitive coupling detection fix This patch fixes the problem reported in: http://marc.theaimsgroup.com/?l=linux-kernel&m=110798711911645&w=2 The 5700 link problem was caused by reading uninitialized values in sram and causing capacitive coupling mode to be enabled by mistake. This patch fixes the problem by properly validating the sram contents. Signed-off-by: Michael Chan Signed-off-by: David S. Miller [TG3]: Update driver version and reldate. Signed-off-by: David S. Miller [PATCH] general split_vma hugetlb fix My recent do_munmap hugetlb fix has proved inadequate. There are other places (madvise, mbind, mlock, mprotect) where split_vma is called. Only mprotect excludes a hugetlb vma: the others are in danger of splitting at a misaligned address, causing later BUGs. So move the ~HPAGE_MASK check from do_munmap to split_vma itself; and fix up those places (madvise and mlock) which expect split_vma can fail only with -ENOMEM, and wish to convert that to -EAGAIN. (It appears genuine that some of these syscalls should be failing with -ENOMEM and some with -EAGAIN, so respect those behaviours.) madvise_dontneed doesn't use split_vma, but is equally in danger of causing a hugetlb BUG via zap_page_range. Whereas elsewhere the patch is permissive (allowing the operation on a hugetlb vma even when pointless, so long as it doesn't missplit it), here we must use -EINVAL on any hugetlb vma, since a page fault would hit the BUG in its nopage. Signed-off-by: Hugh Dickins Acked-by: William Irwin Signed-off-by: Linus Torvalds [PATCH] Eicon driver: convert to pci_register_driver convert from pci_module_init to pci_register_driver Signed-off-by: Christophe Lucas Signed-off-by: Armin Schindler Signed-off-by: Linus Torvalds [PATCH] Eicon driver: code cleanups Cleanups (initially sent by Adrian Bunk): - make some needlessly global code static - removed obsolete #define OLD_MAX_DESCRIPTORS - removed more platform independend code not used in linux - removed dos- at end of lines - fix indentation in already modified files Signed-off-by: Armin Schindler Signed-off-by: Linus Torvalds [PATCH] de214x.c uses uninitialized pci_dev->irq Don't use pci_dev->irq until after pci_enable_device(). Andy Esten reported that his NIC stopped working in 2.6.10 because of this problem. Signed-off-by: Bjorn Helgaas Signed-off-by: Jeff Garzik [SERIAL] drivers/serial/*: convert to pci_register_driver Patch from Christophe Lucas convert from pci_module_init to pci_register_driver Signed-off-by: Christophe Lucas [SERIAL] add TP560 data/fax/modem support Patch from Bjorn Helgaas Claim Topic TP560 data/fax/voice modem. This device reports as class 0x0780, so we don't claim it by default: 00:0d.0 Class 0780: 151f:0000 Subsystem: 151f:0000 Interrupt: pin A routed to IRQ 11 Region 0: I/O ports at a400 [size=8] 00: 1f 15 00 00 01 00 00 02 00 00 80 07 00 00 00 00 10: 01 a4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 00 00 00 00 1f 15 00 00 30: 00 00 00 00 00 00 00 00 00 00 00 00 0b 01 00 00 Some rc.serial scripts extract IRQ and I/O port information from /proc/pci and stuff it into an unused port using setserial. That doesn't work reliably anymore because pci_enable_device() is never called, so the IRQ may not be enabled. Thanks to Evan Clarke for reporting and helping debug this problem. Signed-off-by: Bjorn Helgaas [PATCH] ppc32: Fix PCI2 support on MPC8555/41 CDS systems This fixes an issue related to the second PCI host controller working on MPC8555/41 systems. We track the last PCI bus number on PCI1 so that the PCI2 host controller can properly exclude itself at the right time, exclusion should occur after initial setup so that the early pci config cycles in setting PCI2 actually get to the controller. Signed-off-by: Kumar Gala Signed-off-by: Linus Torvalds [PATCH] kmalloc() bug in pci-dma.c dma_declare_coherent_memory() is calling kmalloc with wrong arguments. Signed-off-by: Venkatesh Pallipadi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: fix typos in cpm_uart_cpm2.c This patch removes excess '~' before the bit masks. Signed-off-by: Andrei Konovalov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix small vmalloc per allocation limit The vmap vmalloc rework in 2.5 had a unintended side effect. vmalloc uses kmalloc now to allocate an array with a list of pages. kmalloc has a 128K maximum. This limits the vmalloc maximum size to 64MB on a 64bit system with 4K pages. That limit causes problems with other subsystems, e.g. iptables relies on allocating large vmallocs for its rule sets. This is a bug IMHO - on 64bit platforms there shouldn't be such a low limit on the vmalloc size. And even on 32bit it's too small for custom kernels with enlarged vmalloc area. Another problem is that this makes vmalloc unreliable. After the system has been running for some time it is unlikely that kmalloc will be able to allocate >order 2 pages due to memory fragmentation. This patch takes the easy way out for fixing this by just allocating this array with vmalloc when it is larger than a page. While more complicated and intrusive solutions would be possible they didn't use vmalloc recursively they didn't seem it worth to handle this very infrequent case. Please note that the vmalloc recursion is strictly bounded because each nested allocation will generate a much smaller stack frame. Also the kernel stack can handle even a few recursion steps easily because vmalloc has only a small stack frame. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] megaraid_mbox fix wrong order of arguments in memset(). This, BTW, shows why cross-builds are useful - the only indication of problem had been a new warning showing up in sparse output on alpha build (number exceeding 256 got truncated). Signed-off-by: Al Viro [PATCH] raid5 and raid6 fixes to current bk tree This fixes the raid5 and raid6 prolems that crept in with the recent introduction of "bi_max_vecs". Since raid5/raid6 allocate their own bio's, they need to make sure that bi_max_vecs is updated along with bi_vcnt. [CG3]: FB mmap .voff and .poff were reversed. Signed-off-by: David S. Miller [CG3]: Set framebuffer cmap correctly. Signed-off-by: David S. Miller [SPARC]: fb: Fix putcmap handling in sbuslib Signed-off-by: David S. Miller [SPARC]: Do not BUG() in srmmu_pte_pfn(). For device memory, just return a value that will never cause pte_pfn() to return true. Noticed by Tom Callaway. Signed-off-by: David S. Miller [ARM PATCH] 2473/1: fix alignment trap handler for big-endian Patch from Lennert Buytenhek The alignment trap handler in arch/arm/mm/alignment.c performs halfword and word accesses by translating them into byte accessing and then combining the pieces. However, it assumes little-endian byte ordering in doing so, which causes unaligned accesses on big-endian platforms to erroneously load or store byteswapped data. This patch was pulled from an old 2.4 -ds tree, and appears to fix the issue. It was submitted for 2.4 at the time (ARM patch ID 1205/1206), but rejected since big-endian ARM platforms are not supported in 2.4. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King [ARM PATCH] 2468/1: S3C2440 - GPIOJ12 register fix Patch from Ben Dooks GPIOJ12 alternate function is CAMRESET, not CAMCLKOUT as mis-copied on creation Patch from Guillaume Gourat Signed-off-by: Guillaume Gourat Signed-off-by: Ben Dooks Signed-off-by: Russell King [ARM PATCH] 2471/1: S3C2440 - fix S3C2440_CAMDIVN register address Patch from Ben Dooks Off by 4 error on S3C2440_CAMDVIN register address, and re-indented the pll calculation code to proper C style. Thanks to Guillaume Gourat for spotting the register mistake Signed-off-by: Guillaume Gourat Signed-off-by: Ben Dooks Signed-off-by: Russell King [PATCH] Eicon driver: remove ^M characters from xdi_vers.h This removes the CRs from the kernel file of Eicon ISDN driver. Linux 2.6.11-rc4 [PATCH] memset argument order misuses A simple 'grep memset.*\<0);' shows argument order errors in several uses of memset. This grep was inspired by Al Viro's recent patch, megaraid_mbox fix, which fixed this problem in the megaraid driver. [PATCH] radeonfb: typos fixes The dynamic clock code in radeonfb comes almost as-is from X.org (where it was contributed by ATI). It has a few typos (wrong register access macros) that this patch fixes. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Linus Torvalds [PATCH] r8169: endianness fixes Endianness fixes - rtl8169_rx_csum() forgot to convert the descriptor to cpu order, - same thing for rtl8169_rx_vlan_skb() but this one is more tricky as the layout of the (u32) word in the 8169 descriptor calls for a second level of swap at the vlan tag level (u16). The old code only did the second part (in an endian-dependant way, how fun). - rtl8169_tx_vlan_tag(): this time the (u32 descriptor level) cpu_to_le32 is issued in rtl8169_start_xmit but the (u16 vlan tag level) cpu_to_be16 is not right any more. Summary: avoid even calls to cpu_to_{b/l}eXX on a given piece of data. The change has no effect on x86. Now sparc64 talks to x86. Pinpointed-by: Jon Mason Signed-off-by: Francois Romieu Signed-off-by: Jeff Garzik [PATCH] r8169: merge of Realtek's code Merge of Realtek's code - code dedicated to a new phy (spotted by Richard Dawe); - C+ register fiddling seems required for both RTL_GIGA_MAC_VER_{D/E}; - apart from being reserved, register at address 0xe2 is named 'IntrMitigate'; - bump version number. A bunch of people do not use the vanilla kernel module simply because Realtek's driver has a higher revision number. This is not an issue per se but their driver is buggy due to some partial merge of in-kernel code. Signed-off-by: Francois Romieu Signed-off-by: Richard Dawe Signed-off-by: Jeff Garzik [PATCH] r8169: typo in debugging code Typo in debugging code. Signed-off-by: Francois Romieu Signed-off-by: Jeff Garzik [PATCH] r8169: screaming irq when the device is closed Close the race for a screaming irq when the device is closed. - rtl8169_interrupt() try to properly IRQ_HANDLE an interrupt even when the network device is going down. As a benefit, rtl8169_poll() does not need to care about the close race any more; - factor code with rtl8169_irq_mask_and_ack(); - rtl8169_init_board(): mitigate some really unexpected events. Signed-off-by: Francois Romieu Signed-off-by: Jeff Garzik [PATCH] r8169: synchronization and balancing when the device is closed rtl8169_close synchronization and balancing - use synchronize_kernel() to sync with the xmit thread (kindly suggested by davem); - balance the netif_poll_disable issued in rtl8169_down. Signed-off-by: Francois Romieu Signed-off-by: Jeff Garzik [PATCH] emac: fix jumbo frame support Fixes a bug in RX buffer allocation so that jumbo size skbs are allocated when the MTU size is changed. Also removes the deprecated restore_flags() call. Please apply. Signed-off-by: Matt Porter Signed-off-by: Jeff Garzik [PATCH] emac: fix mdio delay Fixes MDIO delay. Please apply. Signed-off-by: Ralph Siemsen Signed-off-by: Matt Porter Signed-off-by: Jeff Garzik [PATCH] Allow heap to be marked executable too This makes it possible to mark binaries to have both an executable stack and heap, allowing for a NX system to disable NX on a per-binary level. Signed-off-by: Arjan van de Ven Signed-off-by: Linus Torvalds Eicon driver: remove ^M for real this time. Really. [ARM PATCH] 2474/1: Fix compile for badge4 Patch from Thomas Gleixner Trivial build fix for badge4 platform Signed-off-by: Thomas Gleixner Signed-off-by: Russell King [ARM PATCH] 2476/1: Fix compile for shannon Patch from Thomas Gleixner Trivial build fix for shannon platform Signed-off-by: Thomas Gleixner Signed-off-by: Russell King [ARM PATCH] 2478/1: Remove NULL initializers Patch from Thomas Gleixner Remove NULL initializers of static variables. Signed-off-by: Thomas Gleixner Signed-off-by: Russell King [libata] do not call pci_disable_device() for certain errors If PCI request regions fails, then someone else is using the hardware we wish to use. For that one case, calling pci_disable_device() is rather rude. [ARM PATCH] 2480/1: IXP4XX - cleanup resource for i2c controller Patch from Ben Dooks Fix the following: arch/arm/mach-ixp4xx/common.c:305: warning: initialization from incompatible pointer type Signed-off-by: Ben Dooks Signed-off-by: Russell King [ARM PATCH] 2481/1: IXP2000 - replace sti/cli with local_irq{save,restore} Patch from Ben Dooks Fix the following: arch/arm/mach-ixp2000/pci.c:148: warning: `cli' is deprecated (declared at include/linux/interrupt.h:65) arch/arm/mach-ixp2000/pci.c:161: warning: `sti' is deprecated (declared at include/linux/interrupt.h:69) arch/arm/mach-ixp2000/pci.c:178: warning: `cli' is deprecated (declared at include/linux/interrupt.h:65) arch/arm/mach-ixp2000/pci.c:191: warning: `sti' is deprecated (declared at include/linux/interrupt.h:69) By replacing cli() wht local_irq_save() and sti() with local_irq_restore(). This patch has not been tested. Signed-off-by: Ben Dooks Signed-off-by: Russell King [ARM] Add missing __user annotations to sys_clone() Signed-off-by: Russell King [ARM] Fix SA1111 and PXA iomem sparse warnings. This adds some missing annotations found by making the raw IO operations check their pointer type. Signed-off-by: Russell King [ARM] Fix sparse warnings for Integrator builds. Add some missing __iomem annotations for Integrator machines. Signed-off-by: Russell King [PATCH] ISDN locking fix isdn_net_get_locked_lp is doing a local_bh_enable with hard IRQs disabled. This is not allowed. The following patch fixes the problem by removing the unnecessary local_bh_enable while the hard IRQs are disabled. Signed-off-by: Herbert Xu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: remove extra whitespace before preprocessor token unifdef complains about the space before #ifndef. Signed-off-by: Olaf Hering Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] IPMI: Fix LAN bridging The size of LAN bridged messages was not being returned properly from the function that calculated address sizes. Signed-off-by: Corey Minyard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] block new writers on frozen filesystems When the lockfs patches went in an important bit got lost, the call in generic_file_write to put newly incoming writers to sleep when a filesystem is frozen. Nathan added back the call in the now separate XFS write patch, and the patch for the generic code is below: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] make ACPI_BLACKLIST_YEAR depend on ACPI_INTERPRETER this oneliner fixes the situation that I can enter a year to blacklist ACPI devices even if ACPI is completely disabled. Signed-off-by: Rolf Eike Beer Signed-off-by: Linus Torvalds [COMPAT]: TUNSETIFF needs to copy back data after ioctl. It is defined as a _IOW() which is erroneous, it should have been defined as _IORW() but that cannot be changed now without breaking all existing applications using this ioctl. Signed-off-by: David S. Miller [SPARC]: Fix cg3 fb blanking. cg3_blank() needs to clear the video enable register bit to blank the screen, not set it. Signed-off-by: David S. Miller [SPARC]: Fix video mode probing in atyfb driver. On Sparc, if the user does not specify a mode option, we should use the PROM probed values in default_var always. Signed-off-by: David S. Miller [TG3]: Always check tg3_readphy() return value. Signed-off-by: David S. Miller [TG3]: Update driver version and reldate. Signed-off-by: David S. Miller [SPARC32]: Need to clear PSR_EF in psr of childregs on fork() on SMP. Signed-off-by: David S. Miller [NETROM/ROSE]: Use netdev_priv() Signed-off-by: David S. Miller [SPARC]:Check prom_getproperty() return value in prom_nodematch(). Signed-off-by: David S. Miller [NET]: Fix socket.h comment typo. Signed-off-by: Olaf Hering Signed-off-by: David S. Miller Limit tty IO chunking to 2kB The NTTY code can get confused by 4kB chunks, apparently because n_tty_receive_room() will claim to have more room than n_tty_receive_buf() can actually accept. Until somebody figures out what the real n_tty_receive_room() logic should be, let's just limit it to a safe 2kB. Thanks go to Andreas Schwab for finding a test-case. Fix bogus opost buffer size check Noted while going through the n_tty code: that buffer check used to check against the size of the temporary kernel buffer, but since the tty layer was changed to use kernel buffers though-out, the kernel buffer array became just a pointer, and the check was limiting the opost blocksize to the size of a pointer, which makes no sense. Just remove it, since now the whole buffer is always in kernel space. Input: fix ALPS protocol validation rules We checked the wrong byte, causing the touchpad to lose sync if an absolute packet is received after a relative packet with negative Y displacement. Signed-off-by: Dmitry Torokhov Signed-off-by: Linus Torvalds [IPSEC]: Move dst->child loop from dst_ifdown to xfrm_dst_ifdown. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller [NET]: Add netdev argument to dst ifdown. This patch adds a net_device argument to ifdown. After all, it's a bit silly to notify someone of an ifdown event without telling them what which device it was for :) Signed-off-by: Herbert Xu Signed-off-by: David S. Miller [IPV6]: Fix IPV6_PKTINFO et al. handling in udpv6_recvmsg(). CMSG reception needs to occur even if msg_name is not set. Signed-off-by: Hideaki YOSHIFUJI Signed-off-by: David S. Miller [PATCH] radeonfb: Fix hang on boot with some laptops It appears that access to the PLL registers of the radeon chip is unreliable while the card is in "legacy VGA" text mode. I don't have a good explanation yet, it might be the BIOS mucking around behind my back. This fixes the lockup by moving the code that enables/disables the dynamic power management to after the mode is set. I'm still waiting for a proper explanation from ATI... Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Linus Torvalds [SPARC]: Check prom_getproperty return value. Errors should not be ignored, so add __must_check tag to this function as well. Signed-off-by: David S. Miller [ACPI] ACPICA 20050211 from Bob Moore Implemented ACPI 3.0 support for implicit conversion within the Match() operator. match_obj can now be of type integer, buffer, or string instead of just type integer. Package elements are implicitly converted to the type of the match_obj. This change aligns the behavior of Match() with the behavior of the other logical operators (LLess(), etc.) It also requires an errata change to the ACPI specification as this support was intended for ACPI 3.0, but was inadvertently omitted. Fixed a problem with the internal implicit "to buffer" conversion. Strings that are converted to buffers will cause buffer truncation if the string is smaller than the target buffer. Integers that are converted to buffers will not cause buffer truncation, only zero extension (both as per the ACPI spec.) The problem was introduced when code was added to truncate the buffer, but this should not be performed in all cases, only the string case. Fixed a problem with the Buffer and Package operators where the interpreter would get confused if two such operators were used as operands to an ASL operator (such as LLess(Buffer(1){0},Buffer(1){1}). The internal result stack was not being popped after the execution of these operators, resulting in an AE_NO_RETURN_VALUE exception. Fixed a problem with constructs of the form Store(Index(...),...). The reference object returned from Index was inadvertently resolved to an actual value. This problem was introduced in version 20050114 when the behavior of Store() was modified to restrict the object types that can be used as the source operand (to match the ACPI specification.) Reduced stack use in acpi_get_object_info(). [PKTGEN]: Bug fixes, bump to version 2.56. - Fix printing of running list, do not stop at first not-running device, instead scan them all. - Do not free SKB before final access via show_results() Signed-off-by: David S. Miller [PATCH] fbdev: Fix gcc 4.0 compile failure From: Art Haas The current GCC cvs code does not like the include/linux/fb.h file: In file included from drivers/video/aty/atyfb_base.c:63: include/linux/fb.h:865: error: array type has incomplete element type This error is due to recent changes in GCC. A thread discussing this change can be found by following the link below: http://gcc.gnu.org/ml/gcc/2005-02/msg00053.html The patch moves the array declaration after the definition of the fb_modelist structure, and with this small change GCC is happy once again. Signed-off-by: Antonino Daplas Signed-off-by: Linus Torvalds [SPARC64]: auxio_register is pointer not integer. Signed-off-by: David S. Miller [PATCH] USB: ehci patch for NF4 port miscounting Turns out that a workaround for a different EHCI chip trips up at least one NForce4 board. Neither controller can multiply right. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB Hub driver: Add reset recovery-time delay This patch is clearly needed for us to be in compliance with the USB spec. It adds the mandated recovery-time delay following a port reset. Regardless of anything else we do to alter the device initialization sequence, this is necessary. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: ehci requeue revisit This gets rid of a bug found in some IRQ handling logic, after tripping a debug assertion. Basically, a recent patch called the wrong routine to unlink a QH. Net result, it wasn't allowing for the case that some other QH was already being unlinked. This patch uses the correct routine; the names are confusingly similar, and the effect is often identical. The consequence of using the wrong routine was that the driver could lose one of the pending unlinks (probably wedging some activity) and treat the other one as completed before it was safe to do so (which probably wouldn't oops, but could cause other nasty corruption). From: Brian Murphy Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] kthread_bind new worker threads when onlining cpu We weren't binding new worker threads to their cpu when onlining. Using preempt and the debug version of smp_processor_id found this. Signed-off-by: Nathan Lynch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: fixup of previous PCI9 patch Previous PCI9 patch had a #endif placed wrong for some unknown reason (was correct in local tree) This fixes it. Signed-off-by: Rune Torgersen Signed-off-by: Tom Rini Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [SPARC64]: Put PROM trampolines into asm file. No need for these enormous inline asm statements. Signed-off-by: David S. Miller [SPARC64]: Fix access_ok() and friends warnings. The implementation is a nop on sparc64, we always return true, but we have to add at least a (void) reference to the arguments to avoid compiler/checker warnings. Signed-off-by: David S. Miller [PATCH] sata_qstor: new basic driver for Pacific Digital This is a new basic libata SATA driver for the Pacific Digital QStor SATA/RAID card. It features ordinary per-drive SATA with single-request DMA for R/W commands, and PIO for everything else. It currently does not implement any of the hardware RAID support, nor hot-plug, nor the tagged/native command-queuing features. On the other hand, it is small and simple as a result. Signed-off-by: Mark Lord Signed-off-by: Jeff Garzik [PATCH] Fix possible race with 4level-fixup.h When using 4level-fixup.h, a PMD page may end up beeing freed before the matching PGD entry is cleared due to the way the compatibility macros work. This can cause nasty races on some architectures. This patch fixes it by defining pud_clear() to be pgd_clear(). That means we'll actually write 0 twice, a small price to pay here, especially seeing how easy it is to convert to the new headers anyway (hint hint, ppc & ppc64 patches as soon as 2.6.11 is out). Signed-off-by: Nick Piggin Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Linus Torvalds [ARM PATCH] 2485/1: fix enp2611 coexistence with other machine types Patch from Lennert Buytenhek If enp2611 support is compiled in, the kernel will unconditionally perform enp2611-style PCI initialisation. Conditionalise this on machine_is_enp2611(). Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King [PATCH] Check for wraps in copy_page_range While browsing the 4 level page table changes (looking for a bug), I noticed that copy_page_range, unlike others, do not check for wraparound, which I suppose could be a problem with 4G/4G architectures or that sort of thing. This patch fixes it. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Linus Torvalds [PATCH] Fix buf in zeromap_pud_range() losing virtual address This patch fixes a nasty bug that took us almost a week to track down on ppc64, introduced by the 4L page table changes, and resulting in random memory corruption. All archs that rely on a PTE page's struct page to contain the mm & address (in mapping/index) will be affected. zeromap_pud_range() is one of these page tables walking functions that split the address into a base and an offset. It forgets to add back the "base" when calling the lower level zeromap_pmd_range(), thus passing a bogus virtual address. Most archs won't care, unless they do the above, since the lower level can allocate a PTE page. Kudo's to Michael Ellerman too who spent that week running tests after tests to track it down, since the only way we managed to get it to show up was after about 1 to 2h of LTP runs ... (Note: We are in _urgent_ need to consolidate all those page table walking functions, they all do things in a subtely different way, with different checks (sometimes redudant) and inconsitent with each other, even within a given set of them. Hopefully, Nick has some work in progress there). Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Linus Torvalds [PATCH] optimise copy page range Suggested by Linus: optimise a condition in the clear_p?d_range functions. Results in one less conditional branch on i386 with gcc-3.4.4 Signed-off-by: Nick Piggin Signed-off-by: Linus Torvalds [ARM PATCH] 2486/1: fix incorrect comment in arch/arm/kernel/debug.S Patch from Lennert Buytenhek arch/arm/kernel/debug.S has a comment at the top stating that the file is called debug-armv.S, which is clearly not so. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King [ARM PATCH] 2487/1: minor IRQ routing tweaks for ENP-2611 Patch from Lennert Buytenhek - The PCI2050B bridge is not wired to any interrupt pin. - The SPI-3 option board slot is wired to PCI_B. - Don't printk every time enp2611_map_pci_irq is called. - Complain loudly if we encounter an unknown device. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King [SPARC64]: Fix access_ok() args in sys_sparc32.c:get_tv32(). Signed-off-by: David S. Miller [PATCH] m32r: build fix for SMP kernel Here is a patch to fix compile errors of 2.6.11-rc4 for the m32r SMP kernel. * include/asm-m32r/spinlock.h: - Add read_can_lock() and write_can_lock() to fix build errors for SMP. - Rename 'lock' to 'slock'. (cf. Changesets 1.1966.85.1) * arch/m32r/kernel/smp.c: - Rename 'lock' to 'slock'. (cf. Changesets 1.1966.85.1) Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] m32r: fix sys_clone() This patch is required to fix sys_clone() for m32r. * arch/m32r/kernel/process.c: - Fix sys_clone; add arguments, parent_tidptr and child_tidptr. - Cosmetics: Change indentation of function parameters for sys_clone(), sys_vfork(). Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] m32r: defconfig updates Here is a patchset to update defconfig files for m32r. The m32r kernel's API/ABI has been changed since 2.6.11-rc1. Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sis: fix sparse warnings drivers/video/sis/sis_main.c:2204:2: warning: undefined identifier 'lock_kernel' drivers/video/sis/sis_main.c:2206:2: warning: undefined identifier 'unlock_kernel' drivers/video/sis/sis_main.c:2204: warning: implicit declaration of function `lock_kernel' drivers/video/sis/sis_main.c:2206: warning: implicit declaration of function `unlock_kernel' Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] USB: Add ioctls to ub This patch adds support for ioctls to ub, with the help of scsi_ioctl_cmd(). Now ub can eject CDs. But do not try to burn CDs yet, it's not tested. Original patch from Peter Jones (aka deviant-). Signed-off-by: Pete Zaitcev Signed-off-by: Greg Kroah-Hartman [PATCH] ub: fix Add ioctls to ub patch I am awfully sorry, but that patch contained a bug. The code dereferenced cmd->back as if it were a pointer to a request even when it wasn't. It worked by accident, because rq->flags overlapped with a zeroed memory in other case. Here is a corrective patch. Signed-off-by: Pete Zaitcev Signed-off-by: Greg Kroah-Hartman [libata] add ->bmdma_{stop,status} hooks The timeout/error handling path was assuming that the hardware in question was PCI IDE BMDMA-like, which is incorrect in a few cases. Turn direct function calls into two new hooks. [SPARC64]: Use common sys_ipc() compat code. No need to duplicate it locally. This also fixes several arg sign extension bugs and the subsequent ltp testsuite failures. Signed-off-by: David S. Miller add sysctl helper functions to provide milliseconds-based interfaces. Signed-off-by: Hideaki YOSHIFUJI [IPV4] Use appropriate sysctl helpers for gc_min_interval_ms. Because its type is int, inappropriate to use ulong helpers. This also fixes inconsistency between sysctl and procfs. Signed-off-by: Hideaki YOSHIFUJI [SPARC64]: BUG on rediculious memcpy lengths. Anything larger than MAX_INT is suspect. Do this for user copies too. Signed-off-by: David S. Miller [PATCH] libata: fix command queue leak when xlat_func fails ata_scsi_translate allocates from the libata command queue by calling ata_scsi_qc_new. If xlat_func returns non-zero, control jumps to err_out which fails to free the allocated command. Fix is to add a new API to free unused commands. Signed-off-by: John W. Linville Signed-off-by: Jeff Garzik [ARM PATCH] 2493/1: put IXP2000 slowport in 8-bit mode after boot Patch from Lennert Buytenhek This is an old patch from 2.6.9-rc3-ds2 that never made it upstream. The IXP2000 slowport has two modes of operation, 8-bit and 32-bit. The slowport itself is a byte-wide bus, and in 8-bit mode, it does the more-or-less obvious thing: every word read causes four byte reads, and those bytes are then combined into a word according to the xscale core's current endian setting. So, what value you get depends on what endianity your IXP2000 is running in. In 32-bit mode, however, it is the slowport itself which combines bytes into words, and for this it unconditionally uses little endian mode. In this mode, word reads from the slowport will return the same value no matter whether the xscale core is running in big or little endian mode. This can be a plus in some cases. Byte (and halfword) accesses in 32-bit mode have rather useless semantics due to this, though. The usefulness of 32-bit mode is limited to the initial boot. When the IXP2000 resets, the slowport is always in 32-bit mode, so if you flash the bootloader into flash (which is connected to the slowport) using little-endian byte ordering, the xscale will always read the instruction stream correctly, no matter whether it's running in big or little endian mode. After booting it makes no sense to use 32-bit mode anymore. Especially since the slowport's word ordering in 32-bit mode is little endian, and the IXP2000 is conventionally run in big endian, which gives all kinds of fun issues when trying to access peripherals connected to the slowport. In fact, the current MTD map driver for IXP2000 already sets the slowport to 8-bit mode because it cannot access the flash otherwise. However, this means that if the MTD map driver is not compiled in for some reason, the slowport will stay in 32-bit mode after the initial boot, which will cause peripheral accesses to unexpectedly break! Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King [ARM PATCH] 2494/1: fix 'CONFGI_' -> 'CONFIG_' in mach-ixp2000/ixdp2x00.c Patch from Lennert Buytenhek Fix a misspelled config symbol name in the ixp2000 code. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King [ARM] Take account of vm_pgoff for DMA mmap The DMA mmap code was ignoring vm_pgoff which prevented a partial mmap() of a DMA buffer. Signed-off-by: Russell King [Bluetooth] The new Microsoft dongle needs HCI_Reset For the new Microsoft Wireless Transceiver for Bluetooth 2.0 it is necessary to send the HCI_Reset on every device initialization. Signed-off-by: Marcel Holtmann [ide] fix ide_get_error_location() for LBA28 Higher bits (16-23) of the address were ignored. Signed-off-by: Bartlomiej Zolnierkiewicz [PATCH] mca resource layout fix Greg's tree changes the layout of struct resource, so mca.c blows up. Preemptively fix it. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] end_buffer_async_read printk ratelimiting ratelimit the disk I/O error reporting in end_buffer_async_read(). Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] m32r: warning fix /project/m32r-linux/kernel/linux-2.6.11-rc4-bk4/b/include/linux/nodemask.h: In function `__first_unset_node': /project/m32r-linux/kernel/linux-2.6.11-rc4-bk4/b/include/linux/nodemask.h:246: warning: passing arg 1 of `find_next_zero_bit' discards qualifiers from pointer target type Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] radeonfb: Workaround memory corruption accel problem A conflict between X and radeonfb can cause system memory corruption when switching console from X (note that this is not realted to the recent radeonfb patches, the problem has been there forever as far as I can tell). This patch works around it in radeonfb by making sure the "offsets" register that driver the memory mapping of the accel engine are always properly set before every accel op. A better fix should be done in fbcon ultimately. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Linus Torvalds [PATCH] PCI: support PCI_PM_CAP version 1 A check for the PM_CAP version was recently added but i breaks devices with version 1. if they're in power-save mode they never get out of it. Change it to also support v1. Signed-off-by: Daniel Ritz Signed-off-by: Linus Torvalds [ide] small compile fix to ide.c with !CONFIG_PCI Small patch to fix following warning with CONFIG_IDE && !CONFIG_PCI: CC drivers/ide/ide.o drivers/ide/ide.c: In function 'ide_system_bus_speed': drivers/ide/ide.c:338: warning: unused variable 'pci_default' I decided to save some bytes by #ifdef:ing the struct in question. CC:ing Hanna because she did the change (and just to say hi ;-). Signed-off-by: Mika Kukkonen Signed-off-by: Bartlomiej Zolnierkiewicz [ide] Kconfig for VR1000 machine driver selection Fix the use of CONFIG_MACH_VR1000, which was missing an trailing zero from the configuration variable, so never being shown if only the VR1000 was selected Signed-off-by: Ben Dooks Signed-off-by: Bartlomiej Zolnierkiewicz Use e820 memory map to determine PCI allocation area. Don't use the VM numbers (max_low_pfn and friends), since they depend on the partial kernel linear mapping and only partially on the actual physical memory layout. Be more careful about looking for gaps in the e820 table. We really don't care about anything beyond the 4GB mark, so make the tests for that explicit (and add a comment), and use regular "unsigned long" for the gap information. x86: when choosing PCI starting address, print out gap information This makes for better messages on what is going on. It also allows us (if we want to), to pick the PCI starting address somewhere else in the gap. That may be a good idea (ie do a pci_mem_start = (gapstart + (gapsize >> 3) + 0xfffff) & ~0xfffff; or similar. [PATCH] strip.c build fix Someone added a new dev_set_mac_address() to netdevice.h Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik [PATCH] S2io: Multicast fix Attached is the patch to address the incorrect programming of individual multicast address into the NIC. Signed-off-by: Ravinandan Arakali Signed-off-by: Jeff Garzik [PATCH] natsemi long cable fix This is a minor modification to the previous patch submission that does not assume the default contents of the DSPCFG register are zero. When used with Revision D of the DP83815, the "Recommended Registers Configuration" from page 78 of the DP83815 data sheet is not entirely compatible with the driver's "short cable patch". When the DSPCFG register is written with the value suggested in the document, then do_cable_magic() can't read the DSP coefficient and determines that all cables attached to the DP83815D are 'short', regardless of actual length. Short cables (< 30m) cause do_cable_magic to enable additional attenuation to reduce CRC and idle errors. If the extra attenuation is unintentionally enabled for long cables (> 50m?), they will not operate properly. The National Semiconductor driver, 'dp83815.c' from http://www.national.com/appinfo/networks/files/linux_2_4.tar.gz was used as a basis for this modification. Signed-off-by: Jeff Garzik [PATCH] ppc32: fix ptep_test_and_clear_young ppc32's implementation of ptep_test_and_clear_young() has a logic error which makes it fail to flush the hash table. Thus PAGE_ACCESSED is almost never set again after beeing cleared (unless something else cause that hash entry to be flushed). Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Linus Torvalds [PATCH] libata kfree fix Fixes double-kfree that caused slab corruption. Signed-off-by: Jeff Garzik Signed-off-by: Linus Torvalds [TCP]: Fix BIC max_cwnd calculation error. The BIC TCP cwnd problem as identified by Yee-Ting Li and Doug Leith is that the computation is recalc_ssthresh is incorrect and BICTCP_1_OVER_BETA/2 should be BICTCP_1_OVER_BETA*2. My fix is to implement the code from BIC TCP 1.1 which uses a sysctl to set the beta. There are a few variable name changes from the 1.1 code, and made the scaling factor a #define instead of hardcoded. I validated this using netem and kprobes, for more details see http://developer.osdl.org/shemminger/bic-beta-patch.pdf Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller [PATCH] alpha: struct resource fix Used named initialisers in this declaration before Greg's tree's struct resource layout changes come in and break it. (Probably "dma page reg" shouldn't have spaces in the name - be friendly to /proc/ioports parsers?) Cc: Richard Henderson Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: resource layout fixes Use named initialisers. Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sparc64 rusage build fix Some patch in -mm causes the sparc64 build to explode because `struct rusage' isn't defined or declared in compat.h. So forward-declare it. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] sparc64 usb build fix We need asm/irq.h for __irq_itoa() on sparc[64]. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] au1100: fix io_remap_page_range() arg. list Fix io_remap_page_range() call to pass a missing arg. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] x86_64: resource layout fix Greg's tree changes the order of fields in struct reasource, causing x86_64 to explode nastily. Fix. Cc: Greg KH Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: Fix 32bit largepage issue The paca holds a shadow of the context struct, used for the real mode SLB handler. When we open up a new segment we have to sync up the paca copy otherwise we will instantiate small page SLB entries until the next context switch (at which point we resync the paca copy). Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Build failure with !CONFIG_PCI and with CONFIG_ISAPNP=y && CONFIG_PNPBIOS=y Trying to build latest BK-kernel with !CONFIG_PCI and with CONFIG_ISAPNP=y and CONFIG_PNPBIOS=y I got the following build error: LD vmlinux drivers/built-in.o(.text+0x5486): In function 'pnpbios_parse_allocated_irqresource': : undefined reference to 'pcibios_penalize_isa_irq' Clearly pcibios_penalize_isa_irq() is meant to be called only with CONFIG_PCI=y. Signed-off-by: Mika Kukkonen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [TCP]: Fix excessive stack usage resulting in OOPS with 4KSTACKS. Various routines were putting a full struct tcp_sock on the local stack. What they really wanted was a subset of this information when doing TCP options processing when we only have a mini-socket (for example in SYN-RECVD and TIME_WAIT states). Therefore pull out the needed information into a sub-struct and use that in the TCP options processing routines. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller [PATCH] Re-order includes to fix userland breakage The following moves all includes (except and down to below the existing __KERNEL__ test. None of these includes are needed by the user-visible portions of the header, and in some cases can cause userland apps to break. For example, LTP and sash with an empty will fail thusly: cc -Wall -I../../include -g -Wall -I../../../../include -Wall setrlimit02.c -L../../../../lib -lltp -o setrlimit02 In file included from /usr/include/asm/atomic.h:6, from /usr/include/linux/fs.h:20, from setrlimit02.c:46: /usr/include/asm/processor.h:68: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function) /usr/include/asm/processor.h:68: error: requested alignment is not a constant Build/run tested with a glibc rebuild as well. Signed-off-by: Tom Rini Signed-off-by: Linus Torvalds [PATCH] Fix NR_OPEN header order dependency Move back up in , to get the right ordering for the NR_OPEN dual define (ugh). Signed-off-by: Tom Rini Signed-off-by: Linus Torvalds [PATCH] r8169: fix rx skb allocation error logging Fix rx skb allocation error logging Signed arithmetic is not required as rtl8169_rx_fill() return belongs to the [0; NUM_RX_DESC] interval. Signed-off-by: Jon Mason Signed-off-by: Francois Romieu Signed-off-by: Jeff Garzik [PATCH] r8169: skb alignment nitpicking Nail an overrun in skb alignment and remove the relevant magic variable. Signed-off-by: Jon Mason Signed-off-by: Francois Romieu Signed-off-by: Jeff Garzik [PATCH] r8169: removal of unused #define Removal of unused #define Signed-off-by: Jon Mason Signed-off-by: Francois Romieu Signed-off-by: Jeff Garzik [PATCH] r8169: uniformize comments Uniformize comments Signed-off-by: Jon Mason Signed-off-by: Francois Romieu Signed-off-by: Jeff Garzik [PATCH] ppc32: kernel mapping breakage Christoph Lameter's patch that change page allocators to use GFP_ZERO broke ppc32 in a subtle way. Our allocator is designed to work before mem_init_done, in which cases it uses a ppc specific early_get_page() which doesn't return zeroed pages. However, he removed the call to clear_page() unconditionally, thus causing the kernel initial page tables to have random data in them. They are initialized with set_pte, which means it's _mostly_ harmless, except that set_pte on ppc32 preserves the _PAGE_HASHPTE bit, thus we end up with random bits there, which can cause issues with further manipulation of the kernel page tables and will slow down all hash faults to them causing unnecessary searches. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Linus Torvalds [PATCH] NFS: Further fixes for the -onolock case. Duh... GETLK returns F_UNLCK if and only if the lock could be placed. Signed-off-by: Trond Myklebust Signed-off-by: Linus Torvalds [PATCH] ppc32: Wrong vaddr in flush_hash_one_pte() Reworking the ppc32 mm helps me find interesting bugs in the existing bug, well, brown paper bag for me, I made this one a while ago. The routine flush_hash_one_pte() used by ptep_test_and_clear_young() wasn't properly recaclulating the vaddr from the pte pointer & page->index. The result is that we probably never flushed things from the hash, so that's at least the _second_ bug affecting ptep_test_and_clear_young(), swap on ppc32 must have been really broken :( This fixes it. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Linus Torvalds [PATCH] ppc64: fix compilation for Maple board A patch that I sent in earlier to allow the use of the data address breakpoint on machines with a hypervisor happened to break things for those configs, such as for the Maple board, where we don't compile in the routines for calling the hypervisor. This patch fixes it. Signed-off-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ALPS: do not activate on unsupported models It feels like 2.6.11 is right around the corner. I would like to disable ALPS suport for some devices we don't know how to handle properly yet to cut down on number of complaints that we broke mouse support. Input: ALPS - do not activate native mode for devices whose data we can not handle yet. Signed-off-by: Dmitry Torokhov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] device-mapper: dm-raid1 deadlock fix Fix a dm-raid1 deadlock: nested spinlocks with _irq. Signed-Off-By: Alasdair G Kergon From: Tim Burgess Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds agp: aper_base is unsigned Not that anybody cares about the sign, but the signed type does the wrong thing for right shifts. Which we had. [libata] Add missing hooks, to avoid oops in advanced SATA drivers Advanced SATA drivers should not (and cannot) use the basic PCI IDE hooks for checking the Status and Error registers, as these registers are either in non-standard locations, or simply don't exist. In the error handling path, libata was unconditionally calling some PCI IDE hardware bitbanging functions, which would cause an oops in the AHCI driver and any other advanced libata driver. [PATCH] Fix possible futex mmap_sem deadlock Some futex functions do get_user calls while holding mmap_sem for reading. If get_user() faults, and another thread happens to be in mmap (or somewhere else holding waiting on down_write for the same semaphore), then do_page_fault will deadlock. Most architectures seem to be exposed to this. To avoid it, make sure the page is available. If not, release the semaphore, fault it in and retry. I also found another exposure by inspection, moving some of the code around avoids the possible deadlock there. Signed-off-by: Olof Johansson Signed-off-by: Linus Torvalds [PATCH] r8169: IRQ races during change of mtu IRQ races during change of mtu - NAPI poll must be enabled prior to IRQ activation or the IRQ handler will not know what to do with an incoming packet; - rtl8169_down() needs to try twice to sync with the IRQ handler when it is not issued under !netif_running() protection. Both changes make it safe to request a change of mtu on a live device. Signed-off-by: Francois Romieu Signed-off-by: Jeff Garzik [PATCH] r8169: factor out some code. Factor out some code Signed-off-by: Francois Romieu Signed-off-by: Jeff Garzik Linux 2.6.11-rc5 [NETFILTER]: Prevent NAT from seeing fragments The path for loopback is: LOCAL_OUT: conntrack defrags POST_ROUTING: conntrack refrags PRE_ROUTING: skip conntrack defrag because skb->nfct != NULL PRE_ROUTING: NAT gets hit by fragments Always defrag on loopback if NAT is compiled in. Signed-off-by: Patrick McHardy Acked-by: Rusty Russel Signed-off-by: David S. Miller [IPV6]: Unregister per-device snmp6 proc entry earlier. Do it in addrconf_ifdown. This fixes OOPSes on shutdown with 2.6.10 Signed-off-by: Hideaki YOSHIFUJI Signed-off-by: Herbert Xu Signed-off-by: David S. Miller [PKTGEN]: Replace interruptible_sleep_on_timeout() From Nishanth Aravamudan Signed-off-by: David S. Miller [NETFILTER]: ipt_hashlimit rule load time race condition This is the best we've got: We cannot release and re-grab lock, since checkentry() is called before ip_tables.c grabs ipt_mutex. We also cannot grab the hashtable spinlock, since htable_create will call vmalloc, and that can sleep. And we cannot just re-search the list of htable's in htable_create(), since then we would create duplicate proc files. Signed-off-by: Harald Welte Signed-off-by: David S. Miller [PKTGEN]: reduce stack usage From Randy Dunlap Signed-off-by: David S. Miller [ide] make 1-bit fields unsigned It's a bit difficult to have a value and a sign bit in a 1-bit field. Fix (90) boolean/bitfield sparse warnings: include/linux/ide.h:937:18: warning: dubious one-bit signed bitfield include/linux/ide.h:939:17: warning: dubious one-bit signed bitfield Signed-off-by: Randy Dunlap Signed-off-by: Bartlomiej Zolnierkiewicz [ide] fix build for built-in hpt366 and modular ide-disk * always call __ide_do_rw_disk() in ide_do_rw_disk() * modify ide_hwif_t->rw_disk hook accordingly * update and cleanup hpt372n_rw_disk() (the only user of ide_hwif_t->rw_disk hook) * make __ide_do_rw_disk() static + fix comment Signed-off-by: Bartlomiej Zolnierkiewicz [ide] fix IRQ masking in ide_do_request() Revert to previous way of handling masked_irq argument. Reported to fix problems with shared PCI IRQs. Signed-off-by: Bartlomiej Zolnierkiewicz [PATCH] ppc64: hugepage hash flushing bugfix This fixes a potentially bad (although very rarely triggered) bug in the ppc64 hugepage code. hpte_update() did not correctly calculate the address for hugepages, so pte_clear() (which we use for hugepage ptes as well as normal ones) would not correctly flush the hash page table entry. Under the right circumstances this could potentially lead to duplicate hash entries, which is very bad. davem's upcoming patch to pass the virtual address directly to set_pte() and its ilk will obsolete this, but this is bad enough it should probably be fixed in the meantime. Signed-off-by: David Gibson Acked-by: William Irwin Signed-off-by: Linus Torvalds [ARM] Fix dma_mmap() size argument. We were passing the size of the region in pages, where as remap_pfn_range expected the size in bytes. Signed-off-by: Russell King [PATCH] Make keyctl(KEYCTL_JOIN_SESSION_KEYRING) use the correct arg The attached patch makes keyctl() use the correct argument when invoking the KEYCTL_JOIN_SESSION_KEYRING function. I'm not sure how this evaded testing before, but I suspect the compiler was kind and made both argument registers hold the same value. Thanks to Kevin Coffman for spotting this. Signed-Off-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] USB: fix bug in acm's open function Here's a patch for 2.6.11-rc5 that a lot of cdc-acm driver users are clamoring for. There's a bug introduced in a cleanup which will lead to a race making reopenings fail. This fix is by Alexander Lykanov. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] binfmt_elf build fix The cast to void still triggers the gcc "warning: ignoring return value" warning, which is dumb of it. So ignore the return value differently. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Fix incorrect __init on 'modedb[]' array modedb can not be __init because fb_find_mode() (which is not __init) may get db == NULL. fb_find_mode() is called from modules. Signed-off-by: Olaf Hering Signed-off-by: Linus Torvalds Fix possible pty line discipline race. This ain't pretty. Real fix under discussion. [PATCH] USB: Fix usbfs regression I have just tested kernel version 2.6.11-rc5 and noticed it is not possible to do an USB transfer by submitting an URB to an output endpoint. This breaks newest versions of libusb and thus SANE, gphoto2, and a lot of software. The bug was introduced in version 2.6.11-rc1 and is due to a wrong comparison. Signed-off-by: Aurelien Jarno Signed-off-by: Greg Kroah-Hartman Signed-off-by: Linus Torvalds [PATCH] __devinitdata in parport_pc parport_init_mode is referred to in int __devinit sio_via_probe(). [PATCH] __init in cfq-iosched.c cfq_init() calls __init cfq_slab_setup and hence must be __init itself also made it static [PATCH] remove __initdata in scsi_devinfo.c scsi_dev_flags is referred to in module_param_string(dev_flags, scsi_dev_flags, sizeof(scsi_dev_flags), 0); [PATCH] __initdata in apic.c wait_timer_tick refers to the __init functions wait_8254_wraparound or wait_hpet_tick, hence must be __initdata. [PATCH] more apic.c setup_APIC_timer is only called in __init context and uses __initdata Properly limit keyboard keycodes to KEY_MAX. It can only be set by root, but let's not tempt people to do things that can't work. [IPV4]: Fix lost routes in fn_hash netlink dumps. Spotted by itkes@fat.imed.msu.ru, the fn_hash_dump_bucket() main loop does not increment 'i' properly, and thus routes will not be listed, when the test 'i < s_i' passes. The bug was added when the code was converted over to hlist_for_each_entry() by your's truly. Signed-off-by: David S. Miller [AF_UNIX]: Fix SIOCINQ for STREAM and SEQPACKET. We should report the total bytes in the whole receive queue, not just the first packet, in these cases. Reported by Uwe Bonnes. Signed-off-by: David S. Miller [PATCH] srat: initdata section references srat's node_to_pxm() references pxm2node[] after init. so pxm2node[] should not be __initdata. Error: ./arch/x86_64/mm/srat.o .text refers to 0000000000000008 R_X86_64_32S .init.data Error: ./arch/x86_64/mm/srat.o .text refers to 0000000000000015 R_X86_64_32S .init.data Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds [SERIAL] 8250 woraround for buggy uart Patch from Alex Williamson This patch adds support for detecting and working around a bug in the A2 rev of the Exar ST16C2550 UART. The chip incorrectly advertises an EFR and mis-detects as having the wrong size FIFO. Much of the patch below is Russell's proposed solution to the problem. The only changes I've made are to check the FIFO size on the part (because there is a real part with the same divisor ID and larger FIFO) and save and restore the LCR register around the size_fifo() routine (it doesn't work correctly with a LCR value of 0xBF). Signed-off-by: Alex Williamson Signed-off-by: Russell King Make pipe "poll()" take direction of pipe into account. The pipe code has traditionally not cared about which end-point of the pipe you are polling, meaning that if you poll the write-only end of a pipe, it will still set the "this pipe is readable" bits if there is data to be read on the read side. That makes no sense, and together with the new bigger buffers breaks python-twisted. Based on debugging/patch by Andrea Arcangeli and testcase from Thomas Crhak [PATCH] Make the new merged pipe writes check for SIGPIPE The new pipe buffer merging doesn't check for the "no readers" case, so with small writes that coalesce, we may not get a timely SIGPIPE/EPIPE notification to the writer. Signed-off-by: Andrea Arcangeli Signed-off-by: Linus Torvalds [ARM PATCH] 2496/1: i.MX DMA fix Patch from Sascha Hauer This patch fixes the handling of the dma interrupt acknowledge register (DISR). A DMA interrupt is acknowledged by setting the corresponding bit in DISR. So we are not allowed to use |= on this register because we could lose interrupts. Sascha Hauer Signed-off-by: Sascha Hauer Signed-off-by: Russell King [PATCH] [PATCH] Fix bounced bio and dm panic Make sure that a bio doesn't contain NULL pages in the front of its vec, if a device bounces a bio that doesn't start from 0. Problem noted by Mark Haverkamp. Signed-off-by: Jens Axboe Signed-off-by: Linus Torvalds [ARM PATCH] 2497/1: i.MX pll decode Patch from Sascha Hauer This patch provided by Pavel Pisa fixes a wrong bitmask in imx_decode_pll. Sascha Hauer Signed-off-by: Pavel Pisa Signed-off-by: Sascha Hauer Signed-off-by: Russell King [PATCH] sound/oss/aedsp16: init/exit section cleanups: Exit-only function uninit_aedsp16() was marked __init instead of __exit; ae_config data was marked __initdata but used during exit; several cleanup functions were marked _init but used for init or exit cleanups; Error: ./sound/oss/aedsp16.o .exit.text refers to 0000000000000004 R_X86_64_PC32 .init.data+0x000000000000003b Error: ./sound/oss/aedsp16.o .exit.text refers to 000000000000000c R_X86_64_PC32 .init.text+0x00000000000001e4 Error: ./sound/oss/aedsp16.o .exit.text refers to 0000000000000013 R_X86_64_PC32 .init.text+0x0000000000000034 Error: ./sound/oss/aedsp16.o .exit.text refers to 0000000000000019 R_X86_64_PC32 .init.data+0x000000000000003f Error: ./sound/oss/aedsp16.o .exit.text refers to 0000000000000023 R_X86_64_PC32 .init.text+0x00000000000001b4 Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds [PATCH] sonicvibes: fix initdata references sonicvibes: _devinit function was referencing __initdata (2x), which should be __devinitdata; Error: ./sound/oss/sonicvibes.o .text refers to 0000000000003ca7 R_X86_64_32S .init.data+0x0000000000000080 Error: ./sound/oss/sonicvibes.o .text refers to 00000000000043eb R_X86_64_32S .init.data+0x0000000000000024 Error: ./sound/oss/sonicvibes.o .text refers to 00000000000043f2 R_X86_64_32S .init.data+0x0000000000000020 Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds [PATCH] sound/oss/opl3as2: fix init section reference sound/oss/opl3sa2: calls __init function during probe, which may be after init for PNP devices; Error: ./sound/oss/opl3sa2.o .text refers to 0000000000000204 R_X86_64_PC32 .init.text+0xfffffffffffffffc Error: ./sound/oss/opl3sa2.o .text refers to 0000000000000210 R_X86_64_PC32 .init.text+0xfffffffffffffffc Error: ./sound/oss/opl3sa2.o .text refers to 000000000000021c R_X86_64_PC32 .init.text+0xfffffffffffffffc Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds [PATCH] isdn: use __init for ICCVersion() ICCVersion() is only used by init code & can be marked __init; Error: ./drivers/isdn/hisax/icc.o .text refers to 000000000000014a R_X86_64_32S .init.data Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds [PATCH] dc395x: fix section references dc395x scsi driver makes many references to __init functions & __initdata that should be __devinit & __devinitdata. Error: ./drivers/scsi/dc395x.o .text refers to 00000000000021ef R_X86_64_PC32 .init.text+0x00000000000000b4 Error: ./drivers/scsi/dc395x.o .text refers to 000000000000220e R_X86_64_PC32 .init.text+0x000000000000009c Error: ./drivers/scsi/dc395x.o .text refers to 000000000000222e R_X86_64_PC32 .init.text+0x000000000000009c Error: ./drivers/scsi/dc395x.o .text refers to 00000000000022f4 R_X86_64_PC32 .init.text+0x0000000000000177 Error: ./drivers/scsi/dc395x.o .text refers to 0000000000002301 R_X86_64_32S .init.data Error: ./drivers/scsi/dc395x.o .text refers to 0000000000002307 R_X86_64_32S .init.data+0x0000000000000004 Error: ./drivers/scsi/dc395x.o .text refers to 000000000000230f R_X86_64_32S .init.data+0x0000000000000008 Error: ./drivers/scsi/dc395x.o .text refers to 0000000000002317 R_X86_64_32S .init.data+0x000000000000000c Error: ./drivers/scsi/dc395x.o .text refers to 000000000000231d R_X86_64_32S .init.data Error: ./drivers/scsi/dc395x.o .text refers to 000000000000232d R_X86_64_PC32 .init.text+0xfffffffffffffffc Error: ./drivers/scsi/dc395x.o .text refers to 000000000000237a R_X86_64_PC32 .init.text+0x00000000000000b4 Error: ./drivers/scsi/dc395x.o .text refers to 000000000000238c R_X86_64_PC32 .init.text+0x000000000000009c Error: ./drivers/scsi/dc395x.o .text refers to 00000000000023ac R_X86_64_PC32 .init.text+0x00000000000000b4 Error: ./drivers/scsi/dc395x.o .text refers to 00000000000023d6 R_X86_64_PC32 .init.text+0x000000000000009c Error: ./drivers/scsi/dc395x.o .text refers to 00000000000023e6 R_X86_64_PC32 .init.text+0x000000000000009c Error: ./drivers/scsi/dc395x.o .text refers to 00000000000023fe R_X86_64_PC32 .init.text+0x000000000000009c Error: ./drivers/scsi/dc395x.o .text refers to 000000000000240b R_X86_64_PC32 .init.text+0x000000000000009c Error: ./drivers/scsi/dc395x.o .text refers to 0000000000002418 R_X86_64_PC32 .init.text+0x000000000000009c Error: ./drivers/scsi/dc395x.o .text refers to 000000000000242f R_X86_64_PC32 .init.text+0x000000000000009c Error: ./drivers/scsi/dc395x.o .text refers to 000000000000243f R_X86_64_PC32 .init.text+0x000000000000009c Error: ./drivers/scsi/dc395x.o .text refers to 0000000000002469 R_X86_64_PC32 .init.text+0x00000000000000b4 Error: ./drivers/scsi/dc395x.o .text refers to 0000000000002476 R_X86_64_PC32 .init.text+0x000000000000009c Error: ./drivers/scsi/dc395x.o .text refers to 0000000000002489 R_X86_64_PC32 .init.data+0x0000000000000060 Error: ./drivers/scsi/dc395x.o .text refers to 0000000000002494 R_X86_64_PC32 .init.text+0x0000000000000177 Error: ./drivers/scsi/dc395x.o .text refers to 00000000000024a3 R_X86_64_32S .init.data+0x0000000000000078 Error: ./drivers/scsi/dc395x.o .text refers to 00000000000024ac R_X86_64_PC32 .init.text+0xfffffffffffffffc Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds [PATCH] hp100: fix section references hp100: references __init code that should be marked as __devinit; Error: ./drivers/net/hp100.o .text refers to 0000000000000f7f R_X86_64_PC32 .init.text+0x00000000000000b8 Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds [PATCH] rrunner: fix section references rrunner: references __initdata in a __devinit function; data should be __devinitdata; Error: ./drivers/net/rrunner.o .text refers to 00000000000002b2 R_X86_64_32S .init.data Signed-off-by: Randy Dunlap Signed-off-by: Jes Sorensen Signed-off-by: Linus Torvalds [ARM PATCH] 2498/1: CREDITS - add Ben Dooks Patch from Ben Dooks Add Ben Dooks to the credits file Signed-off-by: Ben Dooks Signed-off-by: Russell King [ARM PATCH] 2505/1: Remove FTVPCI from debug code Patch from Ben Dooks Remove the currently #if'ed out FTVPCI debug code from arch/arm/kernel/debug.S as FTVPCI has no current build candidate. Signed-off-by: Ben Dooks Signed-off-by: Russell King [IA64] ia64 audit build fix With CONFIG_AUDITSYSCALL=n: arch/ia64/kernel/ptrace.c: In function `syscall_trace_enter': arch/ia64/kernel/ptrace.c:1615: warning: implicit declaration of function `audit_syscall_entry' arch/ia64/kernel/ptrace.c: In function `syscall_trace_leave': arch/ia64/kernel/ptrace.c:1631: warning: implicit declaration of function `audit_syscall_exit' And the link fails, due to audit_syscall_entry() not being present. Signed-off-by: Andrew Morton Signed-off-by: Tony Luck [IA64] pci_irq.c: need signed variable to handle error return from acpi This patch fix the error check in acpi_pci_irq_disable(). Signed-off-by: Kenji Kaneshige Signed-off-by: Tony Luck [PATCH] SELinux: Leak in error path There's a leak here in the first error path. Found by the Coverity tool. Signed-off-by: Alexander Nyberg Acked-by: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] SELinux: null dereference in error path The 'bad' label will call function that unconditionally dereferences the NULL pointer. Found by the Coverity tool Signed-off-by: Alexander Nyberg Acked-by: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] genhd: NULL checking fix Avoid a possible null-pointer deref. Found by the Coverity tool Signed-off-by: Alexander Nyberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix audit inode filter Audit inode filter drops high bits on inode number by cut 'n paste mistake. Signed-off-by: Chris Wright Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] prism54 not releasing region Remember to release the PCI regions on an error path. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Input: add more PNP IDs to i8042 driver. Signed-off-by: Dmitry Torokhov Signed-off-by: Linus Torvalds [PATCH] sysfs: fix signedness problem count is size_t, fill_write_buffer() may return a negative number which would evade the 'count > 0' checks and do bad things. found by the Coverity tool Signed-off-by: Alexander Nyberg Signed-off-by: Greg Kroah-Hartman Signed-off-by: Linus Torvalds [PATCH] send audit reply to correct socket Send audit repsonse to socket which request came from, rather than pid that request came from. Signed-off-by: Chris Wright Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] fix module paramater permissions in radeon_base.c You really don't want -2 (which was just a cut-and-paste of the initial value for the parameter) for the file mode in sysfs. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Linus Torvalds Linux 2.6.11