ARM: riscpc: convert to sparse IRQs
Subsystems (5)
PATCH 1/1 ARM: riscpc: convert to sparse IRQs
To improve future maintainability, change the interrupt handling for mach-rpc to use sparse IRQs.
Since the number of possible interrupts is already fixed and relatively small, just make it use all legacy interrupts preallocated using the .nr_irqs field in the machine descriptor, rather than actually allocating domains on the fly.
Several files had to be adjusted to include <mach/irqs.h> explicitly because it is no longer implicitly included with sparse IRQs.
Description adapted from commit c78a41fc04f0 ("ARM: s3c24xx: convert to sparse-irq").
---
This commit depends on my previous submission "ARM: <asm/floppy.h>: fix build with sparse IRQs".
arch/arm/Kconfig | 2 +- arch/arm/mach-rpc/dma.c | 1 + arch/arm/mach-rpc/ecard.c | 2 +- arch/arm/mach-rpc/include/mach/irqs.h | 2 +- arch/arm/mach-rpc/irq.c | 3 ++- arch/arm/mach-rpc/riscpc.c | 2 ++ arch/arm/mach-rpc/time.c | 1 + drivers/input/mouse/rpcmouse.c | 2 +- drivers/input/serio/rpckbd.c | 1 + 9 files changed, 11 insertions(+), 5 deletions(-)
arch/arm/Kconfig +1 -1
@@ -153,7 +153,7 @@ config ARM select PCI_SYSCALL if PCI select PERF_USE_VMALLOC select RTC_LIB - select SPARSE_IRQ if !(ARCH_FOOTBRIDGE || ARCH_RPC) + select SPARSE_IRQ if !ARCH_FOOTBRIDGE select SYS_SUPPORTS_APM_EMULATION select THREAD_INFO_IN_TASK select TIMER_OF if OF
arch/arm/mach-rpc/dma.c +1 -0
@@ -17,6 +17,7 @@#include <asm/fiq.h> #include <asm/irq.h> #include <mach/hardware.h> +#include <mach/irqs.h> #include <linux/uaccess.h> #include <asm/mach/dma.h>
arch/arm/mach-rpc/ecard.c +1 -1
@@ -46,9 +46,9 @@#include <asm/dma.h> #include <asm/ecard.h> #include <mach/hardware.h> +#include <mach/irqs.h> #include <asm/irq.h> #include <asm/mmu_context.h> -#include <asm/mach/irq.h> #include <asm/tlbflush.h> #include "ecard.h"
arch/arm/mach-rpc/include/mach/irqs.h +1 -1
@@ -39,4 +39,4 @@*/ #define FIQ_START 64 -#define NR_IRQS 128 +#define RPC_NR_IRQS 128
arch/arm/mach-rpc/irq.c +2 -1
@@ -5,6 +5,7 @@#include <asm/mach/irq.h> #include <mach/iomd.h> +#include <mach/irqs.h> #include <asm/irq.h> #include <asm/fiq.h>
@@ -177,7 +178,7 @@ void __init rpc_init_irq(void)set_handle_irq (iomd_handle_irq); -for (irq =0 ; irq <NR_IRQS ; irq++) { +for (irq =0 ; irq <RPC_NR_IRQS ; irq++) { clr =IRQ_NOREQUEST ; set =0 ;
arch/arm/mach-rpc/riscpc.c +2 -0
@@ -23,6 +23,7 @@#include <asm/mach-types.h> #include <mach/hardware.h> #include <mach/iomd.h> +#include <mach/irqs.h> #include <asm/page.h> #include <asm/domain.h> #include <asm/setup.h>
@@ -219,6 +220,7 @@ MACHINE_START(RISCPC, "Acorn-RiscPC") .reserve_lp0 = 1, .reserve_lp1 = 1, .map_io = rpc_map_io, + .nr_irqs = RPC_NR_IRQS, .init_irq = rpc_init_irq, .init_time = ioc_timer_init, .restart = rpc_restart,
arch/arm/mach-rpc/time.c +1 -0
@@ -18,6 +18,7 @@#include <mach/hardware.h> #include <mach/iomd.h> +#include <mach/irqs.h> #include <asm/mach/time.h>
drivers/input/mouse/rpcmouse.c +1 -1
@@ -22,8 +22,8 @@#include <linux/io.h> #include <mach/hardware.h> -#include <asm/irq.h> #include <mach/iomd.h> +#include <mach/irqs.h> MODULE_AUTHOR ("Vojtech Pavlik, Russell King" );MODULE_DESCRIPTION ("Acorn RiscPC mouse driver" );
drivers/input/serio/rpckbd.c +1 -0
@@ -18,6 +18,7 @@#include <mach/hardware.h> #include <mach/iomd.h> +#include <mach/irqs.h> MODULE_AUTHOR ("Vojtech Pavlik, Russell King" );MODULE_DESCRIPTION ("Acorn RiscPC PS/2 keyboard controller driver" );
Signature · 1 line
2.43.0
Quoted 2 lines · Ethan Nelson-Moore
This commit depends on my previous submission "ARM: <
asm/floppy.h>: fix build with sparse IRQs".
It also depends on these commits, which I neglected to mention, because it modifies the same sections of code:
ARM: riscpc: use iomd.h everywhere and remove redundant ioc.h header
ARM: move Risc PC-specific <asm/hardware/iomd.h> header into mach-rpc