diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2017-08-18 04:39:25 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-08-18 04:54:43 -0400 |
commit | 500912121411e0175d44b69a7810ac6068e78326 (patch) | |
tree | 218d8be8c0cb91cfbcad32caeadc2ce5a82f44fb | |
parent | 18416e45b76189daf37ba53b2bd0b9ac3749e92e (diff) |
irqchip/xtensa-mx: Report that effective affinity is a single target
The xtensa-mx driver only targets a single CPU at a time, even if
the notional affinity is wider. Let's inform the core code
about this.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Link: http://lkml.kernel.org/r/20170818083925.10108-13-marc.zyngier@arm.com
-rw-r--r-- | drivers/irqchip/Kconfig | 1 | ||||
-rw-r--r-- | drivers/irqchip/irq-xtensa-mx.c | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig index bca9a88012f0..1139de9da21a 100644 --- a/drivers/irqchip/Kconfig +++ b/drivers/irqchip/Kconfig | |||
@@ -223,6 +223,7 @@ config VERSATILE_FPGA_IRQ_NR | |||
223 | config XTENSA_MX | 223 | config XTENSA_MX |
224 | bool | 224 | bool |
225 | select IRQ_DOMAIN | 225 | select IRQ_DOMAIN |
226 | select GENERIC_IRQ_EFFECTIVE_AFF_MASK | ||
226 | 227 | ||
227 | config XILINX_INTC | 228 | config XILINX_INTC |
228 | bool | 229 | bool |
diff --git a/drivers/irqchip/irq-xtensa-mx.c b/drivers/irqchip/irq-xtensa-mx.c index 72a391e01011..a15a9510c904 100644 --- a/drivers/irqchip/irq-xtensa-mx.c +++ b/drivers/irqchip/irq-xtensa-mx.c | |||
@@ -32,6 +32,7 @@ static int xtensa_mx_irq_map(struct irq_domain *d, unsigned int irq, | |||
32 | irq_set_status_flags(irq, IRQ_LEVEL); | 32 | irq_set_status_flags(irq, IRQ_LEVEL); |
33 | return 0; | 33 | return 0; |
34 | } | 34 | } |
35 | irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(irq))); | ||
35 | return xtensa_irq_map(d, irq, hw); | 36 | return xtensa_irq_map(d, irq, hw); |
36 | } | 37 | } |
37 | 38 | ||
@@ -121,9 +122,12 @@ static int xtensa_mx_irq_retrigger(struct irq_data *d) | |||
121 | static int xtensa_mx_irq_set_affinity(struct irq_data *d, | 122 | static int xtensa_mx_irq_set_affinity(struct irq_data *d, |
122 | const struct cpumask *dest, bool force) | 123 | const struct cpumask *dest, bool force) |
123 | { | 124 | { |
124 | unsigned mask = 1u << cpumask_any_and(dest, cpu_online_mask); | 125 | int cpu = cpumask_any_and(dest, cpu_online_mask); |
126 | unsigned mask = 1u << cpu; | ||
125 | 127 | ||
126 | set_er(mask, MIROUT(d->hwirq - HW_IRQ_MX_BASE)); | 128 | set_er(mask, MIROUT(d->hwirq - HW_IRQ_MX_BASE)); |
129 | irq_data_update_effective_affinity(d, cpumask_of(cpu)); | ||
130 | |||
127 | return 0; | 131 | return 0; |
128 | 132 | ||
129 | } | 133 | } |