linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: dirk.behme@de.bosch.com (Dirk Behme)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: zynq: Set bit 22 in PL310 AuxCtrl register (6395/1)
Date: Tue, 12 May 2015 08:31:35 +0200	[thread overview]
Message-ID: <55519E47.7040008@de.bosch.com> (raw)
In-Reply-To: <812979c5a158a3306d8036e7f9731947c58a3ab7.1431411716.git.michal.simek@xilinx.com>

On 12.05.2015 08:22, Michal Simek wrote:
> From: Thomas Betker <thomas.betker@rohde-schwarz.com>
>
> This patch is based on the
> commit 1a8e41cd672f ("ARM: 6395/1: VExpress: Set bit 22 in the PL310
> (cache controller) AuxCtlr register")


I've been under the impression that this shouldn't be done in the 
kernel, but in the boot loader/firmware:

https://lkml.org/lkml/2015/2/20/199

http://lists.denx.de/pipermail/u-boot/2015-March/207803.html

Best regards

Dirk


> Clearing bit 22 in the PL310 Auxiliary Control register (shared
> attribute override enable) has the side effect of transforming Normal
> Shared Non-cacheable reads into Cacheable no-allocate reads.
>
> Coherent DMA buffers in Linux always have a cacheable alias via the
> kernel linear mapping and the processor can speculatively load cache
> lines into the PL310 controller. With bit 22 cleared, Non-cacheable
> reads would unexpectedly hit such cache lines leading to buffer
> corruption.
>
> For Zynq, this fix avoids memory inconsistencies between Gigabit
> Ethernet controller (GEM) and CPU when DMA_CMA is disabled.
>
> Suggested-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
> Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
>   arch/arm/mach-zynq/common.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c
> index 39c1c7d43522..af36dc2545c1 100644
> --- a/arch/arm/mach-zynq/common.c
> +++ b/arch/arm/mach-zynq/common.c
> @@ -197,8 +197,8 @@ static const char * const zynq_dt_match[] = {
>
>   DT_MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform")
>   	/* 64KB way size, 8-way associativity, parity disabled */
> -	.l2c_aux_val	= 0x00000000,
> -	.l2c_aux_mask	= 0xffffffff,
> +	.l2c_aux_val    = 0x00400000,
> +	.l2c_aux_mask	= 0xffbfffff,
>   	.smp		= smp_ops(zynq_smp_ops),
>   	.map_io		= zynq_map_io,
>   	.init_irq	= zynq_irq_init,
>

  reply	other threads:[~2015-05-12  6:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12  6:22 [PATCH] ARM: zynq: Set bit 22 in PL310 AuxCtrl register (6395/1) Michal Simek
2015-05-12  6:31 ` Dirk Behme [this message]
2015-05-12  6:50   ` Michal Simek
2015-05-12 12:42     ` Thomas.Betker at rohde-schwarz.com
2015-05-14 16:40   ` Catalin Marinas
2015-05-18  8:31     ` Thomas.Betker at rohde-schwarz.com
2015-05-12 15:12 ` Josh Cartwright

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=55519E47.7040008@de.bosch.com \
    --to=dirk.behme@de.bosch.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).