public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman•id.au>
To: Alan Modra <amodra@gmail•com>
Cc: linuxppc-dev@ozlabs•org, anton@samba•org
Subject: Re: [RFC PATCH] powerpc: Fix dubious r0 usage
Date: Sat, 18 Feb 2017 19:06:03 +1100	[thread overview]
Message-ID: <87d1efj53o.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <20170217132125.GV3731@bubble.grove.modra.org>

Alan Modra <amodra@gmail•com> writes:

> On Fri, Feb 17, 2017 at 11:08:53PM +1100, Michael Ellerman wrote:
>> Bleeding edge binutils no longer accepts r0 in places where the CPU
>> interprets the value as a literal 0.
>
> Wow!  That was quite some cleanup.  I think I'd better turn the error
> into a warning..

That would be my preference :)

If it remains a hard error we'll need to backport this patch to multiple
stable versions so that people can build those older kernels with new
binutils. Which we can do, but it's a bit of a pain.

>> --- a/arch/powerpc/purgatory/trampoline.S
>> +++ b/arch/powerpc/purgatory/trampoline.S
>> @@ -67,7 +67,7 @@ master:
>>  	mr	%r16,%r3	/* save dt address in reg16 */
>>  	li	%r4,20
>>  	LWZX_BE	%r6,%r3,%r4	/* fetch __be32 version number at byte 20 */
>> -	cmpwi	%r0,%r6,2	/* v2 or later? */
>> +	cmpwi	0,%r6,2		/* v2 or later? */
>>  	blt	1f
>>  	li	%r4,28
>>  	STWX_BE	%r17,%r3,%r4	/* Store my cpu as __be32 at byte 28 */
>
> With this one, it would probably be better to omit the zero (BF
> field).

Yeah good point, thanks for reviewing.

cheers

      parent reply	other threads:[~2017-02-18  8:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-17 12:08 [RFC PATCH] powerpc: Fix dubious r0 usage Michael Ellerman
2017-02-17 13:21 ` Alan Modra
2017-02-17 20:03   ` Segher Boessenkool
2017-02-18  8:06   ` Michael Ellerman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d1efj53o.fsf@concordia.ellerman.id.au \
    --to=mpe@ellerman$(echo .)id.au \
    --cc=amodra@gmail$(echo .)com \
    --cc=anton@samba$(echo .)org \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox