[Skiboot] [PATCH 1/4] core/hmi: fix endian conversion bug
Nicholas Piggin
npiggin at gmail.com
Sat Apr 9 01:31:34 AEST 2022
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 ce5abd7d6..46dc20dbb 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.23.0
More information about the Skiboot
mailing list