Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/luna68k Remove obsolete ssir stuff which was used f...



details:   https://anonhg.NetBSD.org/src/rev/5e2807bfa160
branches:  trunk
changeset: 794703:5e2807bfa160
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Mar 22 16:52:07 2014 +0000

description:
Remove obsolete ssir stuff which was used for pre-5.0 softintr(9).

diffstat:

 sys/arch/luna68k/include/intr.h   |  17 +++++---
 sys/arch/luna68k/luna68k/isr.c    |   5 +-
 sys/arch/luna68k/luna68k/locore.s |  75 +++++---------------------------------
 3 files changed, 22 insertions(+), 75 deletions(-)

diffs (190 lines):

diff -r 677778788caf -r 5e2807bfa160 sys/arch/luna68k/include/intr.h
--- a/sys/arch/luna68k/include/intr.h   Sat Mar 22 16:39:20 2014 +0000
+++ b/sys/arch/luna68k/include/intr.h   Sat Mar 22 16:52:07 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intr.h,v 1.14 2011/11/26 04:40:51 tsutsui Exp $ */
+/* $NetBSD: intr.h,v 1.15 2014/03/22 16:52:07 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -35,10 +35,11 @@
 #ifdef _KERNEL
 
 /*
- * spl functions; all but spl0 are done in-line
+ * spl functions
  */
 #include <machine/psl.h>
 
+#define spl0()         _spl0()
 #define splnone()      spl0()
 #define splsoftclock() splraise1()
 #define splsoftbio()   splraise1()
@@ -48,11 +49,6 @@
 #define splsched()     splraise5()
 #define splhigh()      spl7()
 
-/* watch out for side effects */
-#define splx(s)         ((s) & PSL_IPL ? _spl(s) : spl0())
-
-int spl0(void);
-
 #define        IPL_NONE        0
 #define        IPL_SOFTCLOCK   1
 #define        IPL_SOFTBIO     2
@@ -84,6 +80,13 @@
        return _splraise(icookie._psl);
 }
 
+static inline void
+splx(int sr)
+{
+
+       __asm volatile("movew %0,%%sr" : : "di" (sr));
+}
+
 #endif /* _KERNEL */
 
 #endif /* _MACHINE_INTR_H */
diff -r 677778788caf -r 5e2807bfa160 sys/arch/luna68k/luna68k/isr.c
--- a/sys/arch/luna68k/luna68k/isr.c    Sat Mar 22 16:39:20 2014 +0000
+++ b/sys/arch/luna68k/luna68k/isr.c    Sat Mar 22 16:52:07 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: isr.c,v 1.21 2011/11/26 04:40:51 tsutsui Exp $ */
+/*     $NetBSD: isr.c,v 1.22 2014/03/22 16:52:07 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.21 2011/11/26 04:40:51 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.22 2014/03/22 16:52:07 tsutsui Exp $");
 
 /*
  * Link and dispatch interrupts.
@@ -50,7 +50,6 @@
 isr_autovec_list_t isr_autovec[NISRAUTOVEC];
 struct isr_vectored isr_vectored[NISRVECTORED];
 int    idepth;
-volatile int   ssir;
 
 extern int intrcnt[];          /* from locore.s */
 extern void (*vectab[])(void);
diff -r 677778788caf -r 5e2807bfa160 sys/arch/luna68k/luna68k/locore.s
--- a/sys/arch/luna68k/luna68k/locore.s Sat Mar 22 16:39:20 2014 +0000
+++ b/sys/arch/luna68k/luna68k/locore.s Sat Mar 22 16:52:07 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.58 2014/03/15 09:30:33 tsutsui Exp $ */
+/* $NetBSD: locore.s,v 1.59 2014/03/22 16:52:07 tsutsui Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -451,14 +451,8 @@
        movl    %d0,%sp@-               | push syscall number
        jbsr    _C_LABEL(syscall)       | handle it
        addql   #4,%sp                  | pop syscall arg
-       tstl    _C_LABEL(astpending)
-       jne     Lrei2
-       tstb    _C_LABEL(ssir)
-       jeq     Ltrap1
-       movw    #SPL1,%sr
-       tstb    _C_LABEL(ssir)
-       jne     Lsir1
-Ltrap1:
+       tstl    _C_LABEL(astpending)    | AST pending?
+       jne     Lrei                    | yes, handle it via trap
        movl    %sp@(FR_SP),%a0         | grab and restore
        movl    %a0,%usp                |   user SP
        moveml  %sp@+,#0x7FFF           | restore most registers
@@ -684,16 +678,19 @@
 
 ASENTRY_NOPROFILE(rei)
        tstl    _C_LABEL(astpending)    | AST pending?
-       jeq     Lchksir                 | no, go check for SIR
-Lrei1:
+       jne     1f                      | no, done
+       rte
+1:
        btst    #5,%sp@                 | yes, are we returning to user mode?
-       jne     Lchksir                 | no, go check for SIR
+       jeq     2f                      | no, done
+       rte
+2:
        movw    #PSL_LOWIPL,%sr         | lower SPL
        clrl    %sp@-                   | stack adjust
        moveml  #0xFFFF,%sp@-           | save all registers
        movl    %usp,%a1                | including
        movl    %a1,%sp@(FR_SP)         |    the users SP
-Lrei2:
+Lrei:
        clrl    %sp@-                   | VA == none
        clrl    %sp@-                   | code == none
        movl    #T_ASTFLT,%sp@-         | type == async system trap
@@ -718,38 +715,6 @@
        moveml  %sp@+,#0x7FFF           | restore user registers
        movl    %sp@,%sp                | and our SP
        rte                             | and do real RTE
-Lchksir:
-       tstb    _C_LABEL(ssir)          | SIR pending?
-       jeq     Ldorte                  | no, all done
-       movl    %d0,%sp@-               | need a scratch register
-       movw    %sp@(4),%d0             | get SR
-       andw    #PSL_IPL7,%d0           | mask all but IPL
-       jne     Lnosir                  | came from interrupt, no can do
-       movl    %sp@+,%d0               | restore scratch register
-Lgotsir:
-       movw    #SPL1,%sr               | prevent others from servicing int
-       tstb    _C_LABEL(ssir)          | too late?
-       jeq     Ldorte                  | yes, oh well...
-       clrl    %sp@-                   | stack adjust
-       moveml  #0xFFFF,%sp@-           | save all registers
-       movl    %usp,%a1                | including
-       movl    %a1,%sp@(FR_SP)         |    the users SP
-Lsir1:
-       clrl    %sp@-                   | VA == none
-       clrl    %sp@-                   | code == none
-       movl    #T_SSIR,%sp@-           | type == software interrupt
-       pea     %sp@(12)                | fp == address of trap frame
-       jbsr    _C_LABEL(trap)          | go handle it
-       lea     %sp@(16),%sp            | pop value args
-       movl    %sp@(FR_SP),%a0         | restore
-       movl    %a0,%usp                |   user SP
-       moveml  %sp@+,#0x7FFF           | and all remaining registers
-       addql   #8,%sp                  | pop SP and stack adjust
-       rte
-Lnosir:
-       movl    %sp@+,%d0               | restore scratch register
-Ldorte:
-       rte                             | real return
 
 /*
  * Use common m68k sigcode.
@@ -847,26 +812,6 @@
 #endif
        rts
 
-/*
- * Set processor priority level calls.  Most are implemented with
- * inline asm expansions.  However, spl0 requires special handling
- * as we need to check for our emulated software interrupts.
- */
-
-ENTRY(spl0)
-       moveq   #0,%d0
-       movw    %sr,%d0                 | get old SR for return
-       movw    #PSL_LOWIPL,%sr         | restore new SR
-       tstb    _C_LABEL(ssir)          | software interrupt pending?
-       jeq     Lspldone                | no, all done
-       subql   #4,%sp                  | make room for RTE frame
-       movl    %sp@(4),%sp@(2)         | position return address
-       clrw    %sp@(6)                 | set frame type 0
-       movw    #PSL_LOWIPL,%sp@        | and new SR
-       jra     Lgotsir                 | go handle it
-Lspldone:
-       rts
-
 ENTRY(getsr)
        moveq   #0,%d0
        movw    %sr,%d0



Home | Main Index | Thread Index | Old Index