|
@@ -308,28 +308,6 @@ static int armada_370_xp_mpic_irq_map(struct irq_domain *h,
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-#ifdef CONFIG_SMP
|
|
|
|
-static void armada_mpic_send_doorbell(const struct cpumask *mask,
|
|
|
|
- unsigned int irq)
|
|
|
|
-{
|
|
|
|
- int cpu;
|
|
|
|
- unsigned long map = 0;
|
|
|
|
-
|
|
|
|
- /* Convert our logical CPU mask into a physical one. */
|
|
|
|
- for_each_cpu(cpu, mask)
|
|
|
|
- map |= 1 << cpu_logical_map(cpu);
|
|
|
|
-
|
|
|
|
- /*
|
|
|
|
- * Ensure that stores to Normal memory are visible to the
|
|
|
|
- * other CPUs before issuing the IPI.
|
|
|
|
- */
|
|
|
|
- dsb();
|
|
|
|
-
|
|
|
|
- /* submit softirq */
|
|
|
|
- writel((map << 8) | irq, main_int_base +
|
|
|
|
- ARMADA_370_XP_SW_TRIG_INT_OFFS);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static void armada_xp_mpic_smp_cpu_init(void)
|
|
static void armada_xp_mpic_smp_cpu_init(void)
|
|
{
|
|
{
|
|
u32 control;
|
|
u32 control;
|
|
@@ -352,6 +330,28 @@ static void armada_xp_mpic_smp_cpu_init(void)
|
|
writel(0, per_cpu_int_base + ARMADA_370_XP_INT_CLEAR_MASK_OFFS);
|
|
writel(0, per_cpu_int_base + ARMADA_370_XP_INT_CLEAR_MASK_OFFS);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#ifdef CONFIG_SMP
|
|
|
|
+static void armada_mpic_send_doorbell(const struct cpumask *mask,
|
|
|
|
+ unsigned int irq)
|
|
|
|
+{
|
|
|
|
+ int cpu;
|
|
|
|
+ unsigned long map = 0;
|
|
|
|
+
|
|
|
|
+ /* Convert our logical CPU mask into a physical one. */
|
|
|
|
+ for_each_cpu(cpu, mask)
|
|
|
|
+ map |= 1 << cpu_logical_map(cpu);
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ * Ensure that stores to Normal memory are visible to the
|
|
|
|
+ * other CPUs before issuing the IPI.
|
|
|
|
+ */
|
|
|
|
+ dsb();
|
|
|
|
+
|
|
|
|
+ /* submit softirq */
|
|
|
|
+ writel((map << 8) | irq, main_int_base +
|
|
|
|
+ ARMADA_370_XP_SW_TRIG_INT_OFFS);
|
|
|
|
+}
|
|
|
|
+
|
|
static int armada_xp_mpic_secondary_init(struct notifier_block *nfb,
|
|
static int armada_xp_mpic_secondary_init(struct notifier_block *nfb,
|
|
unsigned long action, void *hcpu)
|
|
unsigned long action, void *hcpu)
|
|
{
|
|
{
|
|
@@ -588,9 +588,8 @@ static int __init armada_370_xp_mpic_of_init(struct device_node *node,
|
|
|
|
|
|
BUG_ON(!armada_370_xp_mpic_domain);
|
|
BUG_ON(!armada_370_xp_mpic_domain);
|
|
|
|
|
|
-#ifdef CONFIG_SMP
|
|
|
|
|
|
+ /* Setup for the boot CPU */
|
|
armada_xp_mpic_smp_cpu_init();
|
|
armada_xp_mpic_smp_cpu_init();
|
|
-#endif
|
|
|
|
|
|
|
|
armada_370_xp_msi_init(node, main_int_res.start);
|
|
armada_370_xp_msi_init(node, main_int_res.start);
|
|
|
|
|