|
@@ -146,6 +146,26 @@ static const struct file_operations default_affinity_proc_fops = {
|
|
.release = single_release,
|
|
.release = single_release,
|
|
.write = default_affinity_write,
|
|
.write = default_affinity_write,
|
|
};
|
|
};
|
|
|
|
+
|
|
|
|
+static int irq_node_proc_show(struct seq_file *m, void *v)
|
|
|
|
+{
|
|
|
|
+ struct irq_desc *desc = irq_to_desc((long) m->private);
|
|
|
|
+
|
|
|
|
+ seq_printf(m, "%d\n", desc->node);
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static int irq_node_proc_open(struct inode *inode, struct file *file)
|
|
|
|
+{
|
|
|
|
+ return single_open(file, irq_node_proc_show, PDE(inode)->data);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static const struct file_operations irq_node_proc_fops = {
|
|
|
|
+ .open = irq_node_proc_open,
|
|
|
|
+ .read = seq_read,
|
|
|
|
+ .llseek = seq_lseek,
|
|
|
|
+ .release = single_release,
|
|
|
|
+};
|
|
#endif
|
|
#endif
|
|
|
|
|
|
static int irq_spurious_proc_show(struct seq_file *m, void *v)
|
|
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)
|
|
/* create /proc/irq/<irq>/smp_affinity */
|
|
/* create /proc/irq/<irq>/smp_affinity */
|
|
proc_create_data("smp_affinity", 0600, desc->dir,
|
|
proc_create_data("smp_affinity", 0600, desc->dir,
|
|
&irq_affinity_proc_fops, (void *)(long)irq);
|
|
&irq_affinity_proc_fops, (void *)(long)irq);
|
|
|
|
+
|
|
|
|
+ proc_create_data("node", 0444, desc->dir,
|
|
|
|
+ &irq_node_proc_fops, (void *)(long)irq);
|
|
#endif
|
|
#endif
|
|
|
|
|
|
proc_create_data("spurious", 0444, desc->dir,
|
|
proc_create_data("spurious", 0444, desc->dir,
|