aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
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
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')
-rw-r--r--arch/sh/Kconfig12
-rw-r--r--arch/sh/kernel/cpu/irq/ipr.c7
2 files changed, 14 insertions, 5 deletions
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index b5629cdc37a0..586cd045e2db 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -678,6 +678,18 @@ config GUSA_RB
678 LLSC, this should be more efficient than the other alternative of 678 LLSC, this should be more efficient than the other alternative of
679 disabling interrupts around the atomic sequence. 679 disabling interrupts around the atomic sequence.
680 680
681config SPARSE_IRQ
682 bool "Support sparse irq numbering"
683 depends on EXPERIMENTAL
684 help
685 This enables support for sparse irqs. This is useful in general
686 as most CPUs have a fairly sparse array of IRQ vectors, which
687 the irq_desc then maps directly on to. Systems with a high
688 number of off-chip IRQs will want to treat this as
689 experimental until they have been independently verified.
690
691 If you don't know what to do here, say N.
692
681endmenu 693endmenu
682 694
683menu "Boot options" 695menu "Boot options"
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,