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:50:28 +0000 (17:50 +0200)
commit1a588c7edcd08370eacc2ecafff5769e6e9907b0
treeac2d7d58907a147a00c3f0941576395e024b8f5b
parent8240829fc38cc09ef13588d661e2b9cc887f6623
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