linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jonathan.austin@arm.com (Jonathan Austin)
To: linux-arm-kernel@lists.infradead.org
Subject: v7_flush_kern_cache_louis flushes up to L2?
Date: Wed, 10 Apr 2013 12:51:36 +0100	[thread overview]
Message-ID: <51655248.7000401@arm.com> (raw)
In-Reply-To: <CABYn4sxUCoWhC_4qydzbCtZdQdetqFZ_u5WtXsghprQget9f5g@mail.gmail.com>

Hi Bastian,

On 10/04/13 11:43, Bastian Hecht wrote:
> Hello,
>
> I've got a Cortex-A9 UP with a L2 and want to submit some PM code I've

To clarify, is this an MPCore with a single core, or a genuine UP? This 
can be established from the 'U' bit of the MPIDR.

> written. Just to make sure I've made no mistake, it would be very
> helpful if you can confirm a hypothesis I use in my code:
>
> v7_flush_kern_cache_louis: Flush the data cache up to Level of
> Unification Inner Shareable
>

Depending on whether you're SMP or UP (bearing in mind that you can be 
SMP, but still only have one processor!) the IS is ignored in the 
v7_flush_dcache_louis operation:
(from cache-v7.S)

         mrc     p15, 1, r0, c0, c0, 1           @ read clidr, r0 = clidr
         ALT_SMP(ands    r3, r0, #(7 << 21))     @ extract LoUIS from clidr
         ALT_UP(ands     r3, r0, #(7 << 27))     @ extract LoUU from clidr
         ALT_SMP(mov     r3, r3, lsr #20)        @ r3 = LoUIS * 2
         ALT_UP(mov      r3, r3, lsr #26)        @ r3 = LoUU * 2
	...
	flush levels based on value in r3

> This flushes the data out up to the L2, right? The ARM docs say that
> the Point of Unification would be my L2. I'm a bit confused by the
> term "Level of Unification Inner Shareable" (that states that in an
> SMP system L1 coherency is guaranteed and all is flushed to the L2?).
>

As you say, for the A9 (from the TRM) the CLIDR reports LoUIS is the 
same as LoUU and both specify L2.

Does that make things clearer, or are you still unsure about something?

Jonny

  reply	other threads:[~2013-04-10 11:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-10 10:43 v7_flush_kern_cache_louis flushes up to L2? Bastian Hecht
2013-04-10 11:51 ` Jonathan Austin [this message]
2013-04-10 12:16   ` Bastian Hecht
2013-04-10 13:35     ` Jonathan Austin
2013-04-10 14:49       ` Bastian Hecht
2013-04-19 10:21       ` Russell King - ARM Linux
2013-04-19 10:48         ` Russell King - ARM Linux
2013-04-10 13:51     ` Lorenzo Pieralisi
2013-04-10 15:08       ` Bastian Hecht

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=51655248.7000401@arm.com \
    --to=jonathan.austin@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).