diff --git a/sys/arm/allwinner/a20/files.a20 b/sys/arm/allwinner/a20/files.a20 index a15d6351f056..bc75c32fa632 100644 --- a/sys/arm/allwinner/a20/files.a20 +++ b/sys/arm/allwinner/a20/files.a20 @@ -7,7 +7,6 @@ arm/arm/cpufunc_asm_armv5.S standard arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard -arm/arm/irq_dispatch.S standard arm/arm/gic.c standard arm/allwinner/a20/a20_cpu_cfg.c standard diff --git a/sys/arm/allwinner/files.a10 b/sys/arm/allwinner/files.a10 index 11def4f557c8..c14ef2e4b644 100644 --- a/sys/arm/allwinner/files.a10 +++ b/sys/arm/allwinner/files.a10 @@ -7,7 +7,6 @@ arm/arm/cpufunc_asm_armv5.S standard arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard -arm/arm/irq_dispatch.S standard arm/allwinner/a10_clk.c standard arm/allwinner/a10_common.c standard diff --git a/sys/arm/arm/exception.S b/sys/arm/arm/exception.S index be95a9229818..ea81781295f3 100644 --- a/sys/arm/arm/exception.S +++ b/sys/arm/arm/exception.S @@ -192,6 +192,16 @@ ASENTRY_NP(exception_exit) PULLFRAMEFROMSVCANDEXIT END(exception_exit) +ASENTRY_NP(irq_entry) + sub lr, lr, #0x00000004 /* Adjust the lr */ + PUSHFRAMEINSVC /* Push an interrupt frame */ + mov r0, sp /* arg for dispatcher */ + + adr lr, exception_exit + mov r1, #0 + b _C_LABEL(arm_irq_handler) +END(irq_entry) + /* * undefined_entry: * diff --git a/sys/arm/arm/intr.c b/sys/arm/arm/intr.c index 9c3365d58593..ac93cbdfeb14 100644 --- a/sys/arm/arm/intr.c +++ b/sys/arm/arm/intr.c @@ -56,12 +56,18 @@ typedef void (*mask_fn)(void *); static struct intr_event *intr_events[NIRQ]; -void arm_handler_execute(struct trapframe *, int); +void arm_irq_handler(struct trapframe *); void (*arm_post_filter)(void *) = NULL; int (*arm_config_irq)(int irq, enum intr_trigger trig, enum intr_polarity pol) = NULL; +/* Data for statistics reporting. */ +u_long intrcnt[NIRQ]; +char intrnames[NIRQ * INTRNAME_LEN]; +size_t sintrcnt = sizeof(intrcnt); +size_t sintrnames = sizeof(intrnames); + /* * Pre-format intrnames into an array of fixed-size strings containing spaces. * This allows us to avoid the need for an intermediate table of indices into @@ -127,7 +133,7 @@ dosoftints(void) } void -arm_handler_execute(struct trapframe *frame, int irqnb) +arm_irq_handler(struct trapframe *frame) { struct intr_event *event; int i; diff --git a/sys/arm/arm/irq_dispatch.S b/sys/arm/arm/irq_dispatch.S deleted file mode 100644 index 258782f1ee85..000000000000 --- a/sys/arm/arm/irq_dispatch.S +++ /dev/null @@ -1,120 +0,0 @@ -/* $NetBSD: irq_dispatch.S,v 1.5 2003/10/30 08:57:24 scw Exp $ */ - -/*- - * Copyright (c) 2002 Fujitsu Component Limited - * Copyright (c) 2002 Genetec Corporation - * 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. Neither the name of The Fujitsu Component Limited nor the name of - * Genetec corporation may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY FUJITSU COMPONENT LIMITED AND GENETEC - * CORPORATION ``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 FUJITSU COMPONENT LIMITED OR GENETEC - * CORPORATION 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. - * - */ - -/*- - * Copyright (c) 2002, 2003 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.s" -#include -#include -#include -__FBSDID("$FreeBSD$"); - -/* - * irq_entry: - * Main entry point for the IRQ vector. This is a generic version - * which can be used by different platforms. - */ - .text - .align 0 - -.Lcurrent_intr_depth: - .word _C_LABEL(current_intr_depth) -AST_LOCALS - -ASENTRY_NP(irq_entry) - sub lr, lr, #0x00000004 /* Adjust the lr */ - PUSHFRAMEINSVC /* Push an interrupt frame */ - UNWINDSVCFRAME - mov r0, sp /* arg for dispatcher */ - - mov r1, #0 - bl _C_LABEL(arm_handler_execute) - - DO_AST - PULLFRAMEFROMSVCANDEXIT - movs pc, lr /* Exit */ -END(irq_entry) - - .data - .align 0 - - .global _C_LABEL(intrnames), _C_LABEL(sintrnames) - .global _C_LABEL(intrcnt), _C_LABEL(sintrcnt) -_C_LABEL(intrnames): - .space NIRQ * (MAXCOMLEN + 1) -_C_LABEL(intrcnt): - .space NIRQ * 4 -_C_LABEL(sintrnames): - .int NIRQ * (MAXCOMLEN + 1) -_C_LABEL(sintrcnt): - .int NIRQ * 4 - - .global _C_LABEL(current_intr_depth) -_C_LABEL(current_intr_depth): - .word 0 - diff --git a/sys/arm/at91/files.at91 b/sys/arm/at91/files.at91 index 8c366ca5ebea..f8af397cc379 100644 --- a/sys/arm/at91/files.at91 +++ b/sys/arm/at91/files.at91 @@ -1,6 +1,5 @@ # $FreeBSD$ arm/arm/cpufunc_asm_arm9.S standard -arm/arm/irq_dispatch.S standard arm/at91/at91_machdep.c standard arm/at91/at91_aic.c standard arm/at91/at91.c standard diff --git a/sys/arm/broadcom/bcm2835/files.bcm2835 b/sys/arm/broadcom/bcm2835/files.bcm2835 index 4563b35909b4..1bb1cf6793ca 100644 --- a/sys/arm/broadcom/bcm2835/files.bcm2835 +++ b/sys/arm/broadcom/bcm2835/files.bcm2835 @@ -22,7 +22,6 @@ arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_arm11x6.S standard arm/arm/cpufunc_asm_armv5.S standard arm/arm/cpufunc_asm_armv6.S standard -arm/arm/irq_dispatch.S standard kern/kern_clocksource.c standard diff --git a/sys/arm/econa/files.econa b/sys/arm/econa/files.econa index 0ede5b222a02..bd8673a8b3d7 100644 --- a/sys/arm/econa/files.econa +++ b/sys/arm/econa/files.econa @@ -6,7 +6,6 @@ arm/econa/timer.c standard arm/econa/uart_bus_ec.c optional uart arm/econa/uart_cpu_ec.c optional uart dev/uart/uart_dev_ns8250.c optional uart -arm/arm/irq_dispatch.S standard arm/arm/bus_space_generic.c standard arm/econa/ehci_ebus.c optional ehci arm/econa/ohci_ec.c optional ohci diff --git a/sys/arm/freescale/imx/files.imx51 b/sys/arm/freescale/imx/files.imx51 index 2c6a154475bb..49aeceb6d04c 100644 --- a/sys/arm/freescale/imx/files.imx51 +++ b/sys/arm/freescale/imx/files.imx51 @@ -4,7 +4,6 @@ arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_armv5.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard -arm/arm/irq_dispatch.S standard kern/kern_clocksource.c standard # Init diff --git a/sys/arm/freescale/imx/files.imx53 b/sys/arm/freescale/imx/files.imx53 index 6fb7b5d3da0e..2a7c15f6a813 100644 --- a/sys/arm/freescale/imx/files.imx53 +++ b/sys/arm/freescale/imx/files.imx53 @@ -4,7 +4,6 @@ arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_armv5.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard -arm/arm/irq_dispatch.S standard kern/kern_clocksource.c standard # Init diff --git a/sys/arm/freescale/imx/files.imx6 b/sys/arm/freescale/imx/files.imx6 index b08b4bd24d58..7d1bf5ef662a 100644 --- a/sys/arm/freescale/imx/files.imx6 +++ b/sys/arm/freescale/imx/files.imx6 @@ -8,7 +8,6 @@ arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv5.S standard arm/arm/cpufunc_asm_armv7.S standard -arm/arm/irq_dispatch.S standard kern/kern_clocksource.c standard # diff --git a/sys/arm/freescale/vybrid/files.vybrid b/sys/arm/freescale/vybrid/files.vybrid index 9bcd8bc1f6e5..81928c3fb5f4 100644 --- a/sys/arm/freescale/vybrid/files.vybrid +++ b/sys/arm/freescale/vybrid/files.vybrid @@ -8,7 +8,6 @@ arm/arm/cpufunc_asm_armv5.S standard arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard -arm/arm/irq_dispatch.S standard arm/arm/bus_space-v6.c standard arm/arm/gic.c standard diff --git a/sys/arm/lpc/files.lpc b/sys/arm/lpc/files.lpc index 9569702e414e..8b24d3b0a9b4 100644 --- a/sys/arm/lpc/files.lpc +++ b/sys/arm/lpc/files.lpc @@ -1,6 +1,5 @@ # $FreeBSD$ arm/arm/bus_space_generic.c standard -arm/arm/irq_dispatch.S standard arm/arm/cpufunc_asm_arm9.S standard arm/arm/cpufunc_asm_armv5.S standard arm/lpc/lpc_machdep.c standard diff --git a/sys/arm/mv/files.mv b/sys/arm/mv/files.mv index 4fbdc6d17357..0d14e4d92f6a 100644 --- a/sys/arm/mv/files.mv +++ b/sys/arm/mv/files.mv @@ -20,7 +20,6 @@ arm/arm/cpufunc_asm_armv5_ec.S standard arm/arm/cpufunc_asm_armv7.S standard arm/arm/cpufunc_asm_sheeva.S standard arm/arm/cpufunc_asm_pj4b.S standard -arm/arm/irq_dispatch.S standard arm/mv/bus_space.c standard arm/mv/gpio.c standard diff --git a/sys/arm/rockchip/files.rk30xx b/sys/arm/rockchip/files.rk30xx index ae9b68013192..98e3d413757c 100644 --- a/sys/arm/rockchip/files.rk30xx +++ b/sys/arm/rockchip/files.rk30xx @@ -7,7 +7,6 @@ arm/arm/cpufunc_asm_armv5.S standard arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard -arm/arm/irq_dispatch.S standard arm/arm/gic.c standard arm/arm/mpcore_timer.c standard diff --git a/sys/arm/s3c2xx0/files.s3c2xx0 b/sys/arm/s3c2xx0/files.s3c2xx0 index 0e82b3904657..5ad289092fab 100644 --- a/sys/arm/s3c2xx0/files.s3c2xx0 +++ b/sys/arm/s3c2xx0/files.s3c2xx0 @@ -2,7 +2,6 @@ arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_arm9.S standard -arm/arm/irq_dispatch.S standard arm/s3c2xx0/board_ln2410sbc.c optional board_ln2410sbc arm/s3c2xx0/s3c24x0_rtc.c standard arm/s3c2xx0/s3c24x0_machdep.c standard diff --git a/sys/arm/samsung/exynos/files.exynos5 b/sys/arm/samsung/exynos/files.exynos5 index bb8218e4c1f7..c68b1ff9acb2 100644 --- a/sys/arm/samsung/exynos/files.exynos5 +++ b/sys/arm/samsung/exynos/files.exynos5 @@ -8,7 +8,6 @@ arm/arm/cpufunc_asm_armv5.S standard arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard -arm/arm/irq_dispatch.S standard arm/arm/bus_space-v6.c standard arm/arm/gic.c standard diff --git a/sys/arm/tegra/files.tegra2 b/sys/arm/tegra/files.tegra2 index de91f32fe886..ce2c5a10c73c 100644 --- a/sys/arm/tegra/files.tegra2 +++ b/sys/arm/tegra/files.tegra2 @@ -6,7 +6,6 @@ arm/arm/bus_space-v6.c standard arm/arm/cpufunc_asm_armv5.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard -arm/arm/irq_dispatch.S standard arm/arm/gic.c standard arm/arm/mpcore_timer.c standard diff --git a/sys/arm/ti/files.ti b/sys/arm/ti/files.ti index 510dbf982fd2..1068a451f560 100644 --- a/sys/arm/ti/files.ti +++ b/sys/arm/ti/files.ti @@ -9,7 +9,6 @@ arm/arm/cpufunc_asm_armv5.S standard arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard -arm/arm/irq_dispatch.S standard arm/ti/ti_common.c standard arm/ti/ti_cpuid.c standard diff --git a/sys/arm/versatile/files.versatile b/sys/arm/versatile/files.versatile index ba892b362121..254ebe1ea337 100644 --- a/sys/arm/versatile/files.versatile +++ b/sys/arm/versatile/files.versatile @@ -6,7 +6,6 @@ arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_arm11x6.S standard arm/arm/cpufunc_asm_armv5.S standard arm/arm/cpufunc_asm_armv6.S standard -arm/arm/irq_dispatch.S standard arm/versatile/bus_space.c standard arm/versatile/pl050.c optional sc diff --git a/sys/arm/xilinx/files.zynq7 b/sys/arm/xilinx/files.zynq7 index 1be012f87443..5b25dc495d0c 100644 --- a/sys/arm/xilinx/files.zynq7 +++ b/sys/arm/xilinx/files.zynq7 @@ -11,7 +11,6 @@ arm/arm/cpufunc_asm_armv5.S standard arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard -arm/arm/irq_dispatch.S standard arm/arm/gic.c standard arm/arm/mpcore_timer.c standard diff --git a/sys/arm/xscale/i80321/files.i80219 b/sys/arm/xscale/i80321/files.i80219 index 398389975419..e9d9eab95643 100644 --- a/sys/arm/xscale/i80321/files.i80219 +++ b/sys/arm/xscale/i80321/files.i80219 @@ -4,7 +4,6 @@ # arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_xscale.S standard -arm/arm/irq_dispatch.S standard arm/xscale/i80321/i80321.c standard arm/xscale/i80321/i80321_dma.c optional dma arm/xscale/i80321/i80321_mcu.c standard diff --git a/sys/arm/xscale/i80321/files.i80321 b/sys/arm/xscale/i80321/files.i80321 index 509bcab49685..48082242e3a3 100644 --- a/sys/arm/xscale/i80321/files.i80321 +++ b/sys/arm/xscale/i80321/files.i80321 @@ -1,7 +1,6 @@ #$FreeBSD$ arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_xscale.S standard -arm/arm/irq_dispatch.S standard arm/xscale/i80321/i80321.c standard arm/xscale/i80321/i80321_aau.c optional aau arm/xscale/i80321/i80321_dma.c optional dma diff --git a/sys/arm/xscale/i8134x/files.i81342 b/sys/arm/xscale/i8134x/files.i81342 index 143576caff4c..c9bd619ed641 100644 --- a/sys/arm/xscale/i8134x/files.i81342 +++ b/sys/arm/xscale/i8134x/files.i81342 @@ -2,7 +2,6 @@ arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_xscale.S standard arm/arm/cpufunc_asm_xscale_c3.S standard -arm/arm/irq_dispatch.S standard arm/xscale/i80321/i80321_timer.c standard arm/xscale/i80321/i80321_wdog.c optional iopwdog arm/xscale/i8134x/i81342.c standard diff --git a/sys/arm/xscale/ixp425/files.ixp425 b/sys/arm/xscale/ixp425/files.ixp425 index 5b1446ccdf1b..8d8855b78308 100644 --- a/sys/arm/xscale/ixp425/files.ixp425 +++ b/sys/arm/xscale/ixp425/files.ixp425 @@ -1,7 +1,6 @@ #$FreeBSD$ arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_xscale.S standard -arm/arm/irq_dispatch.S standard arm/xscale/ixp425/ixp425.c standard arm/xscale/ixp425/ixp425_mem.c standard arm/xscale/ixp425/ixp425_space.c standard diff --git a/sys/arm/xscale/pxa/files.pxa b/sys/arm/xscale/pxa/files.pxa index ce2472a1e6ee..d2ea0c47664e 100644 --- a/sys/arm/xscale/pxa/files.pxa +++ b/sys/arm/xscale/pxa/files.pxa @@ -2,7 +2,6 @@ arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_xscale.S standard -arm/arm/irq_dispatch.S standard arm/xscale/pxa/pxa_gpio.c standard arm/xscale/pxa/pxa_icu.c standard