Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756299Ab0BBP2u (ORCPT ); Tue, 2 Feb 2010 10:28:50 -0500 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:55001 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756149Ab0BBP2s (ORCPT ); Tue, 2 Feb 2010 10:28:48 -0500 Subject: Re: [PATCH] isp1760: Flush the D-cache for the pipe-in transfer buffers From: Catalin Marinas To: Sebastian Andrzej Siewior Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Greg KH , Matthew Dharm In-Reply-To: <20100202120845.GA7210@www.tglx.de> References: <20100202120845.GA7210@www.tglx.de> Content-Type: text/plain Organization: ARM Ltd Date: Tue, 02 Feb 2010 15:28:39 +0000 Message-Id: <1265124519.12634.80.camel@pc1117.cambridge.arm.com> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 02 Feb 2010 15:28:40.0627 (UTC) FILETIME=[65BAF030:01CAA41C] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1163 Lines: 31 On Tue, 2010-02-02 at 12:08 +0000, Sebastian Andrzej Siewior wrote: > * Catalin Marinas | 2010-02-02 11:11:35 [+0000]: > > >When the HDC driver writes the data to the transfer buffers it pollutes > >the D-cache (unlike DMA drivers where the device writes the data). If > >the corresponding pages get mapped into user space, there are no > >additional cache flushing operations performed and this causes random > >user space faults on architectures with separate I and D caches > >(Harvard) or those with aliasing D-cache. > > After looking through lib/scatterlist.c it uses > #include > > and > > flush_kernel_dcache_page(). > Wouldn't this do the job here as well? The documentation implies that this is to be used only with pages obtained with kmap(), which doesn't seem to be the case here. On some ARM processors it isn't even implemented (kunmap does the necessary flushing). -- Catalin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/