Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932123AbbELGj0 (ORCPT ); Tue, 12 May 2015 02:39:26 -0400 Received: from imta21.fe.bosch.de ([139.15.243.226]:24528 "EHLO imta21.fe.bosch.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752428AbbELGjW (ORCPT ); Tue, 12 May 2015 02:39:22 -0400 X-Greylist: delayed 461 seconds by postgrey-1.27 at vger.kernel.org; Tue, 12 May 2015 02:39:22 EDT Message-ID: <55519E47.7040008@de.bosch.com> Date: Tue, 12 May 2015 08:31:35 +0200 From: Dirk Behme Organization: Robert Bosch Car Multimedia GmbH User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Michal Simek , CC: Josh Cartwright , Peter Crosthwaite , Russell King , , , Thomas Betker , Steffen Trumtrar , =?windows-1252?Q?S=F6ren_?= =?windows-1252?Q?Brinkmann?= Subject: Re: [PATCH] ARM: zynq: Set bit 22 in PL310 AuxCtrl register (6395/1) References: <812979c5a158a3306d8036e7f9731947c58a3ab7.1431411716.git.michal.simek@xilinx.com> In-Reply-To: <812979c5a158a3306d8036e7f9731947c58a3ab7.1431411716.git.michal.simek@xilinx.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.34.217.150] X-TM-AS-MML: disable X-TM-AS-Product-Ver: IMSS-7.1.0.1679-7.5.0.1017-21460.004 X-TMASE-MatchedRID: y/2oPz6gbvii6/VcDv9f0Ca1MaKuob8PofZV/2Xa0cKFiT913RgMLt96 V2NgrEHiepYdDkfIivqO9NvhBeIuxL9jX++auvv+lY5qr7f6fHJy4VFP6muDhvyM1n9etGUdQbN TsIpfWx0Y8PaFxxvrt+6J8b01LpFgpME2Z8cgSfONCVVXBJuPJz5qWjX5QROJYBVP5KSinLyMvW 2SwdoNIDnwIif3qJwtgMfjt8skNrRBF4XlFybyxwPZZctd3P4BEVhvB8sXyyOlqCS5RjBc3TApi 0hTr2bdzxhOsrlX7RQQCEi5k+nQxGsNdNW0j5ZgOX/V8P8ail3BxqsKSczjIvoA9r2LThYYKrau Xd3MZDWVD3MrjzKgr4jZxOCEo/A7gIC3hMMOXjkgYReJ4uyCt9eIKS2p7zB5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2238 Lines: 64 On 12.05.2015 08:22, Michal Simek wrote: > From: Thomas Betker > > 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 > Signed-off-by: Thomas Betker > Signed-off-by: Michal Simek > --- > > 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, > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/