pandora-kernel.git
15 years agosched: make scheduler sysfs attributes sysdev class devices
Andi Kleen [Wed, 30 Jul 2008 05:33:52 +0000 (22:33 -0700)]
sched: make scheduler sysfs attributes sysdev class devices

They are really class devices, but were incorrectly declared.  This
leads to crashes with the recent changes that makes non normal sysdevs
use a different prototype.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Pierre Ossman <drzeus-list@drzeus.cx>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agortc-dev: stop periodic interrupts on device release
Tomas Janousek [Wed, 30 Jul 2008 05:33:51 +0000 (22:33 -0700)]
rtc-dev: stop periodic interrupts on device release

Solves http://bugzilla.kernel.org/show_bug.cgi?id=11127

The old rtc.c driver did it and some drivers (like rtc-sh) do it in their
release function, though they should not -- because they should provide
the irq_set_state op and the rtc framework itself should care about it.
This patch makes it do so.

I am aware that some drivers, like rtc-sh, handle userspace PIE sets in
their ioctl op (instead of having the framework call the op), exporting
the irq_set_state op at the same time.  The logic in rtc_irq_set_state
should make sure it doesn't matter and the driver should not need to care
stopping periodic interrupts in its release routine any more.

The correct way, in my opinion, should be this:
1) The driver provides the irq_set_state op and does not care closing the
   interrupts in its release op.
2) If the driver does not provide the op and handles PIE in the ioctl op, it's
   reponsible for closing them in its release op.
3) Something similar for other IRQs, like UIE -- if there's no in-kernel API
   like irq_set_state, handle it in ioctl and release ops. The framework will
   be responsible either for everything or for nothing. (This will probably
   change later.)

Signed-off-by: Tomas Janousek <tomi@nomi.cz>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agogbefb: cmap FIFO timeout
Thomas Bogendoerfer [Wed, 30 Jul 2008 05:33:49 +0000 (22:33 -0700)]
gbefb: cmap FIFO timeout

Writes to the cmap fifo while the display is blanked caused cmap FIFO
timeout messages and a wrong colormap.  To avoid this the driver now
maintains a colormap in memory and updates the colormap after the display
is unblanked.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoworkqueues: add comments to __create_workqueue_key()
Oleg Nesterov [Wed, 30 Jul 2008 05:33:49 +0000 (22:33 -0700)]
workqueues: add comments to __create_workqueue_key()

Dmitry Adamushko pointed out that the error handling in
__create_workqueue_key() is not clear, add the comment.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Dmitry Adamushko <dmitry.adamushko@gmail.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>
15 years agofs/buffer.c: uninline __remove_assoc_queue()
Thomas Petazzoni [Wed, 30 Jul 2008 05:33:47 +0000 (22:33 -0700)]
fs/buffer.c: uninline __remove_assoc_queue()

Uninline the __remove_assoc_queue() function in fs/buffer.c, called at too
many places and too long to really be inlined.  Size results:

   text    data     bss     dec     hex filename
1134606  118840  212992 1466438  166046 vmlinux.old
1134303  118840  212992 1466135  165f17 vmlinux
   -303       0       0    -303    -12F +/-

This patch is part of the Linux Tiny project and has been originally
written by Matt Mackall <mpm@selenic.com>.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.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>
15 years agoomfs: sparse annotations
Harvey Harrison [Wed, 30 Jul 2008 05:33:46 +0000 (22:33 -0700)]
omfs: sparse annotations

Missing cpu_to_be64 on some constant assignments.
fs/omfs/dir.c:107:16: warning: incorrect type in assignment (different base types)
fs/omfs/dir.c:107:16:    expected restricted __be64 [usertype] i_sibling
fs/omfs/dir.c:107:16:    got unsigned long long
fs/omfs/file.c:33:13: warning: incorrect type in assignment (different base types)
fs/omfs/file.c:33:13:    expected restricted __be64 [usertype] e_next
fs/omfs/file.c:33:13:    got unsigned long long
fs/omfs/file.c:36:24: warning: incorrect type in assignment (different base types)
fs/omfs/file.c:36:24:    expected restricted __be64 [usertype] e_cluster
fs/omfs/file.c:36:24:    got unsigned long long
fs/omfs/file.c:37:23: warning: incorrect type in assignment (different base types)
fs/omfs/file.c:37:23:    expected restricted __be64 [usertype] e_blocks
fs/omfs/file.c:37:23:    got unsigned long long

fs/omfs/bitmap.c:74:18: warning: incorrect type in argument 2 (different signedness)
fs/omfs/bitmap.c:74:18:    expected unsigned long volatile *addr
fs/omfs/bitmap.c:74:18:    got long *<noident>
fs/omfs/bitmap.c:77:20: warning: incorrect type in argument 2 (different signedness)
fs/omfs/bitmap.c:77:20:    expected unsigned long volatile *addr
fs/omfs/bitmap.c:77:20:    got long *<noident>
fs/omfs/bitmap.c:112:17: warning: incorrect type in argument 2 (different signedness)
fs/omfs/bitmap.c:112:17:    expected unsigned long volatile *addr
fs/omfs/bitmap.c:112:17:    got long *<noident>

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoscripts/mod/modpost.c: fix spelling of module and happens
Ben Dooks [Wed, 30 Jul 2008 05:33:44 +0000 (22:33 -0700)]
scripts/mod/modpost.c: fix spelling of module and happens

Spelling fixes in scripts/mod/modpost.c

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoremove drivers/serial/v850e_uart.c
Adrian Bunk [Wed, 30 Jul 2008 05:33:44 +0000 (22:33 -0700)]
remove drivers/serial/v850e_uart.c

The removal of drivers/serial/v850e_uart.c originally was in my v850
removal patch, but it seems it got lost somewhere.

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoUSB: m66592-udc: Fix up dev_set_name() badness.
Paul Mundt [Wed, 30 Jul 2008 05:33:43 +0000 (22:33 -0700)]
USB: m66592-udc: Fix up dev_set_name() badness.

Commit 0031a06e2f07ab0d1bc98c31dbb6801f95f4bf01 converted all of the USB
drivers to use dev_set_name(), though there was a typo on the m66592-udc
conversion that handed off the wrong pointer (we want the struct device
here obviously, not the struct usb_gadget).

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agointroduce lower_32_bits() macro
Joerg Roedel [Wed, 30 Jul 2008 05:33:42 +0000 (22:33 -0700)]
introduce lower_32_bits() macro

The file kernel.h contains the upper_32_bits macro.  This patch adds the
other part, the lower_32_bits macro.  Its first use will be in the driver
for AMD IOMMU.

Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodo_try_to_free_page: update comments related to vmscan functions
Fernando Luis Vazquez Cao [Wed, 30 Jul 2008 05:33:42 +0000 (22:33 -0700)]
do_try_to_free_page: update comments related to vmscan functions

Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoswapfile/vmscan: update comments related to vmscan functions
Fernando Luis Vazquez Cao [Wed, 30 Jul 2008 05:33:41 +0000 (22:33 -0700)]
swapfile/vmscan: update comments related to vmscan functions

Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoswap: update function comment of release_pages
Fernando Luis Vazquez Cao [Wed, 30 Jul 2008 05:33:40 +0000 (22:33 -0700)]
swap: update function comment of release_pages

Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomadvise: update function comment of madvise_dontneed
Fernando Luis Vazquez Cao [Wed, 30 Jul 2008 05:33:39 +0000 (22:33 -0700)]
madvise: update function comment of madvise_dontneed

Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoprintk: fix comment for printk ratelimiting
Uwe Kleine-König [Wed, 30 Jul 2008 05:33:38 +0000 (22:33 -0700)]
printk: fix comment for printk ratelimiting

The comment assumed the burst to be one and the ratelimit used to be named
printk_ratelimit_jiffies.

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Cc: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoChar: mxser, ratelimit ioctl warning
Jiri Slaby [Wed, 30 Jul 2008 05:33:38 +0000 (22:33 -0700)]
Char: mxser, ratelimit ioctl warning

The GET_MAJOR ioctl prints out a warning, make it ratelimited.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoinitrd: cast `initrd_start' to `void *'
Geert Uytterhoeven [Wed, 30 Jul 2008 05:33:36 +0000 (22:33 -0700)]
initrd: cast `initrd_start' to `void *'

commit fb6624ebd912e3d6907ca6490248e73368223da9 (initrd: Fix virtual/physical
mix-up in overwrite test) introduced the compiler warning below on mips,
as its virt_to_page() doesn't cast the passed address to unsigned long
internally, unlike on most other architectures:

init/main.c: In function `start_kernel':
init/main.c:633: warning: passing argument 1 of `virt_to_phys' makes pointer from integer without a cast
init/main.c:636: warning: passing argument 1 of `virt_to_phys' makes pointer from integer without a cast

For now, kill the warning by explicitly casting initrd_start to `void *', as
that's the type it should really be.

Reported-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agouml: fix tty-related build error
WANG Cong [Wed, 30 Jul 2008 05:33:34 +0000 (22:33 -0700)]
uml: fix tty-related build error

/home/wangcong/Projects/linux-2.6/arch/um/drivers/line.c: In function `line_write_interrupt':
/home/wangcong/Projects/linux-2.6/arch/um/drivers/line.c:366: error: `struct tty_ldisc' has no member named `write_wakeup'
/home/wangcong/Projects/linux-2.6/arch/um/drivers/line.c:367: error: `struct tty_ldisc' has no member named `write_wakeup'

Signed-off-by: WANG Cong <wangcong@zeuux.org>
Cc: Jeff Dike <jdike@addtoit.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoconnector: add a BlackBoard user to connector
Jerome Arbez-Gindre [Wed, 30 Jul 2008 05:33:33 +0000 (22:33 -0700)]
connector: add a BlackBoard user to connector

Add a BlackBoard user to connector.  BlackBoard is part of the TSP GPL
sampling framework (http://savannah.nongnu.org/p/tsp)

[akpm@linux-foundation.org: add comment]
Signed-off-by: Jerome Arbez-Gindre <jeromearbezgindre@gmail.com>
Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoprint_ip_sym(): use %pS
Vegard Nossum [Wed, 30 Jul 2008 05:33:32 +0000 (22:33 -0700)]
print_ip_sym(): use %pS

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years ago8250.c: port.lock is irq-safe
Borislav Petkov [Wed, 30 Jul 2008 05:33:32 +0000 (22:33 -0700)]
8250.c: port.lock is irq-safe

serial8250_startup() doesn't disable interrupts while taking the &up->port.lock
which might race against the interrupt handler serial8250_interrupt(), which
when entered, will deadlock waiting for the lock to be released.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Tested-by: Ingo Molnar <mingo@elte.hu>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomarkers: fix markers read barrier for multiple probes
Mathieu Desnoyers [Wed, 30 Jul 2008 05:33:31 +0000 (22:33 -0700)]
markers: fix markers read barrier for multiple probes

Paul pointed out two incorrect read barriers in the marker handler code in
the path where multiple probes are connected.  Those are ordering reads of
"ptype" (single or multi probe marker), "multi" array pointer, and "multi"
array data access.

It should be ordered like this :

read ptype
smp_rmb()
read multi array pointer
smp_read_barrier_depends()
access data referenced by multi array pointer

The code with a single probe connected (optimized case, does not have to
allocate an array) has correct memory ordering.

It applies to kernel 2.6.26.x, 2.6.25.x and linux-next.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: <stable@kernel.org> [2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agortc: don't return -EBUSY when mutex_lock_interruptible() fails
David Brownell [Wed, 30 Jul 2008 05:33:30 +0000 (22:33 -0700)]
rtc: don't return -EBUSY when mutex_lock_interruptible() fails

It was pointed out that the RTC framework handles its mutex locks oddly
...  returning -EBUSY when interrupted.  This fixes that by returning the
value of mutex_lock_interruptible() (i.e.  -EINTR).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodrivers/video: release mutex in error handling code
Julia Lawall [Wed, 30 Jul 2008 05:33:28 +0000 (22:33 -0700)]
drivers/video: release mutex in error handling code

The mutex is released on a successful return, so it would seem that it
should be released on an error return as well.

The semantic patch finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression l;
@@

mutex_lock(l);
... when != mutex_unlock(l)
    when any
    when strict
(
if (...) { ... when != mutex_unlock(l)
+   mutex_unlock(l);
    return ...;
}
|
mutex_unlock(l);
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Acked-by: Ondrej Zajicek <santiago@crfreenet.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agohpwdt: don't use static flags
Alexey Dobriyan [Wed, 30 Jul 2008 05:33:26 +0000 (22:33 -0700)]
hpwdt: don't use static flags

Static (read: global) is potential problem.  Two threads can corrupt each
other's interrupt status, better avoid this.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Thomas Mingarelli <thomas.mingarelli@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoiscsi_ibft_find: fix modpost warning
Jan Beulich [Wed, 30 Jul 2008 05:33:25 +0000 (22:33 -0700)]
iscsi_ibft_find: fix modpost warning

Exporting __init functions is wrong.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Konrad Rzeszutek <konradr@linux.vnet.ibm.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>
15 years agobacklight: ensure platform_lcd on by default
Ben Dooks [Wed, 30 Jul 2008 05:33:25 +0000 (22:33 -0700)]
backlight: ensure platform_lcd on by default

It seems that we need to ensure that the lcd is powered up at start,
otherwise we do not see a display.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocpuset: clean up cpuset hierarchy traversal code
Li Zefan [Wed, 30 Jul 2008 05:33:24 +0000 (22:33 -0700)]
cpuset: clean up cpuset hierarchy traversal code

Use cpuset.stack_list rather than kfifo, so we avoid memory allocation
for kfifo.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocpuset: fix wrong calculation of relax domain level
Li Zefan [Wed, 30 Jul 2008 05:33:23 +0000 (22:33 -0700)]
cpuset: fix wrong calculation of relax domain level

When multiple cpusets are overlapping in their 'cpus' and hence they
form a single sched domain, the largest sched_relax_domain_level among
those should be used. But when top_cpuset's sched_load_balance is
set, its sched_relax_domain_level is used regardless other sub-cpusets'.

This patch fixes it by walking the cpuset hierarchy to find the largest
sched_relax_domain_level.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocpuset: speed up sched domain partition
Lai Jiangshan [Wed, 30 Jul 2008 05:33:22 +0000 (22:33 -0700)]
cpuset: speed up sched domain partition

All child cpusets contain a subset of the parent's cpus, so we can skip
them when partitioning sched domains. This decreases 'csa' greately for
cpusets with multi-level hierarchy.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocpuset: a bit cleanup for scan_for_empty_cpusets()
Li Zefan [Wed, 30 Jul 2008 05:33:21 +0000 (22:33 -0700)]
cpuset: a bit cleanup for scan_for_empty_cpusets()

clean up hierarchy traversal code

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Paul Jackson <pj@sgi.com>
Cc: Cliff Wickman <cpw@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomemcg: remove redundant check in move_task()
Li Zefan [Wed, 30 Jul 2008 05:33:20 +0000 (22:33 -0700)]
memcg: remove redundant check in move_task()

It's guaranteed by cgroup that old_cgrp != cgrp.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocgroup: uninline cgroup_has_css_refs()
Li Zefan [Wed, 30 Jul 2008 05:33:20 +0000 (22:33 -0700)]
cgroup: uninline cgroup_has_css_refs()

It's not small enough, and has 2 call sites.

 text    data     bss     dec     hex filename
12813    1676    4832   19321    4b79 cgroup.o.orig
12775    1676    4832   19283    4b53 cgroup.o

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocgroup: remove duplicate code in allocate_cg_link()
Li Zefan [Wed, 30 Jul 2008 05:33:19 +0000 (22:33 -0700)]
cgroup: remove duplicate code in allocate_cg_link()

- just call free_cg_links() in allocate_cg_links()
- the list will get initialized in allocate_cg_links(), so don't init
  it twice

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocgroup: fix possible memory leak
Li Zefan [Wed, 30 Jul 2008 05:33:18 +0000 (22:33 -0700)]
cgroup: fix possible memory leak

There's a leak if copy_from_user() returns failure.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomm: remove find_max_pfn_with_active_regions
Yinghai Lu [Wed, 30 Jul 2008 05:33:16 +0000 (22:33 -0700)]
mm: remove find_max_pfn_with_active_regions

It has no user now

Also print out info about adding/removing active regions.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoVFS: increase pseudo-filesystem block size to PAGE_SIZE
Alex Nixon [Wed, 30 Jul 2008 05:33:03 +0000 (22:33 -0700)]
VFS: increase pseudo-filesystem block size to PAGE_SIZE

This commit:

    commit ba52de123d454b57369f291348266d86f4b35070
    Author: Theodore Ts'o <tytso@mit.edu>
    Date:   Wed Sep 27 01:50:49 2006 -0700

        [PATCH] inode-diet: Eliminate i_blksize from the inode structure

caused the block size used by pseudo-filesystems to decrease from
PAGE_SIZE to 1024 leading to a doubling of the number of context switches
during a kernbench run.

Signed-off-by: Alex Nixon <Alex.Nixon@citrix.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Ian Campbell <Ian.Campbell@eu.citrix.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: <stable@kernel.org> [2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosticore: don't activate unsupported GSC STI cards on HPPA
Helge Deller [Wed, 30 Jul 2008 05:33:01 +0000 (22:33 -0700)]
sticore: don't activate unsupported GSC STI cards on HPPA

On HPPA there exists some older GSC graphics cards, which need special
graphic-card-BIOS patching to become supported.  Since we don't have yet
implemented the patching, it's better to detect such cards in advance,
inform to the user that there are known problems and to not activate the
card.

Problematic GSC cards and BIOS versions are:
* Hyperdrive/Hyperbowl (A4071A) graphics card series:
   * ID = 0x2BCB015A (Version 8.04/8)
   * ID = 0x2BCB015A (Version 8.04/11)
* Thunder 1 VISUALIZE 48 card:
   * ID = 0x2F23E5FC (Version 8.05/9)
* Thunder 2 VISUALIZE 48 XP card:
   * ID = 0x2F8D570E (Version 8.05/12)
* Some Hyperion and ThunderHawk GSC cards

Further details are described here:
http://parisc-linux.org/faq/graphics-howto.html

Signed-off-by: Helge Deller <deller@gmx.de>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Grant Grundler <grundler@parisc-linux.org>
Cc: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoacpi cpufreq cleanup: move bailing out of function before locking the mutex
Thomas Renninger [Wed, 30 Jul 2008 05:32:59 +0000 (22:32 -0700)]
acpi cpufreq cleanup: move bailing out of function before locking the mutex

Signed-off-by: Thomas Renninger <trenn@suse.de>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Len Brown <lenb@kernel.org>
Cc: Dave Jones <davej@codemonkey.org.uk>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocpufreq acpi: only call _PPC after cpufreq ACPI init funcs got called already
Thomas Renninger [Wed, 30 Jul 2008 05:32:58 +0000 (22:32 -0700)]
cpufreq acpi: only call _PPC after cpufreq ACPI init funcs got called already

Ingo Molnar provided a fix to not call _PPC at processor driver
initialization time in "[PATCH] ACPI: fix cpufreq regression" (git
commit e4233dec749a3519069d9390561b5636a75c7579)

But it can still happen that _PPC is called at processor driver
initialization time.

This patch should make sure that this is not possible anymore.

Signed-off-by: Thomas Renninger <trenn@suse.de>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Len Brown <lenb@kernel.org>
Cc: Dave Jones <davej@codemonkey.org.uk>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoresource: add resource_size()
Magnus Damm [Wed, 30 Jul 2008 05:32:57 +0000 (22:32 -0700)]
resource: add resource_size()

Avoid one-off errors by introducing a resource_size() function.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agobacklight: give platform_lcd the same name as the platform device.
Ben Dooks [Wed, 30 Jul 2008 05:32:56 +0000 (22:32 -0700)]
backlight: give platform_lcd the same name as the platform device.

When registering an platform_lcd, use the name of the platform device
specified in case there are more than one platform_lcd backlights
registered.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agonet: Make "networking" one-click deselectable.
Robert P. J. Day [Wed, 30 Jul 2008 10:14:01 +0000 (03:14 -0700)]
net: Make "networking" one-click deselectable.

Use a menuconfig directive to make all of networking support one-click
deselectable from the top-level menu.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv6: Fix useless proc net sockstat6 removal
Daniel Lezcano [Wed, 30 Jul 2008 10:12:31 +0000 (03:12 -0700)]
ipv6: Fix useless proc net sockstat6 removal

This call is no longer needed, sockstat6 is per namespace so it is
removed at the namespace subsystem destruction.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: MD5: Use MIB counter instead of warning for MD5 mismatch.
David S. Miller [Wed, 30 Jul 2008 10:03:15 +0000 (03:03 -0700)]
tcp: MD5: Use MIB counter instead of warning for MD5 mismatch.

From a report by Matti Aarnio, and preliminary patch by Adam Langley.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agopkt_sched: Fix OOPS on ingress qdisc add.
David S. Miller [Wed, 30 Jul 2008 09:37:46 +0000 (02:37 -0700)]
pkt_sched: Fix OOPS on ingress qdisc add.

Bug report from Steven Jan Springl:

Issuing the following command causes a kernel oops:
tc qdisc add dev eth0 handle ffff: ingress

The problem mostly stems from all of the special case handling of
ingress qdiscs.

So, to fix this, do the grafting operation the same way we do for TX
qdiscs.  Which means that dev_activate() and dev_deactivate() now do
the "qdisc_sleeping <--> qdisc" transitions on dev->rx_queue too.

Future simplifications are possible now, mainly because it is
impossible for dev_queue->{qdisc,qdisc_sleeping} to be NULL.  There
are NULL checks all over to handle the ingress qdisc special case
that used to exist before this commit.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoregulator: TI bq24022 Li-Ion Charger driver
Philipp Zabel [Fri, 11 Jul 2008 15:28:06 +0000 (17:28 +0200)]
regulator: TI bq24022 Li-Ion Charger driver

This adds a regulator driver for the TI bq24022 Single-Chip
Li-Ion Charger with its nCE and ISET2 pins connected to GPIOs.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
15 years agoregulator: maintainers - add maintainers for regulator framework.
Liam Girdwood [Thu, 10 Jul 2008 14:48:00 +0000 (15:48 +0100)]
regulator: maintainers - add maintainers for regulator framework.

Adds Liam Girdwood and Mark Brown as regulator framework maintainers.

Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
15 years agoregulator: documentation - ABI
Liam Girdwood [Wed, 30 Apr 2008 16:23:59 +0000 (17:23 +0100)]
regulator: documentation - ABI

This adds documentation describing the sysfs ABI used by the regulator
framework.

Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
15 years agoregulator: documentation - machine
Liam Girdwood [Wed, 30 Apr 2008 16:22:50 +0000 (17:22 +0100)]
regulator: documentation - machine

This adds documenation describing the regulator machine interface.

Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
15 years agoregulator: documentation - regulator driver
Liam Girdwood [Wed, 30 Apr 2008 16:20:11 +0000 (17:20 +0100)]
regulator: documentation - regulator driver

This adds documentation describing the regulator driver interface.

Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
15 years agoregulator: documentation - consumer interface
Liam Girdwood [Wed, 30 Apr 2008 16:19:02 +0000 (17:19 +0100)]
regulator: documentation - consumer interface

This adds documentation describing the consumer device interface.

Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
15 years agoregulator: documentation - overview
Liam Girdwood [Wed, 30 Apr 2008 16:16:51 +0000 (17:16 +0100)]
regulator: documentation - overview

This adds overview documentation describing the regulator framework and
nomenclature used in the interface specific documentation and code.

Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
15 years agoregulator: core kbuild files
Liam Girdwood [Wed, 30 Apr 2008 16:13:42 +0000 (17:13 +0100)]
regulator: core kbuild files

This patch adds kernel build support for the regulator core.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
15 years agoregulator: regulator test harness
Mark Brown [Wed, 30 Apr 2008 16:05:33 +0000 (17:05 +0100)]
regulator: regulator test harness

This provides a virtual regulator test harness which exposes a sysfs
interface for setting power requirements, intended for test purposes only.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
15 years agoregulator: add support for fixed regulators.
Mark Brown [Wed, 30 Apr 2008 15:27:12 +0000 (16:27 +0100)]
regulator: add support for fixed regulators.

This adds supports for regulator that are not software controlable. It allows
them to coexist in systems with mixed supplies.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
15 years agoregulator: regulator framework core
Liam Girdwood [Wed, 30 Apr 2008 14:59:04 +0000 (15:59 +0100)]
regulator: regulator framework core

This adds the regulator framework core.

This framework is designed to provide a generic interface to voltage
and current regulators within the Linux kernel. It's intended to
provide voltage and current control to client or consumer drivers and
also provide status information to user space applications through a
sysfs interface.

The intention is to allow systems to dynamically control regulator
output in order to save power and prolong battery life. This applies
to both voltage regulators (where voltage output is controllable) and
current sinks (where current output is controllable).

This framework safely compiles out if not selected so that client
drivers can still be used in systems with no software controllable
regulators.

Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoregulator: fixed regulator interface
Mark Brown [Wed, 30 Apr 2008 14:50:21 +0000 (15:50 +0100)]
regulator: fixed regulator interface

This patch adds support for fixed regulators. This class of regulator is
not software controllable but can coexist on machines with software
controlable regulators.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
15 years agoregulator: machine driver interface
Liam Girdwood [Wed, 30 Apr 2008 14:46:09 +0000 (15:46 +0100)]
regulator: machine driver interface

This interface is for machine specific code and allows the creation of
voltage/current domains (with constraints) for each regulator. It can
provide regulator constraints that will prevent device damage through
overvoltage or over current caused by buggy client drivers. It also
allows the creation of a regulator tree whereby some regulators are
supplied by others (similar to a clock tree).

Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoregulator: regulator driver interface
Liam Girdwood [Wed, 30 Apr 2008 14:42:28 +0000 (15:42 +0100)]
regulator: regulator driver interface

This allows regulator drivers to register their regulators and provide
operations to the core. It also has a notifier call chain for propagating
regulator events to clients.

Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoregulator: consumer device interface
Liam Girdwood [Wed, 30 Apr 2008 14:10:07 +0000 (15:10 +0100)]
regulator: consumer device interface

Add support to allow consumer device drivers to control their regulator
power supply.

This uses a similar API to the kernel clock interface in that consumer
drivers can get and put a regulator (like they can with clocks atm) and
get/set voltage, current limit, mode, enable and disable. This should
allow consumers complete control over their supply voltage and current
limit. This also compiles out if not in use so drivers can be reused in
systems with no regulator based power control.

Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoniu: Fix error checking in niu_ethflow_to_class.
Andreas Schwab [Wed, 30 Jul 2008 06:59:20 +0000 (23:59 -0700)]
niu: Fix error checking in niu_ethflow_to_class.

The callers of niu_ethflow_to_class expect zero as error, but it returns
-1 instead.

Signed-off-by: Andreas Schwab <schwab@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoIPv6: datagram_send_ctl() should exit immediately when an error occured
Miao Xie [Wed, 30 Jul 2008 06:57:58 +0000 (23:57 -0700)]
IPv6: datagram_send_ctl() should exit immediately when an error occured

When an error occured, datagram_send_ctl() should exit immediately rather than
continue to run the for loop. Otherwise, the variable err might be changed and
the error might be hidden.

Fix this bug by using "goto" instead of "break".

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agopowerpc/mm: Lockless get_user_pages_fast() for 64-bit (v3)
Nick Piggin [Wed, 30 Jul 2008 05:23:13 +0000 (15:23 +1000)]
powerpc/mm: Lockless get_user_pages_fast() for 64-bit (v3)

Implement lockless get_user_pages_fast for 64-bit powerpc.

Page table existence is guaranteed with RCU, and speculative page references
are used to take a reference to the pages without having a prior existence
guarantee on them.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
15 years agopowerpc: Don't use the wrong thread_struct for ptrace get/set VSX regs
Michael Neuling [Mon, 28 Jul 2008 15:13:14 +0000 (01:13 +1000)]
powerpc: Don't use the wrong thread_struct for ptrace get/set VSX regs

In PTRACE_GET/SETVSRREGS, we should be using the thread we are
ptracing rather than current.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
15 years agopowerpc: Fix ptrace buffer size for VSX
Michael Neuling [Mon, 28 Jul 2008 15:13:14 +0000 (01:13 +1000)]
powerpc: Fix ptrace buffer size for VSX

Fix cut-and-paste error in the size setting for ptrace buffers for VSX.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
15 years agopowerpc: Correctly hookup PTRACE_GET/SETVSRREGS for 32 bit processes
Michael Neuling [Mon, 28 Jul 2008 15:13:14 +0000 (01:13 +1000)]
powerpc: Correctly hookup PTRACE_GET/SETVSRREGS for 32 bit processes

Fix bug where PTRACE_GET/SETVSRREGS are not connected for 32 bit processes.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
15 years agoide/powermac: Fix use of uninitialized pointer on media-bay
Benjamin Herrenschmidt [Mon, 28 Jul 2008 01:29:56 +0000 (11:29 +1000)]
ide/powermac: Fix use of uninitialized pointer on media-bay

The current ide-pmac calls media_bay_set_ide_infos() with an
uninitialized "hwif" argument. The proper fix is to split the
allocation of the hwif from its registration in order to properly
setup the mediabay informations before registration.

Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
15 years agopowerpc: Allow non-hcall return values for lparcfg writes
Nathan Fontenot [Fri, 25 Jul 2008 18:27:06 +0000 (04:27 +1000)]
powerpc: Allow non-hcall return values for lparcfg writes

The code to handle writes to /proc/ppc64/lparcfg incorrectly
assumes that the return code from the helper routines to update
processor or memory entitlement return a hcall return value. It
then assumes any non-hcall return value is bad and sets the return
code for the write to be -EIO.

The update_[mp]pp routines can return values other than a hcall
return value. This patch removes the automatic setting of any
return code that is not an hcall return value from these routines
to -EIO.

Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
15 years agoipmi/powerpc: Use linux/of_{device,platform}.h instead of asm
Stephen Rothwell [Fri, 23 May 2008 06:22:42 +0000 (16:22 +1000)]
ipmi/powerpc: Use linux/of_{device,platform}.h instead of asm

Drivers should not include the asm variants anymore

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Wed, 30 Jul 2008 04:51:00 +0000 (21:51 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

15 years agoMerge commit 'kumar/kumar-next'
Benjamin Herrenschmidt [Wed, 30 Jul 2008 04:36:03 +0000 (14:36 +1000)]
Merge commit 'kumar/kumar-next'

15 years agopowerpc/fsl: proliferate simple-bus compatibility to soc nodes
Kim Phillips [Tue, 29 Jul 2008 20:29:24 +0000 (15:29 -0500)]
powerpc/fsl: proliferate simple-bus compatibility to soc nodes

add simple-bus compatible property to soc nodes for 83xx/85xx platforms
that were missing them.  Add same to platform probe code.

This fixes SoC device drivers (such as talitos) to succeed in matching
devices present in the soc node.

also update mpc836x_rdk dts to new SEC bindings (overlooked in commit
3fd4473: powerpc/fsl: update crypto node definition and device tree
instances).

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
15 years agoSELinux: /proc/mounts should show what it can
Eric Paris [Tue, 29 Jul 2008 21:07:26 +0000 (17:07 -0400)]
SELinux: /proc/mounts should show what it can

Given a hosed SELinux config in which a system never loads policy or
disables SELinux we currently just return -EINVAL for anyone trying to
read /proc/mounts.  This is a configuration problem but we can certainly
be more graceful.  This patch just ignores -EINVAL when displaying LSM
options and causes /proc/mounts display everything else it can.  If
policy isn't loaded the obviously there are no options, so we aren't
really loosing any information here.

This is safe as the only other return of EINVAL comes from
security_sid_to_context_core() in the case of an invalid sid.  Even if a
FS was mounted with a now invalidated context that sid should have been
remapped to unlabeled and so we won't hit the EINVAL and will work like
we should.  (yes, I tested to make sure it worked like I thought)

Signed-off-by: Eric Paris <eparis@redhat.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Signed-off-by: James Morris <jmorris@namei.org>
15 years agoMerge branch 'master' of /home/cbou/linux-2.6
Anton Vorontsov [Tue, 29 Jul 2008 22:05:23 +0000 (02:05 +0400)]
Merge branch 'master' of /home/cbou/linux-2.6

Conflicts:

drivers/power/Kconfig
drivers/power/Makefile

15 years agomac80211: fix mesh beaconing
Luis Carlos Cobo [Tue, 29 Jul 2008 17:59:31 +0000 (19:59 +0200)]
mac80211: fix mesh beaconing

This patch fixes mesh beaconing, which was broken by "mac80211: revamp
beacon configuration".

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoPS3: gelic: use unsigned long for irqflags
Vegard Nossum [Tue, 29 Jul 2008 11:31:47 +0000 (13:31 +0200)]
PS3: gelic: use unsigned long for irqflags

The semantic patch I used was this:

@@
expression lock;
identifier flags;
expression subclass;
@@

- unsigned int flags;
+ unsigned long flags;

...

<+...

(
 spin_lock_irqsave(lock, flags)
|
 _spin_lock_irqsave(lock)
|
 spin_unlock_irqrestore(lock, flags)
|
 _spin_unlock_irqrestore(lock, flags)
|
 read_lock_irqsave(lock, flags)
|
 _read_lock_irqsave(lock)
|
 read_unlock_irqrestore(lock, flags)
|
 _read_unlock_irqrestore(lock, flags)
|
 write_lock_irqsave(lock, flags)
|
 _write_lock_irqsave(lock)
|
 write_unlock_irqrestore(lock, flags)
|
 _write_unlock_irqrestore(lock, flags)
|
 spin_lock_irqsave_nested(lock, flags, subclass)
|
 _spin_lock_irqsave_nested(lock, subclass)
|
 spin_unlock_irqrestore(lock, flags)
|
 _spin_unlock_irqrestore(lock, flags)
|
 _raw_spin_lock_flags(lock, flags)
|
 __raw_spin_lock_flags(lock, flags)
)

...+>

This patch was generated using the Coccinelle framework.

Cc: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Cc: Julia Lawall <julia@diku.dk>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: fix cfg80211 hooks for master interface
Johannes Berg [Tue, 29 Jul 2008 11:22:52 +0000 (13:22 +0200)]
mac80211: fix cfg80211 hooks for master interface

The master interface is a virtual interface that is registered
to mac80211, changing that does not seem like a good idea at
the moment. However, since it has no sdata, we cannot accept
any configuration for it. This patch makes the cfg80211 hooks
reject any such attempt.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agonl80211: fix dump callbacks
Johannes Berg [Tue, 29 Jul 2008 11:22:51 +0000 (13:22 +0200)]
nl80211: fix dump callbacks

Julius Volz pointed out that the dump callbacks in nl80211 were
broken and fixed one of them. This patch fixes the other three
and also addresses the TODOs there.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Julius Volz <juliusv@google.com>
Cc: Thomas Graf <tgraf@suug.ch>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: partially fix skb->cb use
Johannes Berg [Tue, 29 Jul 2008 09:32:07 +0000 (11:32 +0200)]
mac80211: partially fix skb->cb use

This patch fixes mac80211 to not use the skb->cb over the queue step
from virtual interfaces to the master. The patch also, for now,
disables aggregation because that would still require requeuing,
will fix that in a separate patch. There are two other places (software
requeue and powersaving stations) where requeue can happen, but that is
not currently used by any drivers/not possible to use respectively.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agortl8187: Improve wireless statistics for RTL8187B
Larry Finger [Tue, 29 Jul 2008 03:25:08 +0000 (22:25 -0500)]
rtl8187: Improve wireless statistics for RTL8187B

Wireless statistics produced by the RTL8187B driver are not particularly
informative about the strength of the received signal. From the data sheet
provided by Realtek, I discovered that certain parts of the RX header
should have the information necessary to calculate signal quality and
strength. With testing, it became clear that most of these quantities were
very jittery - only the AGC correlated with the signals expected from nearby
AP's. As a result, the quality and strength are derived from the agc value.
The scaling has been determined so that the numbers are close to those
obtained by b43 under the same conditions. The results are qualitatively
correct.

Statistics derived for the RTL8187 have not been changed.

The RX header variables have been renamed to match the quantites described
in the Realtek data sheet.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agortl8187: Fix for TX sequence number problem
Larry Finger [Tue, 29 Jul 2008 03:08:18 +0000 (22:08 -0500)]
rtl8187: Fix for TX sequence number problem

"mac80211: fix TX sequence numbers" broke rtl8187. This
patch makes the same kind of fix that was done for rt2x00. Note that
this code will have to be reworked for proper sequence numbers on beacons.
In addition, the sequence number has been placed in the hardware state,
not the vif state.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: append CONFIG_ to MAC80211_VERBOSE_PS_DEBUG in net/mac80211/tx.c.
Rami Rosen [Thu, 24 Jul 2008 07:40:37 +0000 (10:40 +0300)]
mac80211: append CONFIG_ to MAC80211_VERBOSE_PS_DEBUG in net/mac80211/tx.c.

In net/mac80211/tx.c, there are some #ifdef which checks
MAC80211_VERBOSE_PS_DEBUG
(which in fact is never set) instead of
CONFIG_MAC80211_VERBOSE_PS_DEBUG, as should be.

This patch replaces MAC80211_VERBOSE_PS_DEBUG with
CONFIG_MAC80211_VERBOSE_PS_DEBUG in these #ifdef commands in
net/mac80211/tx.c.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: fix sparse integer as NULL pointer warning
Harvey Harrison [Thu, 24 Jul 2008 01:36:38 +0000 (18:36 -0700)]
mac80211: fix sparse integer as NULL pointer warning

drivers/net/wireless/mac80211_hwsim.c:503:20: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agodrivers/net/wireless/iwlwifi/iwl-led.c: printk fix
Andrew Morton [Wed, 23 Jul 2008 06:50:04 +0000 (23:50 -0700)]
drivers/net/wireless/iwlwifi/iwl-led.c: printk fix

ia64:

drivers/net/wireless/iwlwifi/iwl-led.c: In function `iwl_get_blink_rate':
drivers/net/wireless/iwlwifi/iwl-led.c:271: warning: long long int format, s64 arg (arg 6)
drivers/net/wireless/iwlwifi/iwl-led.c:271: warning: long long int format, u64 arg (arg 7)

We do not know what type the architecture uses to impement u64 and s64,
hence we must cast the variables for printing.

Cc: Tomas Winkler <tomas.winkler@intel.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: return correct error return from ieee80211_wep_init
Jeremy Fitzhardinge [Mon, 14 Jul 2008 19:52:08 +0000 (12:52 -0700)]
mac80211: return correct error return from ieee80211_wep_init

Return the proper error code rather than a hard-coded ENOMEM from
ieee80211_wep_init.  Also, print the error code on failure.

Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: tx, use dev_kfree_skb_any for beacon_get
Jiri Slaby [Mon, 14 Jul 2008 10:43:23 +0000 (12:43 +0200)]
mac80211: tx, use dev_kfree_skb_any for beacon_get

Use dev_kfree_skb_any(); instead of dev_kfree_skb();, since
ieee80211_beacon_get function might be called from atomic.
(It's in a fail path.)

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Clear queue entry flags during initialization
Ivo van Doorn [Mon, 21 Jul 2008 17:06:02 +0000 (19:06 +0200)]
rt2x00: Clear queue entry flags during initialization

When the queues are being initialized the entry flags fields must be
reset to 0. When this does not happen some entries might still be
marked as "occupied" after an ifdown & ifup cycle which would trigger
errors when the entry is being accessed:

phy0 -> rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 0.
Please file bug report to http://rt2x00.serialmonkey.com.

This also fixes the mac80211 warning:

------------[ cut here ]------------
WARNING: at net/mac80211/tx.c:1238 ieee80211_master_start_xmit+0x30a/0x350 [mac80211]()

which was triggered by the queue error.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Force full register config after start()
Ivo van Doorn [Mon, 21 Jul 2008 09:52:44 +0000 (11:52 +0200)]
rt2x00: Force full register config after start()

rt2x00 will only perform configuration changes from
mac80211 when the configuration option has changed.
This means it keeps track of the current active configuration
and will check these values when the config() callback function
is used.

However this causes breakage when the interface has been
brought down and up again, since all stored active values
aren't reset while the registers might have.
This is for example the case with rt61pci antenna registers which
will jump to invalid values when the interface has been started.

To make sure a full configuration takes place after the start()
callback function, a new flag is added which will be checked
during config() and skips the "what's changed" phase.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agob43legacy: Release mutex in error handling code
Julia Lawall [Mon, 21 Jul 2008 09:29:34 +0000 (11:29 +0200)]
b43legacy: Release mutex in error handling code

The mutex is released on a successful return, so it would seem that it
should be released on an error return as well.

The semantic patch finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression l;
@@

mutex_lock(l);
... when != mutex_unlock(l)
    when any
    when strict
(
if (...) { ... when != mutex_unlock(l)
+   mutex_unlock(l);
    return ...;
}
|
mutex_unlock(l);
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agodrivers/net/wireless/ipw2100.c: Release mutex in error handling code
Julia Lawall [Mon, 21 Jul 2008 07:58:11 +0000 (09:58 +0200)]
drivers/net/wireless/ipw2100.c: Release mutex in error handling code

The mutex is released on a successful return, so it would seem that it
should be released on an error return as well.

The semantic patch finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression l;
@@

mutex_lock(l);
... when != mutex_unlock(l)
    when any
    when strict
(
if (...) { ... when != mutex_unlock(l)
+   mutex_unlock(l);
    return ...;
}
|
mutex_unlock(l);
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Fix memleak when RTS/CTS fails
Ivo van Doorn [Sun, 20 Jul 2008 16:03:58 +0000 (18:03 +0200)]
rt2x00: Fix memleak when RTS/CTS fails

When sending the RTS/CTS frame fails, we should
free the skb buffer which was created.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Fix QOS sequence counting
Ivo van Doorn [Sun, 20 Jul 2008 16:03:38 +0000 (18:03 +0200)]
rt2x00: Fix QOS sequence counting

When IEEE80211_TX_CTL_ASSIGN_SEQ is not set,
the driver should disable hardware sequence counting
to make sure the mac80211 provided counter is used.
This fixes QOS sequence counting, since that is one
of the cases where mac80211 provides a seperate
sequence counter.

By moving the sequence counting code to rt2x00queue
we make sure that _all_ frames get the sequence counter,
including RTS/CTS and Beacon frames.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Fix the beacon length bug
Iwo Mergler [Sat, 19 Jul 2008 14:17:40 +0000 (16:17 +0200)]
rt2x00: Fix the beacon length bug

When setting up a beacon template, the length of the beacon is
calculated with the assumption that the SKB already contains
the Tx descriptor. In the case of beacons it doesn't.

This patch undoes the damage by adding the Tx descriptor length
to the beacon length. This is safe, because the shortest possible
beacon is longer than the Tx header.

Signed-off-by: Iwo Mergler <Iwo@call-direct.com.au>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Large vendor requests for rt73usb firmware upload and beacons
Iwo Mergler [Sat, 19 Jul 2008 14:17:16 +0000 (16:17 +0200)]
rt2x00: Large vendor requests for rt73usb firmware upload and beacons

Switches rt73usb to use large vendor requests for firmware
and beacons. This also fixes the garbled beacon bug.

Signed-off-by: Iwo Mergler <Iwo@call-direct.com.au>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Support for large vendor requests
Iwo Mergler [Sat, 19 Jul 2008 14:16:54 +0000 (16:16 +0200)]
rt2x00: Support for large vendor requests

Adds an extra rt2x00 vendor request function to support register
transfers beyond the CSR_CACHE_SIZE / USB packet size limit. This
is useful for firmware uploads, beacon templates and keys, all
of which are to large to do with a single USB request.

Signed-off-by: Iwo Mergler <Iwo@call-direct.com.au>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Fix EIFS timing value
Ivo van Doorn [Sat, 19 Jul 2008 14:16:12 +0000 (16:16 +0200)]
rt2x00: Fix EIFS timing value

Olivier reported a difference between the EIFS
values used in the legacy driver and the one in
the rt2x00 drivers.

In rt2x00 the value was
( SIFS + (8 * (IEEE80211_HEADER + ACK_SIZE)) )
which comes down to 314us while the legacy driver uses the value 364us

This was caused because EIFS is: SIFS + DIFS + AckTime
This patch will fix this by adding the DIFS by the above value,
and creating a SHORT_EIFS define which uses the SHORT_DIFS.

Reported-by: Olivier Cornu <o.cornu@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Remove duplicate declaration
Ivo van Doorn [Sat, 19 Jul 2008 14:15:42 +0000 (16:15 +0200)]
rt2x00: Remove duplicate declaration

rt2x00queue_free_skb() was declared twice.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: don't enable MSI, we cannot handle it yet
Pavel Roskin [Fri, 18 Jul 2008 16:56:59 +0000 (12:56 -0400)]
ath5k: don't enable MSI, we cannot handle it yet

MSI is a nice thing, but we cannot enable it without changing the
interrupt handler.  If we do it, we break MSI capable hardware,
specifically AR5006 chipset.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: fix recursive locking in ath5k_beacon_update
Bob Copeland [Fri, 18 Jul 2008 15:11:21 +0000 (11:11 -0400)]
ath5k: fix recursive locking in ath5k_beacon_update

ath5k_beacon_update takes sc->lock upon entry.  However, it is only
called from within ath5k_config_interface, which already holds the lock.
Remove the unnecessary locking from ath5k_beacon_update.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>