Skip to contentSkip to conversation

kgdb: Handle HAS_IOPORT dependencies

PATCH Applied Niklas Schnelle 3 participants 4 messages Apr 3, 2024 Library code

lore
Share & tools
lore
#0 lore raw

cover kgdb: Handle HAS_IOPORT dependencies

Hi Andrew,

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_v6 branch[1] with signed tags. 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_v6
[2] https://lore.kernel.org/lkml/CAHk-=wg80je=K7madF4e7WrRNp37e3qh6y10Svhdc7O8SZ_-8g@mail.gmail.com/

Niklas Schnelle (1):
kgdb: add HAS_IOPORT dependency

 lib/Kconfig.kgdb | 1 +
 1 file changed, 1 insertion(+)
Signature · 1 line
2.40.1
#1 lore raw

PATCH 1/1 kgdb: add HAS_IOPORT dependency

In a future patch HAS_IOPORT=n will disable inb()/outb() and friends at compile time. We thus need to add HAS_IOPORT as dependency for those drivers using them.

---
 lib/Kconfig.kgdb | 1 +
 1 file changed, 1 insertion(+)
lib/Kconfig.kgdb +1 -0
index b5c0e6576749..537e1b3f5734 100644
@@ -122,6 +122,7 @@ config KDB_DEFAULT_ENABLE
 config KDB_KEYBOARD
 	bool "KGDB_KDB: keyboard as input device"
 	depends on VT && KGDB_KDB && !PARISC
+	depends on HAS_IOPORT
 	default n
 	help
 	  KDB can use a PS/2 type keyboard for an input device
Signature · 1 line
2.40.1
maintainer
#2 lore raw
In reply to Niklas Schnelle
Quoted 11 lines · On Wed, 3 Apr 2024 15:25:46 +0200 Niklas Schnelle <[email protected]>…

Hi Andrew,

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.

Quoted 5 lines

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_v6 branch[1] with signed tags. As for compile-time vs runtime see Linus' reply to my first attempt[2].

Thanks.

I'm not fully understanding the timing. Am I correct in believing that the 44 other patches are not dependent upon this one? And that this patch is not dependent upon those 44?

#3 lore raw
Quoted 17 lines · Andrew Morton
Quoted 10 lines · On Wed, 3 Apr 2024 15:25:46 +0200 Niklas Schnelle <[email protected]>…

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.

Quoted 5 lines

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_v6 branch[1] with signed tags. As for compile-time vs runtime see Linus' reply to my first attempt[2].

Quoted 3 lines

I'm not fully understanding the timing. Am I correct in believing that the 44 other patches are not dependent upon this one? And that this patch is not dependent upon those 44?

Correct, there is just one last patch that depends on everything else going in first.

Arnd