aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-05-07 11:44:08 -0400
committerThomas Gleixner <tglx@linutronix.de>2014-05-16 08:05:19 -0400
commit0a2db49dc4fe2873f857617d320c37b6bfe40255 (patch)
tree8eecb10c8ac8fd9db345a1f7f5d28f3c247ad61e
parent499c2b75e9c695b57faaf6a63fde391ff9e523a3 (diff)
x86: uv: Use irq_alloc/free_hwirq()
No functional change. The request to allocate the irq above NR_IRQS_LEGACY is completely pointless as the implementation enforces that the dynamic allocations are above the GSI interrupts, which includes the legacy PIT irqs. This does not replace the requirement to move x86 to irq domains, but it limits the mess to some degree. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Grant Likely <grant.likely@linaro.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: x86@kernel.org Link: http://lkml.kernel.org/r/20140507154335.252789823@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--arch/x86/platform/uv/uv_irq.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/x86/platform/uv/uv_irq.c b/arch/x86/platform/uv/uv_irq.c
index acf7752da952..b233681af4de 100644
--- a/arch/x86/platform/uv/uv_irq.c
+++ b/arch/x86/platform/uv/uv_irq.c
@@ -238,11 +238,9 @@ uv_set_irq_affinity(struct irq_data *data, const struct cpumask *mask,
238int uv_setup_irq(char *irq_name, int cpu, int mmr_blade, 238int uv_setup_irq(char *irq_name, int cpu, int mmr_blade,
239 unsigned long mmr_offset, int limit) 239 unsigned long mmr_offset, int limit)
240{ 240{
241 int irq, ret; 241 int ret, irq = irq_alloc_hwirq(uv_blade_to_memory_nid(mmr_blade));
242 242
243 irq = create_irq_nr(NR_IRQS_LEGACY, uv_blade_to_memory_nid(mmr_blade)); 243 if (!irq)
244
245 if (irq <= 0)
246 return -EBUSY; 244 return -EBUSY;
247 245
248 ret = arch_enable_uv_irq(irq_name, irq, cpu, mmr_blade, mmr_offset, 246 ret = arch_enable_uv_irq(irq_name, irq, cpu, mmr_blade, mmr_offset,
@@ -250,7 +248,7 @@ int uv_setup_irq(char *irq_name, int cpu, int mmr_blade,
250 if (ret == irq) 248 if (ret == irq)
251 uv_set_irq_2_mmr_info(irq, mmr_offset, mmr_blade); 249 uv_set_irq_2_mmr_info(irq, mmr_offset, mmr_blade);
252 else 250 else
253 destroy_irq(irq); 251 irq_free_hwirq(irq);
254 252
255 return ret; 253 return ret;
256} 254}
@@ -285,6 +283,6 @@ void uv_teardown_irq(unsigned int irq)
285 n = n->rb_right; 283 n = n->rb_right;
286 } 284 }
287 spin_unlock_irqrestore(&uv_irq_lock, irqflags); 285 spin_unlock_irqrestore(&uv_irq_lock, irqflags);
288 destroy_irq(irq); 286 irq_free_hwirq(irq);
289} 287}
290EXPORT_SYMBOL_GPL(uv_teardown_irq); 288EXPORT_SYMBOL_GPL(uv_teardown_irq);