diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2015-10-12 05:28:54 -0400 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2015-10-28 06:43:39 -0400 |
commit | e0868e6f673d0d2db6a3c3798605e6efb756e61e (patch) | |
tree | 34ecf6334a5a58f9a337436d70c2f7fc01f39ca4 | |
parent | 3971cdc202f638f252e39316d42492ace04cc1b1 (diff) |
ARC: smp: irqchip: handle IPI as percpu irq like timer
The reason this was not done so far was lack of genuine IPI_IRQ for
ARC700, as we don't have a SMP version of core yet (which might change
soon thx to EZChip). Nevertheles to increase the build coverage, we
need to allow CONFIG_SMP for ARC700 and still be able to run it on a
UP platform (nsim or AXS101) with a UP Device Tree (SMP-on-UP)
The build itself requires some define for IPI_IRQ and even a dummy
value is fine since that code won't run anyways.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
-rw-r--r-- | arch/arc/include/asm/irq.h | 1 | ||||
-rw-r--r-- | arch/arc/kernel/intc-compact.c | 17 |
2 files changed, 9 insertions, 9 deletions
diff --git a/arch/arc/include/asm/irq.h b/arch/arc/include/asm/irq.h index bc5103637326..4fd7d62a6e30 100644 --- a/arch/arc/include/asm/irq.h +++ b/arch/arc/include/asm/irq.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #ifdef CONFIG_ISA_ARCOMPACT | 16 | #ifdef CONFIG_ISA_ARCOMPACT |
17 | #define TIMER0_IRQ 3 | 17 | #define TIMER0_IRQ 3 |
18 | #define TIMER1_IRQ 4 | 18 | #define TIMER1_IRQ 4 |
19 | #define IPI_IRQ (NR_CPU_IRQS-1) /* dummy to enable SMP build for up hardware */ | ||
19 | #else | 20 | #else |
20 | #define TIMER0_IRQ 16 | 21 | #define TIMER0_IRQ 16 |
21 | #define TIMER1_IRQ 17 | 22 | #define TIMER1_IRQ 17 |
diff --git a/arch/arc/kernel/intc-compact.c b/arch/arc/kernel/intc-compact.c index a1669cf2a277..06bcedf19b62 100644 --- a/arch/arc/kernel/intc-compact.c +++ b/arch/arc/kernel/intc-compact.c | |||
@@ -79,17 +79,16 @@ static struct irq_chip onchip_intc = { | |||
79 | static int arc_intc_domain_map(struct irq_domain *d, unsigned int irq, | 79 | static int arc_intc_domain_map(struct irq_domain *d, unsigned int irq, |
80 | irq_hw_number_t hw) | 80 | irq_hw_number_t hw) |
81 | { | 81 | { |
82 | /* | 82 | switch (irq) { |
83 | * XXX: the IPI IRQ needs to be handled like TIMER too. However ARC core | 83 | case TIMER0_IRQ: |
84 | * code doesn't own it (like TIMER0). ISS IDU / ezchip define it | 84 | #ifdef CONFIG_SMP |
85 | * in platform header which can't be included here as it goes | 85 | case IPI_IRQ: |
86 | * against multi-platform image philisophy | 86 | #endif |
87 | */ | ||
88 | if (irq == TIMER0_IRQ) | ||
89 | irq_set_chip_and_handler(irq, &onchip_intc, handle_percpu_irq); | 87 | irq_set_chip_and_handler(irq, &onchip_intc, handle_percpu_irq); |
90 | else | 88 | break; |
89 | default: | ||
91 | irq_set_chip_and_handler(irq, &onchip_intc, handle_level_irq); | 90 | irq_set_chip_and_handler(irq, &onchip_intc, handle_level_irq); |
92 | 91 | } | |
93 | return 0; | 92 | return 0; |
94 | } | 93 | } |
95 | 94 | ||