From: Leonardo Bras <leonardo@linux.ibm.com>
To: christophe.leroy@c-s.fr, benh@kernel.crashing.org,
paulus@samba.org, mpe@ellerman.id.au
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc/8xx: Fix clearing of bits 20-23 in ITLB miss
Date: Thu, 20 Feb 2020 18:53:04 -0300 [thread overview]
Message-ID: <fd6b84ae605c652f652c25e3b8f3e234b82edd8e.camel@linux.ibm.com> (raw)
In-Reply-To: <1cd9c970771ba9f08621ae8357340c93f386bc24.camel@linux.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 1203 bytes --]
On Tue, 2020-02-11 at 01:28 -0300, Leonardo Bras wrote:
> Looks a valid change.
> rlwimi r10, r10, 0, 0x0f00 means:
> r10 = ((r10 << 0) & 0x0f00) | (r10 & ~0x0f00) which ends up being
> r10 = r10
>
> On ISA, rlwinm is recommended for clearing high order bits.
> rlwinm r10, r10, 0, ~0x0f00 means:
> r10 = (r10 << 0) & ~0x0f00
>
> Which does exactly what the comments suggests.
>
> FWIW:
> Reviwed-by: Leonardo Bras <leonardo@linux.ibm.com>
Sorry, I just realized the above was not very clear on my part.
What I meant to say was:
I think your change is correct, as it correctly fixes this line.
I would suggest adding the text bellow to your commit message, making
it easier to understand why rlwimi is not the right instruction clear
bytes 20-23, and why rlwinm is.
The current instruction can be translated to C as:
rlwimi r10, r10, 0, 0x0f00
r10 = ((r10 << 0) & 0x0f00) | (r10 & ~0x0f00) ->
r10 = (r10 & 0x0f00) | (r10 & ~0x0f00) ->
r10 = r10
The new proposed instruction can be translated to C as:
rlwinm r10, r10, 0, ~0x0f00 ->
r10 = (r10 << 0) & ~0x0f00
Which clears bits 20-23 as comment on code states.
Best regards,
Leonardo Bras
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-02-20 21:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-11 4:28 [PATCH] powerpc/8xx: Fix clearing of bits 20-23 in ITLB miss Leonardo Bras
2020-02-20 21:53 ` Leonardo Bras [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-02-09 18:14 Christophe Leroy
2020-02-15 6:28 ` Leonardo Bras
2020-02-15 10:17 ` Christophe Leroy
2020-02-17 14:10 ` Leonardo Bras
2020-02-19 12:39 ` Michael Ellerman
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=fd6b84ae605c652f652c25e3b8f3e234b82edd8e.camel@linux.ibm.com \
--to=leonardo@linux.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=christophe.leroy@c-s.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).