From: Peng Fan <[email protected]>
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 <[email protected]>
---
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
On Wed, Apr 19, 2023 at 05:40:39PM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <[email protected]>
>
> 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.
>
IIRC it has been discussed in the past[1][2], has anything changed now ?
--
Regards,
Sudeep
[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-June/174324.html
[2] https://yhbt.net/lore/all/[email protected]/
> Subject: Re: [PATCH] arm64: kernel: smp: ignore disabled cpu node
>
> On Wed, Apr 19, 2023 at 05:40:39PM +0800, Peng Fan (OSS) wrote:
> > From: Peng Fan <[email protected]>
> >
> > 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.
> >
>
> IIRC it has been discussed in the past[1][2], has anything changed now ?
Ok, removing cpu nodes also means we need also runtime update
cooling devices node, and etc.
Thanks,
Peng.
>
> --
> Regards,
> Sudeep
>
> [1]
> http://lists.in/
> fradead.org%2Fpipermail%2Flinux-arm-kernel%2F2013-
> June%2F174324.html&data=05%7C01%7Cpeng.fan%40nxp.com%7Cf0e0d9c
> 8626b4ffd8ebe08db40bd29ec%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C
> 0%7C0%7C638174953417504770%7CUnknown%7CTWFpbGZsb3d8eyJWIjoi
> MC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C30
> 00%7C%7C%7C&sdata=4wUcFCMArXHGL%2BGu4gAkRFzrqITYvWfe2uyw9Wj
> n00w%3D&reserved=0
> [2]
> https://yhbt/.
> net%2Flore%2Fall%2F1524697712-20208-1-git-send-email-
> rokhanna%40nvidia.com%2F&data=05%7C01%7Cpeng.fan%40nxp.com%7Cf
> 0e0d9c8626b4ffd8ebe08db40bd29ec%7C686ea1d3bc2b4c6fa92cd99c5c3016
> 35%7C0%7C0%7C638174953417504770%7CUnknown%7CTWFpbGZsb3d8ey
> JWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D
> %7C3000%7C%7C%7C&sdata=773VoFqxDZJ2C8QLY6jn62HnOxTVxNkMk0pA
> G6nue44%3D&reserved=0