2024-04-05 14:24:15

by Niklas Schnelle

[permalink] [raw]
Subject: [PATCH 0/1] pnp: Handle HAS_IOPORT dependencies

Hi Jaroslav, Rafael,

This is a follow up in my ongoing effort of making inb()/outb() and
similar I/O port accessors compile-time optional. Previously I sent this
as a treewide series titled "treewide: Remove I/O port accessors for
HAS_IOPORT=n" with the latest being its 5th version[0]. With a significant
subset of patches merged I've changed over to per-subsystem series. These
series are stand alone and should be merged via the relevant tree such
that with all subsystems complete we can follow this up with the final
patch that will make the I/O port accessors compile-time optional.

The current state of the full series with changes to the remaining subsystems
and the aforementioned final patch can be found for your convenience on my
git.kernel.org tree in the has_ioport branch[1]. As for compile-time vs runtime
see Linus' reply to my first attempt[2].

Thanks,
Niklas

[0] https://lore.kernel.org/all/[email protected]/
[1] https://git.kernel.org/pub/scm/linux/kernel/git/niks/linux.git/log/?h=has_ioport
[2] https://lore.kernel.org/lkml/CAHk-=wg80je=K7madF4e7WrRNp37e3qh6y10Svhdc7O8SZ_-8g@mail.gmail.com/

Niklas Schnelle (1):
pnp: add HAS_IOPORT dependencies

drivers/pnp/isapnp/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--
2.40.1



2024-04-05 14:26:50

by Niklas Schnelle

[permalink] [raw]
Subject: [PATCH 1/1] pnp: add HAS_IOPORT dependencies

In a future patch HAS_IOPORT=n will disable inb()/outb() and friends at
compile time. We thus need to depend on HAS_IOPORT even when compile
testing only.

Acked-by: Rafael J. Wysocki <[email protected]>
Co-developed-by: Arnd Bergmann <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Niklas Schnelle <[email protected]>
---
Note: This patch does not depend any not-yet-mainline HAS_IOPORT changes
and may be merged via subsystem specific trees at your earliest
convenience.

drivers/pnp/isapnp/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pnp/isapnp/Kconfig b/drivers/pnp/isapnp/Kconfig
index 8b5f2e461a80..8e5dec59e342 100644
--- a/drivers/pnp/isapnp/Kconfig
+++ b/drivers/pnp/isapnp/Kconfig
@@ -4,7 +4,7 @@
#
config ISAPNP
bool "ISA Plug and Play support"
- depends on ISA || COMPILE_TEST
+ depends on ISA || (HAS_IOPORT && COMPILE_TEST)
help
Say Y here if you would like support for ISA Plug and Play devices.
Some information is in <file:Documentation/userspace-api/isapnp.rst>.
--
2.40.1


2024-04-22 16:32:16

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH 1/1] pnp: add HAS_IOPORT dependencies

On Fri, Apr 5, 2024 at 4:26 PM Niklas Schnelle <[email protected]> wrote:
>
> In a future patch HAS_IOPORT=n will disable inb()/outb() and friends at
> compile time. We thus need to depend on HAS_IOPORT even when compile
> testing only.
>
> Acked-by: Rafael J. Wysocki <[email protected]>
> Co-developed-by: Arnd Bergmann <[email protected]>
> Signed-off-by: Arnd Bergmann <[email protected]>
> Signed-off-by: Niklas Schnelle <[email protected]>
> ---
> Note: This patch does not depend any not-yet-mainline HAS_IOPORT changes
> and may be merged via subsystem specific trees at your earliest
> convenience.
>
> drivers/pnp/isapnp/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pnp/isapnp/Kconfig b/drivers/pnp/isapnp/Kconfig
> index 8b5f2e461a80..8e5dec59e342 100644
> --- a/drivers/pnp/isapnp/Kconfig
> +++ b/drivers/pnp/isapnp/Kconfig
> @@ -4,7 +4,7 @@
> #
> config ISAPNP
> bool "ISA Plug and Play support"
> - depends on ISA || COMPILE_TEST
> + depends on ISA || (HAS_IOPORT && COMPILE_TEST)
> help
> Say Y here if you would like support for ISA Plug and Play devices.
> Some information is in <file:Documentation/userspace-api/isapnprst>.
> --

Applied as 6.10 material, thanks!