sparc64: Make sure %pil interrupts are enabled during hypervisor yield.
authorDavid S. Miller <davem@davemloft.net>
Mon, 24 Mar 2014 18:45:12 +0000 (14:45 -0400)
committerJiri Slaby <jslaby@suse.cz>
Mon, 5 May 2014 12:24:46 +0000 (14:24 +0200)
commit3f5bb90c762520fee214e7852897198e89b29630
treef632119f6aa39773ed2f81879cdbed5f47727e70
parent094c49e05b7684cf4c81d1da2620c1a65fa8ced9
sparc64: Make sure %pil interrupts are enabled during hypervisor yield.

[ Upstream commit cb3042d609e30e6144024801c89be3925106752b ]

In arch_cpu_idle() we must enable %pil based interrupts before
potentially invoking the hypervisor cpu yield call.

As per the Hypervisor API documentation for cpu_yield:

Interrupts which are blocked by some mechanism other that
pstate.ie (for example %pil) are not guaranteed to cause
a return from this service.

It seems that only first generation Niagara chips are hit by this
bug.  My best guess is that later chips implement this in hardware
and wake up anyways from %pil events, whereas in first generation
chips the yield is implemented completely in hypervisor code and
requires %pil to be enabled in order to wake properly from this
call.

Fixes: 87fa05aeb3a5 ("sparc: Use generic idle loop")
Reported-by: Fabio M. Di Nitto <fabbione@fabbione.net>
Reported-by: Jan Engelhardt <jengelh@inai.de>
Tested-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
arch/sparc/kernel/process_64.c