[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a0Bn9xKRX9z369zVCy6CuguTvNbtXOOPbf_OfS697cDyQ@mail.gmail.com>
Date: Sat, 30 Jul 2022 13:54:18 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Billie Alsup <balsup@...co.com>
Cc: linux@...linux.org.uk, tglx@...utronix.de, mingo@...hat.com,
bp@...en8.de, dave.hansen@...ux.intel.com, x86@...nel.org,
hpa@...or.com, arnd@...db.de, linus.walleij@...aro.org,
ardb@...nel.org, rmk+kernel@...linux.org.uk, rostedt@...dmis.org,
nick.hawkins@....com, john@...ozen.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Allow configuration of ARCH_NR_GPIO
On Sat, Jul 30, 2022 at 2:38 AM Billie Alsup <balsup@...co.com> wrote:
>
> From: Billie R Alsup <balsup@...co.com>
>
> Problem: Some systems support a high number of GPIO pins. Allow
> the kernel builder to configure the maximum number of pins, rather
> than forcing a large value on everyone.
>
> Impact: Once a .config is generated, the ARCH_NR_GPIO setting
> will persist. To return to a default setting, the CONFIG_ARCH_NR_GPIO
> must be removed from .config file first.
>
> Trade-offs: It is possible to achieve similar via command line
> parameters, e.g.
>
> make KBUILD_CFLAGS_KERNEL=-DARCH_NR_GPIOS=16384
>
> to the build. This is problematic because the setting does not
> show up in /proc/config.gz. It is also problematic for out-of-tree
> module builds, which require similar if they invoke the API
> gpio_is_valid(). In both cases, one could envision one system
> working normally, and another failing, even though they both have
> the same kernel version and /proc/config.gz. Therefore, it is
> better to have the setting available in .config
>
> Signed-off-by: Billie R Alsup <balsup@...co.com>
What is the use case for manually setting this rather than deriving
it from the selected platforms?
Have you tried to use both a platform-specific option for the minimum
number of this setting, and then restictricting the CONFIG_ARCH_NR_GPIO
setting with a 'range' statement?
Arnd
Powered by blists - more mailing lists