diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-06-29 05:24:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-29 13:26:22 -0400 |
commit | 4a733ee12618cf3ec25cbc337a5e0ba3ad5d7fb6 (patch) | |
tree | efee6dfbfcfd08fbe1f2462afb299aeb5624354b /kernel/irq/proc.c | |
parent | 71d218b75fa91219c6bd310fbdd257dfbcac6c88 (diff) |
[PATCH] genirq: cleanup: merge irq_dir[], smp_affinity_entry[] into irq_desc[]
Consolidation: remove the irq_dir[NR_IRQS] and the smp_affinity_entry[NR_IRQS]
arrays and move them into the irq_desc[] array.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/irq/proc.c')
-rw-r--r-- | kernel/irq/proc.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c index 847b98a611e0..f60b85b61e8b 100644 --- a/kernel/irq/proc.c +++ b/kernel/irq/proc.c | |||
@@ -12,15 +12,10 @@ | |||
12 | 12 | ||
13 | #include "internals.h" | 13 | #include "internals.h" |
14 | 14 | ||
15 | static struct proc_dir_entry *root_irq_dir, *irq_dir[NR_IRQS]; | 15 | static struct proc_dir_entry *root_irq_dir; |
16 | 16 | ||
17 | #ifdef CONFIG_SMP | 17 | #ifdef CONFIG_SMP |
18 | 18 | ||
19 | /* | ||
20 | * The /proc/irq/<irq>/smp_affinity values: | ||
21 | */ | ||
22 | static struct proc_dir_entry *smp_affinity_entry[NR_IRQS]; | ||
23 | |||
24 | #ifdef CONFIG_GENERIC_PENDING_IRQ | 19 | #ifdef CONFIG_GENERIC_PENDING_IRQ |
25 | void proc_set_irq_affinity(unsigned int irq, cpumask_t mask_val) | 20 | void proc_set_irq_affinity(unsigned int irq, cpumask_t mask_val) |
26 | { | 21 | { |
@@ -102,7 +97,7 @@ void register_handler_proc(unsigned int irq, struct irqaction *action) | |||
102 | { | 97 | { |
103 | char name [MAX_NAMELEN]; | 98 | char name [MAX_NAMELEN]; |
104 | 99 | ||
105 | if (!irq_dir[irq] || action->dir || !action->name || | 100 | if (!irq_desc[irq].dir || action->dir || !action->name || |
106 | !name_unique(irq, action)) | 101 | !name_unique(irq, action)) |
107 | return; | 102 | return; |
108 | 103 | ||
@@ -110,7 +105,7 @@ void register_handler_proc(unsigned int irq, struct irqaction *action) | |||
110 | snprintf(name, MAX_NAMELEN, "%s", action->name); | 105 | snprintf(name, MAX_NAMELEN, "%s", action->name); |
111 | 106 | ||
112 | /* create /proc/irq/1234/handler/ */ | 107 | /* create /proc/irq/1234/handler/ */ |
113 | action->dir = proc_mkdir(name, irq_dir[irq]); | 108 | action->dir = proc_mkdir(name, irq_desc[irq].dir); |
114 | } | 109 | } |
115 | 110 | ||
116 | #undef MAX_NAMELEN | 111 | #undef MAX_NAMELEN |
@@ -123,21 +118,21 @@ void register_irq_proc(unsigned int irq) | |||
123 | 118 | ||
124 | if (!root_irq_dir || | 119 | if (!root_irq_dir || |
125 | (irq_desc[irq].chip == &no_irq_type) || | 120 | (irq_desc[irq].chip == &no_irq_type) || |
126 | irq_dir[irq]) | 121 | irq_desc[irq].dir) |
127 | return; | 122 | return; |
128 | 123 | ||
129 | memset(name, 0, MAX_NAMELEN); | 124 | memset(name, 0, MAX_NAMELEN); |
130 | sprintf(name, "%d", irq); | 125 | sprintf(name, "%d", irq); |
131 | 126 | ||
132 | /* create /proc/irq/1234 */ | 127 | /* create /proc/irq/1234 */ |
133 | irq_dir[irq] = proc_mkdir(name, root_irq_dir); | 128 | irq_desc[irq].dir = proc_mkdir(name, root_irq_dir); |
134 | 129 | ||
135 | #ifdef CONFIG_SMP | 130 | #ifdef CONFIG_SMP |
136 | { | 131 | { |
137 | struct proc_dir_entry *entry; | 132 | struct proc_dir_entry *entry; |
138 | 133 | ||
139 | /* create /proc/irq/<irq>/smp_affinity */ | 134 | /* create /proc/irq/<irq>/smp_affinity */ |
140 | entry = create_proc_entry("smp_affinity", 0600, irq_dir[irq]); | 135 | entry = create_proc_entry("smp_affinity", 0600, irq_desc[irq].dir); |
141 | 136 | ||
142 | if (entry) { | 137 | if (entry) { |
143 | entry->nlink = 1; | 138 | entry->nlink = 1; |
@@ -145,7 +140,6 @@ void register_irq_proc(unsigned int irq) | |||
145 | entry->read_proc = irq_affinity_read_proc; | 140 | entry->read_proc = irq_affinity_read_proc; |
146 | entry->write_proc = irq_affinity_write_proc; | 141 | entry->write_proc = irq_affinity_write_proc; |
147 | } | 142 | } |
148 | smp_affinity_entry[irq] = entry; | ||
149 | } | 143 | } |
150 | #endif | 144 | #endif |
151 | } | 145 | } |
@@ -155,7 +149,7 @@ void register_irq_proc(unsigned int irq) | |||
155 | void unregister_handler_proc(unsigned int irq, struct irqaction *action) | 149 | void unregister_handler_proc(unsigned int irq, struct irqaction *action) |
156 | { | 150 | { |
157 | if (action->dir) | 151 | if (action->dir) |
158 | remove_proc_entry(action->dir->name, irq_dir[irq]); | 152 | remove_proc_entry(action->dir->name, irq_desc[irq].dir); |
159 | } | 153 | } |
160 | 154 | ||
161 | void init_irq_proc(void) | 155 | void init_irq_proc(void) |