* [PATCH] powerpc/40x: Fix assembler warning about r0
@ 2020-07-22 2:24 Michael Ellerman
2020-08-05 0:42 ` Michael Ellerman
2020-08-05 15:52 ` Christophe Leroy
0 siblings, 2 replies; 6+ messages in thread
From: Michael Ellerman @ 2020-07-22 2:24 UTC (permalink / raw)
To: linuxppc-dev
The assembler says:
arch/powerpc/kernel/head_40x.S:623: Warning: invalid register expression
It's objecting to the use of r0 as the RA argument. That's because
when RA = 0 the literal value 0 is used, rather than the content of
r0, making the use of r0 in the source potentially confusing.
Fix it to use a literal 0, the generated code is identical.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/kernel/head_40x.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/head_40x.S b/arch/powerpc/kernel/head_40x.S
index 926bfa73586a..5b282d9965a5 100644
--- a/arch/powerpc/kernel/head_40x.S
+++ b/arch/powerpc/kernel/head_40x.S
@@ -620,7 +620,7 @@ _ENTRY(saved_ksp_limit)
ori r6, r6, swapper_pg_dir@l
lis r5, abatron_pteptrs@h
ori r5, r5, abatron_pteptrs@l
- stw r5, 0xf0(r0) /* Must match your Abatron config file */
+ stw r5, 0xf0(0) /* Must match your Abatron config file */
tophys(r5,r5)
stw r6, 0(r5)
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc/40x: Fix assembler warning about r0
2020-07-22 2:24 [PATCH] powerpc/40x: Fix assembler warning about r0 Michael Ellerman
@ 2020-08-05 0:42 ` Michael Ellerman
2020-08-05 15:52 ` Christophe Leroy
1 sibling, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2020-08-05 0:42 UTC (permalink / raw)
To: linuxppc-dev, Michael Ellerman
On Wed, 22 Jul 2020 12:24:22 +1000, Michael Ellerman wrote:
> The assembler says:
> arch/powerpc/kernel/head_40x.S:623: Warning: invalid register expression
>
> It's objecting to the use of r0 as the RA argument. That's because
> when RA = 0 the literal value 0 is used, rather than the content of
> r0, making the use of r0 in the source potentially confusing.
>
> [...]
Applied to powerpc/next.
[1/1] powerpc/40x: Fix assembler warning about r0
https://git.kernel.org/powerpc/c/8d8a629d00a5283874b81b594f31f8d436dc57d8
cheers
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc/40x: Fix assembler warning about r0
2020-07-22 2:24 [PATCH] powerpc/40x: Fix assembler warning about r0 Michael Ellerman
2020-08-05 0:42 ` Michael Ellerman
@ 2020-08-05 15:52 ` Christophe Leroy
2020-08-06 2:18 ` Michael Ellerman
1 sibling, 1 reply; 6+ messages in thread
From: Christophe Leroy @ 2020-08-05 15:52 UTC (permalink / raw)
To: Michael Ellerman, linuxppc-dev
Le 22/07/2020 à 04:24, Michael Ellerman a écrit :
> The assembler says:
> arch/powerpc/kernel/head_40x.S:623: Warning: invalid register expression
I get exactly the same with head_32.S, for the exact same reason.
Christophe
>
> It's objecting to the use of r0 as the RA argument. That's because
> when RA = 0 the literal value 0 is used, rather than the content of
> r0, making the use of r0 in the source potentially confusing.
>
> Fix it to use a literal 0, the generated code is identical.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> ---
> arch/powerpc/kernel/head_40x.S | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kernel/head_40x.S b/arch/powerpc/kernel/head_40x.S
> index 926bfa73586a..5b282d9965a5 100644
> --- a/arch/powerpc/kernel/head_40x.S
> +++ b/arch/powerpc/kernel/head_40x.S
> @@ -620,7 +620,7 @@ _ENTRY(saved_ksp_limit)
> ori r6, r6, swapper_pg_dir@l
> lis r5, abatron_pteptrs@h
> ori r5, r5, abatron_pteptrs@l
> - stw r5, 0xf0(r0) /* Must match your Abatron config file */
> + stw r5, 0xf0(0) /* Must match your Abatron config file */
> tophys(r5,r5)
> stw r6, 0(r5)
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc/40x: Fix assembler warning about r0
2020-08-05 15:52 ` Christophe Leroy
@ 2020-08-06 2:18 ` Michael Ellerman
2020-08-06 8:26 ` Christophe Leroy
0 siblings, 1 reply; 6+ messages in thread
From: Michael Ellerman @ 2020-08-06 2:18 UTC (permalink / raw)
To: Christophe Leroy, linuxppc-dev
Christophe Leroy <christophe.leroy@csgroup.eu> writes:
> Le 22/07/2020 à 04:24, Michael Ellerman a écrit :
>> The assembler says:
>> arch/powerpc/kernel/head_40x.S:623: Warning: invalid register expression
>
> I get exactly the same with head_32.S, for the exact same reason.
Ah yep, I see it. I mostly build pmac32_defconfig which doesn't have
BDI_SWITCH enabled.
Send a patch? :)
Do we still need the BDI_SWITCH code? Is it likely anyone still has one,
that works?
cheers
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc/40x: Fix assembler warning about r0
2020-08-06 2:18 ` Michael Ellerman
@ 2020-08-06 8:26 ` Christophe Leroy
2020-08-06 12:33 ` Michael Ellerman
0 siblings, 1 reply; 6+ messages in thread
From: Christophe Leroy @ 2020-08-06 8:26 UTC (permalink / raw)
To: Michael Ellerman, linuxppc-dev
Le 06/08/2020 à 04:18, Michael Ellerman a écrit :
> Christophe Leroy <christophe.leroy@csgroup.eu> writes:
>> Le 22/07/2020 à 04:24, Michael Ellerman a écrit :
>>> The assembler says:
>>> arch/powerpc/kernel/head_40x.S:623: Warning: invalid register expression
>>
>> I get exactly the same with head_32.S, for the exact same reason.
>
> Ah yep, I see it. I mostly build pmac32_defconfig which doesn't have
> BDI_SWITCH enabled.
>
> Send a patch? :)
Done.
>
> Do we still need the BDI_SWITCH code? Is it likely anyone still has one,
> that works?
I have three (One for 83xx and two for 8xx) and they work, allthough I'm
using them only for Uboot and for very very very early Linux boot
debugging (Last time I used it with Linux was when implementing KASAN)
Christophe
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc/40x: Fix assembler warning about r0
2020-08-06 8:26 ` Christophe Leroy
@ 2020-08-06 12:33 ` Michael Ellerman
0 siblings, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2020-08-06 12:33 UTC (permalink / raw)
To: Christophe Leroy, linuxppc-dev
Christophe Leroy <christophe.leroy@csgroup.eu> writes:
> Le 06/08/2020 à 04:18, Michael Ellerman a écrit :
>> Christophe Leroy <christophe.leroy@csgroup.eu> writes:
>>> Le 22/07/2020 à 04:24, Michael Ellerman a écrit :
>>>> The assembler says:
>>>> arch/powerpc/kernel/head_40x.S:623: Warning: invalid register expression
>>>
>>> I get exactly the same with head_32.S, for the exact same reason.
>>
>> Ah yep, I see it. I mostly build pmac32_defconfig which doesn't have
>> BDI_SWITCH enabled.
>>
>> Send a patch? :)
>
> Done.
>
>>
>> Do we still need the BDI_SWITCH code? Is it likely anyone still has one,
>> that works?
>
> I have three (One for 83xx and two for 8xx) and they work, allthough I'm
> using them only for Uboot and for very very very early Linux boot
> debugging (Last time I used it with Linux was when implementing KASAN)
OK, happy to keep the code around if it works and is being used, even
just a little bit.
cheers
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-08-06 12:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-22 2:24 [PATCH] powerpc/40x: Fix assembler warning about r0 Michael Ellerman
2020-08-05 0:42 ` Michael Ellerman
2020-08-05 15:52 ` Christophe Leroy
2020-08-06 2:18 ` Michael Ellerman
2020-08-06 8:26 ` Christophe Leroy
2020-08-06 12:33 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).