Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6]: src/sys/arch/vax/include Pull up following revision(s) (reque...



details:   https://anonhg.NetBSD.org/src/rev/d4cea5983832
branches:  netbsd-6
changeset: 774321:d4cea5983832
user:      riz <riz%NetBSD.org@localhost>
date:      Thu Jul 12 17:07:38 2012 +0000

description:
Pull up following revision(s) (requested by abs in ticket #407):
        sys/arch/vax/include/cpu.h: revision 1.94
Change cpu_idle to be an inline which sets IPL to 1 and then back to 0
so simh can recognize the kernel is idle.

diffstat:

 sys/arch/vax/include/cpu.h |  15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 39376600f428 -r d4cea5983832 sys/arch/vax/include/cpu.h
--- a/sys/arch/vax/include/cpu.h        Fri Jul 06 13:07:25 2012 +0000
+++ b/sys/arch/vax/include/cpu.h        Thu Jul 12 17:07:38 2012 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: cpu.h,v 1.93 2011/06/05 16:59:21 matt Exp $      */
+/*      $NetBSD: cpu.h,v 1.93.8.1 2012/07/12 17:07:38 riz Exp $      */
 
 /*
  * Copyright (c) 1994 Ludd, University of Lule}, Sweden
@@ -162,7 +162,18 @@
                mtpr(AST_OK,PR_ASTLVL);         \
        } while (/*CONSTCOND*/ 0)
 #define        cpu_proc_fork(x, y)     do { } while (/*CONSCOND*/0)
-#define        cpu_idle()              do { } while (/*CONSCOND*/0)
+
+/*
+ * This allows SIMH to recognize the kernel wants to sleep.
+ */
+static inline void
+cpu_idle(void)
+{
+       int ipl = mfpr(PR_IPL);
+       mtpr(1, PR_IPL);
+       mtpr(ipl, PR_IPL);
+}
+
 static inline bool
 cpu_intr_p(void)
 {



Home | Main Index | Thread Index | Old Index