mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Qiang Su <suqiang4@huawei.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2] UIO: make maximum memory and port regions configurable
Date: Wed, 18 Mar 2020 12:33:52 +0100	[thread overview]
Message-ID: <20200318113352.GA2365557@kroah.com> (raw)
In-Reply-To: <20200307081008.26848-1-suqiang4@huawei.com>

On Sat, Mar 07, 2020 at 04:10:08PM +0800, Qiang Su wrote:
> Now each uio device can only support 5 memory regions and
> 5 port regions. It is far from enough for some big system.
> On the other hand, the hard-coded style is not flexible.
> 
> Consider the marco is used as array index, so a range for
> the config is set in menuconfig. The range is set as 1 to 512.
> The default value is still set as 5 to keep consistent with
> current code.
> 
> Signed-off-by: Qiang Su <suqiang4@huawei.com>
> Reported-by: kbuild test robot <lkp@intel.com>
> ---
> Changes since v1:
> - also make port regions configurable in menuconfig.
> - fix kbuild errors.
> ---
>  drivers/uio/Kconfig        | 18 ++++++++++++++++++
>  include/linux/uio_driver.h |  4 ++--
>  2 files changed, 20 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/uio/Kconfig b/drivers/uio/Kconfig
> index 202ee81cfc2b..cee7d93cfea2 100644
> --- a/drivers/uio/Kconfig
> +++ b/drivers/uio/Kconfig
> @@ -165,4 +165,22 @@ config UIO_HV_GENERIC
>  	  to network and storage devices from userspace.
>  
>  	  If you compile this as a module, it will be called uio_hv_generic.
> +
> +config MAX_UIO_MAPS
> +	depends on UIO
> +	int "Maximum of memory nodes each uio device support(1-512)"
> +	range 1 512
> +	default 5
> +	help
> +	  make the max number of memory regions in uio device configurable.
> +
> +config MAX_UIO_PORT_REGIONS
> +	depends on UIO
> +	int "Maximum of port regions each uio device support(1-512)"
> +	range 1 512
> +	default 5
> +	help
> +	  make the max number of port regions in uio device configurable.


Can you provide a lot more information in these help texts?  Explain why
you would ever want to change these values, and that if you do not
understand, just take the default ones.

Or, better yet, can we just make these values dynamic and grow as needed
by the system?  Why are they "fixed"?

thanks,

greg k-h

  reply	other threads:[~2020-03-18 11:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-07  8:10 Qiang Su
2020-03-18 11:33 ` Greg KH [this message]
2020-03-19  3:11   ` suqiang (C)
2020-03-19  7:18     ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200318113352.GA2365557@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suqiang4@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome