Commit 7d0effa8 authored by Ivan Kokshaysky's avatar Ivan Kokshaysky Committed by Richard Henderson

[PATCH] alpha irq proc update

From Jeff.Wiedemeier@hp.com:

- Only create smp_affinity /proc nodes if a set_affinity handler
  is provided.
- Limit the number of irq nodes that will be created in /proc
  to avoid overfilling the /proc inode space.
parent 7d3c579c
...@@ -362,6 +362,7 @@ register_irq_proc (unsigned int irq) ...@@ -362,6 +362,7 @@ register_irq_proc (unsigned int irq)
irq_dir[irq] = proc_mkdir(name, root_irq_dir); irq_dir[irq] = proc_mkdir(name, root_irq_dir);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
if (irq_desc[irq].handler->set_affinity) {
/* create /proc/irq/1234/smp_affinity */ /* create /proc/irq/1234/smp_affinity */
entry = create_proc_entry("smp_affinity", 0600, irq_dir[irq]); entry = create_proc_entry("smp_affinity", 0600, irq_dir[irq]);
...@@ -371,6 +372,7 @@ register_irq_proc (unsigned int irq) ...@@ -371,6 +372,7 @@ register_irq_proc (unsigned int irq)
entry->write_proc = irq_affinity_write_proc; entry->write_proc = irq_affinity_write_proc;
smp_affinity_entry[irq] = entry; smp_affinity_entry[irq] = entry;
}
#endif #endif
} }
...@@ -398,13 +400,17 @@ init_irq_proc (void) ...@@ -398,13 +400,17 @@ init_irq_proc (void)
#endif #endif
/* /*
* Create entries for all existing IRQs. * Create entries for all existing IRQs. If the number of IRQs
* is greater the 1/4 the total dynamic inode space for /proc,
* don't pollute the inode space
*/ */
for (i = 0; i < NR_IRQS; i++) { if (ACTUAL_NR_IRQS < (PROC_NDYNAMIC / 4)) {
for (i = 0; i < ACTUAL_NR_IRQS; i++) {
if (irq_desc[i].handler == &no_irq_type) if (irq_desc[i].handler == &no_irq_type)
continue; continue;
register_irq_proc(i); register_irq_proc(i);
} }
}
} }
int int
...@@ -518,7 +524,7 @@ show_interrupts(struct seq_file *p, void *v) ...@@ -518,7 +524,7 @@ show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
#endif #endif
for (i = 0; i < NR_IRQS; i++) { for (i = 0; i < ACTUAL_NR_IRQS; i++) {
action = irq_desc[i].action; action = irq_desc[i].action;
if (!action) if (!action)
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment