From: srinidhi.kasagar@stericsson.com (Srinidhi KASAGAR)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: errata: pl310 cache sync operation may be faulty
Date: Wed, 16 Feb 2011 18:04:11 +0530 [thread overview]
Message-ID: <20110216123410.GA6267@bnru02> (raw)
In-Reply-To: <AANLkTi=svL42XJE-61H16B-jgwwu-+pXjS3QcMKNJN6Z@mail.gmail.com>
On Wed, Feb 16, 2011 at 11:32:12 +0100, Catalin Marinas wrote:
> On 16 February 2011 06:03, Srinidhi KASAGAR
> <srinidhi.kasagar@stericsson.com> wrote:
> > On Tue, Feb 15, 2011 at 12:34:22 +0100, Russell King - ARM Linux wrote:
> >> On Tue, Feb 15, 2011 at 04:48:03PM +0530, srinidhi kasagar wrote:
> >> > +#ifdef ARM_ERRATA_753970
> >> > +#define L2X0_DUMMY_REG ?0x740
> >> > + ? /* write to an unmmapped register */
> >> > + ? writel_relaxed(0, base + L2X0_DUMMY_REG);
> >> > + ? cache_wait(base + L2X0_CACHE_SYNC, 1);
> >> > +#else
> >> > ? ? writel_relaxed(0, base + L2X0_CACHE_SYNC);
> >> > ? ? cache_wait(base + L2X0_CACHE_SYNC, 1);
> >> > +#endif
> >>
> >> So why wrap cache_wait() up in that horrible ifdef as well - and why not
> >> put the dummy register definition along side the other register definitions?
> [...]
> > --- a/arch/arm/mm/cache-l2x0.c
> > +++ b/arch/arm/mm/cache-l2x0.c
> > @@ -49,8 +49,14 @@ static inline void cache_wait(void __iomem *reg, unsigned long mask)
> > ?static inline void cache_sync(void)
> > ?{
> > ? ? ? ?void __iomem *base = l2x0_base;
> > +
> > +#ifdef CONFIG_ARM_ERRATA_753970
> > + ? ? ? /* write to an unmmapped register */
> > + ? ? ? writel_relaxed(0, base + L2X0_DUMMY_REG);
> > +#else
> > ? ? ? ?writel_relaxed(0, base + L2X0_CACHE_SYNC);
> > ? ? ? ?cache_wait(base + L2X0_CACHE_SYNC, 1);
> > +#endif
> > ?}
>
> You could still leave cache_wait() after #endif, even though it is a
> no-op. I think it is clearer that the erratum workaround only targets
> the sync.
updated patch below.
next prev parent reply other threads:[~2011-02-16 12:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-15 11:18 [PATCH] ARM: errata: pl310 cache sync operation may be faulty srinidhi kasagar
2011-02-15 11:34 ` Russell King - ARM Linux
2011-02-16 5:36 ` Srinidhi KASAGAR
2011-02-16 6:03 ` Srinidhi KASAGAR
2011-02-16 10:32 ` Catalin Marinas
2011-02-16 12:34 ` Srinidhi KASAGAR [this message]
2011-02-16 12:36 ` Catalin Marinas
2011-02-15 16:38 ` Catalin Marinas
2011-02-16 5:08 ` Srinidhi KASAGAR
2011-02-16 10:11 ` Catalin Marinas
-- strict thread matches above, loose matches on Subject: below --
2011-02-14 11:37 srinidhi kasagar
2011-02-14 11:37 srinidhi kasagar
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=20110216123410.GA6267@bnru02 \
--to=srinidhi.kasagar@stericsson.com \
--cc=linux-arm-kernel@lists.infradead.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).