mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: arnd@arndb.de, alexandre.torgue@st.com,
	Jason Liu <r64343@freescale.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-stm32@st-md-mailman.stormreply.com
Subject: Re: [PATCH 1/2] ARM: errata 814220-B-Cache maintenance by set/way operations can execute out of order.
Date: Wed, 13 Feb 2019 18:27:46 +0000	[thread overview]
Message-ID: <20190213182746.yblgx7i7fplt2chp@shell.armlinux.org.uk> (raw)
In-Reply-To: <20190213095613.31045-2-benjamin.gaignard@linaro.org>

On Wed, Feb 13, 2019 at 10:56:12AM +0100, Benjamin Gaignard wrote:
> Description:
> The v7 ARM states that all cache and branch predictor maintenance operations
> that do not specify an address execute, relative to each other, in program
> order. However, because of this erratum, an L2 set/way cache maintenance
> operation can overtake an L1 set/way cache maintenance operation, this would
> cause the data corruption.
> 
> This ERRATA affected the Cortex-A7 and present in r0p2, r0p3, r0p4, r0p5.
> 
> This patch is the SW workaround by adding a DSB before changing cache levels as
> the ARM ERRATA: ARM/MP: 814220 told in the ARM ERRATA documentation.
> 
> Signed-off-by: Jason Liu <r64343@freescale.com>
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> ---
>  arch/arm/Kconfig       | 10 ++++++++++
>  arch/arm/mm/cache-v7.S |  3 +++
>  2 files changed, 13 insertions(+)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 664e918e2624..6f608558e22a 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1227,6 +1227,16 @@ config PCI_HOST_ITE8152
>  	default y
>  	select DMABOUNCE
>  
> +config ARM_ERRATA_814220
> +	bool "ARM errata: Cache maintenance by set/way operations can execute out of order"
> +	depends on CPU_V7
> +	help
> +	  The v7 ARM states that all cache and branch predictor maintenance operations
> +	  that do not specify an address execute, relative to each other, in program order.
> +	  However, because of this erratum, an L2 set/way cache maintenance operation can
> +	  overtake an L1 set/way cache maintenance operation. This ERRATA only affected the
> +	  Cortex-A7 and present in r0p2, r0p3, r0p4, r0p5.

We generally try to keep help lines so that when edited on an 80 column
display, they do not wrap.  Please can you reformat the above to satisfy
that please?  (means breaking the lines after "maintenance" on the first
line.)

Thanks.

> +
>  endmenu
>  
>  menu "Kernel Features"
> diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S
> index 2149b47a0c5a..7ff7b4c197cc 100644
> --- a/arch/arm/mm/cache-v7.S
> +++ b/arch/arm/mm/cache-v7.S
> @@ -163,6 +163,9 @@ loop2:
>  skip:
>  	add	r10, r10, #2			@ increment cache number
>  	cmp	r3, r10
> +#ifdef CONFIG_ARM_ERRATA_814220
> +	dsb
> +#endif
>  	bgt	flush_levels
>  finished:
>  	mov	r10, #0				@ switch back to cache level 0
> -- 
> 2.15.0
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

  reply	other threads:[~2019-02-13 18:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-13  9:56 [PATCH 0/2] ARM errata 814220 Benjamin Gaignard
2019-02-13  9:56 ` [PATCH 1/2] ARM: errata 814220-B-Cache maintenance by set/way operations can execute out of order Benjamin Gaignard
2019-02-13 18:27   ` Russell King - ARM Linux admin [this message]
2019-02-13  9:56 ` [PATCH 2/2] ARM: stm32: select ARM errata 814220 Benjamin Gaignard
2019-02-13 14:52 ` [PATCH 0/2] " Arnd Bergmann
2019-02-15 16:30   ` Alexandre Torgue

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=20190213182746.yblgx7i7fplt2chp@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=alexandre.torgue@st.com \
    --cc=arnd@arndb.de \
    --cc=benjamin.gaignard@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=r64343@freescale.com \
    /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

all inboxes | Powered by JetHome®