svn commit: r342698 - stable/12/sys/riscv/riscv

Mark Johnston markj at FreeBSD.org
Wed Jan 2 16:42:08 UTC 2019


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");
 }
 
 /*


More information about the svn-src-all mailing list