Skip to content

Commit 35c2387

Browse files
Lorenzo PieralisiKAGA-KOKO
authored andcommitted
irqchip/gic-v5: Remove undue WARN_ON()s in the IRS affinity parsing
In gicv5_irs_of_init_affinity() a WARN_ON() is triggered if: 1) a phandle in the "cpus" property does not correspond to a valid OF node 2 a CPU logical id does not exist for a given OF cpu_node #1 is a firmware bug and should be reported as such but does not warrant a WARN_ON() backtrace. #2 is not necessarily an error condition (eg a kernel can be booted with nr_cpus=X limiting the number of cores artificially) and therefore there is no reason to clutter the kernel log with WARN_ON() output when the condition is hit. Rework the IRS affinity parsing code to remove undue WARN_ON()s thus making it less noisy. Signed-off-by: Lorenzo Pieralisi <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent 1a2cce5 commit 35c2387

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/irqchip/irq-gic-v5-irs.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,12 +626,14 @@ static int __init gicv5_irs_of_init_affinity(struct device_node *node,
626626
int cpu;
627627

628628
cpu_node = of_parse_phandle(node, "cpus", i);
629-
if (WARN_ON(!cpu_node))
629+
if (!cpu_node) {
630+
pr_warn(FW_BUG "Erroneous CPU node phandle\n");
630631
continue;
632+
}
631633

632634
cpu = of_cpu_node_to_id(cpu_node);
633635
of_node_put(cpu_node);
634-
if (WARN_ON(cpu < 0))
636+
if (cpu < 0)
635637
continue;
636638

637639
if (iaffids[i] & ~iaffid_mask) {

0 commit comments

Comments
 (0)