* [PATCH] powerpc/prom: Remove redundant early_init_dt_scan_root() call
@ 2026-04-18 9:12 Sourabh Jain
2026-06-01 13:40 ` Shivang Upadhyay
0 siblings, 1 reply; 3+ messages in thread
From: Sourabh Jain @ 2026-04-18 9:12 UTC (permalink / raw)
To: linuxppc-dev
Cc: Sourabh Jain, Aditya Gupta, Christophe Leroy (CS GROUP),
Hari Bathini, Madhavan Srinivasan, Mahesh Salgaonkar,
Michael Ellerman, Nicholas Piggin, Ritesh Harjani (IBM),
Shivang Upadhyay, Venkat Rao Bagalkote, linux-kernel
Commit 554b66233623 ("of/fdt: Scan the root node properties earlier")
moved the invocation of early_init_dt_scan_root() into
early_init_dt_verify().
early_init_devtree() already calls early_init_dt_verify(), so the root
node properties are parsed before reaching the explicit call in this
function.
Keeping the call here results in scanning the root node twice. Remove
the redundant call and rely on the invocation from
early_init_dt_verify().
This change keeps the behavior the same and removes an unnecessary
duplicate call.
Cc: Aditya Gupta <adityag@linux.ibm.com>
Cc: "Christophe Leroy (CS GROUP)" <chleroy@kernel.org>
Cc: Hari Bathini <hbathini@linux.ibm.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Mahesh Salgaonkar <mahesh@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
Cc: Shivang Upadhyay <shivangu@linux.ibm.com>
Cc: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
---
arch/powerpc/kernel/prom.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 9ed9dde7d231..d218c8cc1f73 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -824,7 +824,6 @@ void __init early_init_devtree(void *params)
fadump_append_bootargs();
/* Scan memory nodes and rebuild MEMBLOCKs */
- early_init_dt_scan_root();
early_init_dt_scan_memory_ppc();
/*
--
2.52.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] powerpc/prom: Remove redundant early_init_dt_scan_root() call
2026-04-18 9:12 [PATCH] powerpc/prom: Remove redundant early_init_dt_scan_root() call Sourabh Jain
@ 2026-06-01 13:40 ` Shivang Upadhyay
2026-06-03 3:55 ` Sourabh Jain
0 siblings, 1 reply; 3+ messages in thread
From: Shivang Upadhyay @ 2026-06-01 13:40 UTC (permalink / raw)
To: Sourabh Jain
Cc: linuxppc-dev, Aditya Gupta, Christophe Leroy (CS GROUP),
Hari Bathini, Madhavan Srinivasan, Mahesh Salgaonkar,
Michael Ellerman, Nicholas Piggin, Ritesh Harjani (IBM),
Venkat Rao Bagalkote, linux-kernel
On Sat, Apr 18, 2026 at 02:42:50PM +0530, Sourabh Jain wrote:
> Commit 554b66233623 ("of/fdt: Scan the root node properties earlier")
> moved the invocation of early_init_dt_scan_root() into
> early_init_dt_verify().
>
> early_init_devtree() already calls early_init_dt_verify(), so the root
> node properties are parsed before reaching the explicit call in this
> function.
>
> Keeping the call here results in scanning the root node twice. Remove
> the redundant call and rely on the invocation from
> early_init_dt_verify().
>
> This change keeps the behavior the same and removes an unnecessary
> duplicate call.
>
> Cc: Aditya Gupta <adityag@linux.ibm.com>
> Cc: "Christophe Leroy (CS GROUP)" <chleroy@kernel.org>
> Cc: Hari Bathini <hbathini@linux.ibm.com>
> Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
> Cc: Mahesh Salgaonkar <mahesh@linux.ibm.com>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Nicholas Piggin <npiggin@gmail.com>
> Cc: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
> Cc: Shivang Upadhyay <shivangu@linux.ibm.com>
> Cc: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
> ---
> arch/powerpc/kernel/prom.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
> index 9ed9dde7d231..d218c8cc1f73 100644
> --- a/arch/powerpc/kernel/prom.c
> +++ b/arch/powerpc/kernel/prom.c
> @@ -824,7 +824,6 @@ void __init early_init_devtree(void *params)
> fadump_append_bootargs();
>
> /* Scan memory nodes and rebuild MEMBLOCKs */
> - early_init_dt_scan_root();
> early_init_dt_scan_memory_ppc();
>
> /*
> --
> 2.52.0
>
Hi Sourabh,
Patch Looks good to me. Ran a quick boot test also.
Feel free to add.
Tested-by: Shivang Upadhyay <shivangu@linux.ibm.com>
~Shivang.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] powerpc/prom: Remove redundant early_init_dt_scan_root() call
2026-06-01 13:40 ` Shivang Upadhyay
@ 2026-06-03 3:55 ` Sourabh Jain
0 siblings, 0 replies; 3+ messages in thread
From: Sourabh Jain @ 2026-06-03 3:55 UTC (permalink / raw)
To: Shivang Upadhyay
Cc: linuxppc-dev, Aditya Gupta, Christophe Leroy (CS GROUP),
Hari Bathini, Madhavan Srinivasan, Mahesh Salgaonkar,
Michael Ellerman, Nicholas Piggin, Ritesh Harjani (IBM),
Venkat Rao Bagalkote, linux-kernel
On 01/06/26 19:10, Shivang Upadhyay wrote:
> On Sat, Apr 18, 2026 at 02:42:50PM +0530, Sourabh Jain wrote:
>> Commit 554b66233623 ("of/fdt: Scan the root node properties earlier")
>> moved the invocation of early_init_dt_scan_root() into
>> early_init_dt_verify().
>>
>> early_init_devtree() already calls early_init_dt_verify(), so the root
>> node properties are parsed before reaching the explicit call in this
>> function.
>>
>> Keeping the call here results in scanning the root node twice. Remove
>> the redundant call and rely on the invocation from
>> early_init_dt_verify().
>>
>> This change keeps the behavior the same and removes an unnecessary
>> duplicate call.
>>
>> Cc: Aditya Gupta <adityag@linux.ibm.com>
>> Cc: "Christophe Leroy (CS GROUP)" <chleroy@kernel.org>
>> Cc: Hari Bathini <hbathini@linux.ibm.com>
>> Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
>> Cc: Mahesh Salgaonkar <mahesh@linux.ibm.com>
>> Cc: Michael Ellerman <mpe@ellerman.id.au>
>> Cc: Nicholas Piggin <npiggin@gmail.com>
>> Cc: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
>> Cc: Shivang Upadhyay <shivangu@linux.ibm.com>
>> Cc: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
>> Cc: linux-kernel@vger.kernel.org
>> Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
>> ---
>> arch/powerpc/kernel/prom.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
>> index 9ed9dde7d231..d218c8cc1f73 100644
>> --- a/arch/powerpc/kernel/prom.c
>> +++ b/arch/powerpc/kernel/prom.c
>> @@ -824,7 +824,6 @@ void __init early_init_devtree(void *params)
>> fadump_append_bootargs();
>>
>> /* Scan memory nodes and rebuild MEMBLOCKs */
>> - early_init_dt_scan_root();
>> early_init_dt_scan_memory_ppc();
>>
>> /*
>> --
>> 2.52.0
>>
> Hi Sourabh,
>
> Patch Looks good to me. Ran a quick boot test also.
> Feel free to add.
>
> Tested-by: Shivang Upadhyay <shivangu@linux.ibm.com>
Thanks for the testing and review, Shivang.
- Sourabh Jain
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-03 3:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-18 9:12 [PATCH] powerpc/prom: Remove redundant early_init_dt_scan_root() call Sourabh Jain
2026-06-01 13:40 ` Shivang Upadhyay
2026-06-03 3:55 ` Sourabh Jain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox