Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753522AbbBTHPa (ORCPT ); Fri, 20 Feb 2015 02:15:30 -0500 Received: from mail-pa0-f52.google.com ([209.85.220.52]:35460 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751870AbbBTHP3 (ORCPT ); Fri, 20 Feb 2015 02:15:29 -0500 Message-ID: <54E6DF09.9060505@gmail.com> Date: Fri, 20 Feb 2015 01:15:21 -0600 From: Dinh Nguyen User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Rob Herring , Dinh Nguyen CC: Russell King - ARM Linux , Arnd Bergmann , "linux-kernel@vger.kernel.org" , Olof Johansson , "linux-arm-kernel@lists.infradead.org" Subject: Re: [RESEND PATCH 2/2] arm: socfpga: Set share override bit of the l2 cache controller References: <1424365606-19964-1-git-send-email-dinguyen@opensource.altera.com> <1424365606-19964-2-git-send-email-dinguyen@opensource.altera.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1135 Lines: 28 Hi Rob, On 2/19/15 12:13 PM, Rob Herring wrote: > On Thu, Feb 19, 2015 at 11:06 AM, wrote: >> From: Dinh Nguyen >> >> By not having bit 22 set 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. > > You really should be doing this in your bootloader. > Can I ask what is your reasoning for doing this in the bootloader? It's seems like this is such a nice mechanism to do it here. Dinh -- 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/