powerpc/fadump: Fix fadump to work with a different endian capture kernel
authorHari Bathini <hbathini@linux.ibm.com>
Wed, 21 Apr 2021 17:50:52 +0000 (23:20 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:42 +0000 (10:22 +0200)
commita0f7180a2c1cd4cc4430d7351c4de09b8616f3f7
treebcbb502aee9e979d67461e1902ab506cba8ad38a
parentde8f0b173d0751b089827fbacfef1d0b4d197014
powerpc/fadump: Fix fadump to work with a different endian capture kernel

[ Upstream commit b74196af372f7cb4902179009265fe63ac81824f ]

Dump capture would fail if capture kernel is not of the endianess as the
production kernel, because the in-memory data structure (struct
opal_fadump_mem_struct) shared across production kernel and capture
kernel assumes the same endianess for both the kernels, which doesn't
have to be true always. Fix it by having a well-defined endianess for
struct opal_fadump_mem_struct.

Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/161902744901.86147.14719228311655123526.stgit@hbathini
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/platforms/powernv/opal-fadump.c
arch/powerpc/platforms/powernv/opal-fadump.h