From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnd@arndb.de (Arnd Bergmann) Date: Mon, 12 Dec 2011 16:48:51 +0000 Subject: [Linaro-mm-sig] [RFC v2 1/2] dma-buf: Introduce dma buffer sharing mechanism In-Reply-To: References: <1322816252-19955-1-git-send-email-sumit.semwal@ti.com> <20111209142405.6f371be6@pyramind.ukuu.org.uk> Message-ID: <201112121648.52126.arnd@arndb.de> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Saturday 10 December 2011, Daniel Vetter wrote: > If userspace (through some driver calls) > tries to do stupid things, it'll just get garbage. See > Message-ID: > for my reasons why it think this is the right way to go forward. So in > essence I'm really interested in the reasons why you want the kernel > to enforce this (or I'm completely missing what's the contentious > issue here). This has nothing to do with user space mappings. Whatever user space does, you get garbage if you don't invalidate cache lines that were introduced through speculative prefetching before you access cache lines that were DMA'd from a device. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [Linaro-mm-sig] [RFC v2 1/2] dma-buf: Introduce dma buffer sharing mechanism Date: Mon, 12 Dec 2011 16:48:51 +0000 Message-ID: <201112121648.52126.arnd@arndb.de> References: <1322816252-19955-1-git-send-email-sumit.semwal@ti.com> <20111209142405.6f371be6@pyramind.ukuu.org.uk> Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: owner-linux-mm@kvack.org To: Daniel Vetter Cc: Alan Cox , "Semwal, Sumit" , linux@arm.linux.org.uk, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-mm@kvack.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org List-Id: dri-devel@lists.freedesktop.org On Saturday 10 December 2011, Daniel Vetter wrote: > If userspace (through some driver calls) > tries to do stupid things, it'll just get garbage. See > Message-ID: > for my reasons why it think this is the right way to go forward. So in > essence I'm really interested in the reasons why you want the kernel > to enforce this (or I'm completely missing what's the contentious > issue here). This has nothing to do with user space mappings. Whatever user space does, you get garbage if you don't invalidate cache lines that were introduced through speculative prefetching before you access cache lines that were DMA'd from a device. Arnd -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from moutng.kundenserver.de ([212.227.17.9]:56954 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751461Ab1LLQtM (ORCPT ); Mon, 12 Dec 2011 11:49:12 -0500 From: Arnd Bergmann To: Daniel Vetter Subject: Re: [Linaro-mm-sig] [RFC v2 1/2] dma-buf: Introduce dma buffer sharing mechanism Date: Mon, 12 Dec 2011 16:48:51 +0000 Cc: Alan Cox , "Semwal, Sumit" , linux@arm.linux.org.uk, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-mm@kvack.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <1322816252-19955-1-git-send-email-sumit.semwal@ti.com> <20111209142405.6f371be6@pyramind.ukuu.org.uk> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201112121648.52126.arnd@arndb.de> Sender: linux-media-owner@vger.kernel.org List-ID: On Saturday 10 December 2011, Daniel Vetter wrote: > If userspace (through some driver calls) > tries to do stupid things, it'll just get garbage. See > Message-ID: > for my reasons why it think this is the right way to go forward. So in > essence I'm really interested in the reasons why you want the kernel > to enforce this (or I'm completely missing what's the contentious > issue here). This has nothing to do with user space mappings. Whatever user space does, you get garbage if you don't invalidate cache lines that were introduced through speculative prefetching before you access cache lines that were DMA'd from a device. Arnd