diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/irq/proc.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c index 7a6eb04ef6b5..fe92dc5190dd 100644 --- a/kernel/irq/proc.c +++ b/kernel/irq/proc.c | |||
@@ -147,6 +147,26 @@ static const struct file_operations default_affinity_proc_fops = { | |||
147 | .release = single_release, | 147 | .release = single_release, |
148 | .write = default_affinity_write, | 148 | .write = default_affinity_write, |
149 | }; | 149 | }; |
150 | |||
151 | static int irq_node_proc_show(struct seq_file *m, void *v) | ||
152 | { | ||
153 | struct irq_desc *desc = irq_to_desc((long) m->private); | ||
154 | |||
155 | seq_printf(m, "%d\n", desc->node); | ||
156 | return 0; | ||
157 | } | ||
158 | |||
159 | static int irq_node_proc_open(struct inode *inode, struct file *file) | ||
160 | { | ||
161 | return single_open(file, irq_node_proc_show, PDE(inode)->data); | ||
162 | } | ||
163 | |||
164 | static const struct file_operations irq_node_proc_fops = { | ||
165 | .open = irq_node_proc_open, | ||
166 | .read = seq_read, | ||
167 | .llseek = seq_lseek, | ||
168 | .release = single_release, | ||
169 | }; | ||
150 | #endif | 170 | #endif |
151 | 171 | ||
152 | static int irq_spurious_proc_show(struct seq_file *m, void *v) | 172 | static int irq_spurious_proc_show(struct seq_file *m, void *v) |
@@ -231,6 +251,9 @@ void register_irq_proc(unsigned int irq, struct irq_desc *desc) | |||
231 | /* create /proc/irq/<irq>/smp_affinity */ | 251 | /* create /proc/irq/<irq>/smp_affinity */ |
232 | proc_create_data("smp_affinity", 0600, desc->dir, | 252 | proc_create_data("smp_affinity", 0600, desc->dir, |
233 | &irq_affinity_proc_fops, (void *)(long)irq); | 253 | &irq_affinity_proc_fops, (void *)(long)irq); |
254 | |||
255 | proc_create_data("node", 0444, desc->dir, | ||
256 | &irq_node_proc_fops, (void *)(long)irq); | ||
234 | #endif | 257 | #endif |
235 | 258 | ||
236 | proc_create_data("spurious", 0444, desc->dir, | 259 | proc_create_data("spurious", 0444, desc->dir, |