Skip to contentSkip to conversation

pnp: Handle HAS_IOPORT dependencies

PATCH Applied Niklas Schnelle 2 participants 3 messages Apr 5, 2024 – Apr 22, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover 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(-)
Signature · 1 line
2.40.1
#1 lore raw

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.

---
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(-)
drivers/pnp/isapnp/Kconfig +1 -1
index 8b5f2e461a80..8e5dec59e342 100644
@@ -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>.
Signature · 1 line
2.40.1
maintainer Applied
#2 lore raw

Re: [PATCH 1/1] pnp: add HAS_IOPORT dependencies

Quoted 22 lines · Niklas Schnelle

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.

---
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(-)
drivers/pnp/isapnp/Kconfig +0 -0
index 8b5f2e461a80..8e5dec59e342 100644

drivers/pnp/isapnp/Kconfig

Quoted 9 lines
drivers/pnp/isapnp/Kconfig +1 -2
@@ -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>.
--

Applied as 6.10 material, thanks!