diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2017-10-09 06:41:36 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-10-09 07:26:48 -0400 |
commit | 19e1d4e947cac3b5e08225d15ad7744e691c7376 (patch) | |
tree | 61139efe210f4a4841580974f7e7c01856faa969 /kernel/irq/manage.c | |
parent | 8a5776a5f49812d29fe4b2d0a2d71675c3facf3f (diff) |
genirq: Warn when effective affinity is not updated
Emit a one time warning when the effective affinity mask is enabled in
Kconfig, but the interrupt chip does not update the mask in its
irq_set_affinity() callback,
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1710042208400.2406@nanos
Diffstat (limited to 'kernel/irq/manage.c')
-rw-r--r-- | kernel/irq/manage.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index d00132b5c325..ef89f7246656 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -168,6 +168,19 @@ void irq_set_thread_affinity(struct irq_desc *desc) | |||
168 | set_bit(IRQTF_AFFINITY, &action->thread_flags); | 168 | set_bit(IRQTF_AFFINITY, &action->thread_flags); |
169 | } | 169 | } |
170 | 170 | ||
171 | static void irq_validate_effective_affinity(struct irq_data *data) | ||
172 | { | ||
173 | #ifdef CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK | ||
174 | const struct cpumask *m = irq_data_get_effective_affinity_mask(data); | ||
175 | struct irq_chip *chip = irq_data_get_irq_chip(data); | ||
176 | |||
177 | if (!cpumask_empty(m)) | ||
178 | return; | ||
179 | pr_warn_once("irq_chip %s did not update eff. affinity mask of irq %u\n", | ||
180 | chip->name, data->irq); | ||
181 | #endif | ||
182 | } | ||
183 | |||
171 | int irq_do_set_affinity(struct irq_data *data, const struct cpumask *mask, | 184 | int irq_do_set_affinity(struct irq_data *data, const struct cpumask *mask, |
172 | bool force) | 185 | bool force) |
173 | { | 186 | { |
@@ -181,6 +194,7 @@ int irq_do_set_affinity(struct irq_data *data, const struct cpumask *mask, | |||
181 | case IRQ_SET_MASK_OK_DONE: | 194 | case IRQ_SET_MASK_OK_DONE: |
182 | cpumask_copy(desc->irq_common_data.affinity, mask); | 195 | cpumask_copy(desc->irq_common_data.affinity, mask); |
183 | case IRQ_SET_MASK_OK_NOCOPY: | 196 | case IRQ_SET_MASK_OK_NOCOPY: |
197 | irq_validate_effective_affinity(data); | ||
184 | irq_set_thread_affinity(desc); | 198 | irq_set_thread_affinity(desc); |
185 | ret = 0; | 199 | ret = 0; |
186 | } | 200 | } |