From patchwork Wed May 19 13:00:23 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Woodhouse X-Patchwork-Id: 100872 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4JD0w9Y025459 for ; Wed, 19 May 2010 13:00:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755762Ab0ESNA5 (ORCPT ); Wed, 19 May 2010 09:00:57 -0400 Received: from casper.infradead.org ([85.118.1.10]:46830 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753306Ab0ESNA4 (ORCPT ); Wed, 19 May 2010 09:00:56 -0400 Received: from macbook.infradead.org ([2001:8b0:10b:1:216:eaff:fe05:bbb8]) by casper.infradead.org with esmtpsa (Exim 4.69 #1 (Red Hat Linux)) id 1OEisr-0007sM-TS; Wed, 19 May 2010 13:00:26 +0000 Subject: Re: [PATCH v3] ad7877: keep dma rx buffers in seperate cache lines From: David Woodhouse To: Mike Frysinger Cc: Christoph Lameter , Pekka Enberg , Matt Mackall , Dmitry Torokhov , 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 , Johannes Weiner , Nick Piggin , David Rientjes , David Brownell , Grant Likely In-Reply-To: References: <1273487642-2169-1-git-send-email-os@emlix.com> <20100511063309.GC9644@core.coreip.homeip.net> <1273608441.15067.1002.camel@calx> Date: Wed, 19 May 2010 14:00:23 +0100 Message-ID: <1274274023.6930.10047.camel@macbook.infradead.org> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 (2.28.3-1.fc12) X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org See http://www.infradead.org/rpr.html Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 19 May 2010 13:00:58 +0000 (UTC) diff --git a/drivers/input/touchscreen/ad7877.c b/drivers/input/touchscreen/ad7877.c index 0d2d7e5..ae5d56e 100644 --- a/drivers/input/touchscreen/ad7877.c +++ b/drivers/input/touchscreen/ad7877.c @@ -151,6 +151,11 @@ enum { /* * Non-touchscreen sensors only use single-ended conversions. */ +#ifdef ARCH_KMALLOC_MINALIGN +#define __dma_aligned __attribute__((__aligned__(ARCH_KMALLOC_MINALIGN))) +#else +#define __dma_aligned +#endif struct ser_req { u16 reset; @@ -163,7 +168,7 @@ struct ser_req { * DMA (thus cache coherency maintenance) requires the * transfer buffers to live in their own cache lines. */ - u16 sample ____cacheline_aligned; + u16 sample __dma_aligned; }; struct ad7877 { @@ -203,7 +208,7 @@ struct ad7877 { * DMA (thus cache coherency maintenance) requires the * transfer buffers to live in their own cache lines. */ - u16 conversion_data[AD7877_NR_SENSE] ____cacheline_aligned; + u16 conversion_data[AD7877_NR_SENSE] __dma_aligned; }; static int gpio3;