Author: bdragon
Date: Wed Sep 23 01:51:01 2020
New Revision: 366051
URL: https://svnweb.freebsd.org/changeset/base/366051

Log:
  [PowerPC64LE] Endian fix for opal_hmi.c
  
  Another boring one. We need to endian swap before checking flags.
  
  Sponsored by: Tag1 Consulting, Inc.

Modified:
  head/sys/powerpc/powernv/opal_hmi.c

Modified: head/sys/powerpc/powernv/opal_hmi.c
==============================================================================
--- head/sys/powerpc/powernv/opal_hmi.c Wed Sep 23 01:49:50 2020        
(r366050)
+++ head/sys/powerpc/powernv/opal_hmi.c Wed Sep 23 01:51:01 2020        
(r366051)
@@ -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)
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to