Skip to content

Commit

Permalink
powerpc/64e: Drop stale call to smp_processor_id() which hangs SMP st…
Browse files Browse the repository at this point in the history
…artup

Commit ebb9d30 ("powerpc/mm: any thread in one core can be the
first to setup TLB1") removed the need to know the cpu_id in
early_init_this_mmu(), but the call to smp_processor_id() which was
marked __maybe_used remained.

Since commit ed1cd6d ("powerpc: Activate CONFIG_THREAD_INFO_IN_TASK")
thread_info cannot be reached before MMU is properly set up.

Drop this stale call to smp_processor_id() which makes SMP hang when
CONFIG_PREEMPT is set.

Fixes: ebb9d30 ("powerpc/mm: any thread in one core can be the first to setup TLB1")
Fixes: ed1cd6d ("powerpc: Activate CONFIG_THREAD_INFO_IN_TASK")
Cc: stable@vger.kernel.org # v5.1+
Reported-by: Chris Packham <Chris.Packham@alliedtelesis.co.nz>
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/bef479514f4c08329fa649f67735df8918bc0976.1565268248.git.christophe.leroy@c-s.fr
  • Loading branch information
Christophe Leroy authored and Michael Ellerman committed Aug 12, 2019
1 parent ed4289e commit b9ee5e0
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion arch/powerpc/mm/nohash/tlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,6 @@ static void early_init_this_mmu(void)
#ifdef CONFIG_PPC_FSL_BOOK3E
if (mmu_has_feature(MMU_FTR_TYPE_FSL_E)) {
unsigned int num_cams;
int __maybe_unused cpu = smp_processor_id();
bool map = true;

/* use a quarter of the TLBCAM for bolted linear map */
Expand Down

0 comments on commit b9ee5e0

Please sign in to comment.