Commit ef37d337 authored by Thomas Petazzoni's avatar Thomas Petazzoni Committed by Jason Cooper

irqchip: irq-armada-370-xp: Do the set_smp_cross_call() in the driver

Instead of having the SoC code in arch/arm/mach-mvebu/platsmp.c do the
set_smp_cross_call() to register the IPI-triggering function, it makes
more sense to do exactly what the GIC driver is doing: let the irqchip
driver do it. This way, it avoids having to expose the
armada_mpic_send_doorbell() function between the irqchip driver and
the SoC code.
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1397483648-26611-5-git-send-email-thomas.petazzoni@free-electrons.comSigned-off-by: default avatarJason Cooper <jason@lakedaemon.net>
parent c9eaa447
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#define ARMADA_XP_MAX_CPUS 4 #define ARMADA_XP_MAX_CPUS 4
void armada_mpic_send_doorbell(const struct cpumask *mask, unsigned int irq);
void armada_xp_mpic_smp_cpu_init(void); void armada_xp_mpic_smp_cpu_init(void);
void armada_xp_secondary_startup(void); void armada_xp_secondary_startup(void);
extern struct smp_operations armada_xp_smp_ops; extern struct smp_operations armada_xp_smp_ops;
......
...@@ -90,8 +90,6 @@ static void __init armada_xp_smp_init_cpus(void) ...@@ -90,8 +90,6 @@ static void __init armada_xp_smp_init_cpus(void)
if (ncores == 0 || ncores > ARMADA_XP_MAX_CPUS) if (ncores == 0 || ncores > ARMADA_XP_MAX_CPUS)
panic("Invalid number of CPUs in DT\n"); panic("Invalid number of CPUs in DT\n");
set_smp_cross_call(armada_mpic_send_doorbell);
} }
static void __init armada_xp_smp_prepare_cpus(unsigned int max_cpus) static void __init armada_xp_smp_prepare_cpus(unsigned int max_cpus)
......
...@@ -315,7 +315,8 @@ static int armada_370_xp_mpic_irq_map(struct irq_domain *h, ...@@ -315,7 +315,8 @@ static int armada_370_xp_mpic_irq_map(struct irq_domain *h,
} }
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
void armada_mpic_send_doorbell(const struct cpumask *mask, unsigned int irq) static void armada_mpic_send_doorbell(const struct cpumask *mask,
unsigned int irq)
{ {
int cpu; int cpu;
unsigned long map = 0; unsigned long map = 0;
...@@ -511,6 +512,9 @@ static int __init armada_370_xp_mpic_of_init(struct device_node *node, ...@@ -511,6 +512,9 @@ static int __init armada_370_xp_mpic_of_init(struct device_node *node,
if (parent_irq <= 0) { if (parent_irq <= 0) {
irq_set_default_host(armada_370_xp_mpic_domain); irq_set_default_host(armada_370_xp_mpic_domain);
set_handle_irq(armada_370_xp_handle_irq); set_handle_irq(armada_370_xp_handle_irq);
#ifdef CONFIG_SMP
set_smp_cross_call(armada_mpic_send_doorbell);
#endif
} else { } else {
irq_set_chained_handler(parent_irq, irq_set_chained_handler(parent_irq,
armada_370_xp_mpic_handle_cascade_irq); armada_370_xp_mpic_handle_cascade_irq);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment