28 May, 2010
40 commits
-
This patch cleans up move charge code by:
- define functions to handle pte for each types, and make
is_target_pte_for_mc() cleaner.- instead of checking the MOVE_CHARGE_TYPE_ANON bit, define a function
that checks the bit.Signed-off-by: Daisuke Nishimura
Acked-by: KAMEZAWA Hiroyuki
Cc: Balbir Singh
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This adds a feature to disable oom-killer for memcg, if disabled, of
course, tasks under memcg will stop.But now, we have oom-notifier for memcg. And the world around memcg is
not under out-of-memory. memcg's out-of-memory just shows memcg hits
limit. Then, administrator or management daemon can recover the situation
by- kill some process
- enlarge limit, add more swap.
- migrate some tasks
- remove file cache on tmps (difficult ?)Unlike oom-killer, you can take enough information before killing tasks.
(by gcore, or, ps etc.)[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: KAMEZAWA Hiroyuki
Cc: Daisuke Nishimura
Cc: Balbir Singh
Cc: Daisuke Nishimura
Cc: David Rientjes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Considering containers or other resource management softwares in userland,
event notification of OOM in memcg should be implemented. Now, memcg has
"threshold" notifier which uses eventfd, we can make use of it for oom
notification.This patch adds oom notification eventfd callback for memcg. The usage is
very similar to threshold notifier, but control file is memory.oom_control
and no arguments other than eventfd is required.% cgroup_event_notifier /cgroup/A/memory.oom_control dummy
(About cgroup_event_notifier, see Documentation/cgroup/)Signed-off-by: KAMEZAWA Hiroyuki
Cc: Daisuke Nishimura
Cc: Balbir Singh
Cc: Daisuke Nishimura
Cc: David Rientjes
Cc: Davide Libenzi
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
memcg's oom waitqueue is a system-wide wait_queue (for handling
hierarchy.) So, it's better to add custom wake function and do filtering
in wake up path.This patch adds a filtering feature for waking up oom-waiters. Hierarchy
is properly handled.Signed-off-by: KAMEZAWA Hiroyuki
Reviewed-by: Daisuke Nishimura
Cc: Balbir Singh
Cc: Daisuke Nishimura
Cc: David Rientjes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Trevor Woerner
Cc: Paul Menage
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
- Add additional location (Git) for the kernel master tree
- Add reference to Git ProjectSigned-off-by: Abraham Arce
Acked-by: Randy Dunlap
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
I recently had to recover some files from an old broken machine that was
running BorderWare Document Gateway. It's basically a drop in web server
for sharing files. From the look of the init process and using strings on
of a few files it seems to be based on FreeBSD 3.3.The process turned out to be more difficult than I imagined, but to cut a
long story short BorderWare in their wisdom use a nonstandard magic number
in their UFS (ufstype=44bsd) file systems. Thus Linux refuses to mount
the file systems in order to recover the data. After a bit of hunting I
was able to make a quick fix to fs/ufs/super.c in order to detect the new
magic number.I assume that this number is the same for all installations. It's quite
easy to find out from ufs_fs.h. The superblock sits 8k into the block
device and the magic number its 1372 bytes into the superblock struct.# dd if=/dev/sda5 skip=$(( 8192 + 1372 )) bs=1 count=4 2> /dev/null | hd
00000000 97 26 24 0f |.&$.|
#Signed-off-by: Thomas Stewart
Cc: Evgeniy Dushistov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use memdup_user when user data is immediately copied into the
allocated region.The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)//
@@
expression from,to,size,flag;
position p;
identifier l1,l2;
@@- to = \(kmalloc@p\|kzalloc@p\)(size,flag);
+ to = memdup_user(from,size);
if (
- to==NULL
+ IS_ERR(to)
|| ...) {
}
- if (copy_from_user(to, from, size) != 0) {
-
- }
//Signed-off-by: Julia Lawall
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The current backlight code is stubbed out, so the new props changes added
some warnings:
drivers/video/bf54x-lq043fb.c: In function 'bfin_bf54x_probe':
drivers/video/bf54x-lq043fb.c:666: warning: label 'out9' defined but not used
drivers/video/bf54x-lq043fb.c:504: warning: unused variable 'props'Fix em !
Signed-off-by: Mike Frysinger
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The current backlight code is stubbed out, so the new props changes added
some warnings about unused label/prop.Signed-off-by: Mike Frysinger
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use memdup_user when user data is immediately copied into the
allocated region.The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)//
@@
expression from,to,size,flag;
position p;
identifier l1,l2;
@@- to = \(kmalloc@p\|kzalloc@p\)(size,flag);
+ to = memdup_user(from,size);
if (
- to==NULL
+ IS_ERR(to)
|| ...) {
}
- if (copy_from_user(to, from, size) != 0) {
-
- }
//Signed-off-by: Julia Lawall
Cc: Joseph Chan
Cc: Scott Fang
Cc: Florian Tobias Schandinat
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add support for S3 Trio3D/1X (86C360) and S3 Trio3D/2X (86C362 and 86C368)
cards to s3fb driver. Tested with 86C362 AGP and 86C368 PCI&AGP.[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Ondrej Zary
Acked-by: Ondrej Zajicek
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This eliminates the following build warning:
drivers/gpio/it8761e_gpio.c: In function `it8761e_gpio_exit':
drivers/gpio/it8761e_gpio.c:220: warning: ignoring return value of `gpiochip_remove', declared with attribute warn_unused_resultSigned-off-by: Daniel Mack
Cc: Denis Turischev
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Intel Penwell chip has two 96 pins GPIO blocks, which are very similiar as
Intel Langwell chip GPIO block, except for pin number difference. This
patch expends the original Langwell GPIO driver to support Penwell's.Signed-off-by: Alek Du
Cc: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Nobody uses that anymore, so remove and expect drivers to use the gpiolib
implementation.Signed-off-by: Felipe Balbi
Cc: Tony Lindgren
Cc: David Brownell
Cc: Mark Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Stop using the omap-specific implementations for gpio debouncing now that
gpiolib provides its own support.Signed-off-by: Felipe Balbi
Cc: Tony Lindgren
Cc: David Brownell
Cc: Mark Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
OMAP supports debouncing of gpio lines, implement the method using
gpiolib.Signed-off-by: Felipe Balbi
Cc: Tony Lindgren
Cc: David Brownell
Cc: Mark Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
A few architectures, like OMAP, allow you to set a debouncing time for the
gpio before generating the IRQ. Teach gpiolib about that.Mark said:
: This would be generally useful for embedded systems, especially where
: the interrupt concerned is a wake source. It allows drivers to avoid
: spurious interrupts from noisy sources so if the hardware supports it
: the driver can avoid having to explicitly wait for the signal to become
: stable and software has to cope with fewer events. We've lived without
: it for quite some time, though.David said:
: I looked at adding debounce support to the generic GPIO calls (and thus
: gpiolib) some time back, but decided against it. I forget why at this
: time (check list archives) but it wasn't because of lack of utility in
: certain contexts.
:
: One thing to watch out for is just how variable the hardware capabilities
: are. Atmel GPIOs have something like a fixed number of 32K clock cycles
: for debounce, twl4030 had something odd, OMAPs were more like the Atmel
: chips but with a different clock. In some cases debouncing had to be
: ganged, not per-GPIO. And so forth.Signed-off-by: Felipe Balbi
Cc: Tony Lindgren
Cc: David Brownell
Reviewed-by: Mark Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The current message, 'not registered' is confusing as it implies it was
not registered with something, whereas printing 'failed to register'
implies it was the gpiochip_add() call that did not work correctly.Signed-off-by: Ben Dooks
Cc: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Fix a bug I noticed while hacking on the max732x driver for interrupt
support. According to the datasheets, open-drain pins have to be
configured as output-high (which in that case is actually high impedance)
to be used as input.Signed-off-by: Marc Zyngier
Acked-by: Eric Miao
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Setup both client_group_a and client_group_b if nr_port > 8 (not including
nr_port==8).Signed-off-by: Axel Lin
Cc: Eric Miao
Cc: Ben Dooks
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The valid offset value is 0..PL061_GPIO_NR-1, this patch corrects the
offset value range checking.Signed-off-by: Axel Lin
Acked-by: Baruch Siach
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Uwe Kleine-König
Cc: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Uwe Kleine-König
Cc: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
gpiolib doesn't need to modify the names and I assume most initializers
use string constants that shouldn't be modified anyhow.[akpm@linux-foundation.org: fix drivers/gpio/cs5535-gpio.c]
Signed-off-by: Uwe Kleine-König
Cc: Kevin Wells
Cc: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Most of the GPIO expanders supported by the max732x driver have interrupt
generation capability by reporting changes on input pins through an INT#
pin. This patch implements the irq_chip functionnality (edge detection
only).Signed-off-by: Marc Zyngier
Cc: Eric Miao
Cc: Jebediah Huang
Cc: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add a driver for the RTC on the AB8500 power management chip. This is a
client of the AB8500 MFD driver.Signed-off-by: Virupax Sadashivpetimath
Signed-off-by: Rabin Vincent
Acked-by: Linus Walleij
Acked-by: Srinidhi Kasagar
Cc: Alessandro Zummo
Cc: Samuel Ortiz
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use memdup_user when user data is immediately copied into the allocated
region. Elimination of the variable ads, which is no longer useful.The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)//
@@
expression from,to,size,flag;
position p;
identifier l1,l2;
@@- to = \(kmalloc@p\|kzalloc@p\)(size,flag);
+ to = memdup_user(from,size);
if (
- to==NULL
+ IS_ERR(to)
|| ...) {
}
- if (copy_from_user(to, from, size) != 0) {
-
- }
//Signed-off-by: Julia Lawall
Cc: Ian Kent
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use memdup_user when user data is immediately copied into the
allocated region.The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)//
@@
expression from,to,size,flag;
position p;
identifier l1,l2;
@@- to = \(kmalloc@p\|kzalloc@p\)(size,flag);
+ to = memdup_user(from,size);
if (
- to==NULL
+ IS_ERR(to)
|| ...) {
}
- if (copy_from_user(to, from, size) != 0) {
-
- }
//Signed-off-by: Julia Lawall
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use memdup_user when user data is immediately copied into the
allocated region.The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)//
@@
expression from,to,size,flag;
position p;
identifier l1,l2;
@@- to = \(kmalloc@p\|kzalloc@p\)(size,flag);
+ to = memdup_user(from,size);
if (
- to==NULL
+ IS_ERR(to)
|| ...) {
}
- if (copy_from_user(to, from, size) != 0) {
-
- }
//Signed-off-by: Julia Lawall
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use ERR_CAST(x) rather than ERR_PTR(PTR_ERR(x)). The former makes more
clear what is the purpose of the operation, which otherwise looks like a
no-op.The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)//
@@
type T;
T x;
identifier f;
@@T f (...) { }
@@
expression x;
@@- ERR_PTR(PTR_ERR(x))
+ ERR_CAST(x)
//Signed-off-by: Julia Lawall
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add a glue layer to support the sdhci driver on the ST SPEAr platform.
Signed-off-by: Viresh Kumar
Cc:
Cc: Linus Walleij
Cc: Russell King
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
SDIO specification allows RAW (Read after Write) operation using
IO_RW_DIRECT command (CMD52) by setting the RAW bit. This operation is
similar to ordinary read/write commands, except that both write and read
are performed using single command/response pair. The Linux SDIO layer
already supports this internaly, only external function is missing for
drivers to make use, which is added by this patch.This type of command is required to implement proper power save mode
support in wl1251 wifi driver.Android has similar patch for G1 in it's tree for the same reason:
http://android.git.kernel.org/?p=kernel/common.git;a=commitdiff;h=74a47786f6ecbe6c1cf9fb15efe6a968451deb52
Signed-off-by: Grazvydas Ignotas
Acked-by: Kalle Valo
Cc: Dmitry Shmidt
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Even though many mmc host drivers pass a pm_message_t argument to
mmc_suspend_host() that argument isn't used the by MMC core. As host
drivers are converted to dev_pm_ops they'll have to construct
pm_message_t's (as they won't be passed by the PM subsystem any more) just
to appease the mmc suspend interface.We might as well just delete the unused paramter.
Signed-off-by: Matt Fleming
Acked-by: Anton Vorontsov
Acked-by: Michal Miroslaw ZZ
Acked-by: Sascha Sommer
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Convert PM operations to use dev_pm_ops. This will facilitate the runtime
PM coversion which will add to dev_pm_ops hooks.Note that dev_pm_ops version of the suspend hook no longer takes a 'state'
argument. However, the MMC core function mmc_suspend_host() still takes a
'state' argument, but it is unused, so a dummy state variable was created
to pass to the MMC core.In the future, the MMC core should be converted to drop this state
argument and the rest of the MMC drivers could be easily converted to
dev_pm_ops as well.Signed-off-by: Kevin Hilman
Cc: Madhusudhan Chikkature
Cc: Adrian Hunter
Cc: Matt Fleming
Cc: Tony Lindgren
Cc: Denis Karpov
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The following changes were needed:
- do not use in_interrupt() because it will not work
with threaded interruptsIn addition, the following improvements were made:
- ensure DMA is unmapped only after the final DMA interrupt
- ensure a request is completed only after the final DMA interrupt
- disable controller interrupts when a request is not in progress
- remove the spin-lock protecting the start of a new request from
an unexpected interrupt because the locking was complicated and
a 'req_in_progress' flag suffices (since the spin-lock only defers
the unexpected interrupts anyway)
- instead use the spin-lock to protect the MMC interrupt handler
from the DMA interrupt handler
- remove the semaphore preventing DMA from being started while
the previous DMA is still in progress - the other changes make that
impossible, so it is now a BUG_ON condition
- ensure the controller interrupt status is clear before exiting
the interrrupt handlerIn general, these changes make the code safer but do not fix any specific
bugs so backporting is not necessary.Signed-off-by: Adrian Hunter
Tested-by: Venkatraman S
Acked-by: Madhusudhan Chikkature
Acked-by: Tony Lindgren
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Wifi over SDIO doesn't work correctly without multiblock, so enable this.
This patch depends on the following patches:Signed-off-by: Maurus Cuelenaere
Cc: Thomas Abraham
Cc: Ben Dooks
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Enable the ADMA feature in the 6410 SDHCI controller driver.
Signed-off-by: Maurus Cuelenaere
Signed-off-by: Thomas Abraham
Acked-by: Ben Dooks
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The s3c6410 sdhci controller does not support the 'End' attribute and NOP
attribute in the same 8-Byte ADMA descriptor. This patch adds a new quirk
to identify sdhci host contollers with such behaviour. In addition to
this, for controllers using the new quirk, the last entry in the ADMA
descritor table is marked with the 'End' attribute (instead of using a NOP
descriptor with 'End' attribute).Signed-off-by: Maurus Cuelenaere
Signed-off-by: Thomas Abraham
Acked-by: Ben Dooks
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Unfortunately some architectures #define their read{b,w,l} and
write{b,w,l} I/O accessors which makes the SDHCI I/O accessor functions of
the same names subject to preprocessing. This leads to the following
compiler error,In file included from drivers/mmc/host/sdhci.c:26:
drivers/mmc/host/sdhci.h:318:35: error: macro "writel" passed 3 arguments, but takes just 2Rename the SDHCI I/O functions so that CONFIG_MMC_SDHCI_IO_ACCESSORS can
be enabled for architectures that implement their read{b,w,l} and
write{b,w,l} functions with macros.Signed-off-by: Matt Fleming
Cc: Zhangfei Gao
Acked-by: Anton Vorontsov
Acked-by: Wolfram Sang
Acked-by: Ben Dooks
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds