powerpc/pseries/ras: Fix FWNMI_VALID off by one
authorNicholas Piggin <npiggin@gmail.com>
Fri, 8 May 2020 04:33:58 +0000 (14:33 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:48:48 +0000 (17:48 +0200)
commit76ad7c3d5abdca1b737eac522aaff7df38b1dcb7
treebe16d7379d7aceca4ab349e3c2a9b0d9ab3ebfe8
parent75d0e73cb949d34fd4656edeb6b97ca669de2db9
powerpc/pseries/ras: Fix FWNMI_VALID off by one

[ Upstream commit deb70f7a35a22dffa55b2c3aac71bc6fb0f486ce ]

This was discovered developing qemu fwnmi sreset support. This
off-by-one bug means the last 16 bytes of the rtas area can not
be used for a 16 byte save area.

It's not a serious bug, and QEMU implementation has to retain a
workaround for old kernels, but it's good to tighten it.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: Mahesh Salgaonkar <mahesh@linux.ibm.com>
Link: https://lore.kernel.org/r/20200508043408.886394-7-npiggin@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/platforms/pseries/ras.c