Path: csiph.com!news.mixmin.net!aioe.org!news.servidellagleba.it!bofh.it!news.nic.it!robomod From: Greg KH Newsgroups: linux.kernel Subject: Re: [PATCH] uio: add UIO_MEM_CUSTOM support Date: Wed, 15 Feb 2017 18:20:08 +0100 Message-ID: References: X-Original-To: lixiubo@cmss.chinamobile.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.7.2 (2016-11-26) Sender: robomod@news.nic.it List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Approved: robomod@news.nic.it Lines: 31 Organization: linux.* mail to news gateway X-Original-Cc: agrover@redhat.com, mchristi@redhat.com, namei.unix@gmail.com, linux-kernel@vger.kernel.org X-Original-Date: Wed, 15 Feb 2017 09:19:37 -0800 X-Original-Message-ID: <20170215171937.GA4705@kroah.com> X-Original-References: <1487133786-25545-1-git-send-email-lixiubo@cmss.chinamobile.com> X-Original-Sender: linux-kernel-owner@vger.kernel.org Xref: csiph.com linux.kernel:1581486 On Wed, Feb 15, 2017 at 12:43:06PM +0800, lixiubo@cmss.chinamobile.com wrote: > From: Xiubo Li > > This will allow UIO based drivers, like TCMU, have opportunities to > implement their own mmap magics. > > Signed-off-by: Xiubo Li > --- > drivers/uio/uio.c | 2 ++ > include/linux/uio_driver.h | 1 + > 2 files changed, 3 insertions(+) > > diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c > index fba021f..6ca0ae0 100644 > --- a/drivers/uio/uio.c > +++ b/drivers/uio/uio.c > @@ -708,6 +708,8 @@ static int uio_mmap(struct file *filep, struct vm_area_struct *vma) > case UIO_MEM_LOGICAL: > case UIO_MEM_VIRTUAL: > return uio_mmap_logical(vma); > + case UIO_MEM_CUSTOM: > + return 0; How does this help? Can you provide an update to the documentation in Documentation/driver-api/uio-howto.rst to show how to use this? thanks, greg k-h