Summary of changes from v2.6.10 to v2.6.11-rc1 ============================================ [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 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_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 [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 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 [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 [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 [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 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 [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) [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 [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 [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 [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 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 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 [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 [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 [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 [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 [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 [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. 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 [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 [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