aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
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 /drivers
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 'drivers')
-rw-r--r--drivers/sh/intc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/sh/intc.c b/drivers/sh/intc.c
index caf065694042..d687a9b93d03 100644
--- a/drivers/sh/intc.c
+++ b/drivers/sh/intc.c
@@ -24,6 +24,7 @@
24#include <linux/sh_intc.h> 24#include <linux/sh_intc.h>
25#include <linux/sysdev.h> 25#include <linux/sysdev.h>
26#include <linux/list.h> 26#include <linux/list.h>
27#include <linux/topology.h>
27 28
28#define _INTC_MK(fn, mode, addr_e, addr_d, width, shift) \ 29#define _INTC_MK(fn, mode, addr_e, addr_d, width, shift) \
29 ((shift) | ((width) << 5) | ((fn) << 9) | ((mode) << 13) | \ 30 ((shift) | ((width) << 5) | ((fn) << 9) | ((mode) << 13) | \
@@ -671,7 +672,7 @@ unsigned int intc_evt2irq(unsigned int vector)
671 672
672void __init register_intc_controller(struct intc_desc *desc) 673void __init register_intc_controller(struct intc_desc *desc)
673{ 674{
674 unsigned int i, k, smp, cpu = smp_processor_id(); 675 unsigned int i, k, smp;
675 struct intc_desc_int *d; 676 struct intc_desc_int *d;
676 677
677 d = alloc_bootmem(sizeof(*d)); 678 d = alloc_bootmem(sizeof(*d));
@@ -771,19 +772,16 @@ void __init register_intc_controller(struct intc_desc *desc)
771 for (i = 0; i < desc->nr_vectors; i++) { 772 for (i = 0; i < desc->nr_vectors; i++) {
772 struct intc_vect *vect = desc->vectors + i; 773 struct intc_vect *vect = desc->vectors + i;
773 unsigned int irq = evt2irq(vect->vect); 774 unsigned int irq = evt2irq(vect->vect);
774#ifdef CONFIG_SPARSE_IRQ
775 struct irq_desc *irq_desc; 775 struct irq_desc *irq_desc;
776#endif 776
777 if (!vect->enum_id) 777 if (!vect->enum_id)
778 continue; 778 continue;
779 779
780#ifdef CONFIG_SPARSE_IRQ 780 irq_desc = irq_to_desc_alloc_node(irq, numa_node_id());
781 irq_desc = irq_to_desc_alloc_cpu(irq, cpu);
782 if (unlikely(!irq_desc)) { 781 if (unlikely(!irq_desc)) {
783 printk(KERN_INFO "can not get irq_desc for %d\n", irq); 782 printk(KERN_INFO "can not get irq_desc for %d\n", irq);
784 continue; 783 continue;
785 } 784 }
786#endif
787 785
788 intc_register_irq(desc, d, vect->enum_id, irq); 786 intc_register_irq(desc, d, vect->enum_id, irq);
789 } 787 }