diff options
| -rw-r--r-- | Documentation/filesystems/proc.txt | 4 | ||||
| -rw-r--r-- | kernel/irq/proc.c | 23 |
2 files changed, 27 insertions, 0 deletions
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index a4f30faa4f1f..6507d2ae5236 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
| @@ -566,6 +566,10 @@ The default_smp_affinity mask applies to all non-active IRQs, which are the | |||
| 566 | IRQs which have not yet been allocated/activated, and hence which lack a | 566 | IRQs which have not yet been allocated/activated, and hence which lack a |
| 567 | /proc/irq/[0-9]* directory. | 567 | /proc/irq/[0-9]* directory. |
| 568 | 568 | ||
| 569 | The node file on an SMP system shows the node to which the device using the IRQ | ||
| 570 | reports itself as being attached. This hardware locality information does not | ||
| 571 | include information about any possible driver locality preference. | ||
| 572 | |||
| 569 | prof_cpu_mask specifies which CPUs are to be profiled by the system wide | 573 | prof_cpu_mask specifies which CPUs are to be profiled by the system wide |
| 570 | profiler. Default value is ffffffff (all cpus). | 574 | profiler. Default value is ffffffff (all cpus). |
| 571 | 575 | ||
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c index 6f50eccc79c0..e346e08f5c34 100644 --- a/kernel/irq/proc.c +++ b/kernel/irq/proc.c | |||
| @@ -146,6 +146,26 @@ static const struct file_operations default_affinity_proc_fops = { | |||
| 146 | .release = single_release, | 146 | .release = single_release, |
| 147 | .write = default_affinity_write, | 147 | .write = default_affinity_write, |
| 148 | }; | 148 | }; |
| 149 | |||
| 150 | static int irq_node_proc_show(struct seq_file *m, void *v) | ||
| 151 | { | ||
| 152 | struct irq_desc *desc = irq_to_desc((long) m->private); | ||
| 153 | |||
| 154 | seq_printf(m, "%d\n", desc->node); | ||
| 155 | return 0; | ||
| 156 | } | ||
| 157 | |||
| 158 | static int irq_node_proc_open(struct inode *inode, struct file *file) | ||
| 159 | { | ||
| 160 | return single_open(file, irq_node_proc_show, PDE(inode)->data); | ||
| 161 | } | ||
| 162 | |||
| 163 | static const struct file_operations irq_node_proc_fops = { | ||
| 164 | .open = irq_node_proc_open, | ||
| 165 | .read = seq_read, | ||
| 166 | .llseek = seq_lseek, | ||
| 167 | .release = single_release, | ||
| 168 | }; | ||
| 149 | #endif | 169 | #endif |
| 150 | 170 | ||
| 151 | static int irq_spurious_proc_show(struct seq_file *m, void *v) | 171 | static int irq_spurious_proc_show(struct seq_file *m, void *v) |
| @@ -230,6 +250,9 @@ void register_irq_proc(unsigned int irq, struct irq_desc *desc) | |||
| 230 | /* create /proc/irq/<irq>/smp_affinity */ | 250 | /* create /proc/irq/<irq>/smp_affinity */ |
| 231 | proc_create_data("smp_affinity", 0600, desc->dir, | 251 | proc_create_data("smp_affinity", 0600, desc->dir, |
| 232 | &irq_affinity_proc_fops, (void *)(long)irq); | 252 | &irq_affinity_proc_fops, (void *)(long)irq); |
| 253 | |||
| 254 | proc_create_data("node", 0444, desc->dir, | ||
| 255 | &irq_node_proc_fops, (void *)(long)irq); | ||
| 233 | #endif | 256 | #endif |
| 234 | 257 | ||
| 235 | proc_create_data("spurious", 0444, desc->dir, | 258 | proc_create_data("spurious", 0444, desc->dir, |
