]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/powernv: Fix return value from power7_nap() et al.
authorPaul Mackerras <paulus@samba.org>
Thu, 19 Mar 2015 23:10:18 +0000 (10:10 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 23 Mar 2015 04:06:50 +0000 (15:06 +1100)
commitcdbbc907f2b2c88e472f05641f0587ec301c38bb
tree3666249b77114fa74d780abcd5133f360977661c
parent9b3e02ed5deb819fc83fffb2575a6aaea7f3aa21
powerpc/powernv: Fix return value from power7_nap() et al.

The power7_nap(), power7_sleep() and power7_winkle() functions are
called from pnv_smp_cpu_kill_self(), which expects them to return the
SRR1 value set by the hardware on wakeup, or 0 if no nap/sleep/winkle
occurred.  However, in the case where an interrupt needs to be
replayed, the logic in power7_powersave_common (the common code for
power7_nap et al.) doesn't set r3 to 0 in this case.  Instead what we
get as the return value is the selector for the type of power-saving
mode requested (1, 2 or 3).  In fact this should not affect the
operation of pnv_smp_cpu_kill_self(), but it is better to get this
correct, so this adds an instruction to set r3 to 0 in this case.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/idle_power7.S