irqchip: bcm2835: Avoid arch/arm-specific handle_IRQ
Subsystems (3)
PATCH v2 1/4 irqchip: bcm2835: Avoid arch/arm-specific handle_IRQ
This is equivalent and works for arm64 as well.
Signed-off-by Eric Anholt <[email protected]>
Acked-by Stephen Warren <[email protected]>
---
v2: add ack
drivers/irqchip/irq-bcm2835.c | 3 +-- drivers/irqchip/irq-bcm2836.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/irqchip/irq-bcm2835.c +1 -2
@@ -52,7 +52,6 @@#include <linux/irqdomain.h> #include <asm/exception.h> -#include <asm/mach/irq.h> /* Put the bank and irq (32 bits) into the hwirq */ #define MAKE_HWIRQ (b, n) ((b << 5) | (n))
@@ -242,7 +241,7 @@ static void __exception_irq_entry bcm2835_handle_irq(u32 hwirq;while ((hwirq =get_next_armctrl_hwirq ()) != ~0 ) -handle_IRQ (irq_linear_revmap (intc.domain, hwirq), regs); +handle_domain_irq (intc.domain, hwirq, regs); }static void bcm2836_chained_handle_irq (struct irq_desc *desc)
drivers/irqchip/irq-bcm2836.c +1 -1
@@ -180,7 +180,7 @@ __exception_irq_entry bcm2836_arm_irqchip_handle_irq(struct pt_regs *regs) }else if (stat) {u32 hwirq =ffs (stat) -1 ; -handle_IRQ (irq_linear_revmap (intc.domain, hwirq), regs); +handle_domain_irq (intc.domain, hwirq, regs); } }
Signature · 1 line
2.8.0.rc3
PATCH v2 2/4 irqchip: bcm2836: Drop smp_set_ops on arm64 builds
For arm64, the bootloader will instead be implementing the spin-table enable method.
Signed-off-by Eric Anholt <[email protected]>
Acked-by Stephen Warren <[email protected]>
---
v2: add ack, fix #ifdef
drivers/irqchip/irq-bcm2836.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/irqchip/irq-bcm2836.c +5 -1
@@ -223,6 +223,7 @@ static struct notifier_block bcm2836_arm_irqchip_cpu_notifier = { .priority = 100, }; +#ifdef CONFIG_ARM int __init bcm2836_smp_boot_secondary (unsigned int cpu,struct task_struct *idle) {
@@ -238,7 +239,7 @@ int __init bcm2836_smp_boot_secondary(unsigned int cpu,static const struct smp_operations bcm2836_smp_ops__initconst = { .smp_boot_secondary = bcm2836_smp_boot_secondary, }; - +#endif #endif static const struct irq_domain_ops bcm2836_arm_irqchip_intc_ops = {
@@ -256,8 +257,11 @@ bcm2836_arm_irqchip_smp_init(void)register_cpu_notifier (&bcm2836_arm_irqchip_cpu_notifier);set_smp_cross_call (bcm2836_arm_irqchip_send_ipi); + +#ifdef CONFIG_ARM smp_set_ops (&bcm2836_smp_ops);#endif +#endif }/*
Signature · 1 line
2.8.0.rc3
PATCH v2 3/4 irqchip: bcm2836: Fix compiler warning on 64-bit build
In reply to Eric AnholtSigned-off-by Eric Anholt <[email protected]>
Acked-by Stephen Warren <[email protected]>
---
v2: add ack
drivers/irqchip/irq-bcm2836.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-bcm2836.c +1 -1
@@ -253,7 +253,7 @@ bcm2836_arm_irqchip_smp_init(void)/* Unmask IPIs to the boot CPU. */ bcm2836_arm_irqchip_cpu_notify (&bcm2836_arm_irqchip_cpu_notifier,CPU_STARTING , - (void *)smp_processor_id ()); + (void *)(uintptr_t )smp_processor_id ());register_cpu_notifier (&bcm2836_arm_irqchip_cpu_notifier);set_smp_cross_call (bcm2836_arm_irqchip_send_ipi);
Signature · 1 line
2.8.0.rc3
PATCH v2 4/4 irqchip: bcm2836: Use a more generic memory barrier call
In reply to Eric Anholtdsb() requires an argument on arm64, so we needed to add "sy". Instead, take this opportunity to switch to the same smp_wmb() call that gic uses for its IPIs. This is a less strong barrier than we were doing before (dmb(ishst) compared to dsb(sy)), but it seems to be the correct one.
Signed-off-by Eric Anholt <[email protected]>
Acked-by Stephen Warren <[email protected]>
---
v2: add ack
drivers/irqchip/irq-bcm2836.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-bcm2836.c +1 -1
@@ -195,7 +195,7 @@ static void bcm2836_arm_irqchip_send_ipi(const struct cpumask *mask,* Ensure that stores to normal memory are visible to the * other CPUs before issuing the IPI. */ -dsb (); +smp_wmb ();for_each_cpu (cpu, mask) {writel (1 << ipi, mailbox0_base +16 * cpu);
Signature · 1 line
2.8.0.rc3