[PATCH -next 1/4] powerpc: Remove obsoleted declaration for _get_SP

Michael Ellerman mpe at ellerman.id.au
Fri Aug 30 20:41:13 AEST 2024


cuigaosheng <cuigaosheng1 at huawei.com> writes:
> On 2024/8/22 22:16, LEROY Christophe wrote:
>>
>> Le 22/08/2024 à 15:06, Gaosheng Cui a écrit :
>>> [Vous ne recevez pas souvent de courriers de cuigaosheng1 at huawei.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ]
>>>
>>> The _get_SP() have been removed since
>>> commit 917f0af9e5a9 ("powerpc: Remove arch/ppc and include/asm-ppc"),
>>> and now it is useless, so remove it.
>> Not sure that commit is relevant since it relates to arch/ppc/ not
>> arch/powerpc/
>>
>> For arch/powerpc/ I think it is commit f4db196717c6 ("[POWERPC] Remove
>> _get_SP")
>
> In commit 1da177e4c3f4, linux implemented the _get_SP function in misc.S
> and declared and use it in arch/ppc/kernel/process.c, the declaration
> of _get_SP in arch/powerpc/kernel/process.c was introduced in commit
> 14cf11af6cf608, but at this time arch/powerpc/kernel/misc_32.S has not
> been introduced yet,so I think the declaration belongs to _get_SP in the
> misc.S,it have been removed since commit 917f0af9e5a9.

It's true that in

  14cf11af6cf6 ("powerpc: Merge enough to start building in arch/powerpc.")

there was no _get_SP() in arch/powerpc, and the build used the one in
arch/ppc, and so at that point the prototype in
arch/powerpc/kernel/process.c was for the implementation in arch/ppc.

But in commit

  e7e2d2da2638 ("powerpc: Don't compile in arch/ppc/kernel for 32-bit ARCH=powerpc")

we stopped building arch/ppc/kernel as part of the powerpc build.

So from then on the prototype was for the implementation in
arch/powerpc. If we check out e7e2d2da2638 and grep in arch/powerpc for _get_SP:

  $ git grep -w _get_SP arch/powerpc/ include/asm-powerpc/
  arch/powerpc/kernel/misc_32.S:_GLOBAL(_get_SP)
  arch/powerpc/kernel/process.c:extern unsigned long _get_SP(void);

So it was indeed f4db196717c6 ("[POWERPC] Remove _get_SP") that removed
the implementation this prototype was referring to.

I'll update the change log, no need to send a v2.

cheers


More information about the Linuxppc-dev mailing list