From 05c3051f860f66d5997278b175634f07fe10a644 Mon Sep 17 00:00:00 2001 From: Brandon Bergren Date: Wed, 23 Sep 2020 01:51:01 +0000 Subject: [PATCH] [PowerPC64LE] Endian fix for opal_hmi.c Another boring one. We need to endian swap before checking flags. Sponsored by: Tag1 Consulting, Inc. --- sys/powerpc/powernv/opal_hmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/powerpc/powernv/opal_hmi.c b/sys/powerpc/powernv/opal_hmi.c index 5e91770ee7a..b10eac1eeaa 100644 --- a/sys/powerpc/powernv/opal_hmi.c +++ b/sys/powerpc/powernv/opal_hmi.c @@ -94,7 +94,7 @@ opal_hmi_handler2(struct trapframe *frame) *flags = 0; err = opal_call(OPAL_HANDLE_HMI2, DMAP_TO_PHYS((vm_offset_t)flags)); - if (*flags & OPAL_HMI_FLAGS_TOD_TB_FAIL) + if (be64toh(*flags) & OPAL_HMI_FLAGS_TOD_TB_FAIL) panic("TOD/TB recovery failure"); if (err == OPAL_SUCCESS) -- 2.45.0