From: David Jander <david.jander@protonic.nl>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>,
Wolfgang Denk <wd@denx.de>,
gunnar@genesi-usa.com
Subject: Re: [RFC][PATCH v5] MPC5121 TLB errata workaround
Date: Tue, 17 Mar 2009 11:38:42 +0100 [thread overview]
Message-ID: <200903171138.42814.david.jander@protonic.nl> (raw)
In-Reply-To: <FDDCB39D-E847-4627-B6F8-404A40D1C0C7@kernel.crashing.org>
On Monday 16 March 2009 19:05:00 Kumar Gala wrote:
> On Mar 16, 2009, at 10:52 AM, David Jander wrote:
> > Complete workaround for DTLB errata in e300c2/c3/c4 processors.
> >
> > Due to the bug, the hardware-implemented LRU algorythm always goes
> > to way
> > 1 of the TLB. This fix implements the proposed software workaround in
> > form of a LRW table for chosing the TLB-way.
> >
> > Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> > Signed-off-by: David Jander <david@protonic.nl>
> >
> > ---
> > diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/
> > head_32.S
> > index 0f4fac5..3971ee4 100644
> > --- a/arch/powerpc/kernel/head_32.S
> > +++ b/arch/powerpc/kernel/head_32.S
> > @@ -578,9 +578,21 @@ DataLoadTLBMiss:
> > andc r1,r3,r1 /* PP = user? (rw&dirty? 2: 3): 0 */
> > mtspr SPRN_RPA,r1
> > mfspr r3,SPRN_DMISS
> > + mfspr r2,SPRN_SRR1 /* Need to restore CR0 */
> > + mtcrf 0x80,r2
> > +#ifdef CONFIG_PPC_MPC512x
> > + li r0,1
> > + mfspr r1,SPRN_SPRG6
> > + rlwinm r2,r3,17,27,31 /* Get Address bits 19:15 */
>
> Don't we want:
> rlwinm r2,r3,20,27,31 /* Get address bits 15:19 */
Hmm, you are right, I must have accidentally counted LE bit-ordering ;-)
Only funny part is, that I don't measure any performance difference after
fixing this.... *sigh*.
Regards,
--
David Jander
Protonic Holland.
next prev parent reply other threads:[~2009-03-17 10:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-16 15:52 [RFC][PATCH v5] MPC5121 TLB errata workaround David Jander
2009-03-16 16:09 ` David Jander
2009-03-16 17:47 ` Kumar Gala
2009-03-16 16:34 ` Kenneth Johansson
2009-03-16 18:05 ` Kumar Gala
2009-03-17 10:38 ` David Jander [this message]
2009-03-17 12:43 ` Kumar Gala
2009-06-06 22:07 ` Wolfgang Denk
2009-06-06 22:42 ` Benjamin Herrenschmidt
2009-06-08 18:16 ` Kumar Gala
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=200903171138.42814.david.jander@protonic.nl \
--to=david.jander@protonic.nl \
--cc=galak@kernel.crashing.org \
--cc=gunnar@genesi-usa.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=wd@denx.de \
/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).