Skip to content

Commit

Permalink
ARC: SMP resurrect #22: [plat-arcfpga] IPI fixes
Browse files Browse the repository at this point in the history
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 <vgupta@synopsys.com>
  • Loading branch information
vineetgarc committed Oct 25, 2012
1 parent d9209dc commit 8562445
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion arch/arc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ irqreturn_t do_IPI(int irq, void *dev_id)
*/
int smp_ipi_irq_setup(int cpu, int irq)
{
return request_irq(irq, do_IPI, 0, "IPI Interrupt", NULL);
return request_irq(irq, do_IPI, IRQF_PERCPU, "IPI Interrupt", NULL);
}

struct cpu cpu_topology[NR_CPUS];
Expand Down
6 changes: 3 additions & 3 deletions arch/arc/plat-arcfpga/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void arc_platform_smp_init_cpu(void)

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

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

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

idu_enable();

Expand Down

0 comments on commit 8562445

Please sign in to comment.