diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2014-04-14 09:54:01 -0400 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2014-05-08 10:41:49 -0400 |
commit | ef37d337e1d37bd84ccaa5811a8d1f00f8b3677c (patch) | |
tree | 8e771442b31bdbd3a82cd81bbda02d886df16ba3 | |
parent | c9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff) |
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: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1397483648-26611-5-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
-rw-r--r-- | arch/arm/mach-mvebu/armada-370-xp.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-mvebu/platsmp.c | 2 | ||||
-rw-r--r-- | drivers/irqchip/irq-armada-370-xp.c | 6 |
3 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/mach-mvebu/armada-370-xp.h b/arch/arm/mach-mvebu/armada-370-xp.h index 237c86b83390..cd57c78af271 100644 --- a/arch/arm/mach-mvebu/armada-370-xp.h +++ b/arch/arm/mach-mvebu/armada-370-xp.h | |||
@@ -20,7 +20,6 @@ | |||
20 | 20 | ||
21 | #define ARMADA_XP_MAX_CPUS 4 | 21 | #define ARMADA_XP_MAX_CPUS 4 |
22 | 22 | ||
23 | void armada_mpic_send_doorbell(const struct cpumask *mask, unsigned int irq); | ||
24 | void armada_xp_mpic_smp_cpu_init(void); | 23 | void armada_xp_mpic_smp_cpu_init(void); |
25 | void armada_xp_secondary_startup(void); | 24 | void armada_xp_secondary_startup(void); |
26 | extern struct smp_operations armada_xp_smp_ops; | 25 | extern struct smp_operations armada_xp_smp_ops; |
diff --git a/arch/arm/mach-mvebu/platsmp.c b/arch/arm/mach-mvebu/platsmp.c index a6da03f5b24e..6f06f6ddb51e 100644 --- a/arch/arm/mach-mvebu/platsmp.c +++ b/arch/arm/mach-mvebu/platsmp.c | |||
@@ -90,8 +90,6 @@ static void __init armada_xp_smp_init_cpus(void) | |||
90 | 90 | ||
91 | if (ncores == 0 || ncores > ARMADA_XP_MAX_CPUS) | 91 | if (ncores == 0 || ncores > ARMADA_XP_MAX_CPUS) |
92 | panic("Invalid number of CPUs in DT\n"); | 92 | panic("Invalid number of CPUs in DT\n"); |
93 | |||
94 | set_smp_cross_call(armada_mpic_send_doorbell); | ||
95 | } | 93 | } |
96 | 94 | ||
97 | static void __init armada_xp_smp_prepare_cpus(unsigned int max_cpus) | 95 | static void __init armada_xp_smp_prepare_cpus(unsigned int max_cpus) |
diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c index 41be897df8d5..727566216e24 100644 --- a/drivers/irqchip/irq-armada-370-xp.c +++ b/drivers/irqchip/irq-armada-370-xp.c | |||
@@ -315,7 +315,8 @@ static int armada_370_xp_mpic_irq_map(struct irq_domain *h, | |||
315 | } | 315 | } |
316 | 316 | ||
317 | #ifdef CONFIG_SMP | 317 | #ifdef CONFIG_SMP |
318 | void armada_mpic_send_doorbell(const struct cpumask *mask, unsigned int irq) | 318 | static void armada_mpic_send_doorbell(const struct cpumask *mask, |
319 | unsigned int irq) | ||
319 | { | 320 | { |
320 | int cpu; | 321 | int cpu; |
321 | unsigned long map = 0; | 322 | unsigned long map = 0; |
@@ -511,6 +512,9 @@ static int __init armada_370_xp_mpic_of_init(struct device_node *node, | |||
511 | if (parent_irq <= 0) { | 512 | if (parent_irq <= 0) { |
512 | irq_set_default_host(armada_370_xp_mpic_domain); | 513 | irq_set_default_host(armada_370_xp_mpic_domain); |
513 | set_handle_irq(armada_370_xp_handle_irq); | 514 | set_handle_irq(armada_370_xp_handle_irq); |
515 | #ifdef CONFIG_SMP | ||
516 | set_smp_cross_call(armada_mpic_send_doorbell); | ||
517 | #endif | ||
514 | } else { | 518 | } else { |
515 | irq_set_chained_handler(parent_irq, | 519 | irq_set_chained_handler(parent_irq, |
516 | armada_370_xp_mpic_handle_cascade_irq); | 520 | armada_370_xp_mpic_handle_cascade_irq); |