Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/alpha In splx(), don't call spl0() unless the ssir ...



details:   https://anonhg.NetBSD.org/src/rev/c120138fdc11
branches:  trunk
changeset: 508630:c120138fdc11
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Apr 15 23:26:05 2001 +0000

description:
In splx(), don't call spl0() unless the ssir != 0.

diffstat:

 sys/arch/alpha/alpha/interrupt.c |   6 +++---
 sys/arch/alpha/include/intr.h    |  13 ++++++-------
 2 files changed, 9 insertions(+), 10 deletions(-)

diffs (66 lines):

diff -r 74afc7bb3701 -r c120138fdc11 sys/arch/alpha/alpha/interrupt.c
--- a/sys/arch/alpha/alpha/interrupt.c  Sun Apr 15 23:07:34 2001 +0000
+++ b/sys/arch/alpha/alpha/interrupt.c  Sun Apr 15 23:26:05 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: interrupt.c,v 1.57 2001/04/15 23:07:34 thorpej Exp $ */
+/* $NetBSD: interrupt.c,v 1.58 2001/04/15 23:26:05 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.57 2001/04/15 23:07:34 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.58 2001/04/15 23:26:05 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -381,7 +381,7 @@
 }
 
 struct alpha_soft_intr alpha_soft_intrs[IPL_NSOFT];
-unsigned long ssir;
+__volatile unsigned long ssir;
 
 /* XXX For legacy software interrupts. */
 struct alpha_soft_intrhand *softnet_intrhand;
diff -r 74afc7bb3701 -r c120138fdc11 sys/arch/alpha/include/intr.h
--- a/sys/arch/alpha/include/intr.h     Sun Apr 15 23:07:34 2001 +0000
+++ b/sys/arch/alpha/include/intr.h     Sun Apr 15 23:26:05 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intr.h,v 1.43 2001/04/15 23:07:35 thorpej Exp $ */
+/* $NetBSD: intr.h,v 1.44 2001/04/15 23:26:05 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -114,12 +114,16 @@
 
 #ifdef _KERNEL
 
+/* Simulated software interrupt register. */
+extern __volatile unsigned long ssir;
+
 /* IPL-lowering/restoring macros */
 void   spl0(void);
+
 static __inline void
 splx(int s)
 {
-       if (s == ALPHA_PSL_IPL_0)
+       if (s == ALPHA_PSL_IPL_0 && ssir != 0)
                spl0();
        else
                alpha_pal_swpipl(s);
@@ -204,11 +208,6 @@
        ((asi)[num].intr_maxstrays != 0 &&                              \
         (asi)[num].intr_nstrays == (asi)[num].intr_maxstrays)
 
-/*
- * simulated software interrupt register
- */
-extern unsigned long ssir;
-
 #define        setsoft(x)      atomic_setbits_ulong(&ssir, 1 << (x))
 
 struct alpha_soft_intrhand {



Home | Main Index | Thread Index | Old Index