Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Dec 2018 17:45:16 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r342221 - head/sys/riscv/riscv
Message-ID:  <201812191745.wBJHjGXa088984@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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");
 }
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812191745.wBJHjGXa088984>