]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - arch/powerpc/kernel/exceptions-64s.S
powerpc/64s: Fix system reset interrupt winkle wakeups
authorNicholas Piggin <npiggin@gmail.com>
Wed, 2 Nov 2016 06:57:01 +0000 (17:57 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 12 Nov 2016 09:12:42 +0000 (20:12 +1100)
commitf23ed166f283b1a6f0a1f0b0c889e8df9a10ff85
treea3bce7a07f727a1443ca9cd8a20195a9036a510c
parentfb479e44a9e240a23c2d208c2ace23542a47f41c
powerpc/64s: Fix system reset interrupt winkle wakeups

Wakeups from winkle set the low bit of the HSPRG0 register, to
distinguish it from other sleep states. This is also the PACA pointer.
The system reset exception handler fails to mask this bit away before
using this value before using it as the PACA pointer.

Fix this by adding a new type of exception prolog macro where we already
have the PACA set in r13, and have the system reset vector mask it out.
The winkle wakeup handler will store the masked value back into HSPRG0.

Fixes: fb479e44a9e2 ("powerpc/64s: relocation, register save fixes for system reset interrupt")
Cc: stable@vger.kernel.org # v3.0+
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/exception-64s.h
arch/powerpc/kernel/exceptions-64s.S