summaryrefslogtreecommitdiffstats
path: root/kernel/irq
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2017-10-09 12:41:36 +0200
committerThomas Gleixner <tglx@linutronix.de>2017-10-09 13:26:48 +0200
commit19e1d4e947cac3b5e08225d15ad7744e691c7376 (patch)
tree61139efe210f4a4841580974f7e7c01856faa969 /kernel/irq
parent8a5776a5f49812d29fe4b2d0a2d71675c3facf3f (diff)
downloadlinux-19e1d4e947cac3b5e08225d15ad7744e691c7376.tar.bz2
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')
-rw-r--r--kernel/irq/manage.c14
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)
set_bit(IRQTF_AFFINITY, &action->thread_flags);
}
+static void irq_validate_effective_affinity(struct irq_data *data)
+{
+#ifdef CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK
+ const struct cpumask *m = irq_data_get_effective_affinity_mask(data);
+ struct irq_chip *chip = irq_data_get_irq_chip(data);
+
+ if (!cpumask_empty(m))
+ return;
+ pr_warn_once("irq_chip %s did not update eff. affinity mask of irq %u\n",
+ chip->name, data->irq);
+#endif
+}
+
int irq_do_set_affinity(struct irq_data *data, const struct cpumask *mask,
bool force)
{
@@ -181,6 +194,7 @@ int irq_do_set_affinity(struct irq_data *data, const struct cpumask *mask,
case IRQ_SET_MASK_OK_DONE:
cpumask_copy(desc->irq_common_data.affinity, mask);
case IRQ_SET_MASK_OK_NOCOPY:
+ irq_validate_effective_affinity(data);
irq_set_thread_affinity(desc);
ret = 0;
}