All of lore.kernel.org
 help / color / mirror / Atom feed
From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: dummy_flush_tlb_a15_erratum in check_and_switch_context
Date: Fri, 28 Jun 2013 16:51:06 +0100	[thread overview]
Message-ID: <20130628155106.GG1643@arm.com> (raw)
In-Reply-To: <20130628085719.GA29002@mudshark.cambridge.arm.com>

On Fri, Jun 28, 2013 at 09:57:19AM +0100, Will Deacon wrote:
> On Fri, Jun 28, 2013 at 04:48:14AM +0100, Jon Masters wrote:
> > #ifdef CONFIG_ARM_ERRATA_798181
> > static inline void dummy_flush_tlb_a15_erratum(void)
> > {
> >         /*
> >          * Dummy TLBIMVAIS. Using the unmapped address 0 and ASID 0.
> >          */
> >         asm("mcr p15, 0, %0, c8, c3, 1" : : "r" (0));
> >         dsb();
> > }
> > #else
> > static inline void dummy_flush_tlb_a15_erratum(void)
> > {
> > }
> > #endif
> 
> Yep, the -IS variants are only available on SMP cores.
> 
> > Now I think it's personally just easier to only turn on that errata on
> > LPAE/A15 kernels and just leave it at that (I've requested this get
> > moved to the lpae config and out of the base config so this is what
> > should happen shortly - clearly the intention), but some folks out there
> > want to do exciting things...I got asked if this could be runtime
> > patched (which I guess in theory is possible), but I'm not going there.
> > 
> > Anyway, in addition, does this kind of thing need fixing with a more
> > specific Kconfig so that there's an explicit A15 dependency in there?
> > Rather just "depends on CPU_V7 && SMP"?
> 
> Even better: my TLB optimisation series removes this line of code
> altogether:
> 
>   http://lists.infradead.org/pipermail/linux-arm-kernel/2013-June/178592.html
> 
> If we need a quick fix for stable, we should just check the CPUID on
> the context-switch slow(er) path.

I've been waiting for the arch/arm/mm/context.c change in the above
patch to reach mainline for a long time ;). Basically with
cpumask_setall(&tlb_flush_pending) we no longer need the dummy flush for
this erratum since the flush will happen on all CPUs anyway.

-- 
Catalin

      parent reply	other threads:[~2013-06-28 15:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-28  3:48 dummy_flush_tlb_a15_erratum in check_and_switch_context Jon Masters
2013-06-28  8:57 ` Will Deacon
2013-06-28 12:54   ` Jon Masters
2013-06-28 15:51   ` Catalin Marinas [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=20130628155106.GG1643@arm.com \
    --to=catalin.marinas@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.