From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752204AbdBORTk (ORCPT ); Wed, 15 Feb 2017 12:19:40 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:46786 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751934AbdBORTi (ORCPT ); Wed, 15 Feb 2017 12:19:38 -0500 Date: Wed, 15 Feb 2017 09:19:37 -0800 From: Greg KH To: lixiubo@cmss.chinamobile.com Cc: agrover@redhat.com, mchristi@redhat.com, namei.unix@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] uio: add UIO_MEM_CUSTOM support Message-ID: <20170215171937.GA4705@kroah.com> References: <1487133786-25545-1-git-send-email-lixiubo@cmss.chinamobile.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1487133786-25545-1-git-send-email-lixiubo@cmss.chinamobile.com> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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