31 Jul, 2012
40 commits
-
Introduce CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE and use this instead
of the multitude of #if defined() checks in atomic64_test.cSigned-off-by: Catalin Marinas
Cc: Russell King
Cc: Ralf Baechle
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Convert ext4_count_free() to use memweight() instead of table lookup
based counting clear bits implementation. This change only affects the
code segments enabled by EXT4FS_DEBUG.Note that this memweight() call can't be replaced with a single
bitmap_weight() call, although the pointer to the memory area is aligned
to long-word boundary. Because the size of the memory area may not be a
multiple of BITS_PER_LONG, then it returns wrong value on big-endian
architecture.This also includes the following change.
- Remove unnecessary map == NULL check in ext4_count_free() which
always takes non-null pointer as the memory area.Signed-off-by: Akinobu Mita
Cc: "Theodore Ts'o"
Cc: Andreas Dilger
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Convert ext3_count_free() to use memweight() instead of table lookup
based counting clear bits implementation. This change only affects the
code segments enabled by EXT3FS_DEBUG.Note that this memweight() call can't be replaced with a single
bitmap_weight() call, although the pointer to the memory area is aligned
to long-word boundary. Because the size of the memory area may not be a
multiple of BITS_PER_LONG, then it returns wrong value on big-endian
architecture.This also includes the following changes.
- Remove unnecessary map == NULL check in ext3_count_free() which
always takes non-null pointer as the memory area.- Fix printk format warning that only reveals with EXT3FS_DEBUG.
Signed-off-by: Akinobu Mita
Acked-by: Jan Kara
Cc: Andreas Dilger
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Convert ext2_count_free() to use memweight() instead of table lookup
based counting clear bits implementation. This change only affects the
code segments enabled by EXT2FS_DEBUG.Note that this memweight() call can't be replaced with a single
bitmap_weight() call, although the pointer to the memory area is aligned
to long-word boundary. Because the size of the memory area may not be a
multiple of BITS_PER_LONG, then it returns wrong value on big-endian
architecture.This also includes the following changes.
- Remove unnecessary map == NULL check in ext2_count_free() which
always takes non-null pointer as the memory area.- Fix printk format warning that only reveals with EXT2FS_DEBUG.
Signed-off-by: Akinobu Mita
Acked-by: Jan Kara
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use memweight to count the total number of bits set in memory area.
Signed-off-by: Akinobu Mita
Cc: Mark Fasheh
Cc: Joel Becker
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use memweight() to count the total number of bits set in memory area.
Signed-off-by: Akinobu Mita
Acked-by: Laurent Pinchart
Acked-by: Mauro Carvalho Chehab
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use memweight() to count the total number of bits set in memory area.
Signed-off-by: Akinobu Mita
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use memweight() to count the total number of bits set in memory area.
Signed-off-by: Akinobu Mita
Cc: Alasdair Kergon
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use memweight() to count the total number of bits clear in memory area.
Note that this memweight() call can't be replaced with a single
bitmap_weight() call, although the pointer to the memory area is aligned
to long-word boundary. Because the size of the memory area may not be a
multiple of BITS_PER_LONG, then it returns wrong value on big-endian
architecture.Signed-off-by: Akinobu Mita
Acked-by: Anders Larsen
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
memweight() is the function that counts the total number of bits set in
memory area. Unlike bitmap_weight(), memweight() takes pointer and size
in bytes to specify a memory area which does not need to be aligned to
long-word boundary.[akpm@linux-foundation.org: rename `w' to `ret']
Signed-off-by: Akinobu Mita
Cc: Anders Larsen
Cc: Alasdair Kergon
Cc: Laurent Pinchart
Cc: Mark Fasheh
Cc: Joel Becker
Cc: Jan Kara
Cc: Andreas Dilger
Cc: "Theodore Ts'o"
Cc: Matthew Wilcox
Cc: Mauro Carvalho Chehab
Cc: Tony Luck
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The lp855x header is used only in the platform side, so it can be moved
into platform_data directorySigned-off-by: Milo(Woogyom) Kim
Cc: Richard Purdie
Cc: Bryan Wu
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
ROM boundary definitions do not need to be exported because these are
used only internally in the lp855x driver.And few code cosmetic changes
Signed-off-by: Milo(Woogyom) Kim
Cc: Richard Purdie
Cc: Bryan Wu
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The devm_ functions allocate memory that is released when a driver
detaches. This patch uses devm_gpio_request_one() for these functions.Signed-off-by: Jingoo Han
Cc: Alberto Panizzo
Cc: Richard Purdie
Cc: Grant Likely
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The devm_ functions allocate memory that is released when a driver
detaches. This patch uses devm_gpio_request() for these functions.Signed-off-by: Jingoo Han
Cc: Eric Miao
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The devm_ functions allocate memory that is released when a driver
detaches. This patch uses devm_gpio_request() for these functions.Signed-off-by: Jingoo Han
Acked-by: Marek Vasut
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The devm_ functions allocate memory that is released when a driver
detaches. This patch uses devm_gpio_request() for these functions.Signed-off-by: Jingoo Han
Cc: Dmitry Baryshkov
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The devm_ functions allocate memory that is released when a driver
detaches. This patch uses devm_gpio_request() for these functions.Signed-off-by: Jingoo Han
Cc: Dmitry Baryshkov
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The devm_ functions allocate memory that is released when a driver
detaches. This patch uses devm_gpio_request() for these functions.Signed-off-by: Jingoo Han
Acked-by: Christian Gmeiner
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The devm_ functions allocate memory that is released when a driver
detaches. This patch uses devm_gpio_request() for these functions.Signed-off-by: Jingoo Han
Cc: Hans-Christian Egtvedt
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The devm_ functions allocate memory that is released when a driver
detaches. This patch uses devm_kzalloc of these functions.Signed-off-by: Jingoo Han
Acked-by: Johan Hovold
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The devm_ functions allocate memory that is released when a driver
detaches. This patch uses devm_kzalloc of these functionsSigned-off-by: Jingoo Han
Cc: Christian Gmeiner
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The devm_ functions allocate memory that is released when a driver
detaches. This patch uses devm_kzalloc of these functions.Signed-off-by: Jingoo Han
Acked-by: Hans-Christian Egtvedt
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add patterns for Exynos DP header to MAINTAINERS file.
Signed-off-by: Jingoo Han
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
There are many places in the kernel where the drivers print small buffers
as a hex string. This patch adds a support of the variable width buffer
to print it as a hex string with a delimiter. The idea came from Pavel
Roskin here: http://www.digipedia.pl/usenet/thread/18835/17449/Sample output of
pr_info("buf[%d:%d] %*phC\n", from, len, len, &buf[from]);
could be look like this:
[ 0.726130] buf[51:8] e8:16:b6:ef:e3:74:45:6e
[ 0.750736] buf[59:15] 31:81:b8:3f:35:49:06:ae:df:32:06:05:4a:af:55
[ 0.757602] buf[17:5] ac:16:d5:2c:efSigned-off-by: Andy Shevchenko
Cc: Joe Perches
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When using ALT+SysRq+Q all the pointers are replaced with "pK-error" like
this:[23153.208033] .base: pK-error
with echo h > /proc/sysrq-trigger it works:
[23107.776363] .base: ffff88023e60d540
The intent behind this behavior was to return "pK-error" in cases where
the %pK format specifier was used in interrupt context, because the
CAP_SYSLOG check wouldn't be meaningful. Clearly this should only apply
when kptr_restrict is actually enabled though.Reported-by: Stevie Trujillo
Signed-off-by: Dan Rosenberg
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Cc: Randy Dunlap
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Bluetooth uses mostly LE byte order which is reversed for visual
interpretation. Currently in Bluetooth in use unsafe batostr function.This is a slightly modified version of Joe's patch (sent Sat, Dec 4,
2010).Signed-off-by: Andrei Emeltchenko
Cc: Joe Perches
Cc: Marcel Holtmann
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Now that all KERN_ uses are prefixed with ASCII SOH, there is no
need for a KERN_CONT. Keep it backward compatible by adding #define
KERN_CONT ""Reduces kernel image size a thousand bytes.
Signed-off-by: Joe Perches
Cc: Kay Sievers
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
vprintk_emit() prefix parsing should only be done for internal kernel
messages. This allows existing behavior to be kept in all cases.Signed-off-by: Joe Perches
Cc: Kay Sievers
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Instead of "", use an ASCII SOH for the KERN_ prefix initiator.
This saves 1 byte per printk, thousands of bytes in a normal kernel.
No output changes are produced as vprintk_emit converts these uses to
"".Signed-off-by: Joe Perches
Cc: Kay Sievers
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Make the output logging routine independent of the KERN_ style.
Signed-off-by: Joe Perches
Cc: Kay Sievers
Cc: Takashi Iwai
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use the generic printk_get_level() to search a message for a kern_level.
Add __printf to verify format and arguments. Fix a few messages that
had mismatches in format and arguments. Add #ifdef CONFIG_PRINTK blocks
to shrink the object size a bit when not using printk.[akpm@linux-foundation.org: whitespace tweak]
Signed-off-by: Joe Perches
Cc: Kay Sievers
Cc: Chris Mason
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add #include so that the #define KERN_ macros
don't have to be duplicated.Signed-off-by: Joe Perches
Cc: Kay Sievers
Cc: Russell King
Cc: Kay Sievers
Acked-by: David Howells
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Separate the printk.h file into 2 pieces so the definitions can be used in
asm files.Signed-off-by: Joe Perches
Cc: Kay Sievers
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The current form of a KERN_ is "".
Add printk_get_level and printk_skip_level functions to handle these
formats.These functions centralize tests of KERN_ so a future modification
can change the KERN_ style and shorten the number of bytes consumed
by these headers.[akpm@linux-foundation.org: fix build error and warning]
Signed-off-by: Joe Perches
Cc: Kay Sievers
Cc: Wu Fengguang
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Reported-by: Andrew Morton
Signed-off-by: Kay Sievers
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Addresses https://bugzilla.kernel.org/show_bug.cgi?44431
Reported-by:
Signed-off-by: Alan Cox
Cc: Pavan Savoy
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
If argv_split() failed, the code will end up calling argv_free(NULL). Fix
it up and clean things up a bit.Addresses Coverity report 703573.
Cc: Cyrill Gorcunov
Cc: Kees Cook
Cc: Serge Hallyn
Cc: "Eric W. Biederman"
Cc: WANG Cong
Cc: Alan Cox
Cc: David Rientjes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
On the suspend/resume path the boot CPU does not go though an
offline->online transition. This breaks the NMI detector post-resume
since it depends on PMU state that is lost when the system gets
suspended.Fix this by forcing a CPU offline->online transition for the lockup
detector on the boot CPU during resume.To provide more context, we enable NMI watchdog on Chrome OS. We have
seen several reports of systems freezing up completely which indicated
that the NMI watchdog was not firing for some reason.Debugging further, we found a simple way of repro'ing system freezes --
issuing the command 'tasket 1 sh -c "echo nmilockup > /proc/breakme"'
after the system has been suspended/resumed one or more times.With this patch in place, the system freeze result in panics, as
expected.These panics provide a nice stack trace for us to debug the actual issue
causing the freeze.[akpm@linux-foundation.org: fiddle with code comment]
[akpm@linux-foundation.org: make lockup_detector_bootcpu_resume() conditional on CONFIG_SUSPEND]
[akpm@linux-foundation.org: fix section errors]
Signed-off-by: Sameer Nanda
Cc: Ingo Molnar
Cc: Peter Zijlstra
Cc: "Rafael J. Wysocki"
Cc: Don Zickus
Cc: Mandeep Singh Baines
Cc: Srivatsa S. Bhat
Cc: Anshuman Khandual
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
panic_lock is meant to ensure that panic processing takes place only on
one cpu; if any of the other cpus encounter a panic, they will spin
waiting to be shut down.However, this causes a regression in this scenario:
1. Cpu 0 encounters a panic and acquires the panic_lock
and proceeds with the panic processing.
2. There is an interrupt on cpu 0 that also encounters
an error condition and invokes panic.
3. This second invocation fails to acquire the panic_lock
and enters the infinite while loop in panic_smp_self_stop.Thus all panic processing is stopped, and the cpu is stuck for eternity
in the while(1) inside panic_smp_self_stop.To address this, disable local interrupts with local_irq_disable before
acquiring the panic_lock. This will prevent interrupt handlers from
executing during the panic processing, thus avoiding this particular
problem.Signed-off-by: Vikram Mulukutla
Reviewed-by: Stephen Boyd
Cc: Michael Holzheu
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds