]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/xive: Fix endian conversion size
authorBenjamin Gray <bgray@linux.ibm.com>
Wed, 11 Oct 2023 05:37:00 +0000 (16:37 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:08:26 +0000 (11:08 +0100)
commit945dc61d7840f3dbf17a7b2a0a23091d9b865fe1
treef7d67d77adc350656587a6d84087ee32c7d05c63
parentbce31a2bcb1ea1a488eb91b933b9bc56f9dffaf7
powerpc/xive: Fix endian conversion size

[ Upstream commit ff7a60ab1e065257a0e467c13b519f4debcd7fcf ]

Sparse reports a size mismatch in the endian swap. The Opal
implementation[1] passes the value as a __be64, and the receiving
variable out_qsize is a u64, so the use of be32_to_cpu() appears to be
an error.

[1]: https://github.com/open-power/skiboot/blob/80e2b1dc73/hw/xive.c#L3854

Fixes: 88ec6b93c8e7 ("powerpc/xive: add OPAL extensions for the XIVE native exploitation support")
Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231011053711.93427-2-bgray@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/sysdev/xive/native.c