]> Git Repo - J-linux.git/commit
irqchip/loongson-eiointc: Use early_cpu_to_node() instead of cpu_to_node()
authorHuacai Chen <[email protected]>
Sun, 23 Jun 2024 03:41:13 +0000 (11:41 +0800)
committerThomas Gleixner <[email protected]>
Sun, 23 Jun 2024 15:09:26 +0000 (17:09 +0200)
commit2d64eaeeeda5659d52da1af79d237269ba3c2d2c
treeb6b626498c448e81b55df2de0a995423a935a06a
parent6ba59ff4227927d3a8530fc2973b80e94b54d58f
irqchip/loongson-eiointc: Use early_cpu_to_node() instead of cpu_to_node()

Multi-bridge machines required that all eiointc controllers in the system
are initialized, otherwise the system does not boot.

The initialization happens on the boot CPU during early boot and relies on
cpu_to_node() for identifying the individual nodes.

That works when the number of possible CPUs is large enough, but with a
command line limit, e.g. "nr_cpus=$N" for kdump, but fails when the CPUs
of the secondary nodes are not covered.

During early ACPI enumeration all CPU to node mappings are recorded up to
CONFIG_NR_CPUS. These are accessible via early_cpu_to_node() even in the
case that "nr_cpus=N" truncates the number of possible CPUs and only
provides the possible CPUs via cpu_to_node() translation.

Change the node lookup in the driver to use early_cpu_to_node() so that
even with a limitation on the number of possible CPUs all eointc instances
are initialized.

This can't obviously cure the case where CONFIG_NR_CPUS is too small.

[ tglx: Massaged changelog ]

Fixes: 64cc451e45e1 ("irqchip/loongson-eiointc: Fix incorrect use of acpi_get_vec_parent")
Signed-off-by: Huacai Chen <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
drivers/irqchip/irq-loongson-eiointc.c
This page took 0.046887 seconds and 4 git commands to generate.