From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 25 Mar 2015 10:24:02 +0100 (CET) Received: from localhost.localdomain ([127.0.0.1]:49890 "EHLO linux-mips.org" rhost-flags-OK-OK-OK-FAIL) by eddie.linux-mips.org with ESMTP id S27009902AbbCYJYBET3n9 (ORCPT ); Wed, 25 Mar 2015 10:24:01 +0100 Received: from scotty.linux-mips.net (localhost.localdomain [127.0.0.1]) by scotty.linux-mips.net (8.14.9/8.14.8) with ESMTP id t2P9NxEH032093; Wed, 25 Mar 2015 10:23:59 +0100 Received: (from ralf@localhost) by scotty.linux-mips.net (8.14.9/8.14.9/Submit) id t2P9NwZx032092; Wed, 25 Mar 2015 10:23:58 +0100 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) Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 46517 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: ralf@linux-mips.org Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ralf Baechle Subject: Re: [PATCH V6 15/25] MIPS: BMIPS: Flush the readahead cache after DMA Date: Wed, 25 Mar 2015 10:23:58 +0100 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-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <1419529760-9520-16-git-send-email-cernekee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Kevin Cernekee Cc: f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, jaedon.shin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org, tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org, jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org, jogo-p3rKhJxN3npAfugRpC6u6w@public.gmane.org, arnd-r2nGTMty4D4@public.gmane.org, computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: devicetree@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 fro= m > 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. >=20 > Signed-off-by: Kevin Cernekee > Signed-off-by: Jaedon Shin > --- > arch/mips/mm/dma-default.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) >=20 > 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 > =20 > +#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: =2E/arch/mips/include/asm/bmips.h: In function =E2=80=98bmips_read_zscm= _reg=E2=80=99: =2E/arch/mips/include/asm/bmips.h:97:160: error: cast to pointer from i= nteger of different size [-Werror=3Dint-to-pointer-cast] cache_op(Index_Load_Tag_S, ZSCM_REG_BASE + offset); = = ^ =2E/arch/mips/include/asm/bmips.h: In function =E2=80=98bmips_write_zsc= m_reg=E2=80=99: =2E/arch/mips/include/asm/bmips.h:118:160: error: cast to pointer from = integer of different size [-Werror=3Dint-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 -- To unsubscribe from this list: send the line "unsubscribe devicetree" i= n the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html