CVS commit: [netbsd-5] src/sys/arch/vax/include

2012-08-22 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Aug 22 20:59:47 UTC 2012

Modified Files:
src/sys/arch/vax/include [netbsd-5]: cpu.h

Log Message:
Pull up following revision(s) (requested by abs in ticket #1780):
sys/arch/vax/include/cpu.h: revision 1.94 via patch
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.


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.85.14.1 src/sys/arch/vax/include/cpu.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/vax/include/cpu.h
diff -u src/sys/arch/vax/include/cpu.h:1.85 src/sys/arch/vax/include/cpu.h:1.85.14.1
--- src/sys/arch/vax/include/cpu.h:1.85	Tue Mar 11 05:34:02 2008
+++ src/sys/arch/vax/include/cpu.h	Wed Aug 22 20:59:47 2012
@@ -1,4 +1,4 @@
-/*  $NetBSD: cpu.h,v 1.85 2008/03/11 05:34:02 matt Exp $  */
+/*  $NetBSD: cpu.h,v 1.85.14.1 2012/08/22 20:59:47 bouyer Exp $  */
 
 /*
  * Copyright (c) 1994 Ludd, University of Lule}, Sweden
@@ -165,7 +165,18 @@ extern int cpu_printfataltraps;
 #define	cpu_proc_fork(x, y)	do { } while (/*CONSCOND*/0)
 #define	cpu_lwp_free(l, f)	do { } while (/*CONSCOND*/0)
 #define	cpu_lwp_free2(l)	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)
 {



CVS commit: [netbsd-5] src/sys/arch/vax/include

2009-05-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Mon May 18 21:38:03 UTC 2009

Modified Files:
src/sys/arch/vax/include [netbsd-5]: mtpr.h

Log Message:
Pull up following revision(s) (requested by mhitch in ticket #767):
sys/arch/vax/include/mtpr.h: revisions 1.21, 1.22
Add memory clobber to mtpr for barrier.  See also kern/38637.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.20.58.1 src/sys/arch/vax/include/mtpr.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/vax/include/mtpr.h
diff -u src/sys/arch/vax/include/mtpr.h:1.20 src/sys/arch/vax/include/mtpr.h:1.20.58.1
--- src/sys/arch/vax/include/mtpr.h:1.20	Fri Feb 16 01:34:03 2007
+++ src/sys/arch/vax/include/mtpr.h	Mon May 18 21:38:03 2009
@@ -1,4 +1,4 @@
-/*  $NetBSD: mtpr.h,v 1.20 2007/02/16 01:34:03 matt Exp $ */
+/*  $NetBSD: mtpr.h,v 1.20.58.1 2009/05/18 21:38:03 bouyer Exp $ */
 
 /*
  * Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@@ -172,7 +172,8 @@
 	__asm volatile (
 		mtpr %0,%1
 	: /* No output */
-	: g (val), g (reg));
+	: g (val), g (reg)
+	: memory);
 }
 
 static inline register_t