cpu-topology: Don't error on more than CONFIG_NR_CPUS CPUs in device tree
authorZeng Tao <prime.zeng@hisilicon.com>
Fri, 17 Jan 2020 01:52:52 +0000 (09:52 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Jan 2020 14:21:49 +0000 (15:21 +0100)
commitf3c19481820cca412a768ae1d6737f59b68acfed
treeb9fd5f8c709847f3e60bc90f11d5c0d8eafa5425
parenta37f4958f7b63d2b3cd17a76151fdfc29ce1da5f
cpu-topology: Don't error on more than CONFIG_NR_CPUS CPUs in device tree

When the kernel is configured with CONFIG_NR_CPUS smaller than the
number of CPU nodes in the device tree(DT), all the CPU nodes parsing
done to fetch topology information will fail. This is not reasonable
as it is legal to have all the physical CPUs in the system in the DT.

Let us just skip such CPU DT nodes that are not used in the kernel
rather than returning an error.

Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com>
Link: https://lore.kernel.org/r/1579225973-32423-1-git-send-email-prime.zeng@hisilicon.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/arch_topology.c