From: Scott Wood <scottwood@freescale.com>
To: Caraman Mihai Claudiu-B02008 <mihai.caraman@freescale.com>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH 2/2] powerpc/e6500: hw tablewalk: fix recursive tlb lock on cpu 0
Date: Fri, 30 May 2014 12:01:40 -0500 [thread overview]
Message-ID: <1401469300.6603.199.camel@snotra.buserror.net> (raw)
In-Reply-To: <65f51156027a4c8a90c670d0ba72df3c@BY2PR03MB508.namprd03.prod.outlook.com>
On Fri, 2014-05-30 at 02:59 -0500, Caraman Mihai Claudiu-B02008 wrote:
> > -----Original Message-----
> > From: Linuxppc-dev [mailto:linuxppc-dev-
> > bounces+mihai.caraman=freescale.com@lists.ozlabs.org] On Behalf Of Scott
> > Wood
> > Sent: Friday, May 23, 2014 12:45 AM
> > To: linuxppc-dev@lists.ozlabs.org
> > Cc: Wood Scott-B07421
> > Subject: [PATCH 2/2] powerpc/e6500: hw tablewalk: fix recursive tlb lock
> > on cpu 0
> >
> > Commit 82d86de25b9c99db546e17c6f7ebf9a691da557e "TLB lock recursive"
> > introduced a bug whereby cpu 0 uses the same value for "lock held" as
> > is used to indicate that the lock is free.
>
> Isn't his what spin lock implementation solves by combines paca_index
> with lock_token? Can't we have a common approach?
That would require expanding the lock to 32 bits, is a more intrusive
fix than needed, and invites breakage in the TLB code if the lock_token
mechanism were to change.
> > Add one to the CPU value to ensure we do not use zero as a "lock held"
> > value.
>
> The CPU value is loaded in r10 from tlb_miss_common_e6500. "TLB lock recursive"
> commit also introduced this misleading comment:
>
> We are entered with:
> r10 = cpu number
I addressed this in v2 that I posted yesterday.
-Scott
prev parent reply other threads:[~2014-05-30 17:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-22 21:45 [PATCH 1/2] powerpc/e6500: hw tablewalk: clear TID in kernel indirect entries Scott Wood
2014-05-22 21:45 ` [PATCH 2/2] powerpc/e6500: hw tablewalk: fix recursive tlb lock on cpu 0 Scott Wood
2014-05-30 7:59 ` mihai.caraman
2014-05-30 17:01 ` Scott Wood [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=1401469300.6603.199.camel@snotra.buserror.net \
--to=scottwood@freescale.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mihai.caraman@freescale.com \
/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).