From patchwork Tue May 11 06:05:47 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 98605 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 o4B669mc019154 for ; Tue, 11 May 2010 06:06:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756282Ab0EKGGI (ORCPT ); Tue, 11 May 2010 02:06:08 -0400 Received: from mail-px0-f174.google.com ([209.85.212.174]:65221 "EHLO mail-px0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754893Ab0EKGGE (ORCPT ); Tue, 11 May 2010 02:06:04 -0400 Received: by pxi5 with SMTP id 5so2040100pxi.19 for ; Mon, 10 May 2010 23:06:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=qzhCO/f6jLCQe6jrRqkDMwW9QourrttnW2FPgajNKS0=; b=Gucdqk9Chaa3LuCzm30yZ1bt/vkjl4ZLWz2teTzWFOt7yrB/L9QQ/it5fVWF3pr+Jq qDJOY05GhTMUZ79E5S1IlIlTknVsaw9fvv63jkTMOwFGrE1TEQn9z51ls+k65pqV42Nk ezEdmO93XUwAROzgn4yFwK4AZbhrup+k9pApw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; b=j3LNNvhSl7X50Mm4HvZJ6qpTxCQrNggUhuGC3iD3bXNhjIPzDZLFlt3aGSdryqfviQ 1z23/n4Xs0MFWTZduhi2UKd9Oq+qroZE4timok8TIpHpHJFnNGuROA7Bntso8XZ+TFcP g3793/shKojwnF+slHliMnBk01h8mMcpwhPBM= Received: by 10.140.87.41 with SMTP id k41mr3452137rvb.109.1273557954045; Mon, 10 May 2010 23:05:54 -0700 (PDT) Received: from mailhub.coreip.homeip.net (c-24-6-153-206.hsd1.ca.comcast.net [24.6.153.206]) by mx.google.com with ESMTPS id i19sm2539142rvn.23.2010.05.10.23.05.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 10 May 2010 23:05:51 -0700 (PDT) Date: Mon, 10 May 2010 23:05:47 -0700 From: Dmitry Torokhov To: Andrew Morton Cc: Oskar Schirmer , Michael Hennerich , Mike Frysinger , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel =?iso-8859-1?Q?Gl=F6ckner?= , Oliver Schneidewind , Johannes Weiner Subject: Re: [PATCH v3] ad7877: keep dma rx buffers in seperate cache lines Message-ID: <20100511060547.GA9644@core.coreip.homeip.net> References: <1273487642-2169-1-git-send-email-os@emlix.com> <1273488154-2993-1-git-send-email-os@emlix.com> <20100510142225.4bf215ef.akpm@linux-foundation.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20100510142225.4bf215ef.akpm@linux-foundation.org> User-Agent: Mutt/1.5.20 (2009-08-17) 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]); Tue, 11 May 2010 06:06:09 +0000 (UTC) diff --git a/drivers/input/touchscreen/ad7877.c b/drivers/input/touchscreen/ad7877.c index e019d53..0d2d7e5 100644 --- a/drivers/input/touchscreen/ad7877.c +++ b/drivers/input/touchscreen/ad7877.c @@ -156,9 +156,14 @@ struct ser_req { u16 reset; u16 ref_on; u16 command; - u16 sample; struct spi_message msg; struct spi_transfer xfer[6]; + + /* + * DMA (thus cache coherency maintenance) requires the + * transfer buffers to live in their own cache lines. + */ + u16 sample ____cacheline_aligned; }; struct ad7877 { @@ -182,8 +187,6 @@ struct ad7877 { u8 averaging; u8 pen_down_acc_interval; - u16 conversion_data[AD7877_NR_SENSE]; - struct spi_transfer xfer[AD7877_NR_SENSE + 2]; struct spi_message msg; @@ -195,6 +198,12 @@ struct ad7877 { spinlock_t lock; struct timer_list timer; /* P: lock */ unsigned pending:1; /* P: lock */ + + /* + * DMA (thus cache coherency maintenance) requires the + * transfer buffers to live in their own cache lines. + */ + u16 conversion_data[AD7877_NR_SENSE] ____cacheline_aligned; }; static int gpio3;