linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tixy@linaro.org (Jon Medhurst (Tixy))
To: linux-arm-kernel@lists.infradead.org
Subject: [BUG] v7_coherent_kern_range broken on big.LITTLE
Date: Fri, 15 Feb 2013 12:06:25 +0000	[thread overview]
Message-ID: <1360929985.4078.24.camel@linaro1.home> (raw)
In-Reply-To: <20130215103340.GA3014@e102568-lin.cambridge.arm.com>

On Fri, 2013-02-15 at 10:33 +0000, Lorenzo Pieralisi wrote:
> On Fri, Feb 15, 2013 at 10:04:37AM +0000, Jon Medhurst (Tixy) wrote:
> > On Thu, 2013-02-14 at 17:16 +0000, Will Deacon wrote:
> > > Hi Tixy,
> > > 
> > > On Thu, Feb 14, 2013 at 05:07:43PM +0000, Jon Medhurst (Tixy) wrote:
> > > > The function v7_coherent_kern_range uses the macro icache_line_size to
> > > > read the current CPUs icache line size for the purpose of invalidating
> > > > all cache lines in the given range.
> > > > 
> > > > Unfortunately, on the TC2 big.LITTLE test chip, the A15 icache line size
> > > > is 64 bytes, but the A7 size is only 32 bytes. So when the function
> > > > executes on the A15 it will miss out every alternate cache line for the
> > > > A7.
> > > 
> > > There is a signal (IMINLN) to the core which allows A15 to behave as though
> > > it has a 32-byte line size and this should be driven correctly for big/little.
> > 
> > How do we set that signal? Is that something we have to set up in Linux
> > or is it something that we expect the Firmware to set up?
> 
> If I am not mistaken, SCC register at offset 0x400 (bit 7) allows IMINLN to
> be forced to 0 (ie Instruction Cache minimum line size == 32 bytes).
> 
> This can be done through board.txt so that it is set up as we want.

According to the TRM for TC2 the default value for that register is
0x33330c80, so adding the line "SCC: 0x400 0x33330c00" and incrementing
TOTALSCCS does the trick, and the A15's now report an icache size of 32.

We'll have to get everyone with a TC2 to make that change then?

As this is a TC2 issue, and not Linux related, shall we drop
linux-arm-kernel from all future replies to avoid the noise? I've added
linaro-dev to the cc list so this continues to get public visibility.

-- 
Tixy

      reply	other threads:[~2013-02-15 12:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-14 17:07 [BUG] v7_coherent_kern_range broken on big.LITTLE Jon Medhurst (Tixy)
2013-02-14 17:14 ` Russell King - ARM Linux
2013-02-14 17:16 ` Will Deacon
2013-02-15 10:04   ` Jon Medhurst (Tixy)
2013-02-15 10:33     ` Lorenzo Pieralisi
2013-02-15 12:06       ` Jon Medhurst (Tixy) [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=1360929985.4078.24.camel@linaro1.home \
    --to=tixy@linaro.org \
    --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).