[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230419094039.3140521-1-peng.fan@oss.nxp.com>
Date: Wed, 19 Apr 2023 17:40:39 +0800
From: "Peng Fan (OSS)" <peng.fan@....nxp.com>
To: catalin.marinas@....com, will@...nel.org, peterz@...radead.org,
jpoimboe@...nel.org, rafael.j.wysocki@...el.com,
vschneid@...hat.com, ben-linux@...ff.org, Pierre.Gondois@....com
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Peng Fan <peng.fan@....com>
Subject: [PATCH] arm64: kernel: smp: ignore disabled cpu node
From: Peng Fan <peng.fan@....com>
If the cpu node is set disabled in device tree, we should ignore the
node. i.MX8MP has some variants, which have one or two or four A53 cores.
The current imx8mp device tree use the full feature SoC. With such
device tree to bring the variant with one or two A53 cores will cause
issue.
The firmware will update the status property, and kernel will check the
property before bring up the core.
Signed-off-by: Peng Fan <peng.fan@....com>
---
arch/arm64/kernel/smp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
index d00d4cbb31b1..aa1d678adf4a 100644
--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -631,6 +631,9 @@ static void __init of_parse_and_init_cpus(void)
for_each_of_cpu_node(dn) {
u64 hwid = of_get_cpu_hwid(dn, 0);
+ if (!of_device_is_available(dn))
+ goto next;
+
if (hwid & ~MPIDR_HWID_BITMASK)
goto next;
--
2.37.1
Powered by blists - more mailing lists