safe/jmp/linux-2.6
14 years agoau1000_eth: Duplicate test of RX_OVERLEN bit in update_rx_stats()
roel kluin [Tue, 6 Oct 2009 09:54:18 +0000 (09:54 +0000)]
au1000_eth: Duplicate test of RX_OVERLEN bit in update_rx_stats()

in update_rx_stats() the RX_OVERLEN bit is set twice, replace it by RX_RUNT.
in au1000_rx() the RX_MISSED_FRAME bit was tested a few lines earlier already

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: Fix Unlikely(x) > y
Roel Kluin [Tue, 6 Oct 2009 19:34:39 +0000 (19:34 +0000)]
netxen: Fix Unlikely(x) > y

The closing parenthesis was not on the right location.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agopasemi_mac: ethtool get settings fix
Valentine Barshak [Mon, 5 Oct 2009 03:27:56 +0000 (03:27 +0000)]
pasemi_mac: ethtool get settings fix

Not all pasemi mac interfaces can have a phy attached.
For example, XAUI has no phy and phydev is NULL for it.
In this case ethtool get settings causes kernel crash.
Fix it by returning -EOPNOTSUPP if there's no PHY attached.

Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoadd maintainer for network drop monitor kernel service
Neil Horman [Mon, 5 Oct 2009 03:56:55 +0000 (03:56 +0000)]
add maintainer for network drop monitor kernel service

I was getting ribbed about this earlier, so I figured I'd make it
official.  Add myself as the maintainer of the drop monitor bits, so
people don't just gripe at Dave when it breaks (I'm sure it will never
break, but just in case :) ).

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Fix phylib locking strategy
Matt Carlson [Mon, 5 Oct 2009 17:55:29 +0000 (17:55 +0000)]
tg3: Fix phylib locking strategy

Felix Radensky noted that chip resets were generating stack trace dumps.
This is because the driver is attempting to acquire the mdio bus mutex
while holding the tp->lock spinlock.  The fix is to change the code such
that every phy access takes the tp->lock spinlock instead.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agorndis_host: support ETHTOOL_GPERMADDR
John W. Linville [Tue, 6 Oct 2009 11:05:42 +0000 (11:05 +0000)]
rndis_host: support ETHTOOL_GPERMADDR

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agofutex: Fix typo in FUTEX_WAIT/WAKE_BITSET_PRIVATE definitions
Anton Blanchard [Wed, 7 Oct 2009 00:13:58 +0000 (11:13 +1100)]
futex: Fix typo in FUTEX_WAIT/WAKE_BITSET_PRIVATE definitions

Looks like a typo, FUTEX_WAKE_BITS should be FUTEX_WAIT_BITSET.

Signed-off-by: Anton Blanchard <anton@samba.org>
LKML-Reference: <20091007001358.GE16073@kryten>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
14 years agoipv4: arp_notify address list bug
Stephen Hemminger [Wed, 7 Oct 2009 10:18:17 +0000 (03:18 -0700)]
ipv4: arp_notify address list bug

This fixes a bug with arp_notify.

If arp_notify is enabled, kernel will crash if address is changed
and no IP address is assigned.
  http://bugzilla.kernel.org/show_bug.cgi?id=14330

Reported-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agorcu: Place root rcu_node structure in separate lockdep class
Paul E. McKenney [Wed, 7 Oct 2009 04:48:18 +0000 (21:48 -0700)]
rcu: Place root rcu_node structure in separate lockdep class

Before this patch, all of the rcu_node structures were in the same lockdep
class, so that lockdep would complain when rcu_preempt_offline_tasks()
acquired the root rcu_node structure's lock while holding one of the leaf
rcu_nodes' locks.

This patch changes rcu_init_one() to use a separate
spin_lock_init() for the root rcu_node structure's lock than is
used for that of all of the rest of the rcu_node structures, which
puts the root rcu_node structure's lock in its own lockdep class.

Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: akpm@linux-foundation.org
Cc: mathieu.desnoyers@polymtl.ca
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
Cc: dhowells@redhat.com
LKML-Reference: <12548908983277-git-send-email->
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agorcu: Make hot-unplugged CPU relinquish its own RCU callbacks
Paul E. McKenney [Wed, 7 Oct 2009 04:48:17 +0000 (21:48 -0700)]
rcu: Make hot-unplugged CPU relinquish its own RCU callbacks

The current interaction between RCU and CPU hotplug requires that
RCU block in CPU notifiers waiting for callbacks to drain.

This can be greatly simplified by having each CPU relinquish its
own callbacks, and for both _rcu_barrier() and CPU_DEAD notifiers
to adopt all callbacks that were previously relinquished.

This change also eliminates the possibility of certain types of
hangs due to the previous practice of waiting for callbacks to be
invoked from within CPU notifiers.  If you don't every wait, you
cannot hang.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: akpm@linux-foundation.org
Cc: mathieu.desnoyers@polymtl.ca
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
Cc: dhowells@redhat.com
LKML-Reference: <1254890898456-git-send-email->
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agorcu: Move rcu_barrier() to rcutree
Paul E. McKenney [Wed, 7 Oct 2009 04:48:16 +0000 (21:48 -0700)]
rcu: Move rcu_barrier() to rcutree

Move the existing rcu_barrier() implementation to rcutree.c,
consistent with the fact that the rcu_barrier() implementation is
tied quite tightly to the RCU implementation.

This opens the way to simplify and fix rcutree.c's rcu_barrier()
implementation in a later patch.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: akpm@linux-foundation.org
Cc: mathieu.desnoyers@polymtl.ca
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
Cc: dhowells@redhat.com
LKML-Reference: <12548908982563-git-send-email->
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agogigaset: add kerneldoc comments
Tilman Schmidt [Tue, 6 Oct 2009 12:19:01 +0000 (12:19 +0000)]
gigaset: add kerneldoc comments

Add kerneldoc comments to some functions in the Gigaset driver.

Impact: documentation
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogigaset: correct debugging output selection
Tilman Schmidt [Tue, 6 Oct 2009 12:18:56 +0000 (12:18 +0000)]
gigaset: correct debugging output selection

Dump payload data consistently only when DEBUG_STREAM_DUMP debug bit
is set.

Impact: debugging aid
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogigaset: improve error recovery
Tilman Schmidt [Tue, 6 Oct 2009 12:18:51 +0000 (12:18 +0000)]
gigaset: improve error recovery

When the Gigaset base stops responding, try resetting the USB
connection to recover.

Impact: error handling improvement
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogigaset: fix device ERROR response handling
Tilman Schmidt [Tue, 6 Oct 2009 12:18:46 +0000 (12:18 +0000)]
gigaset: fix device ERROR response handling

Clear out pending command that got rejected with 'ERROR' response.
This fixes the bug where unloading the driver module would hang
with the message: "gigaset: not searching scheduled commands: busy"
after a device communication error.

Impact: error handling bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogigaset: announce if built with debugging
Tilman Schmidt [Tue, 6 Oct 2009 12:18:41 +0000 (12:18 +0000)]
gigaset: announce if built with debugging

Mention in the driver load announcement whether the driver was built
with debugging messages enabled, to facilitate support.

Impact: informational message
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogigaset: handle isoc frame errors more gracefully
Tilman Schmidt [Tue, 6 Oct 2009 12:18:36 +0000 (12:18 +0000)]
gigaset: handle isoc frame errors more gracefully

Don't drop the remainder of an URB if an isochronous frame has an error.

Impact: error handling improvement
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogigaset: linearize skb
Tilman Schmidt [Tue, 6 Oct 2009 12:18:31 +0000 (12:18 +0000)]
gigaset: linearize skb

The code of the Gigaset driver assumes that sk_buff-s coming
from the ISDN4Linux subsystem are always linear. Explicitly
calling skb_linearize() is cheap if they are, but much more
robust in case they ever aren't.

Impact: robustness improvement
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogigaset: fix reject/hangup handling
Tilman Schmidt [Tue, 6 Oct 2009 12:18:26 +0000 (12:18 +0000)]
gigaset: fix reject/hangup handling

Signal D channel disconnect in a few cases where it was missed,
including when an incoming call is disconnected before it was
accepted.

Impact: error handling improvement
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoisdn: make capidrv module parameter "debugmode" writeable
Tilman Schmidt [Tue, 6 Oct 2009 12:18:15 +0000 (12:18 +0000)]
isdn: make capidrv module parameter "debugmode" writeable

Being able to change the debugmode module parameter of capidrv on the
fly is quite useful for debugging and doesn't do any harm.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoisdn: avoid races in capidrv
Tilman Schmidt [Tue, 6 Oct 2009 12:18:10 +0000 (12:18 +0000)]
isdn: avoid races in capidrv

In several places, capidrv sends a CAPI message to the ISDN
device and then updates its internal state accordingly.
If the response message from the device arrives before the
state is updated, it may be rejected or processed incorrectly.
Avoid these races by updating the state before emitting the
message.

Impact: bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Acked-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoisdn: accept CAPI Informational Info values as success
Tilman Schmidt [Tue, 6 Oct 2009 12:18:05 +0000 (12:18 +0000)]
isdn: accept CAPI Informational Info values as success

Info values in the 0x00xx range are defined in the CAPI standard
as "Informational, message processed successfully". Therefore a
CONNECT_B3_CONF message with an Info value in that range should
open an NCCI just as with Info==0.

Impact: minor bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Acked-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoDocumentation: expand isdn/INTERFACE.CAPI document
Tilman Schmidt [Tue, 6 Oct 2009 12:18:00 +0000 (12:18 +0000)]
Documentation: expand isdn/INTERFACE.CAPI document

- Note that send_message() may be called in interrupt context.
- Describe the storage of CAPI messages and payload data in SKBs.
- Add more details to the description of the _cmsg structure.
- Describe kernelcapi debugging output.

Impact: documentation
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrm/radeon: Fix setting of bits
Roel Kluin [Tue, 6 Oct 2009 19:48:40 +0000 (21:48 +0200)]
drm/radeon: Fix setting of bits

Duplicate bits set

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agopata_atp867x: add Power Management support
Bartlomiej Zolnierkiewicz [Tue, 6 Oct 2009 22:27:25 +0000 (00:27 +0200)]
pata_atp867x: add Power Management support

Cc: Jung-Ik (John) Lee <jilee@google.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agopata_atp867x: PIO support fixes
Bartlomiej Zolnierkiewicz [Tue, 6 Oct 2009 22:27:19 +0000 (00:27 +0200)]
pata_atp867x: PIO support fixes

* use  8 clk setting for active clocks == 7 (was 12 clk)
* use 12 clk setting for active clocks > 12 (was  8 clk)
* do 66MHz bus fixup before mapping active clocks
* fix setup of PIO command timings

Acked-by: Jung-Ik (John) Lee <jilee@google.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agopata_atp867x: clarifications in timings calculations and cable detection
John(Jung-Ik) Lee [Tue, 6 Oct 2009 22:27:03 +0000 (00:27 +0200)]
pata_atp867x: clarifications in timings calculations and cable detection

Signed-off-by: John(Jung-Ik) Lee <jilee@google.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agopata_atp867x: fix it to not claim MWDMA support
Bartlomiej Zolnierkiewicz [Tue, 6 Oct 2009 22:26:57 +0000 (00:26 +0200)]
pata_atp867x: fix it to not claim MWDMA support

MWDMA modes are not supported by this driver currently.

Acked-by: Jung-Ik (John) Lee <jilee@google.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agolibata: fix incorrect link online check during probe
Tejun Heo [Tue, 6 Oct 2009 08:08:40 +0000 (17:08 +0900)]
libata: fix incorrect link online check during probe

While trying to work around spurious detection retries for
non-existent devices on slave links, commit
816ab89782ac139a8b65147cca990822bb7e8675 incorrectly added link
offline check logic before ata_eh_thaw() was called.  This means that
if an occupied link goes down briefly at the time that offline check
was performed, device class will be cleared to ATA_DEV_NONE and libata
wouldn't retry thus failing detection of the device.

The offline check should be done after the port is thawed together
with online check so that such link glitches can be detected by the
interrupt handler and handled properly.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Tim Blechmann <tim@klingt.org>
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agobe2net: Bug fix to properly update ethtool tx-checksumming after ethtool -K <ifname...
Ajit Khaparde [Mon, 5 Oct 2009 02:22:19 +0000 (02:22 +0000)]
be2net: Bug fix to properly update ethtool tx-checksumming after ethtool -K <ifname> tx off

This is a fix for a bug which was a result of wrong use of checksum offload flag.
The status of tx-checksumming was not changed from on to off
after a 'ethtool -K <ifname> tx off' operation.
Use the proper checksum offload flag NETIF_F_HW_CSUM instead of
NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM.
Patch is against net-2.6 tree.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: Fix a typo in be_cmds.h
Ajit Khaparde [Mon, 5 Oct 2009 02:22:05 +0000 (02:22 +0000)]
be2net: Fix a typo in be_cmds.h

MCC_STATUS_NOT_SUPPORTED should be decimal 66 not hex 66.
This patch fixes this typo. Patch against net-2.6 tree.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: Bug Fix while accounting of multicast frames during netdev stats update
Ajit Khaparde [Mon, 5 Oct 2009 02:21:51 +0000 (02:21 +0000)]
be2net: Bug Fix while accounting of multicast frames during netdev stats update

While updating the statistics to be passed via the get_stats,
tx multicast frames were being accounted instead of rx multicast frames.
This patch fixes the bug. This patch is against the net-2.6 tree.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix lock/mutex warnings.
Ron Mercer [Mon, 5 Oct 2009 11:46:49 +0000 (11:46 +0000)]
qlge: Fix lock/mutex warnings.

Get rid of spinlock and private mutex usage for exclusive access to the
HW semaphore register.  rtnl_lock already creates exclusive access to
this register in all driver API.
Add rtnl to firmware worker threads that also use the HW semaphore register.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix queueing of firmware handler in ISR.
Ron Mercer [Mon, 5 Oct 2009 11:46:48 +0000 (11:46 +0000)]
qlge: Fix queueing of firmware handler in ISR.

Check that we are not already polling firmware events before we queue the
firmware event worker, then disable firmware interrupts.
Otherwise we can queue the same event multiple times.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix some bit definitions for reset register.
Ron Mercer [Mon, 5 Oct 2009 11:46:47 +0000 (11:46 +0000)]
qlge: Fix some bit definitions for reset register.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'upstream/wm8350' into for-2.6.32
Mark Brown [Tue, 6 Oct 2009 18:29:47 +0000 (19:29 +0100)]
Merge branch 'upstream/wm8350' into for-2.6.32

14 years agoASoC: WM8350 capture PGA mutes are inverted
Mark Brown [Mon, 29 Jun 2009 10:17:10 +0000 (11:17 +0100)]
ASoC: WM8350 capture PGA mutes are inverted

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
14 years agoASoC: Remove absent SYNC and TDM DAI format options from i.MX SSI
Mark Brown [Tue, 6 Oct 2009 18:25:02 +0000 (19:25 +0100)]
ASoC: Remove absent SYNC and TDM DAI format options from i.MX SSI

These should be handled via set_tdm_slot() now and cause build
failures as-is.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoMerge branch 'pm-fixes-32' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman...
Tony Lindgren [Tue, 6 Oct 2009 15:32:28 +0000 (08:32 -0700)]
Merge branch 'pm-fixes-32' of git://git./linux/kernel/git/khilman/linux-omap-pm into omap-fixes-for-linus

14 years agoomapfb: Blizzard: constify register address tables
Tommi Rantala [Mon, 5 Oct 2009 20:31:47 +0000 (13:31 -0700)]
omapfb: Blizzard: constify register address tables

Constify register address tables

Cc: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Cc: Imre Deak <imre.deak@nokia.com>
Signed-off-by: Tommi Rantala <tt.rantala@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomapfb: Blizzard: fix pointer to be const
Tommi Rantala [Mon, 5 Oct 2009 20:31:46 +0000 (13:31 -0700)]
omapfb: Blizzard: fix pointer to be const

Fixes a compiler warning:
warning: assignment discards qualifiers from pointer target type

Cc: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Cc: Imre Deak <imre.deak@nokia.com>
Signed-off-by: Tommi Rantala <tt.rantala@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomapfb: Condition mutex acquisition
Sergio Aguirre [Mon, 5 Oct 2009 20:31:46 +0000 (13:31 -0700)]
omapfb: Condition mutex acquisition

This fixes a bug introduced by this commit ID:

  commit 537a1bf059fa312355696fa6db80726e655e7f17
  Author: Krzysztof Helt <krzysztof.h1@wp.pl>
  Date:   Tue Jun 30 11:41:29 2009 -0700

    fbdev: add mutex for fb_mmap locking

In which a mutex was added when changing smem_start and smem_len fields,
so the mutex inside the fb_mmap() call is actually used.

The problem was that set_fb_fix, which modifies the above 2 fields,
was called before and after registering the framebuffer,
which when used before registration, lead to a failed attempt to
use an uninitialized mutex.

Solution: Don't use mutex before framebuffer registration.

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Acked-by: Imre Deak <imre.deak@nokia.com>
Tested-by: Cory Maccarrone <darkstar6262@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap: iovmm: Add missing mutex_unlock
Daniel Walker [Mon, 5 Oct 2009 20:31:45 +0000 (13:31 -0700)]
omap: iovmm: Add missing mutex_unlock

I was using Coccinelle with the mutex_unlock semantic patch, and it
unconvered this problem. It appears to be a valid missing unlock issue.
This change should correct it by moving the unlock below the label.

This patch is against the mainline kernel.

Cc: Julia Lawall <julia@diku.dk>
Cc: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Daniel Walker <dwalker@fifo99.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap: iovmm: Fix incorrect spelling
Hiroshi DOYU [Mon, 5 Oct 2009 20:31:45 +0000 (13:31 -0700)]
omap: iovmm: Fix incorrect spelling

Fix incorrect spelling

Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap: SRAM: flush the right address after memcpy in omap_sram_push
ye janboe [Mon, 5 Oct 2009 20:31:44 +0000 (13:31 -0700)]
omap: SRAM: flush the right address after memcpy in omap_sram_push

the original flush operation is to flush the function address which is
copied from.
But we do not change the function code and it is not necessary to flush it.

Signed-off-by: janboe <janboe.ye@gmail.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agofutex: Move exit_pi_state() call to release_mm()
Thomas Gleixner [Mon, 5 Oct 2009 16:18:03 +0000 (18:18 +0200)]
futex: Move exit_pi_state() call to release_mm()

exit_pi_state() is called from do_exit() but not from do_execve().
Move it to release_mm() so it gets called from do_execve() as well.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
LKML-Reference: <new-submission>
Cc: stable@kernel.org
Cc: Anirban Sinha <ani@anirban.org>
Cc: Peter Zijlstra <peterz@infradead.org>
14 years agofutex: Nullify robust lists after cleanup
Peter Zijlstra [Mon, 5 Oct 2009 16:17:32 +0000 (18:17 +0200)]
futex: Nullify robust lists after cleanup

The robust list pointers of user space held futexes are kept intact
over an exec() call. When the exec'ed task exits exit_robust_list() is
called with the stale pointer. The risk of corruption is minimal, but
still it is incorrect to keep the pointers valid. Actually glibc
should uninstall the robust list before calling exec() but we have to
deal with it anyway.

Nullify the pointers after [compat_]exit_robust_list() has been
called.

Reported-by: Anirban Sinha <ani@anirban.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
LKML-Reference: <new-submission>
Cc: stable@kernel.org
14 years agosound: via82xx: move DXS volume controls to PCM interface
Clemens Ladisch [Tue, 6 Oct 2009 06:21:04 +0000 (08:21 +0200)]
sound: via82xx: move DXS volume controls to PCM interface

The "VIA DXS" controls are actually volume controls that apply to the
four PCM substreams, so we better indicate this connection by moving the
controls to the PCM interface.

Commit b452e08e73c0e3dbb0be82130217be4b7084299e in 2.6.30 broke the
restoring of these volumes by "alsactl restore" that most distributions
use; the renaming in this patch cures that regression by preventing
alsactl from applying the old, wrong volume levels to the new controls.
http://bugzilla.kernel.org/show_bug.cgi?id=14151
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=532613

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agotrace: Fix missing assignment in trace_ctxwake_*
Hiroshi Shimamoto [Thu, 1 Oct 2009 04:33:28 +0000 (13:33 +0900)]
trace: Fix missing assignment in trace_ctxwake_*

The state char variable S should be reassigned, if S == 0.

We are missing the state of the task that is going to sleep for the
context switch events (in the raw mode).

Fortunately the problem arises with the sched_switch/wake_up
tracers, not the sched trace events.

The formers are legacy now. But still, that was buggy.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Cc: Steven Rostedt <srostedt@redhat.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4AC43118.6050409@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf_event: Provide vmalloc() based mmap() backing
Peter Zijlstra [Mon, 21 Sep 2009 14:08:49 +0000 (16:08 +0200)]
perf_event: Provide vmalloc() based mmap() backing

Some architectures such as Sparc, ARM and MIPS (basically
everything with flush_dcache_page()) need to deal with dcache
aliases by carefully placing pages in both kernel and user maps.

These architectures typically have to use vmalloc_user() for this.

However, on other architectures, vmalloc() is not needed and has
the downsides of being more restricted and slower than regular
allocations.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: David Miller <davem@davemloft.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1254830228.21044.272.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf_events: Make ABI definitions available to userspace
Chuck Ebbert [Tue, 6 Oct 2009 11:38:51 +0000 (07:38 -0400)]
perf_events: Make ABI definitions available to userspace

Signed-off-by: Chuck Ebbert <cebbert@redhat.com>
LKML-Reference: <200910061138.n96BcqkJ004709@int-mx03.intmail.prod.int.phx2.redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoALSA: hda - Don't pick up invalid HP pins in alc_subsystem_id()
Takashi Iwai [Tue, 6 Oct 2009 11:21:54 +0000 (13:21 +0200)]
ALSA: hda - Don't pick up invalid HP pins in alc_subsystem_id()

alc_subsystem_id() tries to pick up a headphone pin if not configured,
but this caused side-effects as the problem in commit
15870f05e90a365f8022da416e713be0c5024e2f.

This patch fixes the driver behavior to pick up invalid HP pins; at least,
the pins that are listed as the primary outputs aren't taken any more.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoMerge branch 'for-2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Mark Brown [Tue, 6 Oct 2009 11:11:09 +0000 (12:11 +0100)]
Merge branch 'for-2.6.32' of git://git./linux/kernel/git/broonie/sound-2.6 into for-2.6.32

14 years agoperf tools: elf_sym__is_function() should accept "zero" sized functions
Arnaldo Carvalho de Melo [Tue, 6 Oct 2009 02:35:03 +0000 (23:35 -0300)]
perf tools: elf_sym__is_function() should accept "zero" sized functions

Asm routines that end up having size equal to zero are not really
zero sized, and as now we do kernel_maps__fixup_sym_end, at least
for kernel routines this gets fixed.

A similar fixup needs to be done for the userspace bits as well,
but as this fixup started only because in /proc/kallsyms we don't
have the end address nor the function size, it appeared here first.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <1254796503-27203-1-git-send-email-acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agotracing/syscalls: Use long for syscall ret format and field definitions
Tom Zanussi [Tue, 6 Oct 2009 06:00:49 +0000 (01:00 -0500)]
tracing/syscalls: Use long for syscall ret format and field definitions

The syscall event definitions use long for the syscall exit ret
value, but unsigned long for the same thing in the format and field
definitions.  Change them all to long.

Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: rostedt@goodmis.org
Cc: lizf@cn.fujitsu.com
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <1254808849-7829-4-git-send-email-tzanussi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf trace: Update eval_flag() flags array to match interrupt.h
Tom Zanussi [Tue, 6 Oct 2009 06:00:48 +0000 (01:00 -0500)]
perf trace: Update eval_flag() flags array to match interrupt.h

Add missing BLOCK_IOPOLL_SOFTIRQ entry.

Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: rostedt@goodmis.org
Cc: lizf@cn.fujitsu.com
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <1254808849-7829-3-git-send-email-tzanussi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf trace: Remove unused code in builtin-trace.c
Tom Zanussi [Tue, 6 Oct 2009 06:00:47 +0000 (01:00 -0500)]
perf trace: Remove unused code in builtin-trace.c

And some minor whitespace cleanup.

Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: rostedt@goodmis.org
Cc: lizf@cn.fujitsu.com
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <1254808849-7829-2-git-send-email-tzanussi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoconnector: Fix incompatible pointer type warning
Stephen Boyd [Tue, 6 Oct 2009 08:39:51 +0000 (01:39 -0700)]
connector: Fix incompatible pointer type warning

Commit 7069331 (connector: Provide the sender's credentials to the
callback, 2009-10-02) changed callbacks to take two arguments but missed
this one.

drivers/connector/cn_proc.c: In function â€˜cn_proc_init’:
drivers/connector/cn_proc.c:263: warning: passing argument 3 of
‘cn_add_callback’ from incompatible pointer type

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoALSA: hda - Add a workaround for ASUS A7K
Takashi Iwai [Tue, 6 Oct 2009 06:31:29 +0000 (08:31 +0200)]
ALSA: hda - Add a workaround for ASUS A7K

ASUS A7K needs additional GPIO1 bit setup; it has to be cleared.
Added a new fixup hook for this laptop so that it works as is.

Refernece: Novell bnc#494309
http://bugzilla.novell.com/show_bug.cgi?id=494309

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agodrm/ttm: fix refcounting in ttm global code.
Dave Airlie [Tue, 29 Sep 2009 03:56:38 +0000 (13:56 +1000)]
drm/ttm: fix refcounting in ttm global code.

the global refcount wasn't being increased after the first reference.
this caused an oops on unload on a multi-gpu card.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agoahci: filter FPDMA non-zero offset enable for Aspire 3810T
Tejun Heo [Tue, 15 Sep 2009 19:18:03 +0000 (04:18 +0900)]
ahci: filter FPDMA non-zero offset enable for Aspire 3810T

Curiously, Aspire 3810T issues many SATA feature enable commands via
_GTF, of which one is invalid and another is not supported by the
drive.  In the process, it also enables FPDMA non-zero offset.
However, the feature also needs to be supported and enabled from the
controller and it's wrong to enable it from _GTF unless the controller
can do it by default.

Currently, this ends up enabling FPDMA non-zero offset only on the
drive side leading to NCQ command failures and eventual disabling of
NCQ.  This patch makes libata filter out FPDMA non-zero offset enable
for the machine.

This was reported by Marcus Meissner in bnc#522790.

  https://bugzilla.novell.com/show_bug.cgi?id=522790

Reported-by: Marcus Meissner <meissner@novell.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agolibata: make gtf_filter per-dev
Tejun Heo [Tue, 15 Sep 2009 19:17:28 +0000 (04:17 +0900)]
libata: make gtf_filter per-dev

Add ->gtf_filter to ata_device and set it to ata_acpi_gtf_filter when
initializing ata_link.  This is to allow quirks which apply different
gtf filters.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agolibata: implement more acpi filtering options
Tejun Heo [Tue, 15 Sep 2009 19:17:02 +0000 (04:17 +0900)]
libata: implement more acpi filtering options

Currently libata-acpi can only filter DIPM among SATA feature enables
via _GTF.  This patch adds the capability to filter out FPDMA non-zero
offset, in-order guarantee and auto-activation.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agolibata: cosmetic updates
Tejun Heo [Tue, 15 Sep 2009 19:16:04 +0000 (04:16 +0900)]
libata: cosmetic updates

We're about to add more SATA_* and ATA_ACPI_FILTER_* constants.
Reformat them in preparation.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoahci: display all AHCI 1.3 HBA capability flags (v2)
Robert Hancock [Sun, 20 Sep 2009 23:02:31 +0000 (17:02 -0600)]
ahci: display all AHCI 1.3 HBA capability flags (v2)

Update the AHCI driver to display all of the HBA capabilities defined in the
AHCI 1.3 specification. Some of these are in a new CAP2 (HBA Capabilities
Extended) register which is only defined on AHCI 1.2 or later. The spec says
that undefined registers should always return 0 on read, but to be safe we
assume a value of 0 unless the controller reports AHCI version 1.2 or later.
The value can also be retrieved through sysfs as with the existing capability
field.

For example, on an Intel Ibex Peak (PCH) controller:

ahci 0000:00:1f.2: flags: 64bit ncq sntf stag pm led clo pmp pio slum part ems
sxs apst

We don't do anything special with the new flags yet.

Also, change the code that displays the flags to use the same bit enumerations
that are used to control actual operation.

Signed-off-by: Robert Hancock <hancockrwd@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agopata_ali: trivial fix of a very frequent spelling mistake
Dirk Hohndel [Tue, 29 Sep 2009 01:56:07 +0000 (21:56 -0400)]
pata_ali: trivial fix of a very frequent spelling mistake

something-bility is spelled as something-blity
so a grep for 'blit' would find these lines

I broke this one out from the rest as it actually changes
the output of a kernel message - so it could in theory
change the behavior of tools that parse that ouput

Signed-off-by: Dirk Hohndel <hohndel@infradead.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoahci: disable 64bit DMA by default on SB600s
Tejun Heo [Sat, 3 Oct 2009 09:27:29 +0000 (18:27 +0900)]
ahci: disable 64bit DMA by default on SB600s

Till now only one board, ASUS M2A-VM, can do 64bit dma with recent
BIOSen.  Enabling 64bit DMA by default already broke three boards.
Enabling 64bit DMA isn't worth these regressions.  Disable 64bit DMA
by default and enable it only on boards which are known to work.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Gabriele Balducci <balducci@units.it>
Reported-by: maierp@informatik.tu-muenchen.de
Cc: Shane Huang <shane.huang@amd.com>
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agodrm/fb: add more correct 8/16/24/32 bpp fb support.
Dave Airlie [Tue, 6 Oct 2009 03:54:01 +0000 (13:54 +1000)]
drm/fb: add more correct 8/16/24/32 bpp fb support.

The previous patches had some unwanted side effects, I've fixed
the lack of 32bpp working, and fixed up 16bpp so it should also work.

this also adds the interface to allow the driver to set a preferred
console depth so for example low memory rn50 can set it to 8bpp.
It also catches 24bpp on cards that can't do it and forces 32bpp.

Tested on r100/r600/i945.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6
Linus Torvalds [Mon, 5 Oct 2009 21:39:22 +0000 (14:39 -0700)]
Merge git://git./linux/kernel/git/davem/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
  Revert "ide: try to use PIO Mode 0 during probe if possible"
  ide: use printk_once

14 years agoomap: Lock DPLL5 at boot
Rajendra Nayak [Mon, 5 Oct 2009 20:31:44 +0000 (13:31 -0700)]
omap: Lock DPLL5 at boot

Lock DPLL5 at 120MHz at boot. The USBHOST 120MHz f-clock and
USBTLL f-clock are the only users of this DPLL, and 120MHz is
is the only recommended rate for these clocks.

With this patch, the 60 MHz ULPI clock is generated correctly.

Tested on an OMAP3430 SDP.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap: Fix incorrect 730 vs 850 detection
Tony Lindgren [Mon, 5 Oct 2009 20:31:43 +0000 (13:31 -0700)]
omap: Fix incorrect 730 vs 850 detection

Commit cd92204924fafbd5c7241dfd12ca3176d542e0c5 added
support for omap850. However, the patch accidentally
removed the wrong ifdef:

 #  define cpu_is_omap730() 1
 # endif
 #endif
+#else
+# if defined(CONFIG_ARCH_OMAP850)
+#  undef  cpu_is_omap850
+#  define cpu_is_omap850() 1
+# endif
+#endif

...

 void omap2_check_revision(void);

 #endif    /* defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) */
-
-#endif

Instead of removing removing the #endif at the end of the file,
the #endif before #else should have been removed.

But we cannot have multiple #else statements as pointed out by
Alistair Buxton <a.j.buxton@gmail.com>. So the fix is to:

- remove the non-multi-omap special handling, as we need to
  detect between omap730 and omap850 anyways.

- add the missing #endif back to the end of the file

Reported-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agofutex: Fix locking imbalance
Thomas Gleixner [Sun, 4 Oct 2009 07:34:17 +0000 (09:34 +0200)]
futex: Fix locking imbalance

Rich reported a lock imbalance in the futex code:

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

It's caused by the displacement of the retry_private label in
futex_wake_op(). The code unlocks the hash bucket locks in the
error handling path and retries without locking them again which
makes the next unlock fail.

Move retry_private so we lock the hash bucket locks when we retry.

Reported-by: Rich Ercolany <rercola@acm.jhu.edu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Darren Hart <dvhltc@us.ibm.com>
Cc: stable-2.6.31 <stable@kernel.org>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agopanic: Fix panic message visibility by calling bust_spinlocks(0) before dying
Aaro Koskinen [Fri, 2 Oct 2009 11:41:20 +0000 (14:41 +0300)]
panic: Fix panic message visibility by calling bust_spinlocks(0) before dying

Commit ffd71da4e3f ("panic: decrease oops_in_progress only after
having done the panic") moved bust_spinlocks(0) to the end of the
function, which in practice is never reached.

As a result console_unblank() is not called, and on some systems
the user may not see the panic message.

Move it back up to before the unblanking.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Reviewed-by: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <1254483680-25578-1-git-send-email-aaro.koskinen@nokia.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoMerge branch 'kvm-updates/2.6.32' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Mon, 5 Oct 2009 19:07:39 +0000 (12:07 -0700)]
Merge branch 'kvm-updates/2.6.32' of git://git./virt/kvm/kvm

* 'kvm-updates/2.6.32' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: add support for change_pte mmu notifiers
  KVM: MMU: add SPTE_HOST_WRITEABLE flag to the shadow ptes
  KVM: MMU: dont hold pagecount reference for mapped sptes pages
  KVM: Prevent overflow in KVM_GET_SUPPORTED_CPUID
  KVM: VMX: flush TLB with INVEPT on cpu migration
  KVM: fix LAPIC timer period overflow
  KVM: s390: fix memsize >= 4G
  KVM: SVM: Handle tsc in svm_get_msr/svm_set_msr correctly
  KVM: SVM: Fix tsc offset adjustment when running nested

14 years agoMerge branch 'fixes-for-linus' of git://git.monstr.eu/linux-2.6-microblaze
Linus Torvalds [Mon, 5 Oct 2009 19:06:59 +0000 (12:06 -0700)]
Merge branch 'fixes-for-linus' of git://git.monstr.eu/linux-2.6-microblaze

* 'fixes-for-linus' of git://git.monstr.eu/linux-2.6-microblaze:
  microblaze: Clear sticky FSR register after saving it to func parametr
  microblaze: UMS is used only for MMU kernel

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Mon, 5 Oct 2009 19:06:40 +0000 (12:06 -0700)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc: using HZ needs an include of linux/param.h
  sparc32: convert to asm-generic/hardirq.h
  sparc64: Cache per-cpu %pcr register value in perf code.
  sparc64: Fix comment typo in perf_event.c
  sparc64: Minor coding style fixups in perf code.
  sparc64: Add a basic conflict engine in preparation for multi-counter support.
  sparc64: Increase vmalloc size to fix percpu regressions.
  sparc64: Add initial perf event conflict resolution and checks.
  sparc: Niagara1 perf event support.
  sparc: Add Niagara2 HW cache event support.
  sparc: Support all ultra3 and ultra4 derivatives.
  sparc: Support HW cache events.

14 years agoiSCSI/iBFT: use proper address translation
Jan Beulich [Fri, 2 Oct 2009 15:12:39 +0000 (16:12 +0100)]
iSCSI/iBFT: use proper address translation

In virtual environments (namely, Xen Dom0) virt <-> phys and
virt <-> isa-bus translations cannot be freely interchanged (and
even outside such environments it is not really correct to do so).
When looking at memory below 1M, the latter translations should
always be used.

iscsi_ibft_find.c part from: Martin Wilck <martin.wilck@ts.fujitsu.com>.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Konrad Rzeszutek Wilk <ketuzsezs@darnok.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 5 Oct 2009 19:04:41 +0000 (12:04 -0700)]
Merge branch 'perf-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  perf tools: Run generate-cmdlist.sh properly
  perf_event: Clean up perf_event_init_task()
  perf_event: Fix event group handling in __perf_event_sched_*()
  perf timechart: Add a power-only mode
  perf top: Add poll_idle to the skip list

14 years agoMerge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 5 Oct 2009 19:04:16 +0000 (12:04 -0700)]
Merge branch 'timers-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  hrtimer: Remove overly verbose "switch to high res mode" message

14 years agoMerge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 5 Oct 2009 19:03:43 +0000 (12:03 -0700)]
Merge branch 'tracing-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  kmemtrace: Fix up tracer registration
  tracing: Fix infinite recursion in ftrace_update_pid_func()

14 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 5 Oct 2009 19:02:18 +0000 (12:02 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: Don't leak 64-bit kernel register values to 32-bit processes
  x86, SLUB: Remove unused CONFIG FAST_CMPXCHG_LOCAL
  x86: earlyprintk: Fix regression to handle serial,ttySn as 1 arg
  x86: Don't generate cmpxchg8b_emu if CONFIG_X86_CMPXCHG64=y
  x86: Fix csum_ipv6_magic asm memory clobber
  x86: Optimize cmpxchg64() at build-time some more

14 years agorcu: Replace the rcu_barrier enum with pointer to call_rcu*() function
Paul E. McKenney [Tue, 29 Sep 2009 04:50:21 +0000 (21:50 -0700)]
rcu: Replace the rcu_barrier enum with pointer to call_rcu*() function

The rcu_barrier enum causes several problems:

  (1) you have to define the enum somewhere, and there is no
      convenient place,

  (2) the difference between TREE_RCU and TREE_PREEMPT_RCU causes
      problems when you need to map from rcu_barrier enum to struct
      rcu_state,

  (3) the switch statement are large, and

  (4) TINY_RCU really needs a different rcu_barrier() than do the
      treercu implementations.

So replace it with a functionally equivalent but cleaner function
pointer abstraction.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: akpm@linux-foundation.org
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
Cc: dhowells@redhat.com
LKML-Reference: <12541998232366-git-send-email->
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agorcu: Clean up code based on review feedback from Josh Triplett, part 4
Paul E. McKenney [Mon, 28 Sep 2009 14:46:33 +0000 (07:46 -0700)]
rcu: Clean up code based on review feedback from Josh Triplett, part 4

These issues identified during an old-fashioned face-to-face code
review extending over many hours.  This group improves an existing
abstraction and introduces two new ones.  It also fixes an RCU
stall-warning bug found while making the other changes.

o Make RCU_INIT_FLAVOR() declare its own variables, removing
the need to declare them at each call site.

o Create an rcu_for_each_leaf() macro that scans the leaf
nodes of the rcu_node tree.

o Create an rcu_for_each_node_breadth_first() macro that does
a breadth-first traversal of the rcu_node tree, AKA
stepping through the array in index-number order.

o If all CPUs corresponding to a given leaf rcu_node
structure go offline, then any tasks queued on that leaf
will be moved to the root rcu_node structure.  Therefore,
the stall-warning code must dump out tasks queued on the
root rcu_node structure as well as those queued on the leaf
rcu_node structures.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: akpm@linux-foundation.org
Cc: mathieu.desnoyers@polymtl.ca
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
Cc: dhowells@redhat.com
LKML-Reference: <12541491934126-git-send-email->
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agorcu: Clean up code based on review feedback from Josh Triplett, part 3
Paul E. McKenney [Mon, 28 Sep 2009 14:46:32 +0000 (07:46 -0700)]
rcu: Clean up code based on review feedback from Josh Triplett, part 3

Whitespace fixes, updated comments, and trivial code movement.

o Fix whitespace error in RCU_HEAD_INIT()

o Move "So where is rcu_write_lock()" comment so that it does
not come between the rcu_read_unlock() header comment and
the rcu_read_unlock() definition.

o Move the module_param statements for blimit, qhimark, and
qlowmark to immediately follow the corresponding
definitions.

o In __rcu_offline_cpu(), move the assignment to rdp_me
inside the "if" statement, given that rdp_me is not used
outside of that "if" statement.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: akpm@linux-foundation.org
Cc: mathieu.desnoyers@polymtl.ca
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
Cc: dhowells@redhat.com
LKML-Reference: <12541491931164-git-send-email->
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agorcu: Fix rcu_lock_map build failure on CONFIG_PROVE_LOCKING=y
Paul E. McKenney [Wed, 23 Sep 2009 23:18:13 +0000 (16:18 -0700)]
rcu: Fix rcu_lock_map build failure on CONFIG_PROVE_LOCKING=y

Move the rcu_lock_map definition from rcutree.c to rcupdate.c so that
TINY_RCU can use lockdep.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
Linus Torvalds [Mon, 5 Oct 2009 18:56:55 +0000 (11:56 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/gerg/m68knommu

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
  m68knommu: fix rename of pt_regs offset defines breakage
  m68knommu: remove duplicated #include
  m68knommu: show KiB rather than pages in "Freeing initrd memory:" message

14 years agoOMAP3: PM: introduce a new powerdomain walk helper
Artem Bityutskiy [Thu, 1 Oct 2009 07:01:55 +0000 (10:01 +0300)]
OMAP3: PM: introduce a new powerdomain walk helper

The 'pwrdm_for_each()' function walks powerdomains with a spinlock
locked, so the the callbacks cannot do anything which may sleep.
This patch introduces a 'pwrdm_for_each_nolock()' helper which does
the same, but without the spinlock locked. This fixes the following
lockdep warning:

[    0.000000] WARNING: at kernel/lockdep.c:2460 lockdep_trace_alloc+0xac/0xec()
[    0.000000] Modules linked in:
(unwind_backtrace+0x0/0xdc) from [<c0045464>] (warn_slowpath_common+0x48/0x60)
(warn_slowpath_common+0x48/0x60) from [<c0067dd4>] (lockdep_trace_alloc+0xac/0xec)
(lockdep_trace_alloc+0xac/0xec) from [<c009da14>] (kmem_cache_alloc+0x1c/0xd0)
(kmem_cache_alloc+0x1c/0xd0) from [<c00b21d8>] (d_alloc+0x1c/0x1a4)
(d_alloc+0x1c/0x1a4) from [<c00a887c>] (__lookup_hash+0xd8/0x118)
(__lookup_hash+0xd8/0x118) from [<c00a9f20>] (lookup_one_len+0x84/0x94)
(lookup_one_len+0x84/0x94) from [<c010d12c>] (debugfs_create_file+0x8c/0x20c)
(debugfs_create_file+0x8c/0x20c) from [<c010d320>] (debugfs_create_dir+0x1c/0x20)
(debugfs_create_dir+0x1c/0x20) from [<c000e8cc>] (pwrdms_setup+0x60/0x90)
(pwrdms_setup+0x60/0x90) from [<c002e010>] (pwrdm_for_each+0x30/0x80)
(pwrdm_for_each+0x30/0x80) from [<c000e79c>] (pm_dbg_init+0x7c/0x14c)
(pm_dbg_init+0x7c/0x14c) from [<c00232b4>] (do_one_initcall+0x5c/0x1b8)
(do_one_initcall+0x5c/0x1b8) from [<c00083f8>] (kernel_init+0x90/0x10c)
(kernel_init+0x90/0x10c) from [<c00242c4>] (kernel_thread_exit+0x0/0x8)

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
14 years agoOMAP3: PM: Enable GPIO module-level wakeups
Kevin Hilman [Thu, 10 Sep 2009 15:53:08 +0000 (15:53 +0000)]
OMAP3: PM: Enable GPIO module-level wakeups

Currently, only GPIOs in the wakeup domain (GPIOs in bank 0) are
enabled as wakups.  This patch also enables GPIOs in the PER
powerdomain (banks 2-6) to be used as possible wakeup sources.

In addition, this patch ensures that all GPIO wakeups can wakeup
the MPU using the PM_MPUGRPSEL_<pwrdm> registers.

NOTE: this doesn't enable the individual GPIOs as wakeups, this simply
enables the per-bank wakeups at the powerdomain level.

This problem was discovered by Mike Chan when preventing the CORE
powerdomain from going into retention/off.  When CORE was allowed to
hit retention, GPIO wakeups via IO pad were working fine, but when
CORE remained on, GPIO module-level wakeups were not working properly.

To test, prevent CORE from going inactive/retention/off, thus
preventing the IO chain from being armed:

  # echo 3 > /debug/pm_debug/core_pwrdm/suspend

This ensures that GPIO wakeups happen via module-level wakeups and
not via IO pad.

Tested on 3430SDP using the touchscreen GPIO (gpio 2, in WKUP)
Tested on Zoom2 using the QUART interrup GPIO  (gpio 102, in PER)

Also, c.f. OMAP PM wiki for troubleshooting GPIO wakeup issues:
http://elinux.org/OMAP_Power_Management

Reported-by: Mike Chan <mikechan@google.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
14 years agoOMAP3: PM: USBHOST: clear wakeup events on both hosts
Vikram Pandita [Sat, 18 Jul 2009 00:33:09 +0000 (19:33 -0500)]
OMAP3: PM: USBHOST: clear wakeup events on both hosts

USBHOST module has 2 fclocks (for HOST1 and HOST2), only one iclock
and only a single bit in the WKST register to indicate a wakeup event.

Because of the single WKST bit, we cannot know whether a wakeup event
was on HOST1 or HOST2, so enable both fclocks before clearing the
wakeup event to ensure both hosts can properly clear the event.

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
14 years agoOMAP3: PM: PRCM interrupt: only handle selected PRCM interrupts
Paul Walmsley [Wed, 22 Jul 2009 17:29:02 +0000 (10:29 -0700)]
OMAP3: PM: PRCM interrupt: only handle selected PRCM interrupts

Clearing wakeup sources is now only done when the PRM indicates a
wakeup source interrupt.  Since we don't handle any other types of
PRCM interrupts right now, warn if we get any other type of PRCM
interrupt.  Either code needs to be added to the PRCM interrupt
handler to react to these, or these other interrupts should be masked
off at init.

Updated after Jon Hunter's PRCM IRQ rework by Kevin Hilman.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
14 years agoOMAP3: PM: PRCM interrupt: check MPUGRPSEL register
Paul Walmsley [Wed, 22 Jul 2009 17:18:07 +0000 (10:18 -0700)]
OMAP3: PM: PRCM interrupt: check MPUGRPSEL register

PM_WKST register contents should be ANDed with the contents of the
MPUGRPSEL registers.  Otherwise the MPU PRCM interrupt handler could
wind up clearing wakeup events meant for the IVA PRCM interrupt
handler. A future revision to this code should be to read a cached
version of MPUGRPSEL from the powerdomain code, since PRM reads are
relatively slow.

Updated after Jon Hunter's PRCM IRQ change by Kevin Hilman

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
14 years agoOMAP3: PM: Prevent hang in prcm_interrupt_handler
Jon Hunter [Sat, 27 Jun 2009 05:07:25 +0000 (00:07 -0500)]
OMAP3: PM: Prevent hang in prcm_interrupt_handler

There are two scenarios where a race condition could result in a hang
in the prcm_interrupt handler. These are:

1). Waiting for PRM_IRQSTATUS_MPU register to clear.
Bit 0 of the PRM_IRQSTATUS_MPU register indicates that a wake-up event
is pending for the MPU. This bit can only be cleared if the all the
wake-up events latched in the various PM_WKST_x registers have been
cleared. If a wake-up event occurred during the processing of the prcm
interrupt handler, after the corresponding PM_WKST_x register was
checked but before the PRM_IRQSTATUS_MPU was cleared, then the CPU
would be stuck forever waiting for bit 0 in PRM_IRQSTATUS_MPU to be
cleared.

2). Waiting for the PM_WKST_x register to clear.
Some power domains have more than one wake-up source. The PM_WKST_x
registers indicate the source of a wake-up event and need to be cleared
after a wake-up event occurs. When the PM_WKST_x registers are read and
before they are cleared, it is possible that another wake-up event
could occur causing another bit to be set in one of the PM_WKST_x
registers. If this did occur after reading a PM_WKST_x register then
the CPU would miss this event and get stuck forever in a loop waiting
for that PM_WKST_x register to clear.

This patch address the above race conditions that would result in a
hang.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Reviewed-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
14 years agosched: Set correct normal_prio and prio values in sched_fork()
Peter Williams [Thu, 24 Sep 2009 06:47:10 +0000 (06:47 +0000)]
sched: Set correct normal_prio and prio values in sched_fork()

normal_prio should be updated if policy changes from RT to
SCHED_MORMAL or if static_prio/nice is changed.

Some paths through sched_fork() ignore this requirement and may
result in normal_prio having an invalid value.

Fixing this issue allows the call to effective_prio() in
wake_up_new_task() to be removed.

Signed-off-by: Peter Williams <pwil3058@bigpond.net.au>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <f8f46736fd4e7f090ac0.1253774830@mudlark.pw.nest>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agomicroblaze: Clear sticky FSR register after saving it to func parametr
Michal Simek [Mon, 28 Sep 2009 06:50:53 +0000 (08:50 +0200)]
microblaze: Clear sticky FSR register after saving it to func parametr

Previous patch d63678d607d0e37ec7abe5ceb545d7e8aab956a4 clear
it for noMMU kernel. This one do it for MMU.

Correct noMMU version

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: UMS is used only for MMU kernel
Michal Simek [Fri, 25 Sep 2009 09:52:50 +0000 (11:52 +0200)]
microblaze: UMS is used only for MMU kernel

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agowext: let get_wireless_stats() sleep
Johannes Berg [Mon, 5 Oct 2009 09:22:23 +0000 (02:22 -0700)]
wext: let get_wireless_stats() sleep

A number of drivers (recently including cfg80211-based ones)
assume that all wireless handlers, including statistics, can
sleep and they often also implicitly assume that the rtnl is
held around their invocation. This is almost always true now
except when reading from sysfs:

  BUG: sleeping function called from invalid context at kernel/mutex.c:280
  in_atomic(): 1, irqs_disabled(): 0, pid: 10450, name: head
  2 locks held by head/10450:
   #0:  (&buffer->mutex){+.+.+.}, at: [<c10ceb99>] sysfs_read_file+0x24/0xf4
   #1:  (dev_base_lock){++.?..}, at: [<c12844ee>] wireless_show+0x1a/0x4c
  Pid: 10450, comm: head Not tainted 2.6.32-rc3 #1
  Call Trace:
   [<c102301c>] __might_sleep+0xf0/0xf7
   [<c1324355>] mutex_lock_nested+0x1a/0x33
   [<f8cea53b>] wdev_lock+0xd/0xf [cfg80211]
   [<f8cea58f>] cfg80211_wireless_stats+0x45/0x12d [cfg80211]
   [<c13118d6>] get_wireless_stats+0x16/0x1c
   [<c12844fe>] wireless_show+0x2a/0x4c

Fix this by using the rtnl instead of dev_base_lock.

Reported-by: Miles Lane <miles.lane@gmail.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: Fix a bug in preparation of mcc wrb which was causing flash operation to...
Ajit Khaparde [Mon, 5 Oct 2009 09:09:40 +0000 (02:09 -0700)]
be2net: Fix a bug in preparation of mcc wrb which was causing flash operation to fail

This patch fixes a bug that got introduced in commit 76998bc7.
During preparation of mcc wrb, req was being wrongly overwritten
and the flash operation was failing.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotracing: Use free_percpu instead of kfree
Frederic Weisbecker [Sat, 3 Oct 2009 13:08:54 +0000 (15:08 +0200)]
tracing: Use free_percpu instead of kfree

In the event->profile_enable() failure path, we release the per cpu
buffers using kfree which is wrong because they are per cpu pointers.
Although free_percpu only wraps kfree for now, that may change in the
future so lets use the correct way.

Reported-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>
14 years agotracing: Check total refcount before releasing bufs in profile_enable failure
Frederic Weisbecker [Sat, 3 Oct 2009 12:55:18 +0000 (14:55 +0200)]
tracing: Check total refcount before releasing bufs in profile_enable failure

When we call the profile_enable() callback of an event, we release the
shared perf event tracing buffers unconditionnaly in the failure path.
This is wrong because there may be other users of these. Then check the
total refcount before doing this.

Reported-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>
14 years agosparc: using HZ needs an include of linux/param.h
Stephen Rothwell [Mon, 5 Oct 2009 07:46:08 +0000 (00:46 -0700)]
sparc: using HZ needs an include of linux/param.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>