[PATCHv10 3/3] powerpc/smp: Allow hole in paca_ptrs to accommodate boot_cpu

2023-12-26 Thread Pingfan Liu
From: Pingfan Liu This patch always forces the first core onlined due to some subsystem needs cpu0. After core0, a hole may follow, then comes the crashed core. Signed-off-by: Pingfan Liu Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Mahesh Salgaonkar Cc: Wen Xiong Cc:

[PATCHv10 2/3] powerpc/kernel: Extend arrays' size to make room for a hole in cpu_possible_mask

2023-12-26 Thread Pingfan Liu
From: Pingfan Liu This patch aims to mark all the arrays which size is decided by nr_cpu_ids or num_possible_cpus(). Later if a hole is allowed in cpu_possible_mask, the corresponding array should extend to hold the last bit number in cpu_possible_mask. Signed-off-by: Pingfan Liu Cc: Michael E

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

2023-12-26 Thread Pingfan Liu
From: Pingfan Liu 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 Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe

[PATCHv10 0/3] enable nr_cpus for powerpc without re-ordering cpu number

2023-12-26 Thread Pingfan Liu
From: Pingfan Liu This series addresses the nr_cpus issue for PowerPC without re-ordering cpu number. To save the memory used by percpu area, it also limits the possible cpu numbers by allowing hole in cpu_possible_mask. Because the last cpu number will bigger than nr_cpu_ids in this way, some p