From 75337fb90e0ef6702c1bb2337334e258f7119b76 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 9 May 2001 00:32:39 +0000 Subject: Rewrite of Indy IRQs to new style. --- arch/mips/kernel/Makefile | 1 + arch/mips/kernel/irq.c | 21 ++++++++++++++++----- arch/mips/kernel/old-irq.c | 6 ++++++ arch/mips/kernel/setup.c | 14 -------------- 4 files changed, 23 insertions(+), 19 deletions(-) (limited to 'arch/mips/kernel') diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile index 94917f676..f22c94f39 100644 --- a/arch/mips/kernel/Makefile +++ b/arch/mips/kernel/Makefile @@ -42,6 +42,7 @@ endif # Old style irq support, going to die in 2.5. export-objs += old-irq.o +obj-$(CONFIG_NEW_IRQ) += irq.o obj-$(CONFIG_ROTTEN_IRQ) += old-irq.o # transition from old time.c to new time.c diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c index ba73db690..7a779e2dd 100644 --- a/arch/mips/kernel/irq.c +++ b/arch/mips/kernel/irq.c @@ -76,6 +76,9 @@ int get_irq_list(char *buf) int i; p += sprintf(p, " "); + for (i=0; i < 1 /*smp_num_cpus*/; i++) + p += sprintf(p, "CPU%d ", i); + *p++ = '\n'; for (i = 0 ; i < NR_IRQS ; i++) { action = irq_desc[i].action; @@ -182,10 +185,6 @@ void disable_irq(unsigned int irq) } } -void disable_irq(unsigned int irq) -{ -} - /** * enable_irq - enable interrupt handling on an irq * @irq: Interrupt to enable @@ -228,7 +227,7 @@ void enable_irq(unsigned int irq) * SMP cross-CPU interrupts have their own specific * handlers). */ -asmlinkage unsigned int do_IRQ(int irq, struct pt_regs regs) +asmlinkage unsigned int do_IRQ(int irq, struct pt_regs *regs) { /* * We ack quickly, we don't want the irq controller @@ -694,3 +693,15 @@ int setup_irq(unsigned int irq, struct irqaction * new) /* register_irq_proc(irq); */ return 0; } + +void __init init_generic_irq(void) +{ + int i; + + for (i = 0; i < NR_IRQS; i++) { + irq_desc[i].status = IRQ_DISABLED; + irq_desc[i].action = NULL; + irq_desc[i].depth = 1; + irq_desc[i].handler = &no_irq_type; + } +} diff --git a/arch/mips/kernel/old-irq.c b/arch/mips/kernel/old-irq.c index a13948d32..a5dfa2542 100644 --- a/arch/mips/kernel/old-irq.c +++ b/arch/mips/kernel/old-irq.c @@ -33,6 +33,12 @@ #include #include +/* + * The board specific setup routine sets irq_setup to point to a board + * specific setup routine. + */ +void (*irq_setup)(void); + /* * Linux has a controller-independent x86 interrupt architecture. * every controller has a 'controller-template', that is used diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index ac15aae33..ce3016c55 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -100,12 +100,6 @@ static char command_line[COMMAND_LINE_SIZE]; char saved_command_line[COMMAND_LINE_SIZE]; extern char arcs_cmdline[COMMAND_LINE_SIZE]; -/* - * The board specific setup routine sets irq_setup to point to a board - * specific setup routine. - */ -void (*irq_setup)(void); - /* * mips_io_port_base is the begin of the address space to which x86 style * I/O ports are mapped. @@ -420,11 +414,6 @@ init_arch(int argc, char **argv, char **envp, int *prom_vec) start_kernel(); } -static void __init default_irq_setup(void) -{ - panic("Unknown machtype in init_IRQ"); -} - void __init add_memory_region(unsigned long start, unsigned long size, long type) { @@ -536,9 +525,6 @@ void __init setup_arch(char **cmdline_p) int i; - /* Save defaults for configuration-dependent routines. */ - irq_setup = default_irq_setup; - #ifdef CONFIG_BLK_DEV_FD fd_ops = &no_fd_ops; #endif -- cgit v1.2.3