From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH v3] ad7877: keep dma rx buffers in seperate cache lines Date: Mon, 10 May 2010 23:20:15 -0400 Message-ID: <20100510232015.0a9f653a.akpm@linux-foundation.org> 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> <20100511060547.GA9644@core.coreip.homeip.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Mike Frysinger Cc: Dmitry Torokhov , 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 List-Id: linux-input@vger.kernel.org On Tue, 11 May 2010 02:11:41 -0400 Mike Frysinger wrote: > > __ __ __ __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; > > __}; (^^stupid gmail) > i'm not sure this is correct. the cached_aligned attribute makes sure > it starts on a cache boundary, but it doesnt make sure it pads out to > one. so it might work more of the time, but i dont think it's > guaranteed. yup. You'd need to put something like int pad ____cacheline_aligned; _after_ the trashable field. Then look at the .s file and make sure it came out right ;)