Petr Holasek [Thu, 13 Jan 2011 01:00:34 +0000 (17:00 -0800)]
kpagecount: add slab page checking because _mapcount is in a union
Add a PageSlab() check before adding the _mapcount value to /kpagecount.
page->_mapcount is in a union with the SLAB structure so for pages
controlled by SLAB, page_mapcount() returns nonsense.
Signed-off-by: Petr Holasek <pholasek@redhat.com> Cc: Wu Fengguang <fengguang.wu@intel.com> Cc: Matt Mackall <mpm@selenic.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jesper Juhl [Thu, 13 Jan 2011 01:00:27 +0000 (17:00 -0800)]
reiserfs: make sure va_end() is always called after va_start().
A call to va_start() must always be followed by a call to va_end() in the
same function. In fs/reiserfs/prints.c::print_block() this is not always
the case. If 'bh' is NULL we'll return without calling va_end().
One could add a call to va_end() before the 'return' statement, but it's
nicer to just move the call to va_start() after the test for 'bh' being
NULL.
Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Edward Shishkin <edward.shishkin@gmail.com> Cc: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Davide Libenzi [Thu, 13 Jan 2011 01:00:25 +0000 (17:00 -0800)]
pipe: use event aware wakeups
Send the events the wakeup refers to, so that epoll, and even the new poll
code in fs/select.c can avoid wakeups if the events do not match the
requested set.
Signed-off-by: Davide Libenzi <davidel@xmailserver.org> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Wolfram Sang [Thu, 13 Jan 2011 01:00:23 +0000 (17:00 -0800)]
gpiolib: annotate gpio-intialization with __must_check
Because GPIOs can have crucial functions especially in embedded systems,
we are better safe than sorry regarding their configuration. For
gpio_request, the documentation is simply enforced: <quote>"The return
value of gpio_request() must be checked."</quote> For gpio_direction_* and
gpio_request_*, we now act accordingly.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Greg KH <gregkh@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tomoya MORINAGA [Thu, 13 Jan 2011 01:00:22 +0000 (17:00 -0800)]
gpio/ml_ioh_gpio: ML7213 GPIO driver
ML7213 is a companion chip for Intel Atom E6xx series. This driver can be
used for OKI SEMICONDUCTOR ML7213 IOH(Input/Output Hub) which is for
IVI(In-Vehicle Infotainment) use. This driver can access the IOH's GPIO
device.
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: Rabin Vincent <rabin.vincent@stericsson.com> Cc: Marc Zyngier <maz@misterjones.org> Cc: Linus Walleij <linus.walleij@stericsson.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andres Salomon [Thu, 13 Jan 2011 01:00:12 +0000 (17:00 -0800)]
cs5535: deprecate older cs5535_gpio driver
The newer drivers/gpio/cs5535-gpio.c replaces drivers/misc/cs5535_gpio.c.
The new driver has been in the tree for a little while, and has received
some testing; it's time to mark the old one as deprecated. I'm thinking
removal around 2.6.40 would be good, provided we're not missing critical
functionality in the newer driver.
Signed-off-by: Andres Salomon <dilinger@queued.net> Cc: Daniel Drake <dsd@laptop.org> Acked-by: Ben Gardner <bgardner@wabtec.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andres Salomon [Thu, 13 Jan 2011 01:00:11 +0000 (17:00 -0800)]
drivers/staging/olpc_dcon: convert to new cs5535 gpio API
Drop the old geode_gpio crud, as well as the raw outl() calls; instead,
use the Linux GPIO API where possible, and the cs5535_gpio API in other
places.
Note that we don't actually clean up the driver properly yet (once loaded,
it always remains loaded). That'll come later..
This patch is necessary for building the driver.
Signed-off-by: Andres Salomon <dilinger@queued.net> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andres Salomon [Thu, 13 Jan 2011 01:00:10 +0000 (17:00 -0800)]
drivers/gpio/cs5535-gpio.c: add some additional cs5535-specific GPIO functionality
This adds (well, re-adds actually) handling for events/IRQs through cs5535
GPIOs. In the wild and wooly world of CS5535, setup_event() is for
assigning an IRQ to a GPIO filter/event pair, and set_irq() sets up the
pair to trigger IRQs.
These should really only be used in highly platform-specific drivers (such
as OLPC's DCON driver). Sadly, because set_irq() uses MSRs, this causes
the driver to become X86-specific.
Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Daniel Drake <dsd@laptop.org> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Paul Gortmaker [Thu, 13 Jan 2011 01:00:08 +0000 (17:00 -0800)]
rtc: delete legacy MAINTAINERS entry
People stumble across the entry for the legacy PC specific RTC driver
entry in MAINTAINERS when they really want the multi-arch, multi-driver
RTC subsystem. So just delete the old entry that is causing the
confusion.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Paul Fox [Thu, 13 Jan 2011 01:00:07 +0000 (17:00 -0800)]
rtc-cmos: fix suspend/resume
rtc-cmos was setting suspend/resume hooks at the device_driver level.
However, the platform bus code (drivers/base/platform.c) only looks for
resume hooks at the dev_pm_ops level, or within the platform_driver.
Switch rtc_cmos to use dev_pm_ops so that suspend/resume code is executed
again.
Paul said:
: The user visible symptom in our (XO laptop) case was that rtcwake would
: fail to wake the laptop. The RTC alarm would expire, but the wakeup
: wasn't unmasked.
:
: As for severity, the impact may have been reduced because if I recall
: correctly, the bug only affected platforms with CONFIG_PNP disabled.
Signed-off-by: Paul Fox <pgf@laptop.org> Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Cc: <stable@kernel.org> [2.6.37.x] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Axel Lin [Thu, 13 Jan 2011 01:00:05 +0000 (17:00 -0800)]
drivers/rtc/rtc-omap.c: fix a memory leak
request_mem_region() will call kzalloc to allocate memory for struct
resource. release_resource() unregisters the resource but does not free
the allocated memory, thus use release_mem_region() instead to fix the
memory leak.
Also add a missing iounmap() in omap_rtc_remove().
Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Sekhar Nori <nsekhar@ti.com> Cc: Kevin Hilman <khilman@deeprootsystems.com> Cc: Tony Lindgren <tony@atomide.com> Acked-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Yannick Heneault [Thu, 13 Jan 2011 01:00:04 +0000 (17:00 -0800)]
vgacon: check for efi machine
It seems there is a small problem of VGA palette corruption on EFI
machine. When the kernel initializes the architecture, it checks if the
machine is a EFI machine and assumes that a VGA console can exist.
When it initializes the console in vgacon_startup it checks if it can
really use the VGA console. I think this is where a check is missing.
Currently, the function can fail if a VESA boot mode is detected but not if
a EFI boot mode was used.
Thus vgacon_startup() doesn't fail and initialize the video card for a real
VGA mode. This function changes the first 16entries of the VGA palette.
When the efifb driver kicks in, the palette is not restored to default
ramp value, thus the 16 first entry remain in a modified state. The
following patch prevent this corruption.
Signed-off-by: Yannick Heneault <yheneaul@matrox.com> Cc: Dave Airlie <airlied@linux.ie> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Vasiliy Kulikov [Thu, 13 Jan 2011 01:00:00 +0000 (17:00 -0800)]
fs/select.c: fix information leak to userspace
On some architectures __kernel_suseconds_t is int. On these archs struct
timeval has padding bytes at the end. This struct is copied to userspace
with these padding bytes uninitialized. This leads to leaking of contents
of kernel stack memory.
[akpm@linux-foundation.org: avoid the memset on architectures which don't need it] Signed-off-by: Vasiliy Kulikov <segooon@gmail.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dave Jones [Thu, 13 Jan 2011 00:59:59 +0000 (16:59 -0800)]
checkpatch: check for world-writeable sysfs/debugfs files
Exporting world writable sysfs/debugfs files is usually a bad thing. Warn
about it.
Signed-off-by: Dave Jones <davej@redhat.com> Cc: Andy Whitcroft <apw@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Rientjes [Thu, 13 Jan 2011 00:59:55 +0000 (16:59 -0800)]
flex_array: export symbols to modules
Alex said:
I want to use flex_array to store a sparse array of ATM cell
re-assembly buffers for my ATM over Ethernet driver. Using the per-vcc
user_back structure causes problems when stacked with things like
br2684.
Add EXPORT_SYMBOL() for all publically accessible flex array functions
and move to obj-y so that modules may use this library.
Signed-off-by: David Rientjes <rientjes@google.com> Cc: Dave Hansen <dave@linux.vnet.ibm.com> Cc: Paul Mundt <lethal@linux-sh.org> Reported-by: Alex Bennee <kernel-hacker@bennee.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
There's a maintainer entry, but no named individual, so the script doesn't
use git history via --git-fallback.
This is also a defect for MAINTAINERS with status entries marked "Orphan"
or "Odd fixes".
The script now checks a section for any "M:" entry and that an "S:" entry
is supported or maintained. If both those conditions are not satisified,
use --git-fallback as appropriate.
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joe Perches [Thu, 13 Jan 2011 00:59:49 +0000 (16:59 -0800)]
scripts/get_maintainer.pl: make --rolestats the default
This script now requires a user to add --norolestats to the command line
so it's harder to feed the output of this script to programs that send
mass emails.
Update --help to correct command line defaults.
Change version to 0.26.
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Anton Arapov [Thu, 13 Jan 2011 00:59:49 +0000 (16:59 -0800)]
lib/vsprintf.c: fix vscnprintf() if @size is == 0
vscnprintf() should return 0 if @size is == 0. Update the comment for it,
as @size is unsigned.
This change based on the code of commit b903c0b8899b46829a9b80ba55b61079b35940ec ("lib: fix scnprintf() if @size
is == 0") moves the real fix into vscnprinf() from scnprintf() and makes
scnprintf() call vscnprintf(), thus avoid code duplication.
Signed-off-by: Anton Arapov <aarapov@redhat.com> Acked-by: Changli Gao <xiaosuo@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joe Perches [Thu, 13 Jan 2011 00:59:43 +0000 (16:59 -0800)]
include/linux/printk.h: move console functions and variables together
There are many uses of printk_once(KERN_<level>, so add pr_<level>_once
macros to avoid printk_once(KERN_<level> pr_fmt(fmt).
Add an #ifdef CONFIG_PRINTK for print_hex_dump and static inline void
functions for the #else cases to reduce embedded code size. Neaten and
organize the rest of the code.
This patch:
Move console functions and variables together.
Signed-off-by: Joe Perches <joe@perches.com> Cc: Matt Mackall <mpm@selenic.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Huang Ying [Thu, 13 Jan 2011 00:59:43 +0000 (16:59 -0800)]
printk: use RCU to prevent potential lock contention in kmsg_dump
dump_list_lock is used to protect dump_list in kmsg_dumper implementation,
kmsg_dump() uses it to traverse dump_list too. But if there is contention
on the lock, kmsg_dump() will fail, and the valuable kernel message may be
lost.
This patch solves this issue with RCU. Because kmsg_dump() only read the
list, no lock is needed in kmsg_dump(). So that kmsg_dump() will never
fail because of lock contention.
Dan Carpenter [Thu, 13 Jan 2011 00:59:42 +0000 (16:59 -0800)]
dca: remove unneeded NULL check
The return here doesn't release the locks or re-enable IRQs. But as
Andrew Morton points out, domain is never NULL. list_first_entry()
essentially never returns NULL and also we already verified that the list
is not empty.
Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com> Cc: David Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dan Rosenberg [Thu, 13 Jan 2011 00:59:41 +0000 (16:59 -0800)]
kptr_restrict for hiding kernel pointers from unprivileged users
Add the %pK printk format specifier and the /proc/sys/kernel/kptr_restrict
sysctl.
The %pK format specifier is designed to hide exposed kernel pointers,
specifically via /proc interfaces. Exposing these pointers provides an
easy target for kernel write vulnerabilities, since they reveal the
locations of writable structures containing easily triggerable function
pointers. The behavior of %pK depends on the kptr_restrict sysctl.
If kptr_restrict is set to 0, no deviation from the standard %p behavior
occurs. If kptr_restrict is set to 1, the default, if the current user
(intended to be a reader via seq_printf(), etc.) does not have CAP_SYSLOG
(currently in the LSM tree), kernel pointers using %pK are printed as 0's.
If kptr_restrict is set to 2, kernel pointers using %pK are printed as
0's regardless of privileges. Replacing with 0's was chosen over the
default "(null)", which cannot be parsed by userland %p, which expects
"(nil)".
[akpm@linux-foundation.org: check for IRQ context when !kptr_restrict, save an indent level, s/WARN/WARN_ONCE/]
[akpm@linux-foundation.org: coding-style fixup]
[randy.dunlap@oracle.com: fix kernel/sysctl.c warning] Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: James Morris <jmorris@namei.org> Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: Thomas Graf <tgraf@infradead.org> Cc: Eugene Teo <eugeneteo@kernel.org> Cc: Kees Cook <kees.cook@canonical.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: David S. Miller <davem@davemloft.net> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Eric Paris <eparis@parisplace.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Amerigo Wang [Thu, 13 Jan 2011 00:59:39 +0000 (16:59 -0800)]
kernel: clean up USE_GENERIC_SMP_HELPERS
For arch which needs USE_GENERIC_SMP_HELPERS, it has to select
USE_GENERIC_SMP_HELPERS, rather than leaving a choice to user, since they
don't provide their own implementions.
Also, move on_each_cpu() to kernel/smp.c, it is strange to put it in
kernel/softirq.c.
For arch which doesn't use USE_GENERIC_SMP_HELPERS, e.g. blackfin, only
on_each_cpu() is compiled.
Signed-off-by: Amerigo Wang <amwang@redhat.com> Cc: David Howells <dhowells@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Yinghai Lu <yinghai@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Chris Ruffin [Thu, 13 Jan 2011 00:59:38 +0000 (16:59 -0800)]
ihex: fix unused return value compiler warning
Fix unusued return value compiler warnings due to unchecked write() calls.
[akpm@linux-foundation.org: correctly handle short writes] Signed-off-by: Chris Ruffin <cmruffin@gmail.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Shaohua Li [Thu, 13 Jan 2011 00:59:38 +0000 (16:59 -0800)]
include/asm-generic/vmlinux.lds.h: make readmostly section correctly align
The readmostly section should end at a cacheline aligned address,
otherwise the last several data might share cachline with other data and
make the readmostly data still have cache bounce.
For example, in ia64, secpath_cachep is the last readmostly data, and it
shares cacheline with init_uts_ns.
Andrew Morton [Thu, 13 Jan 2011 00:59:37 +0000 (16:59 -0800)]
include/linux/unaligned/packed_struct.h: use __packed
Cc: Will Newton <will.newton@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andrew Morton [Thu, 13 Jan 2011 00:59:35 +0000 (16:59 -0800)]
include/linux/kernel.h: abs(): fix handling of 32-bit unsigneds on 64-bit
Michal reports:
In the framebuffer subsystem the abs() macro is often used as a part of
the calculation of a Manhattan metric, which in turn is used as a measure
of similarity between video modes. The arguments of abs() are sometimes
unsigned numbers. This worked fine until commit a49c59c0 ("Make sure the
value in abs() does not get truncated if it is greater than 2^32:) , which
changed the definition of abs() to prevent truncation. As a result of
this change, in the following piece of code:
u32 a = 0, b = 1;
u32 c = abs(a - b);
'c' will end up with a value of 0xffffffff instead of the expected 0x1.
A problem caused by this change and visible by the end user is that
framebuffer drivers relying on functions from modedb.c will fail to find
high resolution video modes similar to that explicitly requested by the
user if an exact match cannot be found (see e.g.
Fix this by special-casing `long' types within abs().
This patch reduces x86_64 code size a bit - drivers/video/uvesafb.o shrunk
by 15 bytes, presumably because it is doing abs() on 4-byte quantities,
and expanding those to 8-byte longs adds code.
Occasionally the system gets into a state where the CMOS clock has gotten
slightly ahead of current time and the periodic update of RTC fails. The
message is a nuisance and repeats spamming the log.
Seiji Aguchi [Thu, 13 Jan 2011 00:59:30 +0000 (16:59 -0800)]
kmsg_dump: add kmsg_dump() calls to the reboot, halt, poweroff and emergency_restart paths
We need to know the reason why system rebooted in support service.
However, we can't inform our customers of the reason because final
messages are lost on current Linux kernel.
This patch improves the situation above because the final messages are
saved by adding kmsg_dump() to reboot, halt, poweroff and
emergency_restart path.
Signed-off-by: Seiji Aguchi <seiji.aguchi@hds.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Marco Stornelli <marco.stornelli@gmail.com> Reviewed-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Seiji Aguchi [Thu, 13 Jan 2011 00:59:29 +0000 (16:59 -0800)]
kmsg_dump: constrain mtdoops and ramoops to perform their actions only for KMSG_DUMP_PANIC
This series aims to develop logging facility for enterprise use.
It is important to save kernel messages reliably on enterprise system
because they are helpful for diagnosing system.
This series add kmsg_dump() to the paths loosing kernel messages. The use
case is the following.
[Use case of reboot/poweroff/halt/emergency_restart]
My company has often experienced the followings in our support service.
- Customer's system suddenly reboots.
- Customers ask us to investigate the reason of the reboot.
We recognize the fact itself because boot messages remain in
/var/log/messages. However, we can't investigate the reason why the
system rebooted, because the last messages don't remain. And off course
we can't explain the reason.
We can solve above problem with this patch as follows.
Case1: reboot with command
- We can see "Restarting system with command:" or ""Restarting system.".
Case2: halt with command
- We can see "System halted.".
Case3: poweroff with command
- We can see " Power down.".
Case4: emergency_restart with sysrq.
- We can see "Sysrq:" outputted in __handle_sysrq().
Case5: emergency_restart with softdog.
- We can see "Initiating system reboot" in watchdog_fire().
So, we can distinguish the reason of reboot, poweroff, halt and emergency_restart.
If customer executed reboot command, you may think the customer should
know the fact. However, they often claim they don't execute the command
when they rebooted system by mistake.
No message remains on the current Linux kernel, so we can't show the proof
to the customer. This patch improves this situation.
This patch:
Alters mtdoops and ramoops to perform their actions only for
KMSG_DUMP_PANIC, KMSG_DUMP_OOPS and KMSG_DUMP_KEXEC because they would
like to log crashes only.
Signed-off-by: Seiji Aguchi <seiji.aguchi@hds.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Marco Stornelli <marco.stornelli@gmail.com> Reviewed-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Akinobu Mita [Thu, 13 Jan 2011 00:59:28 +0000 (16:59 -0800)]
uml: use simple_write_to_buffer()
Simplify write file operation for mmapper by using
simple_write_to_buffer().
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Randy Dunlap [Thu, 13 Jan 2011 00:59:27 +0000 (16:59 -0800)]
uml: mmapper_kern needs MODULE_LICENSE
Add missing MODULE_LICENSE():
WARNING: modpost: missing MODULE_LICENSE() in arch/um/drivers/mmapper_kern.o
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Greg Lonnon <glonnon@ridgerun.com> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Will Newton [Thu, 13 Jan 2011 00:59:26 +0000 (16:59 -0800)]
arch/um/drivers/line.c: safely iterate over list of winch handlers
unregister_winch() should use list_for_each_safe(), as it can delete from
the list.
Signed-off-by: Will Newton <will.newton@gmail.com> Cc: richard -rw- weinberger <richard.weinberger@gmail.com> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Currently CONFIG_HIGHMEM is broken on User Mode Linux. I'm not sure if it
worked ever.
It doesn't compile and this breaks randomconfig testing.
Signed-off-by: Richard Weinberger <richard@nod.at> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The reset command is part of the init sequence and it take effect
only if the lcd is powered.
The effect of the bug was that the sequence:
set lcd power_state to FB_BLANK_POWERDOWN
set lcd power_state to FB_BLANK_UNBLANK
Did not produced a complete reboot of the LCD which was showing fuzzy
colours.
This was not experienced before implementing correctly all the LCD power
states with the patch [1]. Since before the patch [1] the regulators were
not touched and the LCD shutdown was reached with a register write. After
the patch [1] a complete boot sequence with an initial reset is needed for
the display every time the LCD is powered up.
Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tejun Heo <tj@kernel.org> Cc: Axel Lin <axel.lin@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Alberto Panizzo [Thu, 13 Jan 2011 00:59:23 +0000 (16:59 -0800)]
drivers/video/backlight/l4f00242t03.c: prevent unbalanced calls to regulator enable/disable
Otherwise a double call to:
$ echo 4 > /sys/class/lcd/l4f00242t03/lcd_power
Will, the first power down the lcd and regulators correctly and the
second produce an unbalanced call to regulator disable.
Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tejun Heo <tj@kernel.org> Cc: Axel Lin <axel.lin@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Alberto Panizzo [Thu, 13 Jan 2011 00:59:22 +0000 (16:59 -0800)]
drivers/video/backlight/l4f00242t03.c: full implement fb power states for this lcd
Complete the support of fb power states managing correctly the regulators
bound to this driver.
Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tejun Heo <tj@kernel.org> Cc: Axel Lin <axel.lin@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
leds: add output inversion option to backlight trigger
Extend the LED backlight tirgger driver with an option that allows for
inverting the trigger output polarity.
With the invertion option provided, I (ab)use the backlight trigger for
driving a LED that indicates LCD display blank condtition on my Amstrad
Delta videophone. Since the machine has no dedicated power LED, it was
not possible to distinguish if the display was blanked, or the machine was
turned off, without touching it.
The invert sysfs control is patterned after a similiar function of the GPIO
trigger driver.
[akpm@linux-foundation.org: make output match input, tighten input checking]
[akpm@linux-foundation.org: make output match input, tighten input checking] Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Cc: Paul Mundt <lethal@linux-sh.org> Acked-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Arun Murthy [Thu, 13 Jan 2011 00:59:20 +0000 (16:59 -0800)]
leds-lp5521: modify the way of setting led device name
Currently the led device name is fetched from the device_type in
I2C_BOARD_INFO which comes from the platform data. This name is in turn
used to create an entry in sysfs.
If there exists two or more lp5521 on a particular platform, the
device_type in I2C_BOARD_INFO has to be the same, else lp5521 driver probe
wont be called and if used so, results in run time warning "cannot create
sysfs with same name" and hence a failure.
The name that is used to create sysfs entry is to be passed by the struct
led_platform_data. Hence adding an element of type const char * and
change in lp5521 driver to use this name in creating the led device if
present else use the name obtained by I2C_BOARD_INFO.
Signed-off-by: Arun Murthy <arun.murthy@stericsson.com> Acked-by: Samu Onkalo <samu.p.onkalo@nokia.com> Cc: Ilkka Koskinen <ilkka.koskinen@nokia.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Samu Onkalo [Thu, 13 Jan 2011 00:59:19 +0000 (16:59 -0800)]
leds: lp5521: fix circular locking
Driver contained possibility for circular locking.
One lock is held by sysfs-core and another one by the driver itself. This
happened when the driver created or removed sysfs entries dynamically.
There is no real need to do those operations. Now all the sysfs entries
are created at probe and removed at removal. Engine load sysfs entries
are now visible all the time. However, access to the entries fails if the
engine is disabled or running.
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Cc: Arun Murthy <arun.murthy@stericsson.com> Reviewed-by: Ilkka Koskinen <ilkka.koskinen@nokia.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Samu Onkalo [Thu, 13 Jan 2011 00:59:18 +0000 (16:59 -0800)]
leds: lp5523: fix circular locking
Driver contained possibility for circular locking.
One lock is held by sysfs-core and another one by the driver itself. This
happened when the driver created or removed sysfs entries dynamically.
There is no real need to do those operations. Now all the sysfs entries
are created at probe and removed at removal. Engine load and mux
configuration sysfs entries are now visible all the time. However, access
to the entries fails if the engine is disabled or running.
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Cc: Arun Murthy <arun.murthy@stericsson.com> Reviewed-by: Ilkka Koskinen <ilkka.koskinen@nokia.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Samu Onkalo [Thu, 13 Jan 2011 00:59:17 +0000 (16:59 -0800)]
leds: leds-lp5523: modify the way of setting led device name
Currently all leds channels begins with string lp5523. Patch adds a
possibility to provide name via platform data. This makes it possible to
have several chips without overlapping sysfs names.
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Cc: Arun Murthy <arun.murthy@stericsson.com> Cc: Ilkka Koskinen <ilkka.koskinen@nokia.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Axel Lin [Thu, 13 Jan 2011 00:59:15 +0000 (16:59 -0800)]
leds: leds-pca9532 cleanups
- Remove unneeded input_free_device() after input_unregister_device().
- Add pca9532_destroy_devices() function for destroy devices.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Dmitry Torokhov <dtor@mail.ru> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The code doesn't check first sscanf() return value. If first sscanf()
failed then c contains some garbage. It might lead to reading
uninitialised stack data in the second sscanf() call.
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 12 Jan 2011 16:40:25 +0000 (08:40 -0800)]
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (39 commits)
i915/gtt: fix ordering causing DMAR errors on object teardown.
i915/gtt: fix ordering issues with status setup and DMAR
drm/i915/execbuffer: Reorder binding of objects to favour restrictions
drm/i915: If we hit OOM when allocating GTT pages, clear the aperture
drm/i915/evict: Ensure we completely cleanup on failure
drm/i915/execbuffer: Correctly clear the current object list upon EFAULT
drm/i915/debugfs: Show all objects in the gtt
drm/i915: Record AGP memory type upon error
drm/i915: Periodically flush the active lists and requests
drm/i915/gtt: Unmap the PCI pages after unbinding them from the GTT
drm/i915: Record the error batchbuffer on each ring
drm/i915: Include TLB miss overhead for computing WM
drm/i915: Propagate error from flushing the ring
drm/i915: detect & report PCH display error interrupts
drm/i915: cleanup rc6 code
drm/i915: fix rc6 enabling around suspend/resume
drm/i915: re-enable rc6 support for Ironlake+
drm/i915: Make the ring IMR handling private
drm/i915/ringbuffer: Simplify the ring irq refcounting
drm/i915/debugfs: Show the per-ring IMR
...
* git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-ktest: (30 commits)
ktest: Ask for the manditory config options instead of just failing
ktest: Copy the last good and bad configs in config_bisect
ktest: For grub reboot, use run_ssh instead of run_command
ktest: Added force stop after success and failure
ktest: Parse off the directory name in useconfig for failures
ktest: Use different temp config name for minconfig
ktest: Updated the sample.conf for the latest options
ktest: Added compare script to test ktest.pl to sample.conf
ktest: Added config_bisect test type
ktest/cleanups: Added version 0.2, ssh as options
ktest: Output something easy to parse for failure or success
ktest: Allow a test case to undefine a default value
ktest: Use $output_config instead of typing $outputdir/.config
ktest: Write to stdout if no log file is given
ktest: Use oldnoconfig instead of yes command
ktest: Update the sample config file with more documentation
ktest: New TEST_START instead of using [], and use real SHA1s
ktest: Add poweroff after halt and powercycle after reboot
ktest: Add POST_INSTALL to allow initrds to be created
ktest: Added sample.conf, new %default option format
...
Linus Torvalds [Wed, 12 Jan 2011 16:37:35 +0000 (08:37 -0800)]
Merge branch 'stable/xenbus' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
* 'stable/xenbus' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
xen/xenbus: making backend support modular is too complex
xen/pci: Make xen-pcifront be dependent on XEN_XENBUS_FRONTEND
xen/xenbus: fixup checkpatch issues in xenbus_probe*
xen/netfront: select XEN_XENBUS_FRONTEND
xen/xenbus: clean up noise in xenbus_probe_frontend.c
xen/xenbus: clean up noise in xenbus_probe_backend.c
xen/xenbus: clean up noise in xenbus_probe.c
xen/xenbus: cleanup debug noise in xenbus_comms.c
xen/xenbus: clean up error handling
xen/xenbus: make frontend bus GPL
xen/xenbus: make sure backend bus is registered earlier
xenbus/frontend: register bus earlier
xen: remove xen/evtchn.h
xen: add backend driver support
xen: separate out frontend xenbus
NTFS: writev() fix and maintenance/contact details update
Fix writev() to not keep writing the first segment over and over again
instead of moving onto subsequent segments and update the NTFS entry in
MAINTAINERS to reflect that Tuxera Inc. now supports the NTFS driver.
Signed-off-by: Anton Altaparmakov <anton@tuxera.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Len Brown [Sat, 23 Oct 2010 03:53:03 +0000 (23:53 -0400)]
tools: create power/x86/x86_energy_perf_policy
MSR_IA32_ENERGY_PERF_BIAS first became available on Westmere Xeon.
It is implemented in all Sandy Bridge processors -- mobile, desktop and server.
It is expected to become increasingly important in subsequent generations.
x86_energy_perf_policy is a user-space utility to set the
hardware energy vs performance policy hint in the processor.
Most systems would benefit from "x86_energy_perf_policy normal"
at system startup, as the hardware default is maximum performance
at the expense of energy efficiency.
See x86_energy_perf_policy.8 man page for more information.
Background:
Linux-2.6.36 added "epb" to /proc/cpuinfo to indicate
if an x86 processor supports MSR_IA32_ENERGY_PERF_BIAS,
without actually modifying the MSR.
In March, 2010, Venkatesh Pallipadi proposed a small driver
that programmed MSR_IA32_ENERGY_PERF_BIAS, based on
the cpufreq governor in use. It also offered
a boot-time cmdline option to override.
http://lkml.org/lkml/2010/3/4/457
But hiding the hardware policy behind the
governor choice was deemed "kinda icky".
In June, 2010, I proposed a generic user/kernel API to
generalize the power/performance policy trade-off.
"RFC: /sys/power/policy_preference"
http://lkml.org/lkml/2010/6/16/399
That is my preference for implementing this capability,
but I received no support on the list.
So in September, 2010, I sent x86_energy_perf_policy.c to LKML,
a user-space utility that scribbles directly to the MSR.
http://lkml.org/lkml/2010/9/28/246
Here is that same utility, after responding to some review feedback,
to live in tools/power/, where it is easily found.
Len Brown [Sat, 23 Oct 2010 03:53:03 +0000 (23:53 -0400)]
tools: create power/x86/turbostat
turbostat is a Linux tool to observe proper operation
of Intel(R) Turbo Boost Technology.
turbostat displays the actual processor frequency
on x86 processors that include APERF and MPERF MSRs.
Note that turbostat is of limited utility on Linux
kernels 2.6.29 and older, as acpi_cpufreq cleared
APERF/MPERF up through that release.
On Intel Core i3/i5/i7 (Nehalem) and newer processors,
turbostat also displays residency in idle power saving states,
which are necessary for diagnosing any cpuidle issues
that may have an effect on turbo-mode.
Dave Airlie [Wed, 12 Jan 2011 01:38:37 +0000 (11:38 +1000)]
i915/gtt: fix ordering issues with status setup and DMAR
This code was setting up the status page before setting the DMAR-is-on-bit,
so we were getting DMAR errors on the status page. Reverse the two bits
of init code to the correct result.
Dave Airlie [Wed, 12 Jan 2011 00:49:03 +0000 (10:49 +1000)]
Merge branch 'drm-intel-fixes' of ssh://master.kernel.org/pub/scm/linux/kernel/git/ickle/drm-intel
* 'drm-intel-fixes' of ssh://master.kernel.org/pub/scm/linux/kernel/git/ickle/drm-intel: (37 commits)
drm/i915/execbuffer: Reorder binding of objects to favour restrictions
drm/i915: If we hit OOM when allocating GTT pages, clear the aperture
drm/i915/evict: Ensure we completely cleanup on failure
drm/i915/execbuffer: Correctly clear the current object list upon EFAULT
drm/i915/debugfs: Show all objects in the gtt
drm/i915: Record AGP memory type upon error
drm/i915: Periodically flush the active lists and requests
drm/i915/gtt: Unmap the PCI pages after unbinding them from the GTT
drm/i915: Record the error batchbuffer on each ring
drm/i915: Include TLB miss overhead for computing WM
drm/i915: Propagate error from flushing the ring
drm/i915: detect & report PCH display error interrupts
drm/i915: cleanup rc6 code
drm/i915: fix rc6 enabling around suspend/resume
drm/i915: re-enable rc6 support for Ironlake+
drm/i915: Make the ring IMR handling private
drm/i915/ringbuffer: Simplify the ring irq refcounting
drm/i915/debugfs: Show the per-ring IMR
drm/i915: Mask USER interrupts on gen6 (until required)
drm/i915: Handle ringbuffer stalls when flushing
...
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (67 commits)
cxgb4vf: recover from failure in cxgb4vf_open()
netfilter: ebtables: make broute table work again
netfilter: fix race in conntrack between dump_table and destroy
ah: reload pointers to skb data after calling skb_cow_data()
ah: update maximum truncated ICV length
xfrm: check trunc_len in XFRMA_ALG_AUTH_TRUNC
ehea: Increase the skb array usage
net/fec: remove config FEC2 as it's used nowhere
pcnet_cs: add new_id
tcp: disallow bind() to reuse addr/port
net/r8169: Update the function of parsing firmware
net: ppp: use {get,put}_unaligned_be{16,32}
CAIF: Fix IPv6 support in receive path for GPRS/3G
arp: allow to invalidate specific ARP entries
net_sched: factorize qdisc stats handling
mlx4: Call alloc_etherdev to allocate RX and TX queues
net: Add alloc_netdev_mqs function
caif: don't set connection request param size before copying data
cxgb4vf: fix mailbox data/control coherency domain race
qlcnic: change module parameter permissions
...