Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Use the generic irq_dispatch.S



details:   https://anonhg.NetBSD.org/src/rev/06d1f46291f6
branches:  trunk
changeset: 541158:06d1f46291f6
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Jan 03 00:55:59 2003 +0000

description:
Use the generic irq_dispatch.S

diffstat:

 sys/arch/arm/conf/files.footbridge        |    4 +-
 sys/arch/arm/footbridge/footbridge_intr.h |    4 +-
 sys/arch/arm/footbridge/footbridge_irq.S  |  144 -----------------------------
 sys/arch/arm/ixp12x0/files.ixp12x0        |    4 +-
 sys/arch/arm/ixp12x0/ixp12x0_intr.h       |   52 ++++++++++
 sys/arch/arm/ixp12x0/ixp12x0_irq.S        |  145 ------------------------------
 sys/arch/arm/xscale/files.pxa2x0          |    4 +-
 sys/arch/arm/xscale/pxa2x0_intr.c         |    7 +-
 sys/arch/arm/xscale/pxa2x0_intr.h         |    8 +-
 sys/arch/arm/xscale/pxa2x0_irq.S          |  116 ------------------------
 sys/arch/cats/conf/std.cats               |    4 +-
 sys/arch/evbarm/conf/std.ixm1200          |    4 +-
 sys/arch/evbarm/ixm1200/ixm1200_intr.h    |   46 ---------
 sys/arch/netwinder/conf/std.netwinder     |    4 +-
 14 files changed, 77 insertions(+), 469 deletions(-)

diffs (truncated from 705 to 300 lines):

diff -r d709948c8ba7 -r 06d1f46291f6 sys/arch/arm/conf/files.footbridge
--- a/sys/arch/arm/conf/files.footbridge        Fri Jan 03 00:41:19 2003 +0000
+++ b/sys/arch/arm/conf/files.footbridge        Fri Jan 03 00:55:59 2003 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.footbridge,v 1.10 2002/11/03 21:43:29 chris Exp $
+#      $NetBSD: files.footbridge,v 1.11 2003/01/03 01:06:40 thorpej Exp $
 #
 # Shared footbridge files information
 
@@ -9,7 +9,7 @@
 file   arch/arm/footbridge/footbridge_machdep.c        footbridge
 file   arch/arm/footbridge/footbridge_io.c             footbridge
 file   arch/arm/footbridge/footbridge_pci.c            footbridge
-file   arch/arm/footbridge/footbridge_irq.S            footbridge
+file   arch/arm/arm32/irq_dispatch.S
 file   arch/arm/footbridge/footbridge_irqhandler.c     footbridge
 file   arch/arm/footbridge/footbridge_clock.c          footbridge
 file   arch/arm/arm/softintr.c                         footbridge
diff -r d709948c8ba7 -r 06d1f46291f6 sys/arch/arm/footbridge/footbridge_intr.h
--- a/sys/arch/arm/footbridge/footbridge_intr.h Fri Jan 03 00:41:19 2003 +0000
+++ b/sys/arch/arm/footbridge/footbridge_intr.h Fri Jan 03 00:55:59 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: footbridge_intr.h,v 1.3 2002/11/11 20:44:41 chris Exp $        */
+/*     $NetBSD: footbridge_intr.h,v 1.4 2003/01/03 00:56:00 thorpej Exp $      */
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -69,6 +69,8 @@
 
 #define        __NEWINTR       /* enables new hooks in cpu_fork()/cpu_switch() */
 
+#define        ARM_IRQ_HANDLER _C_LABEL(footbridge_intr_dispatch)
+
 #ifndef _LOCORE
 #include <arm/cpufunc.h>
 
diff -r d709948c8ba7 -r 06d1f46291f6 sys/arch/arm/footbridge/footbridge_irq.S
--- a/sys/arch/arm/footbridge/footbridge_irq.S  Fri Jan 03 00:41:19 2003 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,144 +0,0 @@
-/*     $NetBSD: footbridge_irq.S,v 1.5 2003/01/02 23:54:39 thorpej Exp $       */
-
-/*
- * Copyright (c) 1998 Mark Brinicombe.
- * Copyright (c) 1998 Causality Limited
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by Mark Brinicombe
- *     for the NetBSD Project.
- * 4. The name of the company nor the name of the author may be used to
- *    endorse or promote products derived from this software without specific
- *    prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include "opt_irqstats.h"
-#include "assym.h"
-
-#include <machine/asm.h>
-#include <machine/cpu.h>
-#include <machine/frame.h>
-#include <arm/footbridge/dc21285mem.h>
-#include <arm/footbridge/dc21285reg.h>
-
-/*
- * irq_entry:
- *
- *     Main entry point for the IRQ vector on dc21285 CPUs.  Calls
- *     external interrupt dispatch routine.
- */
-
-       .text
-       .align  0
-
-.Lcurrent_intr_depth: 
-       .word   _C_LABEL(current_intr_depth)
-
-.Lastpending:
-       .word   _C_LABEL(astpending)
-
-ASENTRY_NP(irq_entry)
-       sub     lr, lr, #0x00000004     /* Adjust the lr */
-
-       PUSHFRAMEINSVC                  /* Push an interrupt frame */
-
-       /*
-        * Note that we have entered the IRQ handler.
-        * We are in SVC mode so we cannot use the processor mode
-        * to determine if we are in an IRQ. Instead we will count the
-        * each time the interrupt handler is nested.
-        */
-       ldr     r0, .Lcurrent_intr_depth
-       ldr     r1, [r0]
-       add     r1, r1, #1
-       str     r1, [r0]
-       
-       /* branch off into the external handler */
-       mov     r0, sp
-       bl      _C_LABEL(footbridge_intr_dispatch)
-        
-       /* Decremement the nest count. */
-       ldr     r0, .Lcurrent_intr_depth 
-       ldr     r1, [r0]
-       sub     r1, r1, #1
-       str     r1, [r0]
-
-       /*
-        * If we're returning to user mode, check for pending ASTs.
-        */
-       ldr     r0, [sp]                /* Get the SPSR from stack */
-       and     r0, r0, #(PSR_MODE)     /* Test for USR32 mode before the IRQ */
-       teq     r0, #(PSR_USR32_MODE)
-       bne     .Lirqout                /* Nope, get out now */
-
-.Lastloop:
-       ldr     r0, .Lastpending        /* Do we have an AST pending? */
-       ldr     r1, [r0]
-       teq     r1, #0x00000000
-       beq     .Lirqout                /* Nope, get out now */
-
-       mov     r1, #0x00000000
-       str     r1, [r0]                /* Clear astpending */
-
-       mrs     r4, cpsr                /* save CPSR */
-       bic     r0, r4, #(I32_bit)      /* Enable IRQs */
-       msr     cpsr_c, r0
-
-       mov     r0, sp
-       bl      _C_LABEL(ast)           /* ast(frame) */
-
-       msr     cpsr_c, r4              /* Disable IRQs */
-       b       .Lastloop               /* Check for more ASTs */
-
-.Lirqout:
-       PULLFRAMEFROMSVCANDEXIT
-       movs    pc, lr                  /* Exit */
-
-       .bss
-       .align  0
-
-       .global _C_LABEL(astpending)
-_C_LABEL(astpending):
-       .word   0
-
-       .global _C_LABEL(current_intr_depth)
-_C_LABEL(current_intr_depth):
-       .word   0
-
-       /*
-        * XXX Provide intrnames/intrcnt for legacy code, but
-        * don't actually use them.
-        */
-
-       .global _C_LABEL(intrnames), _C_LABEL(eintrnames)
-       .global _C_LABEL(intrcnt), _C_LABEL(eintrcnt)
-_C_LABEL(intrnames): 
-_C_LABEL(eintrnames):
-
-       .global _C_LABEL(intrcnt), _C_LABEL(sintrcnt), _C_LABEL(eintrcnt)
-_C_LABEL(intrcnt):
-_C_LABEL(eintrcnt):
-
-/* End of footbridge_irq.S */
diff -r d709948c8ba7 -r 06d1f46291f6 sys/arch/arm/ixp12x0/files.ixp12x0
--- a/sys/arch/arm/ixp12x0/files.ixp12x0        Fri Jan 03 00:41:19 2003 +0000
+++ b/sys/arch/arm/ixp12x0/files.ixp12x0        Fri Jan 03 00:55:59 2003 +0000
@@ -1,10 +1,10 @@
-#       $NetBSD: files.ixp12x0,v 1.2 2002/07/20 03:09:03 ichiro Exp $
+#       $NetBSD: files.ixp12x0,v 1.3 2003/01/03 01:08:00 thorpej Exp $
 #
 # Configuration info for Intel IXP12x0 CPU support
 #
 
 file   arch/arm/ixp12x0/ixp12x0_intr.c
-file   arch/arm/ixp12x0/ixp12x0_irq.S
+file   arch/arm/arm32/irq_dispatch.S
 
 # IXP1200 Slow peripheral devices
 device ixpsip { [addr=-1], [size=0], [intr=-1] }: bus_space_generic
diff -r d709948c8ba7 -r 06d1f46291f6 sys/arch/arm/ixp12x0/ixp12x0_intr.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arm/ixp12x0/ixp12x0_intr.h       Fri Jan 03 00:55:59 2003 +0000
@@ -0,0 +1,52 @@
+/*     $NetBSD: ixp12x0_intr.h,v 1.1 2003/01/03 01:07:57 thorpej Exp $ */
+
+/*
+ * Copyright (c) 2002, 2003 Wasabi Systems, Inc.
+ * All rights reserved.
+ *
+ * Written by Allen Briggs for Wasabi Systems, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *      This product includes software developed for the NetBSD Project by
+ *      Wasabi Systems, Inc.
+ * 4. The name of Wasabi Systems, Inc. may not be used to endorse
+ *    or promote products derived from this software without specific prior
+ *    written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _IXP12X0_INTR_H_
+#define _IXP12X0_INTR_H_
+
+#define        ARM_IRQ_HANDLER _C_LABEL(ixp12x0_intr_dispatch)
+
+#ifndef _LOCORE
+
+int    _splraise(int);
+int    _spllower(int);
+void   splx(int);
+void   _setsoftintr(int);
+
+#endif /* ! _LOCORE */
+
+#endif /* _IXP12X0_INTR_H_ */
diff -r d709948c8ba7 -r 06d1f46291f6 sys/arch/arm/ixp12x0/ixp12x0_irq.S
--- a/sys/arch/arm/ixp12x0/ixp12x0_irq.S        Fri Jan 03 00:41:19 2003 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,145 +0,0 @@
-/*     $NetBSD: ixp12x0_irq.S,v 1.4 2003/01/02 23:54:41 thorpej Exp $  */
-
-/*
- * Copyright (c) 2002 Wasabi Systems, Inc.
- * All rights reserved.
- *
- * Written by Jason R. Thorpe for Wasabi Systems, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed for the NetBSD Project by
- *     Wasabi Systems, Inc.
- * 4. The name of Wasabi Systems, Inc. may not be used to endorse
- *    or promote products derived from this software without specific prior
- *    written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "assym.h"
-
-#include <machine/asm.h>



Home | Main Index | Thread Index | Old Index