[PATCHv10 1/3] powerpc/kernel: Remove check on paca_ptrs_size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Pingfan Liu <piliu@xxxxxxxxxx>

Between early_setup()->allocate_paca_ptrs() and
smp_setup_cpu_maps()->free_unused_pacas(), there is no call to
set_nr_cpu_ids(), which means nr_cpu_ids is unchanged.

Hence removing the check.

Signed-off-by: Pingfan Liu <piliu@xxxxxxxxxx>
Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
Cc: Nicholas Piggin <npiggin@xxxxxxxxx>
Cc: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
Cc: Mahesh Salgaonkar <mahesh@xxxxxxxxxxxxx>
Cc: Wen Xiong <wenxiong@xxxxxxxxxx>
Cc: Baoquan He <bhe@xxxxxxxxxx>
Cc: Ming Lei <ming.lei@xxxxxxxxxx>
Cc: Sourabh Jain <sourabhjain@xxxxxxxxxxxxx>
Cc: Hari Bathini <hbathini@xxxxxxxxxxxxx>
Cc: kexec@xxxxxxxxxxxxxxxxxxx
To: linuxppc-dev@xxxxxxxxxxxxxxxx
---
 arch/powerpc/kernel/paca.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c
index cda4e00b67c1..760f371cf096 100644
--- a/arch/powerpc/kernel/paca.c
+++ b/arch/powerpc/kernel/paca.c
@@ -286,16 +286,6 @@ void __init allocate_paca(int cpu)
 
 void __init free_unused_pacas(void)
 {
-	int new_ptrs_size;
-
-	new_ptrs_size = sizeof(struct paca_struct *) * nr_cpu_ids;
-	if (new_ptrs_size < paca_ptrs_size)
-		memblock_phys_free(__pa(paca_ptrs) + new_ptrs_size,
-				   paca_ptrs_size - new_ptrs_size);
-
-	paca_nr_cpu_ids = nr_cpu_ids;
-	paca_ptrs_size = new_ptrs_size;
-
 #ifdef CONFIG_PPC_64S_HASH_MMU
 	if (early_radix_enabled()) {
 		/* Ugly fixup, see new_slb_shadow() */
@@ -304,9 +294,6 @@ void __init free_unused_pacas(void)
 		paca_ptrs[boot_cpuid]->slb_shadow_ptr = NULL;
 	}
 #endif
-
-	printk(KERN_DEBUG "Allocated %u bytes for %u pacas\n",
-			paca_ptrs_size + paca_struct_size, nr_cpu_ids);
 }
 
 #ifdef CONFIG_PPC_64S_HASH_MMU
-- 
2.31.1


_______________________________________________
kexec mailing list
kexec@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/kexec



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux