]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
powerpc: Fix RCU idle and hcall tracing
authorAnton Blanchard <anton@samba.org>
Mon, 9 Jan 2012 14:29:15 +0000 (14:29 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 11 Jan 2012 00:54:20 +0000 (11:54 +1100)
commita5ccfee05a439b803640e94584056204501db31c
tree2545bab092fe62924d5ccba8920c137b1e771ba6
parent7b3480f8b701170c046e1ed362946f5f0d005e13
powerpc: Fix RCU idle and hcall tracing

Tracepoints should not be called inside an rcu_idle_enter/rcu_idle_exit
region. Since pSeries calls H_CEDE in the idle loop, we were violating
this rule.

commit a7b152d5342c (powerpc: Tell RCU about idle after hcall tracing)
tried to work around it by delaying the rcu_idle_enter until after we
called the hcall tracepoint, but there are a number of issues with it.

The hcall tracepoint trampoline code is called conditionally when the
tracepoint is enabled. If the tracepoint is not enabled we never call
rcu_idle_enter. The idle_uses_rcu check was also done at compile time
which breaks multiplatform builds.

The simple fix is to avoid tracing H_CEDE and rely on other tracepoints
and the hypervisor dispatch trace log to work out if we called H_CEDE.

This fixes a hang during boot on pSeries.

Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/idle.c
arch/powerpc/platforms/pseries/lpar.c