linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH] ARM: Flush L2 cache on soft_restart
Date: Wed, 2 Oct 2013 18:31:31 +0100	[thread overview]
Message-ID: <20131002173131.GC30298@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <CAArO44ufGbRxX8oWR8AFh5_iw0F4CodVp8M07e3FJ09EixpUOA@mail.gmail.com>

On Wed, Oct 02, 2013 at 06:19:30PM +0100, Taras Kondratiuk wrote:
> On 2 October 2013 15:49, Will Deacon <will.deacon@arm.com> wrote:
> > On Wed, Oct 02, 2013 at 12:34:16PM +0100, Taras Kondratiuk wrote:
> >> diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
> >> index 94f6b05..e359b62 100644
> >> --- a/arch/arm/kernel/process.c
> >> +++ b/arch/arm/kernel/process.c
> >> @@ -103,9 +103,11 @@ void soft_restart(unsigned long addr)
> >>       local_irq_disable();
> >>       local_fiq_disable();
> >>
> >> -     /* Disable the L2 if we're the last man standing. */
> >> -     if (num_online_cpus() == 1)
> >> +     /* Flush and disable the L2 if we're the last man standing. */
> >> +     if (num_online_cpus() == 1) {
> >> +             outer_flush_all();
> >>               outer_disable();
> >
> > l2x0_disable already contains a flush, so this doesn't change anything.
> 
> Unfortunately not everybody uses l2x0_disable().
> SoC's that use SMC calls for L2 cache maintenance have its own implementation
> of outer_cache.disable which usually doesn't flush cache implicitly.

In which case, we should probably fix the disabling code to make a flush
then update callers not to bother with redundant flushing. The flushing
during the disable code is likely required anyway if there's any
synchronisation going on.

Will

  reply	other threads:[~2013-10-02 17:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-02 11:34 [RFC PATCH] ARM: Flush L2 cache on soft_restart Taras Kondratiuk
2013-10-02 12:49 ` Will Deacon
2013-10-02 17:19   ` Taras Kondratiuk
2013-10-02 17:31     ` Will Deacon [this message]
2013-10-03 22:32       ` Taras Kondratiuk
2013-10-02 21:01   ` Russell King - ARM Linux

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=20131002173131.GC30298@mudshark.cambridge.arm.com \
    --to=will.deacon@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 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).