From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752642AbbCYJYI (ORCPT ); Wed, 25 Mar 2015 05:24:08 -0400 Received: from eddie.linux-mips.org ([148.251.95.138]:50753 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752358AbbCYJYE (ORCPT ); Wed, 25 Mar 2015 05:24:04 -0400 Date: Wed, 25 Mar 2015 10:23:58 +0100 From: Ralf Baechle To: Kevin Cernekee Cc: f.fainelli@gmail.com, jaedon.shin@gmail.com, abrestic@chromium.org, tglx@linutronix.de, jason@lakedaemon.net, jogo@openwrt.org, arnd@arndb.de, computersforpeace@gmail.com, linux-mips@linux-mips.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V6 15/25] MIPS: BMIPS: Flush the readahead cache after DMA Message-ID: <20150325092358.GA31933@linux-mips.org> References: <1419529760-9520-1-git-send-email-cernekee@gmail.com> <1419529760-9520-16-git-send-email-cernekee@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1419529760-9520-16-git-send-email-cernekee@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 25, 2014 at 09:49:10AM -0800, Kevin Cernekee wrote: > BMIPS 3300/435x/438x CPUs have a readahead cache that is separate from > the L1/L2. During a DMA operation, accesses adjacent to a DMA buffer > may cause parts of the DMA buffer to be prefetched into the RAC. To > avoid possible coherency problems, flush the RAC upon DMA completion. > > Signed-off-by: Kevin Cernekee > Signed-off-by: Jaedon Shin > --- > arch/mips/mm/dma-default.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c > index af5f046..38ee47a 100644 > --- a/arch/mips/mm/dma-default.c > +++ b/arch/mips/mm/dma-default.c > @@ -18,6 +18,7 @@ > #include > #include > > +#include > #include > #include > #include Aside of platform-specific headers having no business of getting included directly in a generic arch file, this also breaks the build of many platforms: CC arch/mips/mm/dma-default.o In file included from arch/mips/mm/dma-default.c:21:0: ./arch/mips/include/asm/bmips.h: In function ‘bmips_read_zscm_reg’: ./arch/mips/include/asm/bmips.h:97:160: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] cache_op(Index_Load_Tag_S, ZSCM_REG_BASE + offset); ^ ./arch/mips/include/asm/bmips.h: In function ‘bmips_write_zscm_reg’: ./arch/mips/include/asm/bmips.h:118:160: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] cache_op(Index_Store_Tag_S, ZSCM_REG_BASE + offset); I think the broken platforms are all the 64 bit platforms. Ralf