Does SMP work at all on 40x ?

Michael Ellerman mpe at ellerman.id.au
Wed Jan 30 22:43:32 AEDT 2019


Christophe Leroy <christophe.leroy at c-s.fr> writes:

> In transfer_to_handler() (entry_32.S), we have:
>
> #if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
> ...
> #ifdef CONFIG_SMP
> 	CURRENT_THREAD_INFO(r9, r1)
> 	lwz	r9,TI_CPU(r9)
> 	slwi	r9,r9,3
> 	add	r11,r11,r9
> #endif
> #endif
>
> When running this piece of code, MMU translation is off. But r9 contains 
> the virtual addr of current_thread_info, so unless I miss something, 
> this cannot work on the 40x, can it ?
>
> On CONFIG_BOOKE it works because phys addr = virt addr

AFAIK 40x can't be SMP:

  config SMP
  	depends on PPC_BOOK3S || PPC_BOOK3E || FSL_BOOKE || PPC_47x


But this stuff is all before my time.

The commit that added the SMP block was clearly only meant for BookE:

  4eaddb4d7ec3 ("[POWERPC] Make Book-E debug handling SMP safe")

cheers


More information about the Linuxppc-dev mailing list