[parisc-linux-cvs] DIFF - irq.c /proc/interrupts fix
Grant Grundler
grundler@cup.hp.com
Mon, 26 Feb 2001 16:39:04 -0800 (PST)
Fixes shared IRQ not showing up in /proc/interrupts
grant
ps. I see I have a bug in IOSAPIC where it registers the
same IRQ line twice with the CPU IRQ region. It should
only do it once per line regardless of how many devices
share the line. It's not hurting anything except that
we may run out of CPU EIRR bits sooner than we ought to.
(Which might explain the L2K iosapic problem)
Index: arch/parisc/kernel/irq.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/irq.c,v
retrieving revision 1.35
diff -u -p -r1.35 irq.c
--- irq.c 2001/02/23 01:08:42 1.35
+++ irq.c 2001/02/27 00:12:59
@@ -169,10 +169,8 @@ int get_irq_list(char *buf)
{
#ifdef CONFIG_PROC_FS
char *p = buf;
- int i;
- int regnr;
struct irq_region *region;
- struct irqaction *action;
+ int regnr;
p += sprintf(p, " ");
p += sprintf(p, " IRQ count ");
@@ -183,21 +181,21 @@ int get_irq_list(char *buf)
*/
spin_lock(&irq_lock);
for (regnr = 0; regnr < NR_IRQ_REGS; regnr++) {
+ int i;
region = irq_region[regnr];
if (!region || !region->action)
continue;
for (i = 0; i <= MAX_CPU_IRQ; i++) {
- unsigned int irq_no;
+ struct irqaction *action = &(region->action[i]);
+ unsigned int irq_no = IRQ_FROM_REGION(regnr) + i;
#ifdef CONFIG_SMP
int j;
#endif
- action = &(region->action[i]);
- if (!action->handler)
- continue;
- irq_no = IRQ_FROM_REGION(regnr) + i;
+ if (!action->handler)
+ continue;
p += sprintf(p, "%3d: ", irq_no);
#ifndef CONFIG_SMP
@@ -210,8 +208,12 @@ int get_irq_list(char *buf)
p += sprintf(p, " %14s",
region->data.name ? region->data.name : "N/A");
p += sprintf(p, " %s", action->name);
+
+ while ((action = action->next))
+ p += sprintf(p, ", %s", action->name);
+
*p++ = '\n';
- }
+ }
}
spin_unlock(&irq_lock);