From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Torokhov Subject: Re: [PATCH v3] ad7877: keep dma rx buffers in seperate cache lines Date: Tue, 11 May 2010 14:53:59 -0700 Message-ID: <20100511215359.GF7396@core.coreip.homeip.net> References: <20100511063309.GC9644@core.coreip.homeip.net> <1273608441.15067.1002.camel@calx> <20100511214836.GH1726@emlix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-px0-f174.google.com ([209.85.212.174]:62731 "EHLO mail-px0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751647Ab0EKVyK (ORCPT ); Tue, 11 May 2010 17:54:10 -0400 Content-Disposition: inline In-Reply-To: <20100511214836.GH1726@emlix.com> Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Johannes Weiner Cc: Mike Frysinger , Christoph Lameter , Pekka Enberg , Matt Mackall , Andrew Morton , Oskar Schirmer , Michael Hennerich , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel =?iso-8859-1?Q?Gl=F6ckner?= , Oliver Schneidewind , Nick Piggin , David Rientjes , David Brownell , Grant Likely On Tue, May 11, 2010 at 11:48:36PM +0200, Johannes Weiner wrote: > On Tue, May 11, 2010 at 04:54:41PM -0400, Mike Frysinger wrote: > > does the phrase "DMA safe buffer" imply cache alignment ? > > I guess that depends on the architectural requirements. On x86, > apparently, not so much. On ARM, probably yes, as it's the > requirement to properly maintain coherency. It looks liek ARM (and a few others) do this: [dtor@hammer work]$ grep -r ARCH_KMALLOC_MINALIGN arch/ arch/sh/include/asm/page.h:#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES arch/frv/include/asm/mem-layout.h:#define ARCH_KMALLOC_MINALIGN 8 arch/powerpc/include/asm/page_32.h:#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES arch/arm/include/asm/cache.h:#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES arch/microblaze/include/asm/page.h:#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES arch/mips/include/asm/mach-tx49xx/kmalloc.h: * All happy, no need to define ARCH_KMALLOC_MINALIGN arch/mips/include/asm/mach-ip27/kmalloc.h: * All happy, no need to define ARCH_KMALLOC_MINALIGN arch/mips/include/asm/mach-ip32/kmalloc.h:#define ARCH_KMALLOC_MINALIGN 32 arch/mips/include/asm/mach-ip32/kmalloc.h:#define ARCH_KMALLOC_MINALIGN 128 arch/mips/include/asm/mach-generic/kmalloc.h:#define ARCH_KMALLOC_MINALIGN 128 arch/avr32/include/asm/cache.h:#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES -- Dmitry