[Skiboot] [PATCH 1/4] core/hmi: fix endian conversion bug
Nicholas Piggin
npiggin at gmail.com
Sun Nov 10 23:56:34 AEDT 2024
Fix an endian conversion bug in HMI checkstop reporting.
Noticed by sparse.
Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
core/hmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/hmi.c b/core/hmi.c
index 7f4211c5d..728d3637e 100644
--- a/core/hmi.c
+++ b/core/hmi.c
@@ -915,7 +915,7 @@ static void find_npu_checkstop_reason(int flat_chip_id,
hmi_evt->severity = OpalHMI_SEV_WARNING;
hmi_evt->type = OpalHMI_ERROR_MALFUNC_ALERT;
hmi_evt->u.xstop_error.xstop_type = CHECKSTOP_TYPE_NPU;
- hmi_evt->u.xstop_error.xstop_reason = xstop_reason;
+ hmi_evt->u.xstop_error.xstop_reason = cpu_to_be32(xstop_reason);
hmi_evt->u.xstop_error.u.chip_id = cpu_to_be32(flat_chip_id);
/* Marking the event as recoverable so that we don't crash */
--
2.45.2
More information about the Skiboot
mailing list