svn commit: r342221 - head/sys/riscv/riscv
Mark Johnston
markj at FreeBSD.org
Wed Dec 19 17:45:17 UTC 2018
Author: markj
Date: Wed Dec 19 17:45:16 2018
New Revision: 342221
URL: https://svnweb.freebsd.org/changeset/base/342221
Log:
Implement cpu_halt() for RISC-V.
Submitted by: Mitchell Horne <mhorne063 at gmail.com>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D18595
Modified:
head/sys/riscv/riscv/machdep.c
Modified: head/sys/riscv/riscv/machdep.c
==============================================================================
--- head/sys/riscv/riscv/machdep.c Wed Dec 19 17:42:39 2018 (r342220)
+++ head/sys/riscv/riscv/machdep.c Wed Dec 19 17:45:16 2018 (r342221)
@@ -426,7 +426,9 @@ void
cpu_halt(void)
{
- panic("cpu_halt");
+ intr_disable();
+ for (;;)
+ __asm __volatile("wfi");
}
/*
More information about the svn-src-head
mailing list