Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753804Ab0ARPP6 (ORCPT ); Mon, 18 Jan 2010 10:15:58 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753648Ab0ARPP5 (ORCPT ); Mon, 18 Jan 2010 10:15:57 -0500 Received: from casper.infradead.org ([85.118.1.10]:37280 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753048Ab0ARPP5 (ORCPT ); Mon, 18 Jan 2010 10:15:57 -0500 Date: Mon, 18 Jan 2010 07:16:07 -0800 From: Arjan van de Ven To: Felix Rubinstein Cc: linux-kernel@vger.kernel.org Subject: Re: /dev/mem implementation Message-ID: <20100118071607.17d954a2@infradead.org> In-Reply-To: References: <20100117094043.0483ee1a@infradead.org> Organization: Intel X-Mailer: Claws Mail 3.7.3 (GTK+ 2.16.6; i586-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1010 Lines: 25 On Mon, 18 Jan 2010 14:18:22 +0200 Felix Rubinstein wrote: > The usecase is broadcom 10GbE switch driver which maps DMA memory to > userspace. I can find one more libe1000 which uses char driver to map > DMA memory to userspace too. > So, how can I implement userspace drivers in recent kernels which want > to map DMA memory to userspace if STRICT_DEVMEM or PAT (either of > them) are enabled. for these cases the driver should provide it's own mmap method that exposes only those pages that the hardware has access to. You need something like this anyway to deal with the dma mapping api.... -- Arjan van de Ven Intel Open Source Technology Centre For development, discussion and tips for power savings, visit http://www.lesswatts.org -- 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/