Skip to content

Commit 8562445

Browse files
committed
ARC: SMP resurrect #22: [plat-arcfpga] IPI fixes
1. IPI was not going from cpu1 -> cpu0. Turns out that the IRQ mode programmed IDU_IRQ_MOD_TCPU_ALLRECP mismatched in value in kernel and ISS. kernel (per IDU specs) defines it as '3' whereas ISS believes it shd be 7 (which is clearly a BUG). 2. the IDU IRQs are hardwaired hence need to be setup as IRQF_PERCPU to disallow any irq-affinity changes. Signed-off-by: Vineet Gupta <[email protected]>
1 parent d9209dc commit 8562445

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

arch/arc/kernel/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ irqreturn_t do_IPI(int irq, void *dev_id)
321321
*/
322322
int smp_ipi_irq_setup(int cpu, int irq)
323323
{
324-
return request_irq(irq, do_IPI, 0, "IPI Interrupt", NULL);
324+
return request_irq(irq, do_IPI, IRQF_PERCPU, "IPI Interrupt", NULL);
325325
}
326326

327327
struct cpu cpu_topology[NR_CPUS];

arch/arc/plat-arcfpga/smp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ void arc_platform_smp_init_cpu(void)
6666

6767
/* Check if CPU is configured for more than 16 interrupts */
6868
if (NR_IRQS <= 16 || get_hw_config_num_irq() <= 16)
69-
BUG();
69+
panic("[arcfpga] IRQ system can't support IDU IPI\n");
7070

7171
/* Setup the interrupt in IDU */
7272
idu_disable();
@@ -75,8 +75,8 @@ void arc_platform_smp_init_cpu(void)
7575
(0x1 << cpu) /* target cpus mask, here single cpu */
7676
);
7777

78-
idu_irq_set_mode(cpu, /* IDU IRQ assoc with CPU */
79-
IDU_IRQ_MOD_TCPU_ALLRECP, IDU_IRQ_MODE_PULSE_TRIG);
78+
idu_irq_set_mode(cpu, 7, /* XXX: IDU_IRQ_MOD_TCPU_ALLRECP: ISS bug */
79+
IDU_IRQ_MODE_PULSE_TRIG);
8080

8181
idu_enable();
8282

0 commit comments

Comments
 (0)