diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-10-08 04:44:21 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-10-12 10:53:40 -0400 |
commit | f981a3dc1941035a108da1276c448de6b10ddac9 (patch) | |
tree | fd92dc3d666c46f18a97f2a5a1b0abfab0d26f88 /arch | |
parent | 08c33db6d044d9dc74ddf8d9ee3cb1fa3eca262b (diff) |
x86: io_apic: Prepare alloc/free_irq_cfg()
Rename the grossly misnamed get_one_free_irq_cfg() to alloc_irq_cfg().
Add a (not yet used) irq number argument to free_irq_cfg()
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 065c5dc88b8c..06da8fe2647e 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -180,7 +180,7 @@ struct irq_cfg *irq_cfg(unsigned int irq) | |||
180 | return get_irq_chip_data(irq); | 180 | return get_irq_chip_data(irq); |
181 | } | 181 | } |
182 | 182 | ||
183 | static struct irq_cfg *get_one_free_irq_cfg(int node) | 183 | static struct irq_cfg *alloc_irq_cfg(unsigned int irq, int node) |
184 | { | 184 | { |
185 | struct irq_cfg *cfg; | 185 | struct irq_cfg *cfg; |
186 | 186 | ||
@@ -199,7 +199,7 @@ out_cfg: | |||
199 | return NULL; | 199 | return NULL; |
200 | } | 200 | } |
201 | 201 | ||
202 | static void free_irq_cfg(struct irq_cfg *cfg) | 202 | static void free_irq_cfg(unsigned int at, struct irq_cfg *cfg) |
203 | { | 203 | { |
204 | free_cpumask_var(cfg->domain); | 204 | free_cpumask_var(cfg->domain); |
205 | free_cpumask_var(cfg->old_domain); | 205 | free_cpumask_var(cfg->old_domain); |
@@ -212,7 +212,7 @@ int arch_init_chip_data(struct irq_desc *desc, int node) | |||
212 | 212 | ||
213 | cfg = get_irq_desc_chip_data(desc); | 213 | cfg = get_irq_desc_chip_data(desc); |
214 | if (!cfg) { | 214 | if (!cfg) { |
215 | cfg = get_one_free_irq_cfg(node); | 215 | cfg = alloc_irq_cfg(desc->irq, node); |
216 | desc->chip_data = cfg; | 216 | desc->chip_data = cfg; |
217 | if (!cfg) { | 217 | if (!cfg) { |
218 | printk(KERN_ERR "can not alloc irq_cfg\n"); | 218 | printk(KERN_ERR "can not alloc irq_cfg\n"); |
@@ -289,7 +289,7 @@ void arch_init_copy_chip_data(struct irq_desc *old_desc, | |||
289 | struct irq_cfg *cfg; | 289 | struct irq_cfg *cfg; |
290 | struct irq_cfg *old_cfg; | 290 | struct irq_cfg *old_cfg; |
291 | 291 | ||
292 | cfg = get_one_free_irq_cfg(node); | 292 | cfg = alloc_irq_cfg(desc->irq, node); |
293 | 293 | ||
294 | if (!cfg) | 294 | if (!cfg) |
295 | return; | 295 | return; |
@@ -318,7 +318,7 @@ void arch_free_chip_data(struct irq_desc *old_desc, struct irq_desc *desc) | |||
318 | 318 | ||
319 | if (old_cfg) { | 319 | if (old_cfg) { |
320 | free_irq_2_pin(old_cfg, cfg); | 320 | free_irq_2_pin(old_cfg, cfg); |
321 | free_irq_cfg(old_cfg); | 321 | free_irq_cfg(old_desc->irq, old_cfg); |
322 | old_desc->chip_data = NULL; | 322 | old_desc->chip_data = NULL; |
323 | } | 323 | } |
324 | } | 324 | } |
@@ -331,12 +331,12 @@ struct irq_cfg *irq_cfg(unsigned int irq) | |||
331 | return irq < nr_irqs ? irq_cfgx + irq : NULL; | 331 | return irq < nr_irqs ? irq_cfgx + irq : NULL; |
332 | } | 332 | } |
333 | 333 | ||
334 | static struct irq_cfg *get_one_free_irq_cfg(unsigned int irq, int node) | 334 | static struct irq_cfg *alloc_irq_cfg(unsigned int irq, int node) |
335 | { | 335 | { |
336 | return irq_cfgx + irq; | 336 | return irq_cfgx + irq; |
337 | } | 337 | } |
338 | 338 | ||
339 | static inline void free_irq_cfg(struct irq_cfg *cfg) { } | 339 | static inline void free_irq_cfg(unsigned int at, struct irq_cfg *cfg) { } |
340 | 340 | ||
341 | #endif | 341 | #endif |
342 | 342 | ||
@@ -353,7 +353,7 @@ static struct irq_cfg *alloc_irq_and_cfg_at(unsigned int at, int node) | |||
353 | return cfg; | 353 | return cfg; |
354 | } | 354 | } |
355 | 355 | ||
356 | cfg = get_one_free_irq_cfg(node); | 356 | cfg = alloc_irq_cfg(at, node); |
357 | if (cfg) | 357 | if (cfg) |
358 | set_irq_chip_data(at, cfg); | 358 | set_irq_chip_data(at, cfg); |
359 | else | 359 | else |
@@ -368,7 +368,7 @@ static int alloc_irq_from(unsigned int from, int node) | |||
368 | 368 | ||
369 | static void free_irq_at(unsigned int at, struct irq_cfg *cfg) | 369 | static void free_irq_at(unsigned int at, struct irq_cfg *cfg) |
370 | { | 370 | { |
371 | free_irq_cfg(cfg); | 371 | free_irq_cfg(at, cfg); |
372 | irq_free_desc(at); | 372 | irq_free_desc(at); |
373 | } | 373 | } |
374 | 374 | ||