[PATCH 1/7] genirq/debugfs: Print percpu affinity for percpu_devid interrupts

From: Marc Zyngier
Date: Tue Apr 24 2018 - 10:41:44 EST


percpu_devid interrupts have their affinities stored in a different
field. Let's special-case it.

Signed-off-by: Marc Zyngier <marc.zyngier@xxxxxxx>
---
kernel/irq/debugfs.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/kernel/irq/debugfs.c b/kernel/irq/debugfs.c
index 4dadeb3d6666..da41150322e1 100644
--- a/kernel/irq/debugfs.c
+++ b/kernel/irq/debugfs.c
@@ -32,7 +32,10 @@ static void irq_debug_show_masks(struct seq_file *m, struct irq_desc *desc)
struct irq_data *data = irq_desc_get_irq_data(desc);
struct cpumask *msk;

- msk = irq_data_get_affinity_mask(data);
+ if (irq_is_percpu_devid(data->irq))
+ msk = (struct cpumask *)desc->percpu_affinity;
+ else
+ msk = irq_data_get_affinity_mask(data);
seq_printf(m, "affinity: %*pbl\n", cpumask_pr_args(msk));
#ifdef CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK
msk = irq_data_get_effective_affinity_mask(data);
--
2.14.2