]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
13 years agoIt's only used in ams369fg06.c, no need for it to be in the global namespace.
Axel Lin [Sat, 16 Jul 2011 13:31:00 +0000 (23:31 +1000)]
It's only used in ams369fg06.c, no need for it to be in the global namespace.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: anish singh <anish198519851985@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoFix section mismatch warning by adding the correct annotation __devinit
Jingoo Han [Sat, 16 Jul 2011 13:31:00 +0000 (23:31 +1000)]
Fix section mismatch warning by adding the correct annotation __devinit
to the driver's probe function.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: anish singh <anish198519851985@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agounregister backlight device when unloading the module
Axel Lin [Sat, 16 Jul 2011 13:30:59 +0000 (23:30 +1000)]
unregister backlight device when unloading the module

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: anish singh <anish198519851985@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agobacklight: make some varibales static
Stephen Rothwell [Fri, 1 Jul 2011 05:34:22 +0000 (15:34 +1000)]
backlight: make some varibales static

fixes this build error:

drivers/video/backlight/ams369fg06.o:(.bss+0x510): multiple definition of `before_power'
drivers/video/backlight/s6e63m0.o:(.bss+0x5e0): first defined here

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: anish singh <anish198519851985@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoAdd the ams369fg06 amoled panel driver. The ams369fg06 amoled panel (480
Jingoo Han [Sat, 16 Jul 2011 13:30:59 +0000 (23:30 +1000)]
Add the ams369fg06 amoled panel driver.  The ams369fg06 amoled panel (480
x 800) driver uses 3-wired SPI inteface.  The brightness can be controlled
by gamma setting of amoled panel.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: anish singh <anish198519851985@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years ago- Fix checking of wrong return value for backlight_device_register()
Axel Lin [Sat, 16 Jul 2011 13:30:59 +0000 (23:30 +1000)]
- Fix checking of wrong return value for backlight_device_register()

- Properly free allocated resources in ld9040_probe() error path and
  ld9040_remove().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Donghwa Lee <dh09.lee@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoMike McLagan hasn't contributed in many years and his email bounces.
Joe Perches [Sat, 16 Jul 2011 13:30:58 +0000 (23:30 +1000)]
Mike McLagan hasn't contributed in many years and his email bounces.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: David Miller <davem@davemloft.net>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoThe address limit is already set in flush_old_exec() so this
Mathias Krause [Sat, 16 Jul 2011 13:30:58 +0000 (23:30 +1000)]
The address limit is already set in flush_old_exec() so this
set_fs(USER_DS) is redundant.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoThe address limit is already set in flush_old_exec() so this
Mathias Krause [Sat, 16 Jul 2011 13:30:57 +0000 (23:30 +1000)]
The address limit is already set in flush_old_exec() so this
set_fs(USER_DS) is redundant.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoUnless I'm very much missing something these tests are intended to check
Mark Brown [Sat, 16 Jul 2011 13:30:56 +0000 (23:30 +1000)]
Unless I'm very much missing something these tests are intended to check
if bit zero is set, rather than checking if msk is entirely zero (in which
case the logic would be very confusing.  I haven't actually observed any
runtime issues so this may be a misreading of the code on my part.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoWhen 1280x1024@75Hz mode is set, console palette is not set properly -
Ondrej Zary [Sat, 16 Jul 2011 13:30:56 +0000 (23:30 +1000)]
When 1280x1024@75Hz mode is set, console palette is not set properly -
sometimes the background is white, sometimes yellow and text colors are
also messed up.  This does not happen at 1280x1024@60Hz and below.

It seems that the HW needs some time before setting the palette - maybe
the PLL needs more time to lock at higher speeds.  This patch fixes the
problem but without knowing what register to check for PLL lock(?), the
delay might be excessive.

On Fri, 28 Jan 2011 18:15:37 +0000
Russell King <rmk@arm.linux.org.uk> wrote:

> On Tue, Jan 18, 2011 at 01:14:24PM -0800, Andrew Morton wrote:
> > Russell, I have an (old) note here that this is awaiting an ack from
> > yourself?
>
> Well, I can reproduce this problem on the Netwinders here.  I'm not sure
> that we should delay all mode switches by one second - and any attempt
> to reduce this value does result in the palette not being set correctly.
>
> For 1280x1024-75, the dotclock is 135MHz, which gives a PLL values of
> 0x41 and 0x06.  That's: M=0x41+1, N=0x06+1, P=0x00 (top 2 bits of 0x06)
> -> Q=1
>
>  Fpll = 14.31818MHz * M / N
>  Fout = Fpll / Q
>
> The PLL itself is formed by dividing the 14-ish MHz frequency by N and
> phase comparing the output of the VCO, divided by M, and adjusting the
> VCO until the two correlate.  As VCOs typically tend to have a limited
> range, it's normal to divide the output frequency to produce a greater
> range - and in this case that's done by Q.
>
> For the 800x600-100 copied from /etc/fb.modes, this has a dotclock of
> 67.5MHz, which is exactly half this rate.  The PLL values for this are:
> M=0x41+1, N=0x06+1, P=0x01, giving PLL values of 0x41 and 0x46.
>
> Booting with 800x600-100 does not suffer the problem.  So it's not
> related to PLL lock time.  There's something else going on.
>
> Another experiment I tried was forcing the PLL values to produce 108MHz
> instead of 135MHz.  108MHz is the dotclock for 1280x1024-60.  This too
> doesn't suffer the problem.
>
> I've also tried chosing other delay values.  100ms is too short and
> produces the problem, but 1s works.  1s for a PLL to lock is a hell of
> a time, especially for a PLL operating in the MHz range.
>
> I've tried setting the PLL to a known good freqency, and then switching
> to 135MHz - the problem persists.  It's not like 135MHz is reaching the
> limits - it'll go up to 206MHz.
>
> So, I don't think this has anything to do with PLL locking.  I think
> there's something else going on which isn't immediately obvious - maybe
> bandwidth starvation preventing us from writing properly to the palette?
> As it's a horrible VGA, where you write the same register multiple times
> I wouldn't be surprised if some writes were going missing.
>
> I'll see if I can play around with it some more this evening, but I've
> spent an awful long time on just this issue already this afternoon...
>
> I think further investigation needs to happen on this patch before it's
> acceptable.  Or maybe we should prevent the cyberpro coming up in

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agofb_set_suspend() must be called with the console semaphore held, which
Andrea Righi [Sat, 16 Jul 2011 13:30:55 +0000 (23:30 +1000)]
fb_set_suspend() must be called with the console semaphore held, which
means the code path coming in here will first take the console_lock() and
then call lock_fb_info().

However several framebuffer ioctl commands acquire these locks in reverse
order (lock_fb_info() and then console_lock()).  This gives rise to
potential AB-BA deadlock.

Fix this by changing the order of acquisition in the ioctl commands that
make use of console_lock().

Signed-off-by: Andrea Righi <arighi@develer.com>
Reported-by: Peter Nordström (Palm GBU) <peter.nordstrom@palm.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoThe buffer 'sc.cpu_mask' is a kernel buffer. If bitmap_parse is used
H Hartley Sweeten [Sat, 16 Jul 2011 13:30:55 +0000 (23:30 +1000)]
The buffer 'sc.cpu_mask' is a kernel buffer.  If bitmap_parse is used
instead of __bitmap_parse the extra parameter that indicates a kernel
buffer is not needed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Lars Ellenberg <drbd-dev@lists.linbit.com>
Cc: Philipp Reisner <philipp.reisner@linbit.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoDon't dereference em if it's NULL or an error pointer.
Roel Kluin [Sat, 16 Jul 2011 13:30:55 +0000 (23:30 +1000)]
Don't dereference em if it's NULL or an error pointer.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Chris Mason <chris.mason@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoA call to va_copy() should always be followed by a call to va_end() in the
Jesper Juhl [Sat, 16 Jul 2011 13:30:54 +0000 (23:30 +1000)]
A call to va_copy() should always be followed by a call to va_end() in the
same function.  In kernel/autit.c::audit_log_vformat() this is not always
done.  This patch makes sure va_end() is always called.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Eric Paris <eparis@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoThe address limit is already set in flush_old_exec() so this
Mathias Krause [Sat, 16 Jul 2011 13:30:54 +0000 (23:30 +1000)]
The address limit is already set in flush_old_exec() so this
set_fs(USER_DS) is redundant.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoDon't allow everybody to use a modem.
Vasiliy Kulikov [Sat, 16 Jul 2011 13:30:54 +0000 (23:30 +1000)]
Don't allow everybody to use a modem.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Cc: Linus Walleij <linus.walleij@stericsson.com>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoAdd a driver for the ACPI-based EC event interface found on the OLPC
Daniel Drake [Sat, 16 Jul 2011 13:30:53 +0000 (23:30 +1000)]
Add a driver for the ACPI-based EC event interface found on the OLPC
XO-1.5 laptop.  This enables notification of battery/AC power events, and
enables various devices to be used as wakeup sources through regular ACPI
mechanisms.

This driver can't be built as a module, because some drivers need to know
at boot-time if SCI-based functionality is available via
olpc_ec_wakeup_available().

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Andres Salomon <dilinger@queued.net>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoAdd a driver to configure the XO-1 RTC via CS5536 MSRs, to be used as a
Daniel Drake [Sat, 16 Jul 2011 13:30:53 +0000 (23:30 +1000)]
Add a driver to configure the XO-1 RTC via CS5536 MSRs, to be used as a
system wakeup source via olpc-xo1-pm.

Device detection is based on finding the relevant device tree node.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Andres Salomon <dilinger@queued.net>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoEC events indicate change in AC power connectivity, battery state of
Daniel Drake [Sat, 16 Jul 2011 13:30:53 +0000 (23:30 +1000)]
EC events indicate change in AC power connectivity, battery state of
charge, battery error, battery presence, etc.  Send notifications to the
power supply subsystem when changes are detected.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Andres Salomon <dilinger@queued.net>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoConfigure the XO-1's lid switch GPIO to trigger an SCI interrupt, and
Daniel Drake [Sat, 16 Jul 2011 13:30:52 +0000 (23:30 +1000)]
Configure the XO-1's lid switch GPIO to trigger an SCI interrupt, and
correctly expose this input device which can be used as a wakeup source.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Andres Salomon <dilinger@queued.net>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoThe EC in the OLPC XO-1 delivers GPE events to provide various
Daniel Drake [Sat, 16 Jul 2011 13:30:52 +0000 (23:30 +1000)]
The EC in the OLPC XO-1 delivers GPE events to provide various
notifications.  Add the basic code for GPE/EC event processing and enable
the ebook switch, which can be used as a wakeup source.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Andres Salomon <dilinger@queued.net>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoUpdate the EC SCI masks with recent additions.
Daniel Drake [Sat, 16 Jul 2011 13:30:52 +0000 (23:30 +1000)]
Update the EC SCI masks with recent additions.

Add functions to query SCI events and set the wakeup mask, to be used by
followup patches.

Add functions to tweak an event mask used to select certain EC events as a
system wakeup source.  Also add a function to determine if EC wakeup
functionality is available, as this depends on child drivers (different
for each laptop model) to configure the SCI interrupt.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Andres Salomon <dilinger@queued.net>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoThe System Control Interrupt is used in the OLPC XO-1 to control various
Daniel Drake [Sat, 16 Jul 2011 13:30:51 +0000 (23:30 +1000)]
The System Control Interrupt is used in the OLPC XO-1 to control various
features of the laptop.  Add the driver base and the power button
functionality.

This driver can't be built as a module, because functionality added in
future patches means that some drivers need to know at boot-time whether
SCI-based functionality is available.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Andres Salomon <dilinger@queued.net>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoAdd code needed for basic suspend/resume of the XO-1 laptop. Based on
Daniel Drake [Sat, 16 Jul 2011 13:30:51 +0000 (23:30 +1000)]
Add code needed for basic suspend/resume of the XO-1 laptop.  Based on
earlier work by Jordan Crouse, Andres Salomon, and others.

This patch incorporates all earlier feedback from Thomas Gleixner.  To
clarify a certain point (now more obvious in the code itself): On resume,
OpenFirmware returns execution to Linux in protected mode with a
kernel-compatible GDT already set up.  The changes and simplifications
suggested have all been included.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Andres Salomon <dilinger@queued.net>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoBased on earlier review comments, we'll no longer try to stick all of our
Daniel Drake [Sat, 16 Jul 2011 13:30:51 +0000 (23:30 +1000)]
Based on earlier review comments, we'll no longer try to stick all of our
XO-1 goodies in a single driver.  We'll split it into a power management
driver, and an EC/SCI driver.

As a first step, rename olpc-xo1 to olpc-xo1-pm, and make it builtin
instead of modular.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Andres Salomon <dilinger@queued.net>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoMove these definitions into the relevant header file. This was requested
Daniel Drake [Sat, 16 Jul 2011 13:30:50 +0000 (23:30 +1000)]
Move these definitions into the relevant header file.  This was requested
in the review of the upcoming XO-1 suspend/resume code.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Andres Salomon <dilinger@queued.net>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoIn response to new device tree code in the kernel, OLPC will start using
Daniel Drake [Sat, 16 Jul 2011 13:30:50 +0000 (23:30 +1000)]
In response to new device tree code in the kernel, OLPC will start using
it for probing of certain devices.  However, some firmware fixes are
needed to put the devicetree into a usable state.

Retain compatibility with old firmware by fixing up the device tree at
boot-time if it does not contain the new nodes/properties that we need for
probing.  This is the same approach taken on PPC platforms.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Andres Salomon <dilinger@queued.net>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoReplace the bubble sort in sanitize_e820_map() with a call to the generic
Mike Ditto [Sat, 16 Jul 2011 13:30:50 +0000 (23:30 +1000)]
Replace the bubble sort in sanitize_e820_map() with a call to the generic
kernel sort function to avoid pathological performance with large maps.

On large (thousands of entries) E820 maps, the previous code took minutes
to run; with this change it's now milliseconds.

Signed-off-by: Mike Ditto <mditto@google.com>
Cc: Stefan Assmann <sassmann@kpanic.de>
Cc: Nancy Yuen <yuenn@google.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoThis new driver replaces the old PCEngines Alix 2/3 LED driver with a new
Ed Wildgoose [Sat, 16 Jul 2011 13:30:49 +0000 (23:30 +1000)]
This new driver replaces the old PCEngines Alix 2/3 LED driver with a new
driver that controls the LEDs through the leds-gpio driver.  The old
driver accessed GPIOs directly, which created a conflict and prevented
also loading the cs5535-gpio driver to read other GPIOs on the Alix board.
 With this new driver, we hook into leds-gpio which in turn uses GPIO to
control the LEDs and therefore it's possible to control both the LEDs and
access onboard GPIOs

Driver is moved to platform/geode and any other geode initialisation
modules should move here also.

This driver is inspired by leds-net5501.c by Alessandro Zummo.

Ideally, leds-net5501.c should also be moved to platform/geode.
Additionally the driver relies on parts of the patch: 7f131cf3ed ("leds:
leds-alix2c - take port address from MSR) by Daniel Mack to perform
detection of the Alix board.

Signed-off-by: Ed Wildgoose <kernel@wildgooses.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Daniel Mack <daniel@caiaq.de>
Reviewed-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoOn x86_32 casting the unsigned int result of get_random_int() to long may
Ludwig Nussel [Sat, 16 Jul 2011 13:30:49 +0000 (23:30 +1000)]
On x86_32 casting the unsigned int result of get_random_int() to long may
result in a negative value.  On x86_32 the range of mmap_rnd() therefore
was -255 to 255.  The 32bit mode on x86_64 used 0 to 255 as intended.

The bug was introduced by 675a081 ("x86: unify mmap_{32|64}.c") in January
2008.

Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoThere was one code block that I commented to be able to test the patch dnd
Shérab [Sat, 16 Jul 2011 13:30:49 +0000 (23:30 +1000)]
There was one code block that I commented to be able to test the patch dnd
then forgot to uncomment again, and then you removed it but it should
actually have been uncommented rather than removed.  So here is the patch
tat corrects the code, to be applied on top of your own patch.

Cc: Len Brown <lenb@kernel.org>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years ago- remove commented-out code
Andrew Morton [Sat, 16 Jul 2011 13:30:48 +0000 (23:30 +1000)]
- remove commented-out code
- add missing space to printk
- clean up code layout

Cc: Len Brown <lenb@kernel.org>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Shérab <Sebastien.Hinderer@ens-lyon.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoThis makes the iris driver use the platform API, so it is properly exposed
Shérab [Sat, 16 Jul 2011 13:30:48 +0000 (23:30 +1000)]
This makes the iris driver use the platform API, so it is properly exposed
in /sys.

Signed-off-by: Shérab <Sebastien.Hinderer@ens-lyon.org>
Cc: Len Brown <lenb@kernel.org>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoAdd support for Aspire 1410 BIOS v1.3314. Fixes the following error:
Clay Carpenter [Sat, 16 Jul 2011 13:30:48 +0000 (23:30 +1000)]
Add support for Aspire 1410 BIOS v1.3314.  Fixes the following error:

acerhdf: unknown (unsupported) BIOS version Acer/Aspire 1410/v1.3314,
please report, aborting!

Signed-off-by: Clay Carpenter <claycarpenter@gmail.com>
Signed-off-by: Peter Feuerer <peter@piie.net>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoLinux supports some optional features, but it should notify the BIOS about
Shaohua Li [Sat, 16 Jul 2011 13:30:47 +0000 (23:30 +1000)]
Linux supports some optional features, but it should notify the BIOS about
them via the _OSI method.  Currently Linux doesn't notify any, which might
make such features not work because the BIOS doesn't know about them.

Jarosz has a system which needs this to make ACPI processor aggregator
device work.

Reported-by: "Jarosz, Sebastian" <sebastian.jarosz@intel.com>
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Acked-by: Matthew Garrett <mjg@redhat.com>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agob552a8c56db8 ("ACPI: remove NID_INVAL") removed the left over uses of
David Rientjes [Sat, 16 Jul 2011 13:30:47 +0000 (23:30 +1000)]
b552a8c56db8 ("ACPI: remove NID_INVAL") removed the left over uses of
NID_INVAL, but didn't actually remove the definition.  Remove it.

Signed-off-by: David Rientjes <rientjes@google.com>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoTHERMAL_HWMON is implemented inside the thermal_sys driver and has no
Jean Delvare [Sat, 16 Jul 2011 13:30:47 +0000 (23:30 +1000)]
THERMAL_HWMON is implemented inside the thermal_sys driver and has no
effect on drivers implementing thermal zones, so they shouldn't see
anything related to it in <linux/thermal.h>.  Making the THERMAL_HWMON
implementation fully internal has two advantages beyond the cleaner
design:

* This avoids rebuilding all thermal drivers if the THERMAL_HWMON
  implementation changes, or if CONFIG_THERMAL_HWMON gets enabled or
  disabled.

* This avoids breaking the thermal kABI in these cases too, which should
  make distributions happy.

The only drawback I can see is slightly higher memory fragmentation, as
the number of kzalloc() calls will increase by one per thermal zone.  But
I doubt it will be a problem in practice, as I've never seen a system with
more than two thermal zones.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Rene Herman <rene.herman@gmail.com>
Cc: Len Brown <len.brown@intel.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoWe'll soon need to reuse it.
Jean Delvare [Sat, 16 Jul 2011 13:30:46 +0000 (23:30 +1000)]
We'll soon need to reuse it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Rene Herman <rene.herman@gmail.com>
Cc: Len Brown <len.brown@intel.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoIt's about time to revert 16d752397301b9 ("thermal: Create
Jean Delvare [Sat, 16 Jul 2011 13:30:46 +0000 (23:30 +1000)]
It's about time to revert 16d752397301b9 ("thermal: Create
CONFIG_THERMAL_HWMON=n").  Anybody running a kernel >= 2.6.40 would also
be running a recent enough version of lm-sensors.

Actually having CONFIG_THERMAL_HWMON is pretty convenient so instead of
dropping it, we keep it but hide it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Rene Herman <rene.herman@gmail.com>
Cc: Len Brown <len.brown@intel.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agokernel/time.c:578: error: conflicting types for 'jiffies_to_clock_t'
Andrew Morton [Sat, 16 Jul 2011 13:30:46 +0000 (23:30 +1000)]
kernel/time.c:578: error: conflicting types for 'jiffies_to_clock_t'
include/linux/jiffies.h:306: note: previous declaration of 'jiffies_to_clock_t' was here

Cc: John Stultz <john.stultz@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: hank <pyu@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoThe parameter's origin type is long. On an i386 architecture, it can
hank [Sat, 16 Jul 2011 13:30:46 +0000 (23:30 +1000)]
The parameter's origin type is long.  On an i386 architecture, it can
easily be larger than 0x80000000, causing this function to convert it to a
sign-extended u64 type.  Change the type to unsigned long so we get the
correct result.

Signed-off-by: hank <pyu@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <john.stultz@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoThe out_msi_disable label should be before cleanup_nomem to additionally
Julia Lawall [Sat, 16 Jul 2011 13:30:45 +0000 (23:30 +1000)]
The out_msi_disable label should be before cleanup_nomem to additionally
benefit from the call to iounmap.  Subsequent gotos are adjusted to go to
out_msi_disable instead of cleanup_nomem, which now follows it.  This is
safe because pci_disable_msi does nothing if pci_enable_msi was not called.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
expression e1,e2;
statement S;
@@

e1 = pci_ioremap_bar(...);
... when != e1 = e2
    when != iounmap(e1)
    when any
(
 if (<+...e1...+>) S
|
 if(...) { ... return 0; }
|
 if (...) { ... when != iounmap(e1)
                when != if (...) { ... iounmap(e1) ... }
* return ...;
 } else S
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoThere's a code path in pmcraid that can be reached via device ioctl that
Dan Rosenberg [Sat, 16 Jul 2011 13:30:45 +0000 (23:30 +1000)]
There's a code path in pmcraid that can be reached via device ioctl that
causes all sorts of ugliness, including heap corruption or triggering the
OOM killer due to consecutive allocation of large numbers of pages.

First, the user can call pmcraid_chr_ioctl(), with a type
PMCRAID_PASSTHROUGH_IOCTL.  This calls through to
pmcraid_ioctl_passthrough().  Next, a pmcraid_passthrough_ioctl_buffer is
copied in, and the request_size variable is set to
buffer->ioarcb.data_transfer_length, which is an arbitrary 32-bit signed
value provided by the user.  If a negative value is provided here, bad
things can happen.  For example, pmcraid_build_passthrough_ioadls() is
called with this request_size, which immediately calls
pmcraid_alloc_sglist() with a negative size.  The resulting math on
allocating a scatter list can result in an overflow in the kzalloc() call
(if num_elem is 0, the sglist will be smaller than expected), or if
num_elem is unexpectedly large the subsequent loop will call alloc_pages()
repeatedly, a high number of pages will be allocated and the OOM killer
might be invoked.

It looks like preventing this value from being negative in
pmcraid_ioctl_passthrough() would be sufficient.  Something like this
might do:

Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
Cc: Anil Ravindranath <anil_ravindranath@pmc-sierra.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoarch/cris/arch-v10/kernel/irq.c:239: error: implicit declaration of function 'kgdb_init'
WANG Cong [Sat, 16 Jul 2011 13:30:44 +0000 (23:30 +1000)]
arch/cris/arch-v10/kernel/irq.c:239: error: implicit declaration of function 'kgdb_init'
arch/cris/arch-v10/kernel/irq.c:240: error: implicit declaration of function 'breakpoint'

Declare these two functions.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoarch/cris/arch-v10/drivers/sync_serial.c:961: error: conflicting types for 'sync_seri...
WANG Cong [Sat, 16 Jul 2011 13:30:44 +0000 (23:30 +1000)]
arch/cris/arch-v10/drivers/sync_serial.c:961: error: conflicting types for 'sync_serial_ioctl'

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoarch/cris/arch-v10/drivers/sync_serial.c:628: error: 'ret' undeclared (first use...
WANG Cong [Sat, 16 Jul 2011 13:30:44 +0000 (23:30 +1000)]
arch/cris/arch-v10/drivers/sync_serial.c:628: error: 'ret' undeclared (first use in this function)

'ret' should be 'err'.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoWARNING: line over 80 characters
Andrew Morton [Sat, 16 Jul 2011 13:30:43 +0000 (23:30 +1000)]
WARNING: line over 80 characters
#37: FILE: arch/cris/include/asm/thread_info.h:70:
+#define alloc_thread_info_node(tsk, node) ((struct thread_info *) __get_free_pages(GFP_KERNEL,1))

ERROR: space required after that ',' (ctx:VxV)
#37: FILE: arch/cris/include/asm/thread_info.h:70:
+#define alloc_thread_info_node(tsk, node) ((struct thread_info *) __get_free_pages(GFP_KERNEL,1))
                                                                                              ^

total: 1 errors, 1 warnings, 18 lines checked

./patches/cris-fix-a-build-error-in-kernel-forkc.patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agokernel/fork.c:267: error: implicit declaration of function
WANG Cong [Sat, 16 Jul 2011 13:30:43 +0000 (23:30 +1000)]
kernel/fork.c:267: error: implicit declaration of function
'alloc_thread_info_node'

This is due to renaming alloc_thread_info() to alloc_thread_info_node().

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoVito said:
Peter Zijlstra [Sat, 16 Jul 2011 13:30:42 +0000 (23:30 +1000)]
Vito said:

: The system has many usb disks coming and going day to day, with their
: respective bdi's having min_ratio set to 1 when inserted.  It works for
: some time until eventually min_ratio can no longer be set, even when the
: active set of bdi's seen in /sys/class/bdi/*/min_ratio doesn't add up to
: anywhere near 100.
:
: This then leads to an unrelated starvation problem caused by write-heavy
: fuse mounts being used atop the usb disks, a problem the min_ratio setting
: at the underlying devices bdi effectively prevents.

Fix this leakage by resetting the bdi min_ratio when unregistering the
BDI.

Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Reported-by: Vito Caputo <lkml@pengaru.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoIf dmi_get_system_info() returns NULL, pch_phub_probe() will dereferencea
Alexander Stein [Sat, 16 Jul 2011 13:30:42 +0000 (23:30 +1000)]
If dmi_get_system_info() returns NULL, pch_phub_probe() will dereferencea
a zero pointer.

This oops was observed on an Atom based board which has no BIOS, but a
bootloder which doesn't privde DMI data.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Cc: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Cc: Greg KH <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years ago2.6.36's 7e496299d4d2 ("tmpfs: make tmpfs scalable with percpu_counter for
Hugh Dickins [Sat, 16 Jul 2011 13:30:42 +0000 (23:30 +1000)]
2.6.36's 7e496299d4d2 ("tmpfs: make tmpfs scalable with percpu_counter for
used blocks") to make tmpfs scalable with percpu_counter used
inode->i_lock in place of sbinfo->stat_lock around i_blocks updates; but
that was adverse to scalability, and unnecessary, since info->lock is
already held there in the fast paths.

Remove those uses of i_lock, and add info->lock in the three error paths
where it's then needed across shmem_free_blocks().  It's not actually
needed across shmem_unacct_blocks(), but they're so often paired that it
looks wrong to split them apart.

Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agotruncate_inode_pages_range()'s final loop has a nice pincer property,
Hugh Dickins [Sat, 16 Jul 2011 13:30:42 +0000 (23:30 +1000)]
truncate_inode_pages_range()'s final loop has a nice pincer property,
bringing start and end together, squeezing out the last pages.  But the
range handling missed out on that, just sliding up the range, perhaps
letting pages come in behind it.  Add one more test to give it the same
pincer effect.

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoMake the pagevec_lookup loops in truncate_inode_pages_range(),
Hugh Dickins [Sat, 16 Jul 2011 13:30:41 +0000 (23:30 +1000)]
Make the pagevec_lookup loops in truncate_inode_pages_range(),
invalidate_mapping_pages() and invalidate_inode_pages2_range() more
consistent with each other.

They were relying upon page->index of an unlocked page, but apologizing
for it: accept it, embrace it, add comments and WARN_ONs, and simplify the
index handling.

invalidate_inode_pages2_range() had special handling for a wrapped
page->index + 1 = 0 case; but MAX_LFS_FILESIZE doesn't let us anywhere
near there, and a corrupt page->index in the radix_tree could cause more
trouble than that would catch.  Remove that wrapped handling.

invalidate_inode_pages2_range() uses min() to limit the pagevec_lookup
when near the end of the range: copy that into the other two, although
it's less useful than you might think (it limits the use of the buffer,
rather than the indices looked up).

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoUse consistent variable names in truncate_pagecache(), truncate_setsize(),
Hugh Dickins [Sat, 16 Jul 2011 13:30:41 +0000 (23:30 +1000)]
Use consistent variable names in truncate_pagecache(), truncate_setsize(),
vmtruncate() and vmtruncate_range().

unmap_mapping_range() and vmtruncate_range() have mismatched interfaces:
don't change either, but make the vmtruncates more precise about what they
expect unmap_mapping_range() to do.

vmtruncate_range() is currently called only with page-aligned start and
end+1: can handle unaligned start, but unaligned end+1 would hit BUG_ON in
truncate_inode_pages_range() (lacks partial clearing of the end page).

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoCorrect comment on truncate_inode_pages*() in linux/mm.h; and remove
Hugh Dickins [Sat, 16 Jul 2011 13:30:41 +0000 (23:30 +1000)]
Correct comment on truncate_inode_pages*() in linux/mm.h; and remove
declaration of page_unuse(), it didn't exist even in 2.2.26 or 2.4.0!

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoThe often-NULL data arg to read_cache_page() and read_mapping_page()
Hugh Dickins [Sat, 16 Jul 2011 13:30:40 +0000 (23:30 +1000)]
The often-NULL data arg to read_cache_page() and read_mapping_page()
functions is misdescribed as "destination for read data": no, it's the
first arg to the filler function, often struct file * to ->readpage().

Satisfy checkpatch.pl on those filler prototypes, and tidy up the
declarations in linux/pagemap.h.

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agos/EIO/EFAULT/
Andrew Morton [Sat, 16 Jul 2011 13:30:40 +0000 (23:30 +1000)]
s/EIO/EFAULT/

Cc: <stable@kernel.org>
Cc: Christian Zankel <chris@zankel.net>
Cc: Dan Rosenberg <drosenberg@vsecurity.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoPrevent an arbitrary kernel read. Check the user pointer with access_ok()
Dan Rosenberg [Sat, 16 Jul 2011 13:30:40 +0000 (23:30 +1000)]
Prevent an arbitrary kernel read.  Check the user pointer with access_ok()
before copying data in.

Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
Cc: Christian Zankel <chris@zankel.net>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agofix code layout
Andrew Morton [Sat, 16 Jul 2011 13:30:38 +0000 (23:30 +1000)]
fix code layout

Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoCurrently we are keeping faulted page locked throughout whole __do_fault
KAMEZAWA Hiroyuki [Sat, 16 Jul 2011 13:30:37 +0000 (23:30 +1000)]
Currently we are keeping faulted page locked throughout whole __do_fault
call (except for page_mkwrite code path) after calling file system's fault
code.  If we do early COW, we allocate a new page which has to be charged
for a memcg (mem_cgroup_newpage_charge).

This function, however, might block for unbounded amount of time if memcg
oom killer is disabled or fork-bomb is running because the only way out of
the OOM situation is either an external event or OOM-situation fix.

In the end we are keeping the faulted page locked and blocking other
processes from faulting it in which is not good at all because we are
basically punishing potentially an unrelated process for OOM condition in
a different group (I have seen stuck system because of ld-2.11.1.so being
locked).

We can do test easily.

 % cgcreate -g memory:A
 % cgset -r memory.limit_in_bytes=64M A
 % cgset -r memory.memsw.limit_in_bytes=64M A
 % cd kernel_dir; cgexec -g memory:A make -j

Then, the whole system will live-locked until you kill 'make -j'
by hands (or push reboot...) This is because some important page in a
a shared library are locked.

Considering again, the new page is not necessary to be allocated
with lock_page() held. And usual page allocation may dive into
long memory reclaim loop with holding lock_page() and can cause
very long latency.

There are 3 ways.
  1. do allocation/charge before lock_page()
     Pros. - simple and can handle page allocation in the same manner.
             This will reduce holding time of lock_page() in general.
     Cons. - we do page allocation even if ->fault() returns error.

  2. do charge after unlock_page(). Even if charge fails, it's just OOM.
     Pros. - no impact to non-memcg path.
     Cons. - implemenation requires special cares of LRU and we need to modify
             page_add_new_anon_rmap()...

  3. do unlock->charge->lock again method.
     Pros. - no impact to non-memcg path.
     Cons. - This may kill LOCK_PAGE_RETRY optimization. We need to release
             lock and get it again...

This patch moves "charge" and memory allocation for COW page
before lock_page(). Then, we can avoid scanning LRU with holding
a lock on a page and latency under lock_page() will be reduced.

Then, above livelock disappears.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reported-by: Lutz Vieweg <lvml@5t9.de>
Original-idea-by: Michal Hocko <mhocko@suse.cz>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Ying Han <yinghan@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 years agoMerge remote-tracking branch 'writeback/next'
Stephen Rothwell [Tue, 26 Jul 2011 04:44:09 +0000 (14:44 +1000)]
Merge remote-tracking branch 'writeback/next'

Conflicts:
fs/fs-writeback.c
mm/filemap.c

13 years agoMerge remote-tracking branch 'tmem/linux-next'
Stephen Rothwell [Tue, 26 Jul 2011 04:39:13 +0000 (14:39 +1000)]
Merge remote-tracking branch 'tmem/linux-next'

13 years agoMerge remote-tracking branch 'staging/staging-next'
Stephen Rothwell [Tue, 26 Jul 2011 04:37:29 +0000 (14:37 +1000)]
Merge remote-tracking branch 'staging/staging-next'

Conflicts:
Documentation/feature-removal-schedule.txt
drivers/staging/bcm/headers.h
drivers/staging/brcm80211/brcmfmac/dhd_linux.c
drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h
drivers/staging/brcm80211/brcmfmac/wl_iw.c
drivers/staging/et131x/et131x_netdev.c
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
drivers/staging/rtl8192e/r8192E.h
drivers/staging/tm6000/tm6000-alsa.c
drivers/staging/usbip/userspace/src/utils.h

13 years agoMerge remote-tracking branch 'usb/usb-next'
Stephen Rothwell [Tue, 26 Jul 2011 04:23:09 +0000 (14:23 +1000)]
Merge remote-tracking branch 'usb/usb-next'

Conflicts:
Documentation/feature-removal-schedule.txt

13 years agoMerge remote-tracking branch 'tty/tty-next'
Stephen Rothwell [Tue, 26 Jul 2011 04:19:42 +0000 (14:19 +1000)]
Merge remote-tracking branch 'tty/tty-next'

13 years agoMerge remote-tracking branch 'driver-core/driver-core-next'
Stephen Rothwell [Tue, 26 Jul 2011 04:18:15 +0000 (14:18 +1000)]
Merge remote-tracking branch 'driver-core/driver-core-next'

13 years agoMerge remote-tracking branch 'regmap/for-next'
Stephen Rothwell [Tue, 26 Jul 2011 04:16:49 +0000 (14:16 +1000)]
Merge remote-tracking branch 'regmap/for-next'

13 years agoMerge remote-tracking branch 'namespace/master'
Stephen Rothwell [Tue, 26 Jul 2011 04:15:24 +0000 (14:15 +1000)]
Merge remote-tracking branch 'namespace/master'

13 years agoMerge remote-tracking branch 'sysctl/master'
Stephen Rothwell [Tue, 26 Jul 2011 04:14:06 +0000 (14:14 +1000)]
Merge remote-tracking branch 'sysctl/master'

13 years agoMerge remote-tracking branch 'drivers-x86/linux-next'
Stephen Rothwell [Tue, 26 Jul 2011 04:12:27 +0000 (14:12 +1000)]
Merge remote-tracking branch 'drivers-x86/linux-next'

Conflicts:
Documentation/feature-removal-schedule.txt

13 years agoMerge remote-tracking branch 'xen-two/linux-next'
Stephen Rothwell [Tue, 26 Jul 2011 04:06:46 +0000 (14:06 +1000)]
Merge remote-tracking branch 'xen-two/linux-next'

13 years agoMerge remote-tracking branch 'tip/auto-latest'
Stephen Rothwell [Tue, 26 Jul 2011 04:06:10 +0000 (14:06 +1000)]
Merge remote-tracking branch 'tip/auto-latest'

13 years agoMerge remote-tracking branch 'i7300_edac/linux_next'
Stephen Rothwell [Tue, 26 Jul 2011 04:06:00 +0000 (14:06 +1000)]
Merge remote-tracking branch 'i7300_edac/linux_next'

13 years agoMerge remote-tracking branch 'i7core_edac/linux_next'
Stephen Rothwell [Tue, 26 Jul 2011 04:04:25 +0000 (14:04 +1000)]
Merge remote-tracking branch 'i7core_edac/linux_next'

13 years agoMerge remote-tracking branch 'fsnotify/for-next'
Stephen Rothwell [Tue, 26 Jul 2011 04:01:45 +0000 (14:01 +1000)]
Merge remote-tracking branch 'fsnotify/for-next'

13 years agoMerge remote-tracking branch 'watchdog/master'
Stephen Rothwell [Tue, 26 Jul 2011 03:59:56 +0000 (13:59 +1000)]
Merge remote-tracking branch 'watchdog/master'

13 years agoMerge remote-tracking branch 'agp/agp-next'
Stephen Rothwell [Tue, 26 Jul 2011 03:59:10 +0000 (13:59 +1000)]
Merge remote-tracking branch 'agp/agp-next'

13 years agoMerge remote-tracking branch 'security-testing/next'
Stephen Rothwell [Tue, 26 Jul 2011 03:57:31 +0000 (13:57 +1000)]
Merge remote-tracking branch 'security-testing/next'

Conflicts:
security/tomoyo/realpath.c

13 years agoMerge remote-tracking branch 'voltage/for-next'
Stephen Rothwell [Tue, 26 Jul 2011 03:55:58 +0000 (13:55 +1000)]
Merge remote-tracking branch 'voltage/for-next'

13 years agoMerge remote-tracking branch 'fbdev/master'
Stephen Rothwell [Tue, 26 Jul 2011 03:54:18 +0000 (13:54 +1000)]
Merge remote-tracking branch 'fbdev/master'

13 years agoMerge remote-tracking branch 'drm/drm-next'
Stephen Rothwell [Tue, 26 Jul 2011 03:52:38 +0000 (13:52 +1000)]
Merge remote-tracking branch 'drm/drm-next'

13 years agoMerge remote-tracking branch 'mfd/for-next'
Stephen Rothwell [Tue, 26 Jul 2011 03:51:04 +0000 (13:51 +1000)]
Merge remote-tracking branch 'mfd/for-next'

Conflicts:
drivers/gpio/Makefile
drivers/mfd/Makefile

13 years agoMerge remote-tracking branch 'md/for-next'
Stephen Rothwell [Tue, 26 Jul 2011 03:49:36 +0000 (13:49 +1000)]
Merge remote-tracking branch 'md/for-next'

13 years agoMerge remote-tracking branch 'slab/for-next'
Stephen Rothwell [Tue, 26 Jul 2011 03:42:57 +0000 (13:42 +1000)]
Merge remote-tracking branch 'slab/for-next'

13 years agoMerge remote-tracking branch 'mmc/mmc-next'
Stephen Rothwell [Tue, 26 Jul 2011 03:41:29 +0000 (13:41 +1000)]
Merge remote-tracking branch 'mmc/mmc-next'

13 years agoMerge remote-tracking branch 'leds/for-mm'
Stephen Rothwell [Tue, 26 Jul 2011 03:41:22 +0000 (13:41 +1000)]
Merge remote-tracking branch 'leds/for-mm'

Conflicts:
drivers/leds/Kconfig

13 years agoMerge remote-tracking branch 'battery/master'
Stephen Rothwell [Tue, 26 Jul 2011 03:39:38 +0000 (13:39 +1000)]
Merge remote-tracking branch 'battery/master'

13 years agoMerge branch 'quilt/device-mapper'
Stephen Rothwell [Tue, 26 Jul 2011 03:37:59 +0000 (13:37 +1000)]
Merge branch 'quilt/device-mapper'

13 years agoMerge remote-tracking branch 'block/for-next'
Stephen Rothwell [Tue, 26 Jul 2011 03:37:53 +0000 (13:37 +1000)]
Merge remote-tracking branch 'block/for-next'

13 years agoMerge remote-tracking branch 'input/next'
Stephen Rothwell [Tue, 26 Jul 2011 03:36:04 +0000 (13:36 +1000)]
Merge remote-tracking branch 'input/next'

13 years agoMerge branch 'quilt/rr'
Stephen Rothwell [Tue, 26 Jul 2011 03:36:00 +0000 (13:36 +1000)]
Merge branch 'quilt/rr'

Conflicts:
arch/m68k/kernel/module_mm.c
arch/m68k/kernel/module_no.c
arch/x86/lguest/i386_head.S

13 years agoMerge remote-tracking branch 'sound/for-next'
Stephen Rothwell [Tue, 26 Jul 2011 03:31:54 +0000 (13:31 +1000)]
Merge remote-tracking branch 'sound/for-next'

13 years agoMerge remote-tracking branch 'l2-mtd/master'
Stephen Rothwell [Tue, 26 Jul 2011 03:30:21 +0000 (13:30 +1000)]
Merge remote-tracking branch 'l2-mtd/master'

Conflicts:
drivers/mtd/maps/pxa2xx-flash.c

13 years agoMerge remote-tracking branch 'bluetooth/master'
Stephen Rothwell [Tue, 26 Jul 2011 03:28:56 +0000 (13:28 +1000)]
Merge remote-tracking branch 'bluetooth/master'

13 years agoMerge remote-tracking branch 'wireless/master'
Stephen Rothwell [Tue, 26 Jul 2011 03:27:34 +0000 (13:27 +1000)]
Merge remote-tracking branch 'wireless/master'

13 years agoMerge remote-tracking branch 'async_tx/next'
Stephen Rothwell [Tue, 26 Jul 2011 03:24:33 +0000 (13:24 +1000)]
Merge remote-tracking branch 'async_tx/next'

13 years agoMerge remote-tracking branch 'slave-dma/next'
Stephen Rothwell [Tue, 26 Jul 2011 03:23:01 +0000 (13:23 +1000)]
Merge remote-tracking branch 'slave-dma/next'

Conflicts:
drivers/dma/mv_xor.c

13 years agoMerge remote-tracking branch 'iscsi-target/for-next'
Stephen Rothwell [Tue, 26 Jul 2011 03:21:35 +0000 (13:21 +1000)]
Merge remote-tracking branch 'iscsi-target/for-next'

13 years agoMerge remote-tracking branch 'ibft/master'
Stephen Rothwell [Tue, 26 Jul 2011 03:21:30 +0000 (13:21 +1000)]
Merge remote-tracking branch 'ibft/master'