diff mbox series

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

Message ID 20240822130609.786431-2-cuigaosheng1@huawei.com (mailing list archive)
State Accepted
Commit dace02a9ee1921adee05bf1807a78f92ee2dea2b
Headers show
Series Remove obsoleted declaration for powerpc | expand

Commit Message

Gaosheng Cui Aug. 22, 2024, 1:06 p.m. UTC
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.

Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
---
 arch/powerpc/kernel/process.c | 2 --
 1 file changed, 2 deletions(-)

Comments

LEROY Christophe Aug. 22, 2024, 2:16 p.m. UTC | #1
Le 22/08/2024 à 15:06, Gaosheng Cui a écrit :
> [Vous ne recevez pas souvent de courriers de cuigaosheng1@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")

> 
> Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
> ---
>   arch/powerpc/kernel/process.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
> index 3b506d4c55f3..e7b70c2cc001 100644
> --- a/arch/powerpc/kernel/process.c
> +++ b/arch/powerpc/kernel/process.c
> @@ -72,8 +72,6 @@
>   #define TM_DEBUG(x...) do { } while(0)
>   #endif
> 
> -extern unsigned long _get_SP(void);
> -
>   #ifdef CONFIG_PPC_TRANSACTIONAL_MEM
>   /*
>    * Are we running in "Suspend disabled" mode? If so we have to block any
> --
> 2.25.1
>
Gaosheng Cui Aug. 22, 2024, 3:25 p.m. UTC | #2
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@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.

In addition, commit f4db196717c6 is v2.6.22 but 917f0af9e5a9 is v2.6.27, so I think
it is commit 917f0af9e5a9.

anything others?thanks very much.

>> Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
>> ---
>>    arch/powerpc/kernel/process.c | 2 --
>>    1 file changed, 2 deletions(-)
>>
>> diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
>> index 3b506d4c55f3..e7b70c2cc001 100644
>> --- a/arch/powerpc/kernel/process.c
>> +++ b/arch/powerpc/kernel/process.c
>> @@ -72,8 +72,6 @@
>>    #define TM_DEBUG(x...) do { } while(0)
>>    #endif
>>
>> -extern unsigned long _get_SP(void);
>> -
>>    #ifdef CONFIG_PPC_TRANSACTIONAL_MEM
>>    /*
>>     * Are we running in "Suspend disabled" mode? If so we have to block any
>> --
>> 2.25.1
>>
Christophe Leroy Aug. 23, 2024, 4:40 p.m. UTC | #3
Le 22/08/2024 à 17:25, cuigaosheng a écrit :
> [Vous ne recevez pas souvent de courriers de cuigaosheng1@huawei.com. 
> Découvrez pourquoi ceci est important à 
> https://aka.ms/LearnAboutSenderIdentification ]
> 
> 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@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.
> 
> In addition, commit f4db196717c6 is v2.6.22 but 917f0af9e5a9 is v2.6.27, 
> so I think
> it is commit 917f0af9e5a9.

Nevermind

Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>

> 
> anything others?thanks very much.
> 
>>> Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
>>> ---
>>>    arch/powerpc/kernel/process.c | 2 --
>>>    1 file changed, 2 deletions(-)
>>>
>>> diff --git a/arch/powerpc/kernel/process.c 
>>> b/arch/powerpc/kernel/process.c
>>> index 3b506d4c55f3..e7b70c2cc001 100644
>>> --- a/arch/powerpc/kernel/process.c
>>> +++ b/arch/powerpc/kernel/process.c
>>> @@ -72,8 +72,6 @@
>>>    #define TM_DEBUG(x...) do { } while(0)
>>>    #endif
>>>
>>> -extern unsigned long _get_SP(void);
>>> -
>>>    #ifdef CONFIG_PPC_TRANSACTIONAL_MEM
>>>    /*
>>>     * Are we running in "Suspend disabled" mode? If so we have to 
>>> block any
>>> -- 
>>> 2.25.1
>>>
Michael Ellerman Aug. 30, 2024, 10:41 a.m. UTC | #4
cuigaosheng <cuigaosheng1@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@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
diff mbox series

Patch

diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 3b506d4c55f3..e7b70c2cc001 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -72,8 +72,6 @@ 
 #define TM_DEBUG(x...) do { } while(0)
 #endif
 
-extern unsigned long _get_SP(void);
-
 #ifdef CONFIG_PPC_TRANSACTIONAL_MEM
 /*
  * Are we running in "Suspend disabled" mode? If so we have to block any