From patchwork Mon May 10 10:42:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oskar Schirmer X-Patchwork-Id: 98144 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 o4AAgiji007702 for ; Mon, 10 May 2010 10:42:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756574Ab0EJKmo (ORCPT ); Mon, 10 May 2010 06:42:44 -0400 Received: from mx1.emlix.com ([193.175.82.87]:53994 "EHLO mx1.emlix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752849Ab0EJKmn (ORCPT ); Mon, 10 May 2010 06:42:43 -0400 Received: from gate.emlix.com ([193.175.27.217]:41651 helo=mailer.emlix.com) by mx1.emlix.com with esmtp (Exim 4.69) (envelope-from ) id 1OBQRX-0003Xx-Ox; Mon, 10 May 2010 12:42:35 +0200 Received: by mailer.emlix.com id 1OBQRW-0005hI-Fh; Mon, 10 May 2010 12:42:35 +0200 Received: by mango (sSMTP sendmail emulation); Mon, 10 May 2010 12:42:34 +0200 From: "Oskar Schirmer" To: Michael Hennerich , Dmitry Torokhov Cc: Mike Frysinger , Andrew Morton , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Oskar Schirmer , =?utf-8?q?Daniel=20Gl=C3=B6ckner?= , Oliver Schneidewind , Johannes Weiner Subject: [PATCH v3] ad7877: keep dma rx buffers in seperate cache lines Date: Mon, 10 May 2010 12:42:34 +0200 Message-Id: <1273488154-2993-1-git-send-email-os@emlix.com> In-Reply-To: <1273487642-2169-1-git-send-email-os@emlix.com> References: <1273487642-2169-1-git-send-email-os@emlix.com> MIME-Version: 1.0 Organization: emlix gmbh, Goettingen, Germany 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]); Mon, 10 May 2010 10:42:52 +0000 (UTC) diff --git a/drivers/input/touchscreen/ad7877.c b/drivers/input/touchscreen/ad7877.c index 885354c..9ebb1b4 100644 --- a/drivers/input/touchscreen/ad7877.c +++ b/drivers/input/touchscreen/ad7877.c @@ -153,15 +153,29 @@ enum { */ struct ser_req { + u16 sample; + /* + * DMA (thus cache coherency maintenance) requires the + * transfer buffers to live in their own cache lines. + */ + char __padalign[L1_CACHE_BYTES - sizeof(u16)]; + u16 reset; u16 ref_on; u16 command; - u16 sample; struct spi_message msg; struct spi_transfer xfer[6]; }; struct ad7877 { + u16 conversion_data[AD7877_NR_SENSE]; + /* + * DMA (thus cache coherency maintenance) requires the + * transfer buffers to live in their own cache lines. + */ + char __padalign[L1_CACHE_BYTES - + AD7877_NR_SENSE * sizeof(u16)]; + struct input_dev *input; char phys[32]; @@ -182,8 +196,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;