Source-Changes-HG archive

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

[src/trunk]: src/sys Remove safepri and use IPL_SAFEPRI instead. This may be...



details:   https://anonhg.NetBSD.org/src/rev/a9c09c762935
branches:  trunk
changeset: 780485:a9c09c762935
user:      matt <matt%NetBSD.org@localhost>
date:      Fri Jul 27 05:36:09 2012 +0000

description:
Remove safepri and use IPL_SAFEPRI instead.  This may be defined in a MD
header file (if not, a value of 0 is assmued).

diffstat:

 sys/arch/amiga/amiga/machdep.c     |   9 ++-------
 sys/arch/arm/arm32/intr.c          |   5 ++---
 sys/arch/arm/include/arm32/psl.h   |   4 +++-
 sys/arch/atari/atari/machdep.c     |   9 ++-------
 sys/arch/cesfic/cesfic/machdep.c   |   9 ++-------
 sys/arch/hp300/hp300/machdep.c     |   9 ++-------
 sys/arch/hpcarm/hpcarm/intr.c      |   5 ++---
 sys/arch/hpcarm/include/intr.h     |   4 +++-
 sys/arch/luna68k/luna68k/machdep.c |   9 ++-------
 sys/arch/m68k/include/psl.h        |   4 +++-
 sys/arch/mac68k/mac68k/machdep.c   |  10 ++--------
 sys/arch/mvme68k/mvme68k/machdep.c |  10 ++--------
 sys/arch/news68k/news68k/machdep.c |   9 ++-------
 sys/arch/next68k/next68k/machdep.c |  10 ++--------
 sys/arch/sparc/include/intr.h      |   8 +++++++-
 sys/arch/sparc/sparc/machdep.c     |  10 ++--------
 sys/arch/sparc64/include/intr.h    |   8 +++++++-
 sys/arch/sparc64/sparc64/machdep.c |  10 ++--------
 sys/arch/sun2/sun2/machdep.c       |  10 ++--------
 sys/arch/sun3/sun3/machdep.c       |  10 ++--------
 sys/arch/sun3/sun3x/machdep.c      |  10 ++--------
 sys/arch/x68k/x68k/machdep.c       |  10 ++--------
 sys/kern/kern_sleepq.c             |  21 +++++++++++++++++----
 sys/kern/kern_synch.c              |  18 ++----------------
 24 files changed, 76 insertions(+), 145 deletions(-)

diffs (truncated from 704 to 300 lines):

diff -r 587399f2374c -r a9c09c762935 sys/arch/amiga/amiga/machdep.c
--- a/sys/arch/amiga/amiga/machdep.c    Fri Jul 27 04:17:07 2012 +0000
+++ b/sys/arch/amiga/amiga/machdep.c    Fri Jul 27 05:36:09 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.237 2011/12/15 14:25:12 phx Exp $        */
+/*     $NetBSD: machdep.c,v 1.238 2012/07/27 05:36:09 matt Exp $       */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -48,7 +48,7 @@
 #include "opt_m68k_arch.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.237 2011/12/15 14:25:12 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.238 2012/07/27 05:36:09 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -138,11 +138,6 @@
 int    maxmem;                 /* max memory per process */
 int    physmem = MAXMEM;       /* max supported memory, changes to actual */
 
-/*
- * safepri is a safe priority for sleep to set for a spin-wait
- * during autoconfiguration or after a panic.
- */
-int    safepri = PSL_LOWIPL;
 extern  int   freebufspace;
 extern u_int lowram;
 
diff -r 587399f2374c -r a9c09c762935 sys/arch/arm/arm32/intr.c
--- a/sys/arch/arm/arm32/intr.c Fri Jul 27 04:17:07 2012 +0000
+++ b/sys/arch/arm/arm32/intr.c Fri Jul 27 05:36:09 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intr.c,v 1.32 2010/12/20 00:25:27 matt Exp $   */
+/*     $NetBSD: intr.c,v 1.33 2012/07/27 05:36:09 matt Exp $   */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.32 2010/12/20 00:25:27 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.33 2012/07/27 05:36:09 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -50,7 +50,6 @@
 #include <arm/arm32/machdep.h>
  
 u_int spl_masks[NIPL];
-int safepri = IPL_NONE;
 
 extern u_int irqmasks[];
 
diff -r 587399f2374c -r a9c09c762935 sys/arch/arm/include/arm32/psl.h
--- a/sys/arch/arm/include/arm32/psl.h  Fri Jul 27 04:17:07 2012 +0000
+++ b/sys/arch/arm/include/arm32/psl.h  Fri Jul 27 05:36:09 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: psl.h,v 1.18 2009/01/29 20:54:52 nonaka Exp $  */
+/*     $NetBSD: psl.h,v 1.19 2012/07/27 05:36:09 matt Exp $    */
 
 /*
  * Copyright (c) 1995 Mark Brinicombe.
@@ -62,6 +62,8 @@
 #define splsched()     raisespl(IPL_SCHED)
 #define splhigh()      raisespl(IPL_HIGH)
 
+#define        IPL_SAFEPRI     IPL_NONE                /* for kern_sleepq.c */
+
 #ifdef _KERNEL
 #ifndef _LOCORE
 int raisespl   (int);
diff -r 587399f2374c -r a9c09c762935 sys/arch/atari/atari/machdep.c
--- a/sys/arch/atari/atari/machdep.c    Fri Jul 27 04:17:07 2012 +0000
+++ b/sys/arch/atari/atari/machdep.c    Fri Jul 27 05:36:09 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.173 2011/12/12 19:03:08 mrg Exp $        */
+/*     $NetBSD: machdep.c,v 1.174 2012/07/27 05:36:10 matt Exp $       */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.173 2011/12/12 19:03:08 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.174 2012/07/27 05:36:10 matt Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -113,11 +113,6 @@
 vaddr_t        msgbufpa;
 
 int    physmem = MAXMEM;       /* max supported memory, changes to actual */
-/*
- * safepri is a safe priority for sleep to set for a spin-wait
- * during autoconfiguration or after a panic.
- */
-int    safepri = PSL_LOWIPL;
 extern  int   freebufspace;
 extern u_int lowram;
 
diff -r 587399f2374c -r a9c09c762935 sys/arch/cesfic/cesfic/machdep.c
--- a/sys/arch/cesfic/cesfic/machdep.c  Fri Jul 27 04:17:07 2012 +0000
+++ b/sys/arch/cesfic/cesfic/machdep.c  Fri Jul 27 05:36:09 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.62 2012/02/12 16:34:07 matt Exp $        */
+/*     $NetBSD: machdep.c,v 1.63 2012/07/27 05:36:10 matt Exp $        */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.62 2012/02/12 16:34:07 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.63 2012/07/27 05:36:10 matt Exp $");
 
 #include "opt_bufcache.h"
 #include "opt_ddb.h"
@@ -120,11 +120,6 @@
  */
 /*int  maxmem;*/                       /* max memory per process */
 int    physmem = MAXMEM;       /* max supported memory, changes to actual */
-/*
- * safepri is a safe priority for sleep to set for a spin-wait
- * during autoconfiguration or after a panic.
- */
-int    safepri = PSL_LOWIPL;
 
 extern u_int lowram;
 
diff -r 587399f2374c -r a9c09c762935 sys/arch/hp300/hp300/machdep.c
--- a/sys/arch/hp300/hp300/machdep.c    Fri Jul 27 04:17:07 2012 +0000
+++ b/sys/arch/hp300/hp300/machdep.c    Fri Jul 27 05:36:09 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.224 2011/12/12 19:03:09 mrg Exp $        */
+/*     $NetBSD: machdep.c,v 1.225 2012/07/27 05:36:10 matt Exp $       */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.224 2011/12/12 19:03:09 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.225 2012/07/27 05:36:10 matt Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -130,11 +130,6 @@
 
 int    maxmem;                 /* max memory per process */
 int    physmem = MAXMEM;       /* max supported memory, changes to actual */
-/*
- * safepri is a safe priority for sleep to set for a spin-wait
- * during autoconfiguration or after a panic.
- */
-int    safepri = PSL_LOWIPL;
 
 extern u_int lowram;
 extern short exframesize[];
diff -r 587399f2374c -r a9c09c762935 sys/arch/hpcarm/hpcarm/intr.c
--- a/sys/arch/hpcarm/hpcarm/intr.c     Fri Jul 27 04:17:07 2012 +0000
+++ b/sys/arch/hpcarm/hpcarm/intr.c     Fri Jul 27 05:36:09 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intr.c,v 1.18 2010/12/20 00:25:33 matt Exp $   */
+/*     $NetBSD: intr.c,v 1.19 2012/07/27 05:36:10 matt Exp $   */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.18 2010/12/20 00:25:33 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.19 2012/07/27 05:36:10 matt Exp $");
 
 #include "opt_irqstats.h"
 #include "opt_cputypes.h"
@@ -106,7 +106,6 @@
 
 u_int spl_masks[_SPL_LEVELS + 1];
 u_int spl_smasks[_SPL_LEVELS];
-int safepri = _SPL_0;
 
 #ifdef __HAVE_FAST_SOFTINTS
 /* Handle software interrupts */
diff -r 587399f2374c -r a9c09c762935 sys/arch/hpcarm/include/intr.h
--- a/sys/arch/hpcarm/include/intr.h    Fri Jul 27 04:17:07 2012 +0000
+++ b/sys/arch/hpcarm/include/intr.h    Fri Jul 27 05:36:09 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intr.h,v 1.16 2012/06/10 13:15:24 skrll Exp $  */
+/*     $NetBSD: intr.h,v 1.17 2012/07/27 05:36:10 matt Exp $   */
 
 /*
  * Copyright (c) 1997 Mark Brinicombe.
@@ -49,6 +49,8 @@
 
 #define NIPL           8
 
+#define        IPL_SAFEPRI     _SPL_0
+
 #define        IST_UNUSABLE    -1      /* interrupt cannot be used */
 #define        IST_NONE        0       /* none (dummy) */
 #define        IST_PULSE       1       /* pulsed */
diff -r 587399f2374c -r a9c09c762935 sys/arch/luna68k/luna68k/machdep.c
--- a/sys/arch/luna68k/luna68k/machdep.c        Fri Jul 27 04:17:07 2012 +0000
+++ b/sys/arch/luna68k/luna68k/machdep.c        Fri Jul 27 05:36:09 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.89 2011/12/12 19:03:10 mrg Exp $ */
+/* $NetBSD: machdep.c,v 1.90 2012/07/27 05:36:10 matt Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.89 2011/12/12 19:03:10 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.90 2012/07/27 05:36:10 matt Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -104,11 +104,6 @@
 
 int    maxmem;                 /* max memory per process */
 int    physmem;                /* set by locore */
-/*
- * safepri is a safe priority for sleep to set for a spin-wait
- * during autoconfiguration or after a panic.
- */
-int    safepri = PSL_LOWIPL;
 
 extern u_int lowram;
 
diff -r 587399f2374c -r a9c09c762935 sys/arch/m68k/include/psl.h
--- a/sys/arch/m68k/include/psl.h       Fri Jul 27 04:17:07 2012 +0000
+++ b/sys/arch/m68k/include/psl.h       Fri Jul 27 05:36:09 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: psl.h,v 1.14 2009/05/06 21:37:40 mhitch Exp $  */
+/*     $NetBSD: psl.h,v 1.15 2012/07/27 05:36:11 matt Exp $    */
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -69,6 +69,8 @@
 
 #if defined(_KERNEL) && !defined(_LOCORE)
 
+#define        IPL_SAFEPRI     PSL_LOWIPL      /* for kern_sleepq.c */
+
 /*
  * spl functions; platform-specific code must define spl0 and splx().
  */
diff -r 587399f2374c -r a9c09c762935 sys/arch/mac68k/mac68k/machdep.c
--- a/sys/arch/mac68k/mac68k/machdep.c  Fri Jul 27 04:17:07 2012 +0000
+++ b/sys/arch/mac68k/mac68k/machdep.c  Fri Jul 27 05:36:09 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.343 2012/01/27 18:52:57 para Exp $       */
+/*     $NetBSD: machdep.c,v 1.344 2012/07/27 05:36:11 matt Exp $       */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -74,7 +74,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.343 2012/01/27 18:52:57 para Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.344 2012/07/27 05:36:11 matt Exp $");
 
 #include "opt_adb.h"
 #include "opt_ddb.h"
@@ -194,12 +194,6 @@
 int    physmem = MAXMEM;       /* max supported memory, changes to actual */
 
 /*
- * safepri is a safe priority for sleep to set for a spin-wait
- * during autoconfiguration or after a panic.
- */
-int    safepri = PSL_LOWIPL;
-
-/*
  * Extent maps to manage all memory space, including I/O ranges.  Allocate
  * storage for 8 regions in each, initially.  Later, iomem_malloc_safe
  * will indicate that it's safe to use malloc() to dynamically allocate
diff -r 587399f2374c -r a9c09c762935 sys/arch/mvme68k/mvme68k/machdep.c
--- a/sys/arch/mvme68k/mvme68k/machdep.c        Fri Jul 27 04:17:07 2012 +0000
+++ b/sys/arch/mvme68k/mvme68k/machdep.c        Fri Jul 27 05:36:09 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.150 2011/12/12 19:03:10 mrg Exp $        */
+/*     $NetBSD: machdep.c,v 1.151 2012/07/27 05:36:11 matt Exp $       */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>



Home | Main Index | Thread Index | Old Index