]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita06b4f90c69c45168946f28fe7588e36e182f1dc
treea3bce7a07f727a1443ca9cd8a20195a9036a510c
parent8f35d3a01649155373178682265f5ab3e6280532
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: 8f35d3a01649 ("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