aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-06-11 03:33:09 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-06-11 03:33:09 -0400
commit54ff328b46e58568c4b3350c2fa3223ef862e5a4 (patch)
tree93a39c2dffa2490fd62f6441acba5538abf56b03 /arch/sh/kernel/cpu
parent6a1555fdde407dad23b8a119cf5feeb7c6466de9 (diff)
sh: Tie sparseirq in to Kconfig.
Now that the dependent patches are merged, we are ready to enable sparseirq support. This simply adds the Kconfig option, and then converts from the _cpu to the _node allocation routines to follow the upstream sparseirq API changes. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu')
-rw-r--r--arch/sh/kernel/cpu/irq/ipr.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/sh/kernel/cpu/irq/ipr.c b/arch/sh/kernel/cpu/irq/ipr.c
index 6ad40dbad881..808d99a48efb 100644
--- a/arch/sh/kernel/cpu/irq/ipr.c
+++ b/arch/sh/kernel/cpu/irq/ipr.c
@@ -21,6 +21,7 @@
21#include <linux/module.h> 21#include <linux/module.h>
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/topology.h>
24 25
25static inline struct ipr_desc *get_ipr_desc(unsigned int irq) 26static inline struct ipr_desc *get_ipr_desc(unsigned int irq)
26{ 27{
@@ -59,21 +60,17 @@ void register_ipr_controller(struct ipr_desc *desc)
59 60
60 for (i = 0; i < desc->nr_irqs; i++) { 61 for (i = 0; i < desc->nr_irqs; i++) {
61 struct ipr_data *p = desc->ipr_data + i; 62 struct ipr_data *p = desc->ipr_data + i;
62#ifdef CONFIG_SPARSE_IRQ
63 struct irq_desc *irq_desc; 63 struct irq_desc *irq_desc;
64#endif
65 64
66 BUG_ON(p->ipr_idx >= desc->nr_offsets); 65 BUG_ON(p->ipr_idx >= desc->nr_offsets);
67 BUG_ON(!desc->ipr_offsets[p->ipr_idx]); 66 BUG_ON(!desc->ipr_offsets[p->ipr_idx]);
68 67
69#ifdef CONFIG_SPARSE_IRQ 68 irq_desc = irq_to_desc_alloc_node(p->irq, numa_node_id());
70 irq_desc = irq_to_desc_alloc_cpu(p->irq, smp_processor_id());
71 if (unlikely(!irq_desc)) { 69 if (unlikely(!irq_desc)) {
72 printk(KERN_INFO "can not get irq_desc for %d\n", 70 printk(KERN_INFO "can not get irq_desc for %d\n",
73 p->irq); 71 p->irq);
74 continue; 72 continue;
75 } 73 }
76#endif
77 74
78 disable_irq_nosync(p->irq); 75 disable_irq_nosync(p->irq);
79 set_irq_chip_and_handler_name(p->irq, &desc->chip, 76 set_irq_chip_and_handler_name(p->irq, &desc->chip,