linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] mixture of cleanups to cache-v7.S
Date: Fri, 3 Apr 2015 11:53:45 +0100	[thread overview]
Message-ID: <20150403105345.GA24899@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20150403100848.GZ24899@n2100.arm.linux.org.uk>

On Fri, Apr 03, 2015 at 11:08:48AM +0100, Russell King - ARM Linux wrote:
> On Thu, Apr 02, 2015 at 11:57:59PM +0100, Russell King - ARM Linux wrote:
> > On Thu, Apr 02, 2015 at 11:49:47PM +0100, Russell King - ARM Linux wrote:
> > > Several cleanups are in the patch below... I'll separate them out, but
> > > I'd like to hear comments on them.  Basically:
> > > 
> > > 1. cache-v7.S is built for ARMv7 CPUs, so there's no reason not to
> > >    use movw and movt when loading large constants, rather than using
> > >    "ldr rd,=constant"
> > > 
> > > 2. we can do a much more efficient check for the errata in
> > >    v7_flush_dcache_louis than we were doing - rather than putting the
> > >    work-around code in the fast path, we can re-organise this such that
> > >    we only try to run the workaround code if the LoU field is zero.
> > > 
> > > 3. shift the bitfield we want to extract in the CLIDR to the appropriate
> > >    bit position prior to masking; this reduces the complexity of the
> > >    code, particularly with the SMP differences in v7_flush_dcache_louis.
> > > 
> > > 4. pre-shift the Cortex A9 MIDR value to be checked, and shift the
> > >    actual MIDR to lose the bottom four revision bits.
> > > 
> > > 5. as the v7_flush_dcache_louis code is more optimal, I see no reason not
> > >    to enable this workaround by default now - if people really want it to
> > >    be disabled, they can still choose that option.  This is in addition
> > >    to Versatile Express enabling it.  Given the memory corrupting abilities
> > >    of not having this errata enabled, I think it's only sane that it's
> > >    something that should be encouraged to be enabled, even though it only
> > >    affects r0pX CPUs.
> > > 
> > > One obvious issue comes up here though - in the case that the LoU bits
> > > are validly zero, we merely return from v7_flush_dcache_louis with no
> > > DSB or ISB.  However v7_flush_dcache_all always has a DSB or ISB at the
> > > end, even if LoC is zero.  Is this an intentional difference, or should
> > > v7_flush_dcache_louis always end with a DSB+ISB ?
> > 
> > I should point out that if the DSB+ISB is needed, then the code can
> > instead become as below - basically, we just move the CLIDR into the
> > appropriate position and call start_flush_levels, which does the DMB,
> > applies the mask to extract the appropriate field, and then decides
> > whether it has any levels to process.
> 
> I've now tested this patch on the Versatile Express and SDP4430, and
> both seem to work fine with the patch below.

Here's the patches broken out.  My intention is to put the first five,
which should be entirely non-contravercial, into my for-next branch.
The last two, I'll wait until I hear back from you after the Easter
break.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

  reply	other threads:[~2015-04-03 10:53 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-02 22:49 [RFC] mixture of cleanups to cache-v7.S Russell King - ARM Linux
2015-04-02 22:57 ` Russell King - ARM Linux
2015-04-03 10:08   ` Russell King - ARM Linux
2015-04-03 10:53     ` Russell King - ARM Linux [this message]
2015-04-03 10:54     ` [PATCH 1/7] ARM: cache-v7: use movw/movt instructions Russell King
2015-04-09 17:10       ` Catalin Marinas
2015-04-03 10:54     ` [PATCH 2/7] ARM: cache-v7: shift CLIDR to extract appropriate field before masking Russell King
2015-04-09 17:09       ` Catalin Marinas
2015-04-03 10:54     ` [PATCH 3/7] ARM: cache-v7: consolidate initialisation of cache level index Russell King
2015-04-09 17:11       ` Catalin Marinas
2015-04-03 10:54     ` [PATCH 4/7] ARM: cache-v7: optimise branches in v7_flush_cache_louis Russell King
2015-04-09  8:13       ` Arnd Bergmann
2015-04-09  8:21         ` Russell King - ARM Linux
2015-04-09 10:29           ` Arnd Bergmann
2015-04-09 13:46             ` Russell King - ARM Linux
2015-04-09 17:26               ` Catalin Marinas
2015-04-09 17:17           ` Catalin Marinas
2015-04-09 17:15       ` Catalin Marinas
2015-04-03 10:54     ` [PATCH 5/7] ARM: cache-v7: optimise test for Cortex A9 r0pX devices Russell King
2015-04-09 17:20       ` Catalin Marinas
2015-04-03 10:54     ` [PATCH 6/7] ARM: enable ARM errata 643719 workaround by default Russell King
2015-04-09 17:21       ` Catalin Marinas
2015-04-03 10:54     ` [PATCH 7/7] ARM: cache-v7: further cleanups (and fix?) Russell King
2015-04-10 13:27 ` [RFC] mixture of cleanups to cache-v7.S Catalin Marinas
2015-04-10 14:11   ` Lorenzo Pieralisi
2015-04-10 14:26     ` Russell King - ARM Linux
2015-04-10 15:16       ` Catalin Marinas
2015-04-10 15:37       ` Lorenzo Pieralisi

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=20150403105345.GA24899@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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).