summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2007-08-12Pull sbs into release branchLen Brown
2007-08-12Pull processor into release branchLen Brown
2007-08-12Pull fluff into release branchLen Brown
2007-08-12Pull ec into release branchLen Brown
2007-08-12Pull dock-bay into release branchLen Brown
2007-08-12Pull bugzilla-8842 into release branchLen Brown
2007-08-12Pull bugzilla-8768 into release branchLen Brown
2007-08-12Pull bugzilla-3774 into release branchLen Brown
2007-08-12pull asus sony thinkpad into release branchLen Brown
2007-08-12ACPI: thermal: add DMI hooks to handle AOpen's broken Award BIOSLen Brown
Use DMI to: 1. enable polling (BIOS thermal events are broken) 2. disable active trip points (BIOS fan control is broken) 3. disable passive trip point (BIOS hard-codes it too low) The actual temperature reading does work, and with the aid of polling, the critical trip point should work too. http://bugzilla.kernel.org/show_bug.cgi?id=8842 Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-12ACPI: thermal: create "thermal.act=" to disable or override active trip pointLen Brown
thermal.act=-1 disables all active trip points in all ACPI thermal zones. thermal.act=C, where C > 0, overrides all lowest temperature active trip points in all thermal zones to C degrees Celsius. Raising this trip-point may allow you to keep your system silent up to a higher temperature. However, it will not allow you to raise the lowest temperature trip point above the next higher trip point (if there is one). Lowering this trip point may kick in the fan sooner. Note that overriding this trip-point will disable any BIOS attempts to implement hysteresis around the lowest temperature trip point. This may result in the fan starting and stopping frequently if temperature frequently crosses C. WARNING: raising trip points above the manufacturer's defaults may cause the system to run at higher temperature and shorten its life. Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-12ACPI: thermal: create "thermal.nocrt" to disable critical actionsLen Brown
thermal.nocrt=1 disables actions on _CRT and _HOT ACPI thermal zone trip-points. They will be marked as <disabled> in /proc/acpi/thermal_zone/*/trip_points. There are two cases where this option is used: 1. Debugging a hot system crossing valid trip point. If your system fan is spinning at full speed, be sure that the vent is not clogged with dust. Many laptops have very fine thermal fins that are easily blocked. Check that the processor fan-sink is properly seated, has the proper thermal grease, and is really spinning. Check for fan related options in BIOS SETUP. Sometimes there is a performance vs quiet option. Defaults are generally the most conservative. If your fan is not spinning, yet /proc/acpi/fan/ has files in it, please file a Linux/ACPI bug. WARNING: you risk shortening the lifetime of your hardware if you use this parameter on a hot system. Note that this refers to all system components, including the disk drive. 2. Working around a cool system crossing critical trip point due to erroneous temperature reading. Try again with CONFIG_HWMON=n There is known potential for conflict between the the hwmon sub-system and the ACPI BIOS. If this fixes it, notify lm-sensors@lm-sensors.org and linux-acpi@vger.kernel.org Otherwise, file a Linux/ACPI bug, or notify just linux-acpi@vger.kernel.org. Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-12ACPI: thermal: create "thermal.psv=" to override passive trip pointsLen Brown
"thermal.psv=-1" disables passive trip points for all ACPI thermal zones. "thermal.psv=C", where 'C' is degrees Celsius, overrides all existing passive trip points for all ACPI thermal zones. thermal.psv is checked at module load time, and in response to trip-point change events. Note that if the system does not deliver thermal zone temperature change events near the new trip-point, then it will not be noticed. To force your custom trip point to be noticed, you may need to enable polling: eg. thermal.tzp=3000 invokes polling every 5 minutes. Note that once passive thermal throttling is invoked, it has its own internal Thermal Sampling Period (_TSP), that is unrelated to _TZP. WARNING: disabling or raising a thermal trip point may result in increased running temperature and shorter hardware lifetime on some systems. Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-12ACPI: thermal: expose "thermal.tzp=" to set global polling frequencyLen Brown
Thermal Zone Polling frequency (_TZP) is an optional ACPI object recommending the rate that the OS should poll the associated thermal zone. If _TZP is 0, no polling should be used. If _TZP is non-zero, then the platform recommends that the OS poll the thermal zone at the specified rate. The minimum period is 30 seconds. The maximum period is 5 minutes. (note _TZP and thermal.tzp units are in deci-seconds, so _TZP = 300 corresponds to 30 seconds) If _TZP is not present, ACPI 3.0b recommends that the thermal zone be polled at an "OS provided default frequency". However, common industry practice is: 1. The BIOS never specifies any _TZP 2. High volume OS's from this century never poll any thermal zones Ie. The OS depends on the platform's ability to provoke thermal events when necessary, and the "OS provided default frequency" is "never":-) There is a proposal that ACPI 4.0 be updated to reflect common industry practice -- ie. no _TZP, no polling. The Linux kernel already follows this practice -- thermal zones are not polled unless _TZP is present and non-zero. But thermal zone polling is useful as a workaround for systems which have ACPI thermal control, but have an issue preventing thermal events. Indeed, some Linux distributions still set a non-zero thermal polling frequency for this reason. But rather than ask the user to write a polling frequency into all the /proc/acpi/thermal_zone/*/polling_frequency files, here we simply document and expose the already existing module parameter to do the same at system level, to simplify debugging those broken platforms. Note that thermal.tzp is a module-load time parameter only. Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-12ACPI: thermal: create "thermal.off=1" to disable ACPI thermal supportLen Brown
"thermal.off=1" disables all ACPI thermal support at boot time. CONFIG_ACPI_THERMAL=n can do this at build time. "# rmmod thermal" can do this at run time, as long as thermal is built as a module. WARNING: On some systems, disabling ACPI thermal support will cause the system to run hotter and reduce the lifetime of the hardware. Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-11ACPI: staticAdrian Bunk
Make the needlessly global "acpi_event_seqnum" static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-11ACPI EC: remove potential deadlock from ECAlexey Starikovskiy
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-11ACPI: dock: Send key=value pair instead of plain valueHolger Macht
Send key=value pair along with the uevent instead of a plain value so that userspace (udev) can handle it like common environment variables. Signed-off-by: Holger Macht <hmacht@suse.de> Acked-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Cc: Stephan Berberig <s.berberig@arcor.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-11ACPI: bay: send envp with uevent - fixStephan Berberig
There must not be a new-line character in the uevent. Otherwise, udev gets confused. Thanks to Kay Sievers for pointing it out. Signed-off-by: Stephan Berberig <s.berberig@arcor.de> Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-11Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6Linus Torvalds
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: [S390] monwriter: Serialization bug for multithreaded applications. [S390] vmur: diag14 only works with buffers below 2GB [S390] vmur: add "top of queue" sanity check for reader open [S390] vmur: reject open on z/VM reader files with status HOLD [S390] vmur: use DECLARE_COMPLETION_ONSTACK to keep lockdep happy [S390] vmur: allocate single record buffers instead of one big data buffer [S390] remove DEFAULT_MIGRATION_COST [S390] qdio: make sure data structures are correctly aligned. [S390] hypfs: implement show_options [S390] cio: avoid memory leak on error in css_alloc_subchannel().
2007-08-11Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-blockLinus Torvalds
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: BLOCK: Hide the contents of linux/bio.h if CONFIG_BLOCK=n sysace: HDIO_GETGEO has it's own method for ages drivers/block/cpqarray.c: better error handling and kmalloc + memset conversion to k[cz]alloc drivers/block/cciss.c: kmalloc + memset conversion to kzalloc Clean up duplicate includes in drivers/block/ Fix remap handling by blktrace [PATCH] remove mm/filemap.c:file_send_actor()
2007-08-11i386: Make patching more robust, fix paravirt issueAndi Kleen
Commit 19d36ccdc34f5ed444f8a6af0cbfdb6790eb1177 "x86: Fix alternatives and kprobes to remap write-protected kernel text" uses code which is being patched for patching. In particular, paravirt_ops does patching in two stages: first it calls paravirt_ops.patch, then it fills any remaining instructions with nop_out(). nop_out calls text_poke() which calls lookup_address() which calls pgd_val() (aka paravirt_ops.pgd_val): that call site is one of the places we patch. If we always do patching as one single call to text_poke(), we only need make sure we're not patching the memcpy in text_poke itself. This means the prototype to paravirt_ops.patch needs to change, to marshal the new code into a buffer rather than patching in place as it does now. It also means all patching goes through text_poke(), which is known to be safe (apply_alternatives is also changed to make a single patch). AK: fix compilation on x86-64 (bad rusty!) AK: fix boot on x86-64 (sigh) AK: merged with other patches Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11lguest files should explicitly include asm/paravirt.hJes Sorensen
Files using bits from paravirt.h should explicitly include it rather than relying on it being pulled in by something else. Signed-off-by: Jes Sorensen <jes@sgi.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11fix compilation with gcc 4.2Peter Chubb
gcc-4.2 is a lot more picky about its symbol handling. EXPORT_SYMBOL no longer works on symbols that are undefined or defined with static scope. For example, with CONFIG_PROFILE off, I see: kernel/profile.c:206: error: __ksymtab_profile_event_unregister causes a section type conflict kernel/profile.c:205: error: __ksymtab_profile_event_register causes a section type conflict This patch moves the EXPORTs inside the #ifdef CONFIG_PROFILE, so we only try to export symbols that are defined. Also, in kernel/kprobes.c there's an EXPORT_SYMBOL_GPL() for jprobes_return, which if CONFIG_JPROBES is undefined is a static inline and gives the same error. And in drivers/acpi/resources/rsxface.c, there's an ACPI_EXPORT_SYMBOPL() for a static symbol. If it's static, it's not accessible from outside the compilation unit, so should bot be exported. These three changes allow building a zx1_defconfig kernel with gcc 4.2 on IA64. [akpm@linux-foundation.org: export jpobe_return properly] Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au> Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11spidev warning fixDavid Brownell
Git rid of "warning: passing arg 2 of `access_ok' makes pointer from integer without a cast" reported on SH ... most architectures use macros in that test, SH uses inlined functions. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11mtdchar build fixAndrew Morton
sh: drivers/mtd/mtdchar.c: In function `mtd_mmap': drivers/mtd/mtdchar.c:817: error: dereferencing pointer to incomplete type drivers/mtd/mtdchar.c:817: error: `VM_SHARED' undeclared (first use in this function) drivers/mtd/mtdchar.c:817: error: (Each undeclared identifier is reported only once Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11fix serial buffer memory leakAlan Cox
Patch c5c34d4862e18ef07c1276d233507f540fb5a532 (tty: flush flip buffer on ldisc input queue flush) introduces a race condition which can lead to memory leaks. The problem can be triggered when tcflush() is called when data are being pushed to the line discipline driver by flush_to_ldisc(). flush_to_ldisc() releases tty->buf.lock when calling the line discipline receive_buf function. At that poing tty_buffer_flush() kicks in and sets both tty->buf.head and tty->buf.tail to NULL. When flush_to_ldisc() finishes, it restores tty->buf.head but doesn't touch tty->buf.tail. This corrups the buffer queue, and the next call to tty_buffer_request_room() will allocate a new buffer and overwrite tty->buf.head. The previous buffer is then lost forever without being released. (Thanks to Laurent for the above text, for finding, disgnosing and reporting the bug) - Use tty->flags bits for the flush status. - Wait for the flag to clear again before returning - Fix the doc error noted - Fix flush of empty queue leaving stale flushpending [akpm@linux-foundation.org: cleanup] Signed-off-by: Alan Cox <alan@redhat.com> Acked-by: Paul Fulghum <paulkf@microgate.com> Cc: Laurent Pinchart <laurentp@cse-semaphore.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11spi_mpc83xx: fix prescale modulus calculationAnton Vorontsov
Long ago I've noticed (but didn't pay much attention) that spi_mpc83xx using PM calculations that differs from what specs describe. I.e. u8 pm = mpc83xx_spi->spibrg / (spi->max_speed_hz * 4); While specs says: "The SPI baud rate generator clock source (either system clock or system clock divided by 16, depending on DIV16 bit) is divided by 4 * ([PM] + 1), a range from 4 to 64.". Thus " - 1" is missing in the spi_mpc83xx's formula. Why nobody noticed that bug? Probably because sysclk usually less then user expects, e.g. you expect 200 MHz, but real clock is 198 MHz, and integer rounding helps when this formula is used. Suppose it's SPI in QE, SYSCLK at 198 MHz, thus SPIBRG at 99MHz, 25 MHz requested. PM = (99MHz / ( 25 MHz * 4 )), PM == 0, output SPICLK will be 24.75 MHz At lower frequencies this bug is more noticeable, though. And this bug shows itself in all its beauty if SYSCLK is equal or a bit more than you expect (200 MHz SYSCLK, 100 MHz SPIBRG): PM = (100MHz / ( 25 MHz * 4 )), PM == 1, output SPICLK will be 12.625 MHz! Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11spi_mpc83xx: in "QE mode", use sysclk/2Anton Vorontsov
For MPC8349E input to the SPI Baud Rate Generator is SYSCLK, but it's SYSCLK/2 for MPC8323E (SPI in QE). Fix this, and remove confusion by renaming the mpc83xx_spi->sysclk member as mpc83xx_spi->spibrg. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11drivers/char/pcmcia/cm40x0_cs.c: fix release function callDaniel Ritz
cm4000_cs.c and cm4040_cs.c call the internal release function with an argument of wrong type. this fixes bug #8485 Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch> Cc: Bill McConnaughey <mcconnau@biochem.wustl.edu> Cc: Natalie Protasevich <protasnb@gmail.com> Cc: Harald Welte <laforge@gnumonks.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11matroxfb: rectify jitter (G450/G550)Paul A. Clarke
This builds upon my previous attempts to resolve some jitter problems seen with the Matrox G450 and G550 -based cards, including odd disparities observed between x86 and Power -based machines in a somewhat less hackish way (removing the hacked ifdefs). Apparently, preference should be given to use the DVI PLL when frequencies permit, the Standard PLL otherwise. The max pixel clock for the panellink interface is extracted from the PInS information on the card and used as a limit to determine which PLL to use. Signed-off-by: Paul A. Clarke <pc@us.ibm.com> Acked-by: Petr Vandrovec <petr@vandrovec.name> Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11pvr2fb: Consolidated cleanup of pvr2fb.cAdrian McMenamin
- better handling of the pvr2 registers based on more up to date information. Testing shows that it seems to work pretty well at 16bpp, 24bpp and 32bpp - including proper rendering of the boot logo at all levels (previously this was a bit broken even at 16bpp) and giving white against black text. Really detailed testing (eg with X11) requires support for the maple bus - which isn't (currently - next project assuming this is okay) available, but I have no reason to think this is broken. Signed-off by: Adrian McMenamin <adrian@mcmen.demon.co.uk> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11pvr2fb: Fix oops when pseudo_palette is writtenAntonino A. Daplas
Reported by: Adrian McMenamin <adrianmcmenamin@gmail.com> This driver will oops when the pseudo_palette[] is written as u32 but not when written as u16. When written as u32, it corrupts the adjacent 'mmio_base' field of struct pvr2fb_par. Fix by using framebuffer_alloc()/release() to allocate struct fb_info and struct pvr2fb_par, and create the pseudo_palette[] as part of struct pvr2fb_par. Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11fbcon: Kill compile warningAntonino A. Daplas
Fix compile warning ('map_override unused') if fbcon is compiled as a module and CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=n. [akpm@linux-foundation.org: cleanup] Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11stifb: detect cards in double buffer mode more reliablyHelge Deller
Visualize-EG, Graffiti and A4450A graphics cards on PARISC can be configured in double-buffer and standard mode, but the stifb driver supports standard mode only. This patch detects double-buffered cards more reliable. It is a real bugfix for a very nasty problem for all parisc users which have wrongly configured their graphic card. The problem: The stifb graphics driver will not detect that the card is wrongly configured and then nevertheless just enables the graphics mode, which it shouldn't. In the end, the user will see no further updates / boot messages on the screen. We had documented this problem already on our FAQ (http://parisc-linux.org/faq/index.html#viseg "Why do I get corrupted graphics with my Vis-EG/Graffiti/A4450A card?") but people still run into this problem. So having this fix in as early as possible can help us. Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Antonino Daplas <adaplas@gmail.com> Cc: <stable@kernel.org> Cc: Kyle McMartin <kyle@mcmartin.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11sysace: HDIO_GETGEO has it's own method for agesChristoph Hellwig
The way this driver tries to implement HDIO_GETGEO it'll never be called. Then again on ppc it probably will never be called anyway because it's utterly pointless. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-08-11drivers/block/cpqarray.c: better error handling and kmalloc + memset ↵Mariusz Kozlowski
conversion to k[cz]alloc This patch removes some redundant casts, does the kmalloc + memset to k[cz]alloc conversion and it changes the error path to use goto (to avoid code duplication). drivers/block/cpqarray.c | 49567 -> 48623 (-944 bytes) drivers/block/cpqarray.o | 178820 -> 178288 (-532 bytes) Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Acked-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-08-11drivers/block/cciss.c: kmalloc + memset conversion to kzallocMariusz Kozlowski
drivers/block/cciss.c | 104285 -> 104168 (-117 bytes) drivers/block/cciss.o | 277400 -> 277124 (-276 bytes) Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Acked-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-08-11Clean up duplicate includes in drivers/block/Jesper Juhl
This patch cleans up duplicate includes in drivers/block/ Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Satyam Sharma <satyam.sharma@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-08-11Fix remap handling by blktraceAlan D. Brunelle
This patch provides more information concerning REMAP operations on block IOs. The additional information provides clearer details at the user level, and supports post-processing analysis in btt. o Adds in partition remaps on the same device. o Fixed up the remap information in DM to be in the right order o Sent up mapped-from and mapped-to device information Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-08-10[S390] monwriter: Serialization bug for multithreaded applications.Melissa Howland
Locking added so that multithreaded applications can now do writes from different threads without the risk of storage corruption. Signed-off-by: Melissa Howland <melissah@us.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-08-10[S390] vmur: diag14 only works with buffers below 2GBMichael Holzheu
If memory buffers above 2GB are used, diagnose 14 raises a specification exception. This fix ensures that buffer allocation is done below the 2GB boundary. Signed-off-by: Michael Holzheu <holzheu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-08-10[S390] vmur: add "top of queue" sanity check for reader openMichael Holzheu
If the z/VM reader is already open, it can happen that after opening the Linux reader device, not the topmost file is processed. According the semantics of the Linux z/VM unit record device driver, always the topmost file has to be processed. With this fix an error is returned if that is not the case. Signed-off-by: Michael Holzheu <holzheu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-08-10[S390] vmur: reject open on z/VM reader files with status HOLDMichael Holzheu
If a reader file with HOLD status is at the top of the reader queue, currently all read requests will return data of the second file in the queue. But the semantics of vmur is that always the topmost file is read. With this fix -EPERM is returned on open, if the topmost reader file is in HOLD status. Signed-off-by: Michael Holzheu <holzheu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-08-10[S390] vmur: use DECLARE_COMPLETION_ONSTACK to keep lockdep happyHeiko Carstens
INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. 000000000ff9fb08 000000000ff9fb18 0000000000000002 0000000000000000 000000000ff9fbb8 000000000ff9fb30 000000000ff9fb30 0000000000104198 0000000000000000 0000000000000002 0000000000000000 0000000000000000 000000000ff9fb18 000000000000000c 000000000ff9fb18 000000000ff9fb88 0000000000448db0 0000000000104198 000000000ff9fb18 000000000ff9fb68 Call Trace: ([<00000000001040ea>] show_trace+0x12e/0x170) [<00000000001041f2>] show_stack+0xc6/0xf8 [<0000000000104252>] dump_stack+0x2e/0x3c [<0000000000155f9c>] __lock_acquire+0x460/0x1048 [<0000000000156c16>] lock_acquire+0x92/0xb8 [<000000000043f406>] _spin_lock_irqsave+0x62/0x80 [<0000000000121382>] complete+0x32/0x78 [<000000001082b468>] ur_int_handler+0xc8/0xec [vmur] [<0000000000313216>] ccw_device_call_handler+0xae/0xd4 [<0000000000310da4>] ccw_device_irq+0x5c/0x130 [<0000000000312c84>] io_subchannel_irq+0x8c/0x118 [<000000000030a88c>] do_IRQ+0x16c/0x194 [<0000000000111a62>] io_no_vtime+0x16/0x1c [<0000000080001394>] 0x80001394 Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-08-10[S390] vmur: allocate single record buffers instead of one big data bufferMichael Holzheu
vmur allocates one contiguous kernel buffer to copy user data when creating ccw programs for punch or printer. If big block sizes are used, under memory pressure it can happen, that we do not get memory in one chunk. Now we allocate memory for each single record to avoid high order allocations. Signed-off-by: Michael Holzheu <holzheu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-08-10[S390] qdio: make sure data structures are correctly aligned.Heiko Carstens
The slsb structure contained at the beginning of the qdio_q structure must start on a 256 byte boundary. To make sure this is the case even if slab debugging is turned on create an own slab cache for qdio_q structures. Besides that don't use the slab allocator to allocate whole pages. Use the page allocator instead. Also fix a few memory leaks in error handling code. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-08-10[S390] cio: avoid memory leak on error in css_alloc_subchannel().Cornelia Huck
sch->lock has been allocated in cio_validate_subchannel(), it must be freed if cio_modify() fails. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-08-09Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: mmc: at91_mci: remove whitespace at the end of lines mmc: reorganize bounce buffer init wbsd: fix section mismatch warnings
2007-08-09lguest: Fix Malicious Guest GDT Host CrashRusty Russell
If a Guest makes hypercall which sets a GDT entry to not present, we currently set any segment registers using that GDT entry to 0. Unfortunately, this is not sufficient: there are other ways of altering GDT entries which will cause a fault. The correct solution to do what Linux does: let them set any GDT value they want and handle the #GP when popping causes a fault. This has the added benefit of making our Switcher slightly more robust in the case of any other bugs which cause it to fault. We kill the Guest if it causes a fault in the Switcher: it's the Guest's responsibility to make sure it's not using segments when it changes them. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>