Author: markj
Date: Wed Jan  2 16:42:07 2019
New Revision: 342698
URL: https://svnweb.freebsd.org/changeset/base/342698

Log:
  MFC r342221:
  Implement cpu_halt() for RISC-V.

Modified:
  stable/12/sys/riscv/riscv/machdep.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/riscv/riscv/machdep.c
==============================================================================
--- stable/12/sys/riscv/riscv/machdep.c Wed Jan  2 16:41:39 2019        
(r342697)
+++ stable/12/sys/riscv/riscv/machdep.c Wed Jan  2 16:42:07 2019        
(r342698)
@@ -427,7 +427,9 @@ void
 cpu_halt(void)
 {
 
-       panic("cpu_halt");
+       intr_disable();
+       for (;;)
+               __asm __volatile("wfi");
 }
 
 /*
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to