1 From 3a9f3c695a95d3c34a360e9a95bccce37806c952 Mon Sep 17 00:00:00 2001
2 From: Michael Zoran <mzoran@crowfest.net>
3 Date: Sat, 14 Jan 2017 21:43:57 -0800
4 Subject: [PATCH] ARM64: Round-Robin dispatch IRQs between CPUs.
6 IRQ-CPU mapping is round robined on ARM64 to increase
7 concurrency and allow multiple interrupts to be serviced
8 at a time. This reduces the need for FIQ.
10 Signed-off-by: Michael Zoran <mzoran@crowfest.net>
12 drivers/irqchip/irq-bcm2835.c | 15 ++++++++++++++-
13 drivers/irqchip/irq-bcm2836.c | 21 +++++++++++++++++++++
14 2 files changed, 35 insertions(+), 1 deletion(-)
16 --- a/drivers/irqchip/irq-bcm2835.c
17 +++ b/drivers/irqchip/irq-bcm2835.c
18 @@ -162,10 +162,23 @@ static void armctrl_unmask_irq(struct ir
23 +void bcm2836_arm_irqchip_spin_gpu_irq(void);
25 +static void armctrl_ack_irq(struct irq_data *d)
27 + bcm2836_arm_irqchip_spin_gpu_irq();
32 static struct irq_chip armctrl_chip = {
33 .name = "ARMCTRL-level",
34 .irq_mask = armctrl_mask_irq,
35 - .irq_unmask = armctrl_unmask_irq
36 + .irq_unmask = armctrl_unmask_irq,
38 + .irq_ack = armctrl_ack_irq
42 static int armctrl_xlate(struct irq_domain *d, struct device_node *ctrlr,
43 --- a/drivers/irqchip/irq-bcm2836.c
44 +++ b/drivers/irqchip/irq-bcm2836.c
45 @@ -95,6 +95,27 @@ static void bcm2836_arm_irqchip_unmask_g
51 +void bcm2836_arm_irqchip_spin_gpu_irq(void)
54 + void __iomem *gpurouting = (intc.base + LOCAL_GPU_ROUTING);
55 + u32 routing_val = readl(gpurouting);
57 + for (i = 1; i <= 3; i++) {
58 + u32 new_routing_val = (routing_val + i) & 3;
60 + if (cpu_active(new_routing_val)) {
61 + writel(new_routing_val, gpurouting);
66 +EXPORT_SYMBOL(bcm2836_arm_irqchip_spin_gpu_irq);
70 static struct irq_chip bcm2836_arm_irqchip_gpu = {
71 .name = "bcm2836-gpu",
72 .irq_mask = bcm2836_arm_irqchip_mask_gpu_irq,