patch-2.4.21 linux-2.4.21/arch/sparc/kernel/irq.c
Next file: linux-2.4.21/arch/sparc/kernel/process.c
Previous file: linux-2.4.21/arch/sparc/kernel/ioport.c
Back to the patch index
Back to the overall index
- Lines: 81
- Date:
2003-06-13 07:51:32.000000000 -0700
- Orig file:
linux-2.4.20/arch/sparc/kernel/irq.c
- Orig date:
2002-08-02 17:39:43.000000000 -0700
diff -urN linux-2.4.20/arch/sparc/kernel/irq.c linux-2.4.21/arch/sparc/kernel/irq.c
@@ -72,7 +72,7 @@
prom_halt();
}
-void (*init_timers)(void (*)(int, void *,struct pt_regs *)) =
+void (*sparc_init_timers)(void (*)(int, void *,struct pt_regs *)) =
(void (*)(void (*)(int, void *,struct pt_regs *))) irq_panic;
/*
@@ -92,7 +92,7 @@
struct irqaction static_irqaction[MAX_STATIC_ALLOC];
int static_irq_count;
-struct irqaction *irq_action[NR_IRQS+1] = {
+struct irqaction *irq_action[NR_IRQS] = {
NULL, NULL, NULL, NULL, NULL, NULL , NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL , NULL, NULL
};
@@ -110,7 +110,7 @@
return sun4d_get_irq_list(buf);
}
- for (i = 0 ; i < (NR_IRQS+1) ; i++) {
+ for (i = 0 ; i < NR_IRQS ; i++) {
action = *(i + irq_action);
if (!action)
continue;
@@ -147,7 +147,7 @@
return sun4d_free_irq(irq, dev_id);
}
- cpu_irq = irq & NR_IRQS;
+ cpu_irq = irq & (NR_IRQS - 1);
action = *(cpu_irq + irq_action);
if (cpu_irq > 14) { /* 14 irq levels on the sparc */
printk("Trying to free bogus IRQ %d\n", irq);
@@ -382,7 +382,7 @@
struct irqaction * action;
unsigned int cpu_irq;
- cpu_irq = irq & NR_IRQS;
+ cpu_irq = irq & (NR_IRQS - 1);
action = *(cpu_irq + irq_action);
printk("IO device interrupt, irq = %d\n", irq);
@@ -392,7 +392,7 @@
printk("Expecting: ");
for (i = 0; i < 16; i++)
if (action->handler)
- prom_printf("[%s:%d:0x%x] ", action->name,
+ printk("[%s:%d:0x%x] ", action->name,
(int) i, (unsigned int) action->handler);
}
printk("AIEEE\n");
@@ -461,7 +461,7 @@
extern struct tt_entry trapbase_cpu1, trapbase_cpu2, trapbase_cpu3;
#endif
- cpu_irq = irq & NR_IRQS;
+ cpu_irq = irq & (NR_IRQS - 1);
if(cpu_irq > 14)
return -EINVAL;
if(!handler)
@@ -551,7 +551,7 @@
unsigned long, const char *, void *);
return sun4d_request_irq(irq, handler, irqflags, devname, dev_id);
}
- cpu_irq = irq & NR_IRQS;
+ cpu_irq = irq & (NR_IRQS - 1);
if(cpu_irq > 14)
return -EINVAL;
@@ -636,7 +636,7 @@
extern void sun4c_init_IRQ( void );
extern void sun4m_init_IRQ( void );
extern void sun4d_init_IRQ( void );
-
+
switch(sparc_cpu_model) {
case sun4c:
case sun4:
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)