netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/38] Kconfig: Introduce HAS_IOPORT config option
@ 2023-03-14 12:11 Niklas Schnelle
  2023-03-14 12:11 ` [PATCH v3 18/38] mISDN: add HAS_IOPORT dependencies Niklas Schnelle
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Niklas Schnelle @ 2023-03-14 12:11 UTC (permalink / raw)
  To: Arnd Bergmann, Richard Cochran, Paul Walmsley, Palmer Dabbelt,
	Albert Ou
  Cc: Greg Kroah-Hartman, Bjorn Helgaas, Uwe Kleine-König,
	Mauro Carvalho Chehab, Alan Stern, Rafael J. Wysocki,
	Geert Uytterhoeven, linux-kernel, linux-arch, linux-pci, netdev,
	linux-riscv

Hello Kernel Hackers,

Some platforms such as s390 do not support PCI I/O spaces. On such platforms
I/O space accessors like inb()/outb() are stubs that can never actually work.
The way these stubs are implemented in asm-generic/io.h leads to compiler
warnings because any use will be a NULL pointer access on these platforms. In
a previous patch we tried handling this with a run-time warning on access. This
approach however was rejected by Linus[0] with the argument that this really
should be a compile-time check and, though a much more invasive change, we
believe that is indeed the right approach.

This patch series aims to do exactly that by introducing a HAS_IOPORT config
option akin to the existing HAS_IOMEM. When this is unset inb()/outb() and
friends may not be defined. This is also the same approach originally planned by
Uwe Kleine-König as mentioned in commit ce816fa88cca ("Kconfig: rename
HAS_IOPORT to HAS_IOPORT_MAP").

This series builds heavily on an original patch for demonstating the concept by
Arnd Bergmann[1] and incoporates feedback of previous RFC versions [2] and [3].

This version is based on v6.3-rc1 and is also available on my kernel.org tree
in the has_ioport_v3 branch with the PGP signed tag has_ioport_v3_signed:

https://git.kernel.org/pub/scm/linux/kernel/git/niks/linux.git

Thanks,
Niklas Schnelle

Changes from RFC v2:
- Rebased on v6.3-rc1
- Fixed a NULL pointer dereference in set_io_from_upio() due to accidentially
  expanded #ifdef CONFIG_SERIAL_8250_RT288X (kernel test robot)
- Dropped "ACPI: add dependency on HAS_IOPORT" (Bjorn Helgaas)
- Reworded commit message and moved ifdefs for "PCI/sysfs: Make I/O resource
  depend on HAS_IOPORT" (Bjorn Helgaas)
- Instead of complete removal inb() etc. are marked with __compiletime_error()
  when HAS_IOPORT is unset allowing for better error reporting (Ahmad Fatoum)
- Removed HAS_IOPORT dependency from PCMCIA as I/O port use is optional in at
  least PC Card. Instead added HAS_IOPORT on a per driver basis. (Bjorn
  Helgaas)
- Made uhci_has_pci_registers() constant 0 if HAS_IOPORT is not defined (Alan
  Stern)

Changes from RFC v1:
- Completely dropped the LEGACY_PCI option and replaced its dependencies with
  HAS_IOPORT as appropriate
- In the usb subsystem patch I incorporated the feedback from v1 by Alan Stern:
  - Used a local macro to nop in*()/out*() in the helpers
  - Removed an unnecessary further restriction on CONFIG_USB_UHCI_HCD
- Added a few more subsystems including wireless, ptp, and, mISDN that I had
  previously missed due to a blanket !S390.
- Removed blanket !S390 dependencies where they are added due to the I/O port
  problem
- In the sound system SND_OPL3_LIB needed to use "depends on" instead of
  "select" because of its added HAS_IOPORT dependency
- In the drm subsystem the bochs driver gets #ifdefs instead of a blanket
  dependency because its MMIO capable device variant should work without
  HAS_IOPORT.

[0] https://lore.kernel.org/lkml/CAHk-=wg80je=K7madF4e7WrRNp37e3qh6y10Svhdc7O8SZ_-8g@mail.gmail.com/
[1] https://lore.kernel.org/lkml/CAK8P3a0MNbx-iuzW_-=0ab6-TTZzwV-PT_6gAC1Gp5PgYyHcrA@mail.gmail.com/
[2] https://yhbt.net/lore/all/20211227164317.4146918-1-schnelle@linux.ibm.com/
[3] https://lore.kernel.org/all/20220429135108.2781579-1-schnelle@linux.ibm.com/

Niklas Schnelle (38):
  Kconfig: introduce HAS_IOPORT option and select it as necessary
  ata: add HAS_IOPORT dependencies
  char: impi, tpm: depend on HAS_IOPORT
  comedi: add HAS_IOPORT dependencies
  counter: add HAS_IOPORT dependencies
  /dev/port: don't compile file operations without CONFIG_DEVPORT
  drm: handle HAS_IOPORT dependencies
  firmware: dmi-sysfs: handle HAS_IOPORT=n
  gpio: add HAS_IOPORT dependencies
  hwmon: add HAS_IOPORT dependencies
  i2c: add HAS_IOPORT dependencies
  iio: ad7606: Kconfig: add HAS_IOPORT dependencies
  Input: add HAS_IOPORT dependencies
  Input: gameport: add ISA and HAS_IOPORT dependencies
  leds: add HAS_IOPORT dependencies
  media: add HAS_IOPORT dependencies
  misc: add HAS_IOPORT dependencies
  mISDN: add HAS_IOPORT dependencies
  mpt fusion: add HAS_IOPORT dependencies
  net: handle HAS_IOPORT dependencies
  parport: PC style parport depends on HAS_IOPORT
  PCI: Make quirk using inw() depend on HAS_IOPORT
  PCI/sysfs: Make I/O resource depend on HAS_IOPORT
  pcmcia: add HAS_IOPORT dependencies
  platform: add HAS_IOPORT dependencies
  pnp: add HAS_IOPORT dependencies
  power: add HAS_IOPORT dependencies
  rtc: add HAS_IOPORT dependencies
  scsi: add HAS_IOPORT dependencies
  sound: add HAS_IOPORT dependencies
  speakup: add HAS_IOPORT dependency for SPEAKUP_SERIALIO
  staging: add HAS_IOPORT dependencies
  tty: serial: handle HAS_IOPORT dependencies
  usb: handle HAS_IOPORT dependencies
  video: handle HAS_IOPORT dependencies
  watchdog: add HAS_IOPORT dependencies
  wireless: add HAS_IOPORT dependencies
  asm-generic/io.h: drop inb() etc for HAS_IOPORT=n

 arch/alpha/Kconfig                           |   1 +
 arch/arm/Kconfig                             |   1 +
 arch/arm64/Kconfig                           |   1 +
 arch/ia64/Kconfig                            |   1 +
 arch/m68k/Kconfig                            |   1 +
 arch/microblaze/Kconfig                      |   1 +
 arch/mips/Kconfig                            |   2 +
 arch/parisc/Kconfig                          |   2 +
 arch/powerpc/Kconfig                         |   2 +-
 arch/riscv/Kconfig                           |   1 +
 arch/sh/Kconfig                              |   1 +
 arch/sparc/Kconfig                           |   1 +
 arch/um/Kconfig                              |   1 +
 arch/x86/Kconfig                             |   2 +
 drivers/accessibility/speakup/Kconfig        |   1 +
 drivers/ata/Kconfig                          |   1 +
 drivers/bus/Kconfig                          |   2 +-
 drivers/char/Kconfig                         |   3 +-
 drivers/char/ipmi/Makefile                   |  11 +-
 drivers/char/ipmi/ipmi_si_intf.c             |   3 +-
 drivers/char/ipmi/ipmi_si_pci.c              |   3 +
 drivers/char/mem.c                           |   6 +-
 drivers/char/pcmcia/Kconfig                  |   8 +-
 drivers/char/tpm/Kconfig                     |   1 +
 drivers/char/tpm/tpm_infineon.c              |  14 ++-
 drivers/char/tpm/tpm_tis_core.c              |  19 ++-
 drivers/comedi/Kconfig                       | 103 +++++++++------
 drivers/counter/Kconfig                      |   1 +
 drivers/eisa/Kconfig                         |   1 +
 drivers/firmware/dmi-sysfs.c                 |   4 +
 drivers/gpio/Kconfig                         |   2 +-
 drivers/gpu/drm/qxl/Kconfig                  |   1 +
 drivers/gpu/drm/tiny/bochs.c                 |  19 +++
 drivers/gpu/drm/tiny/cirrus.c                |   2 +
 drivers/hwmon/Kconfig                        |  21 +++-
 drivers/i2c/busses/Kconfig                   |  31 ++---
 drivers/iio/adc/Kconfig                      |   2 +-
 drivers/input/gameport/Kconfig               |   4 +-
 drivers/input/serio/Kconfig                  |   2 +
 drivers/input/touchscreen/Kconfig            |   1 +
 drivers/isdn/Kconfig                         |   1 -
 drivers/isdn/hardware/mISDN/Kconfig          |  12 +-
 drivers/leds/Kconfig                         |   2 +-
 drivers/media/pci/dm1105/Kconfig             |   2 +-
 drivers/media/radio/Kconfig                  |  14 ++-
 drivers/media/rc/Kconfig                     |   6 +
 drivers/message/fusion/Kconfig               |   2 +-
 drivers/misc/altera-stapl/Makefile           |   3 +-
 drivers/misc/altera-stapl/altera.c           |   6 +-
 drivers/net/Kconfig                          |   2 +-
 drivers/net/arcnet/Kconfig                   |   2 +-
 drivers/net/can/cc770/Kconfig                |   1 +
 drivers/net/can/sja1000/Kconfig              |   1 +
 drivers/net/ethernet/3com/Kconfig            |   4 +-
 drivers/net/ethernet/8390/Kconfig            |   6 +-
 drivers/net/ethernet/amd/Kconfig             |   4 +-
 drivers/net/ethernet/fujitsu/Kconfig         |   2 +-
 drivers/net/ethernet/intel/Kconfig           |   2 +-
 drivers/net/ethernet/sis/Kconfig             |   4 +-
 drivers/net/ethernet/smsc/Kconfig            |   2 +-
 drivers/net/ethernet/ti/Kconfig              |   2 +-
 drivers/net/ethernet/via/Kconfig             |   1 +
 drivers/net/ethernet/xircom/Kconfig          |   2 +-
 drivers/net/fddi/Kconfig                     |   2 +-
 drivers/net/fddi/defxx.c                     |   2 +-
 drivers/net/hamradio/Kconfig                 |   6 +-
 drivers/net/wan/Kconfig                      |   2 +-
 drivers/net/wireless/atmel/Kconfig           |   2 +-
 drivers/net/wireless/intersil/hostap/Kconfig |   2 +-
 drivers/parport/Kconfig                      |   4 +-
 drivers/pci/pci-sysfs.c                      |   4 +
 drivers/pci/quirks.c                         |   2 +
 drivers/pcmcia/Kconfig                       |   5 +-
 drivers/platform/chrome/Kconfig              |   1 +
 drivers/platform/chrome/wilco_ec/Kconfig     |   1 +
 drivers/pnp/isapnp/Kconfig                   |   2 +-
 drivers/power/reset/Kconfig                  |   1 +
 drivers/rtc/Kconfig                          |   4 +-
 drivers/scsi/Kconfig                         |  25 ++--
 drivers/scsi/aic7xxx/Kconfig.aic79xx         |   2 +-
 drivers/scsi/aic7xxx/Kconfig.aic7xxx         |   2 +-
 drivers/scsi/aic94xx/Kconfig                 |   2 +-
 drivers/scsi/megaraid/Kconfig.megaraid       |   6 +-
 drivers/scsi/mvsas/Kconfig                   |   2 +-
 drivers/scsi/pcmcia/Kconfig                  |   6 +-
 drivers/scsi/qla2xxx/Kconfig                 |   2 +-
 drivers/staging/sm750fb/Kconfig              |   2 +-
 drivers/staging/vt6655/Kconfig               |   2 +-
 drivers/tty/Kconfig                          |   2 +-
 drivers/tty/serial/8250/8250_early.c         |   4 +
 drivers/tty/serial/8250/8250_pci.c           |  14 +++
 drivers/tty/serial/8250/8250_port.c          |  44 +++++--
 drivers/tty/serial/8250/Kconfig              |   5 +-
 drivers/tty/serial/Kconfig                   |   2 +-
 drivers/usb/core/hcd-pci.c                   |   2 +
 drivers/usb/host/Kconfig                     |   4 +-
 drivers/usb/host/pci-quirks.c                | 125 ++++++++++---------
 drivers/usb/host/pci-quirks.h                |  31 +++--
 drivers/usb/host/uhci-hcd.c                  |   2 +-
 drivers/usb/host/uhci-hcd.h                  |  36 ++++--
 drivers/video/console/Kconfig                |   1 +
 drivers/video/fbdev/Kconfig                  |  25 ++--
 drivers/watchdog/Kconfig                     |   6 +-
 include/asm-generic/io.h                     |  60 +++++++++
 include/linux/gameport.h                     |   9 +-
 include/linux/parport.h                      |   2 +-
 include/video/vga.h                          |   8 ++
 lib/Kconfig                                  |   4 +
 lib/Kconfig.kgdb                             |   3 +-
 net/ax25/Kconfig                             |   2 +-
 sound/drivers/Kconfig                        |   3 +
 sound/isa/Kconfig                            |  31 ++++-
 sound/pci/Kconfig                            |  45 +++++--
 sound/pcmcia/Kconfig                         |   2 +
 114 files changed, 649 insertions(+), 281 deletions(-)


base-commit: eeac8ede17557680855031c6f305ece2378af326
-- 
2.37.2


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v3 18/38] mISDN: add HAS_IOPORT dependencies
  2023-03-14 12:11 [PATCH v3 00/38] Kconfig: Introduce HAS_IOPORT config option Niklas Schnelle
@ 2023-03-14 12:11 ` Niklas Schnelle
  2023-03-15  5:41   ` Jakub Kicinski
  2023-03-14 12:11 ` [PATCH v3 20/38] net: handle " Niklas Schnelle
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Niklas Schnelle @ 2023-03-14 12:11 UTC (permalink / raw)
  To: Arnd Bergmann, Karsten Keil
  Cc: Greg Kroah-Hartman, Bjorn Helgaas, Uwe Kleine-König,
	Mauro Carvalho Chehab, Alan Stern, Rafael J. Wysocki,
	Geert Uytterhoeven, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	linux-kernel, linux-arch, linux-pci, Arnd Bergmann, netdev

In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
not being declared. We thus need to add HAS_IOPORT as dependency for
those drivers using them. With that the !S390 dependency on ISDN can be
removed as all drivers without HAS_IOPORT requirement now build.

Co-developed-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
---
 drivers/isdn/Kconfig                |  1 -
 drivers/isdn/hardware/mISDN/Kconfig | 12 ++++++------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/isdn/Kconfig b/drivers/isdn/Kconfig
index 2690e2c5a158..6fd1b3f84a29 100644
--- a/drivers/isdn/Kconfig
+++ b/drivers/isdn/Kconfig
@@ -6,7 +6,6 @@
 menuconfig ISDN
 	bool "ISDN support"
 	depends on NET && NETDEVICES
-	depends on !S390 && !UML
 	help
 	  ISDN ("Integrated Services Digital Network", called RNIS in France)
 	  is a fully digital telephone service that can be used for voice and
diff --git a/drivers/isdn/hardware/mISDN/Kconfig b/drivers/isdn/hardware/mISDN/Kconfig
index 078eeadf707a..a35bff8a93f5 100644
--- a/drivers/isdn/hardware/mISDN/Kconfig
+++ b/drivers/isdn/hardware/mISDN/Kconfig
@@ -14,7 +14,7 @@ config MISDN_HFCPCI
 
 config MISDN_HFCMULTI
 	tristate "Support for HFC multiport cards (HFC-4S/8S/E1)"
-	depends on PCI || CPM1
+	depends on (PCI || CPM1) && HAS_IOPORT
 	depends on MISDN
 	help
 	  Enable support for cards with Cologne Chip AG's HFC multiport
@@ -43,7 +43,7 @@ config MISDN_HFCUSB
 config MISDN_AVMFRITZ
 	tristate "Support for AVM FRITZ!CARD PCI"
 	depends on MISDN
-	depends on PCI
+	depends on PCI && HAS_IOPORT
 	select MISDN_IPAC
 	help
 	  Enable support for AVMs FRITZ!CARD PCI cards
@@ -51,7 +51,7 @@ config MISDN_AVMFRITZ
 config MISDN_SPEEDFAX
 	tristate "Support for Sedlbauer Speedfax+"
 	depends on MISDN
-	depends on PCI
+	depends on PCI && HAS_IOPORT
 	select MISDN_IPAC
 	select MISDN_ISAR
 	help
@@ -60,7 +60,7 @@ config MISDN_SPEEDFAX
 config MISDN_INFINEON
 	tristate "Support for cards with Infineon chipset"
 	depends on MISDN
-	depends on PCI
+	depends on PCI && HAS_IOPORT
 	select MISDN_IPAC
 	help
 	  Enable support for cards with ISAC + HSCX, IPAC or IPAC-SX
@@ -69,14 +69,14 @@ config MISDN_INFINEON
 config MISDN_W6692
 	tristate "Support for cards with Winbond 6692"
 	depends on MISDN
-	depends on PCI
+	depends on PCI && HAS_IOPORT
 	help
 	  Enable support for Winbond 6692 PCI chip based cards.
 
 config MISDN_NETJET
 	tristate "Support for NETJet cards"
 	depends on MISDN
-	depends on PCI
+	depends on PCI && HAS_IOPORT
 	depends on TTY
 	select MISDN_IPAC
 	select MISDN_HDLC
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v3 20/38] net: handle HAS_IOPORT dependencies
  2023-03-14 12:11 [PATCH v3 00/38] Kconfig: Introduce HAS_IOPORT config option Niklas Schnelle
  2023-03-14 12:11 ` [PATCH v3 18/38] mISDN: add HAS_IOPORT dependencies Niklas Schnelle
@ 2023-03-14 12:11 ` Niklas Schnelle
  2023-03-15  5:41   ` Jakub Kicinski
  2023-03-15  9:47   ` Maciej W. Rozycki
  2023-03-14 12:12 ` [PATCH v3 37/38] wireless: add " Niklas Schnelle
  2023-03-14 14:05 ` [PATCH v3 00/38] Kconfig: Introduce HAS_IOPORT config option Arnd Bergmann
  3 siblings, 2 replies; 9+ messages in thread
From: Niklas Schnelle @ 2023-03-14 12:11 UTC (permalink / raw)
  To: Arnd Bergmann, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Michael Grzeschik, Wolfgang Grandegger,
	Marc Kleine-Budde, Jesse Brandeburg, Tony Nguyen,
	Maciej W. Rozycki, Ralf Baechle
  Cc: Greg Kroah-Hartman, Bjorn Helgaas, Uwe Kleine-König,
	Mauro Carvalho Chehab, Alan Stern, Rafael J. Wysocki,
	Geert Uytterhoeven, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	linux-kernel, linux-arch, linux-pci, Arnd Bergmann, netdev,
	linux-can, intel-wired-lan, linux-hams

In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
not being declared. We thus need to add HAS_IOPORT as dependency for
those drivers requiring them. For the DEFXX driver there use of I/O
ports is optional and we only need to fence those paths.can It also
turns out that with HAS_IOPORT handled explicitly HAMRADIO does not need
the !S390 dependency and successfully builds the bpqether driver.

Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Co-developed-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
---
 drivers/net/Kconfig                  | 2 +-
 drivers/net/arcnet/Kconfig           | 2 +-
 drivers/net/can/cc770/Kconfig        | 1 +
 drivers/net/can/sja1000/Kconfig      | 1 +
 drivers/net/ethernet/3com/Kconfig    | 4 ++--
 drivers/net/ethernet/8390/Kconfig    | 6 +++---
 drivers/net/ethernet/amd/Kconfig     | 4 ++--
 drivers/net/ethernet/fujitsu/Kconfig | 2 +-
 drivers/net/ethernet/intel/Kconfig   | 2 +-
 drivers/net/ethernet/sis/Kconfig     | 4 ++--
 drivers/net/ethernet/smsc/Kconfig    | 2 +-
 drivers/net/ethernet/ti/Kconfig      | 2 +-
 drivers/net/ethernet/via/Kconfig     | 1 +
 drivers/net/ethernet/xircom/Kconfig  | 2 +-
 drivers/net/fddi/Kconfig             | 2 +-
 drivers/net/fddi/defxx.c             | 2 +-
 drivers/net/hamradio/Kconfig         | 6 +++---
 drivers/net/wan/Kconfig              | 2 +-
 net/ax25/Kconfig                     | 2 +-
 19 files changed, 26 insertions(+), 23 deletions(-)

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index c34bd432da27..170387314f1b 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -474,7 +474,7 @@ source "drivers/net/ipa/Kconfig"
 
 config NET_SB1000
 	tristate "General Instruments Surfboard 1000"
-	depends on PNP
+	depends on ISA && PNP
 	help
 	  This is a driver for the General Instrument (also known as
 	  NextLevel) SURFboard 1000 internal
diff --git a/drivers/net/arcnet/Kconfig b/drivers/net/arcnet/Kconfig
index a51b9dab6d3a..d1d07a1d4fbc 100644
--- a/drivers/net/arcnet/Kconfig
+++ b/drivers/net/arcnet/Kconfig
@@ -4,7 +4,7 @@
 #
 
 menuconfig ARCNET
-	depends on NETDEVICES && (ISA || PCI || PCMCIA)
+	depends on NETDEVICES && (ISA || PCI || PCMCIA) && HAS_IOPORT
 	tristate "ARCnet support"
 	help
 	  If you have a network card of this type, say Y and check out the
diff --git a/drivers/net/can/cc770/Kconfig b/drivers/net/can/cc770/Kconfig
index 9ef1359319f0..467ef19de1c1 100644
--- a/drivers/net/can/cc770/Kconfig
+++ b/drivers/net/can/cc770/Kconfig
@@ -7,6 +7,7 @@ if CAN_CC770
 
 config CAN_CC770_ISA
 	tristate "ISA Bus based legacy CC770 driver"
+	depends on ISA
 	help
 	  This driver adds legacy support for CC770 and AN82527 chips
 	  connected to the ISA bus using I/O port, memory mapped or
diff --git a/drivers/net/can/sja1000/Kconfig b/drivers/net/can/sja1000/Kconfig
index 4b2f9cb17fc3..01168db4c106 100644
--- a/drivers/net/can/sja1000/Kconfig
+++ b/drivers/net/can/sja1000/Kconfig
@@ -87,6 +87,7 @@ config CAN_PLX_PCI
 
 config CAN_SJA1000_ISA
 	tristate "ISA Bus based legacy SJA1000 driver"
+	depends on ISA
 	help
 	  This driver adds legacy support for SJA1000 chips connected to
 	  the ISA bus using I/O port, memory mapped or indirect access.
diff --git a/drivers/net/ethernet/3com/Kconfig b/drivers/net/ethernet/3com/Kconfig
index 706bd59bf645..1fbab79e2be4 100644
--- a/drivers/net/ethernet/3com/Kconfig
+++ b/drivers/net/ethernet/3com/Kconfig
@@ -44,7 +44,7 @@ config 3C515
 
 config PCMCIA_3C574
 	tristate "3Com 3c574 PCMCIA support"
-	depends on PCMCIA
+	depends on PCMCIA && HAS_IOPORT
 	help
 	  Say Y here if you intend to attach a 3Com 3c574 or compatible PCMCIA
 	  (PC-card) Fast Ethernet card to your computer.
@@ -54,7 +54,7 @@ config PCMCIA_3C574
 
 config PCMCIA_3C589
 	tristate "3Com 3c589 PCMCIA support"
-	depends on PCMCIA
+	depends on PCMCIA && HAS_IOPORT
 	help
 	  Say Y here if you intend to attach a 3Com 3c589 or compatible PCMCIA
 	  (PC-card) Ethernet card to your computer.
diff --git a/drivers/net/ethernet/8390/Kconfig b/drivers/net/ethernet/8390/Kconfig
index a4130e643342..345f250781c6 100644
--- a/drivers/net/ethernet/8390/Kconfig
+++ b/drivers/net/ethernet/8390/Kconfig
@@ -19,7 +19,7 @@ if NET_VENDOR_8390
 
 config PCMCIA_AXNET
 	tristate "Asix AX88190 PCMCIA support"
-	depends on PCMCIA
+	depends on PCMCIA && HAS_IOPORT
 	help
 	  Say Y here if you intend to attach an Asix AX88190-based PCMCIA
 	  (PC-card) Fast Ethernet card to your computer.  These cards are
@@ -117,7 +117,7 @@ config NE2000
 
 config NE2K_PCI
 	tristate "PCI NE2000 and clones support (see help)"
-	depends on PCI
+	depends on PCI && HAS_IOPORT
 	select CRC32
 	help
 	  This driver is for NE2000 compatible PCI cards. It will not work
@@ -146,7 +146,7 @@ config APNE
 
 config PCMCIA_PCNET
 	tristate "NE2000 compatible PCMCIA support"
-	depends on PCMCIA
+	depends on PCMCIA && HAS_IOPORT
 	select CRC32
 	help
 	  Say Y here if you intend to attach an NE2000 compatible PCMCIA
diff --git a/drivers/net/ethernet/amd/Kconfig b/drivers/net/ethernet/amd/Kconfig
index ab42f75b9413..2f19b4a24d53 100644
--- a/drivers/net/ethernet/amd/Kconfig
+++ b/drivers/net/ethernet/amd/Kconfig
@@ -56,7 +56,7 @@ config LANCE
 
 config PCNET32
 	tristate "AMD PCnet32 PCI support"
-	depends on PCI
+	depends on PCI && HAS_IOPORT
 	select CRC32
 	select MII
 	help
@@ -122,7 +122,7 @@ config MVME147_NET
 
 config PCMCIA_NMCLAN
 	tristate "New Media PCMCIA support"
-	depends on PCMCIA
+	depends on PCMCIA && HAS_IOPORT
 	help
 	  Say Y here if you intend to attach a New Media Ethernet or LiveWire
 	  PCMCIA (PC-card) Ethernet card to your computer.
diff --git a/drivers/net/ethernet/fujitsu/Kconfig b/drivers/net/ethernet/fujitsu/Kconfig
index 0a1400cb410a..06a28bce5d27 100644
--- a/drivers/net/ethernet/fujitsu/Kconfig
+++ b/drivers/net/ethernet/fujitsu/Kconfig
@@ -18,7 +18,7 @@ if NET_VENDOR_FUJITSU
 
 config PCMCIA_FMVJ18X
 	tristate "Fujitsu FMV-J18x PCMCIA support"
-	depends on PCMCIA
+	depends on PCMCIA && HAS_IOPORT
 	select CRC32
 	help
 	  Say Y here if you intend to attach a Fujitsu FMV-J18x or compatible
diff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig
index c18c3b373846..bfb182310135 100644
--- a/drivers/net/ethernet/intel/Kconfig
+++ b/drivers/net/ethernet/intel/Kconfig
@@ -41,7 +41,7 @@ config E100
 
 config E1000
 	tristate "Intel(R) PRO/1000 Gigabit Ethernet support"
-	depends on PCI
+	depends on PCI && HAS_IOPORT
 	help
 	  This driver supports Intel(R) PRO/1000 gigabit ethernet family of
 	  adapters.  For more information on how to identify your adapter, go
diff --git a/drivers/net/ethernet/sis/Kconfig b/drivers/net/ethernet/sis/Kconfig
index 775d76d9890e..7e498bdbca73 100644
--- a/drivers/net/ethernet/sis/Kconfig
+++ b/drivers/net/ethernet/sis/Kconfig
@@ -19,7 +19,7 @@ if NET_VENDOR_SIS
 
 config SIS900
 	tristate "SiS 900/7016 PCI Fast Ethernet Adapter support"
-	depends on PCI
+	depends on PCI && HAS_IOPORT
 	select CRC32
 	select MII
 	help
@@ -35,7 +35,7 @@ config SIS900
 
 config SIS190
 	tristate "SiS190/SiS191 gigabit ethernet support"
-	depends on PCI
+	depends on PCI && HAS_IOPORT
 	select CRC32
 	select MII
 	help
diff --git a/drivers/net/ethernet/smsc/Kconfig b/drivers/net/ethernet/smsc/Kconfig
index 5f22a8a4d27b..13ce9086a9ca 100644
--- a/drivers/net/ethernet/smsc/Kconfig
+++ b/drivers/net/ethernet/smsc/Kconfig
@@ -54,7 +54,7 @@ config SMC91X
 
 config PCMCIA_SMC91C92
 	tristate "SMC 91Cxx PCMCIA support"
-	depends on PCMCIA
+	depends on PCMCIA && HAS_IOPORT
 	select CRC32
 	select MII
 	help
diff --git a/drivers/net/ethernet/ti/Kconfig b/drivers/net/ethernet/ti/Kconfig
index fce06663e1e1..20068acce9fe 100644
--- a/drivers/net/ethernet/ti/Kconfig
+++ b/drivers/net/ethernet/ti/Kconfig
@@ -161,7 +161,7 @@ config TI_KEYSTONE_NETCP_ETHSS
 
 config TLAN
 	tristate "TI ThunderLAN support"
-	depends on (PCI || EISA)
+	depends on (PCI || EISA) && HAS_IOPORT
 	help
 	  If you have a PCI Ethernet network card based on the ThunderLAN chip
 	  which is supported by this driver, say Y here.
diff --git a/drivers/net/ethernet/via/Kconfig b/drivers/net/ethernet/via/Kconfig
index da287ef65be7..00773f5e4d7e 100644
--- a/drivers/net/ethernet/via/Kconfig
+++ b/drivers/net/ethernet/via/Kconfig
@@ -20,6 +20,7 @@ config VIA_RHINE
 	tristate "VIA Rhine support"
 	depends on PCI || (OF_IRQ && GENERIC_PCI_IOMAP)
 	depends on PCI || ARCH_VT8500 || COMPILE_TEST
+	depends on HAS_IOPORT
 	depends on HAS_DMA
 	select CRC32
 	select MII
diff --git a/drivers/net/ethernet/xircom/Kconfig b/drivers/net/ethernet/xircom/Kconfig
index 7497b9bea511..bfbdcf758afb 100644
--- a/drivers/net/ethernet/xircom/Kconfig
+++ b/drivers/net/ethernet/xircom/Kconfig
@@ -19,7 +19,7 @@ if NET_VENDOR_XIRCOM
 
 config PCMCIA_XIRC2PS
 	tristate "Xircom 16-bit PCMCIA support"
-	depends on PCMCIA
+	depends on PCMCIA && HAS_IOPORT
 	help
 	  Say Y here if you intend to attach a Xircom 16-bit PCMCIA (PC-card)
 	  Ethernet or Fast Ethernet card to your computer.
diff --git a/drivers/net/fddi/Kconfig b/drivers/net/fddi/Kconfig
index 846bf41c2717..fa3f1e0fe143 100644
--- a/drivers/net/fddi/Kconfig
+++ b/drivers/net/fddi/Kconfig
@@ -29,7 +29,7 @@ config DEFZA
 
 config DEFXX
 	tristate "Digital DEFTA/DEFEA/DEFPA adapter support"
-	depends on FDDI && (PCI || EISA || TC)
+	depends on FDDI && (PCI || EISA || TC) && HAS_IOPORT
 	help
 	  This is support for the DIGITAL series of TURBOchannel (DEFTA),
 	  EISA (DEFEA) and PCI (DEFPA) controllers which can connect you
diff --git a/drivers/net/fddi/defxx.c b/drivers/net/fddi/defxx.c
index 1fef8a9b1a0f..5f386eba9618 100644
--- a/drivers/net/fddi/defxx.c
+++ b/drivers/net/fddi/defxx.c
@@ -254,7 +254,7 @@ static const char version[] =
 #define DFX_BUS_TC(dev) 0
 #endif
 
-#if defined(CONFIG_EISA) || defined(CONFIG_PCI)
+#ifdef HAS_IOPORT
 #define dfx_use_mmio bp->mmio
 #else
 #define dfx_use_mmio true
diff --git a/drivers/net/hamradio/Kconfig b/drivers/net/hamradio/Kconfig
index a9c44f08199d..0ac87b90b01e 100644
--- a/drivers/net/hamradio/Kconfig
+++ b/drivers/net/hamradio/Kconfig
@@ -83,7 +83,7 @@ config SCC_TRXECHO
 
 config BAYCOM_SER_FDX
 	tristate "BAYCOM ser12 fullduplex driver for AX.25"
-	depends on AX25 && !S390
+	depends on AX25 && HAS_IOPORT
 	select CRC_CCITT
 	help
 	  This is one of two drivers for Baycom style simple amateur radio
@@ -103,7 +103,7 @@ config BAYCOM_SER_FDX
 
 config BAYCOM_SER_HDX
 	tristate "BAYCOM ser12 halfduplex driver for AX.25"
-	depends on AX25 && !S390
+	depends on AX25 && HAS_IOPORT
 	select CRC_CCITT
 	help
 	  This is one of two drivers for Baycom style simple amateur radio
@@ -151,7 +151,7 @@ config BAYCOM_EPP
 
 config YAM
 	tristate "YAM driver for AX.25"
-	depends on AX25 && !S390
+	depends on AX25 && HAS_IOPORT
 	help
 	  The YAM is a modem for packet radio which connects to the serial
 	  port and includes some of the functions of a Terminal Node
diff --git a/drivers/net/wan/Kconfig b/drivers/net/wan/Kconfig
index dcb069dde66b..417e2c2d349d 100644
--- a/drivers/net/wan/Kconfig
+++ b/drivers/net/wan/Kconfig
@@ -178,7 +178,7 @@ config C101
 
 config FARSYNC
 	tristate "FarSync T-Series support"
-	depends on HDLC && PCI
+	depends on HDLC && PCI && HAS_IOPORT
 	help
 	  Support for the FarSync T-Series X.21 (and V.35/V.24) cards by
 	  FarSite Communications Ltd.
diff --git a/net/ax25/Kconfig b/net/ax25/Kconfig
index d3a9843a043d..f769e8f4bd02 100644
--- a/net/ax25/Kconfig
+++ b/net/ax25/Kconfig
@@ -4,7 +4,7 @@
 #
 
 menuconfig HAMRADIO
-	depends on NET && !S390
+	depends on NET
 	bool "Amateur Radio support"
 	help
 	  If you want to connect your Linux box to an amateur radio, answer Y
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v3 37/38] wireless: add HAS_IOPORT dependencies
  2023-03-14 12:11 [PATCH v3 00/38] Kconfig: Introduce HAS_IOPORT config option Niklas Schnelle
  2023-03-14 12:11 ` [PATCH v3 18/38] mISDN: add HAS_IOPORT dependencies Niklas Schnelle
  2023-03-14 12:11 ` [PATCH v3 20/38] net: handle " Niklas Schnelle
@ 2023-03-14 12:12 ` Niklas Schnelle
  2023-03-15  5:26   ` Kalle Valo
  2023-03-14 14:05 ` [PATCH v3 00/38] Kconfig: Introduce HAS_IOPORT config option Arnd Bergmann
  3 siblings, 1 reply; 9+ messages in thread
From: Niklas Schnelle @ 2023-03-14 12:12 UTC (permalink / raw)
  To: Arnd Bergmann, Kalle Valo, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Jouni Malinen
  Cc: Greg Kroah-Hartman, Bjorn Helgaas, Uwe Kleine-König,
	Mauro Carvalho Chehab, Alan Stern, Rafael J. Wysocki,
	Geert Uytterhoeven, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	linux-kernel, linux-arch, linux-pci, Arnd Bergmann,
	linux-wireless, netdev

In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
not being declared. We thus need to add HAS_IOPORT as dependency for
those drivers using them.

Co-developed-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
---
 drivers/net/wireless/atmel/Kconfig           | 2 +-
 drivers/net/wireless/intersil/hostap/Kconfig | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/atmel/Kconfig b/drivers/net/wireless/atmel/Kconfig
index ca45a1021cf4..bafdd57b049a 100644
--- a/drivers/net/wireless/atmel/Kconfig
+++ b/drivers/net/wireless/atmel/Kconfig
@@ -14,7 +14,7 @@ if WLAN_VENDOR_ATMEL
 
 config ATMEL
 	tristate "Atmel at76c50x chipset  802.11b support"
-	depends on CFG80211 && (PCI || PCMCIA)
+	depends on CFG80211 && (PCI || PCMCIA) && HAS_IOPORT
 	select WIRELESS_EXT
 	select WEXT_PRIV
 	select FW_LOADER
diff --git a/drivers/net/wireless/intersil/hostap/Kconfig b/drivers/net/wireless/intersil/hostap/Kconfig
index c865d3156cea..2edff8efbcbb 100644
--- a/drivers/net/wireless/intersil/hostap/Kconfig
+++ b/drivers/net/wireless/intersil/hostap/Kconfig
@@ -56,7 +56,7 @@ config HOSTAP_FIRMWARE_NVRAM
 
 config HOSTAP_PLX
 	tristate "Host AP driver for Prism2/2.5/3 in PLX9052 PCI adaptors"
-	depends on PCI && HOSTAP
+	depends on PCI && HOSTAP && HAS_IOPORT
 	help
 	Host AP driver's version for Prism2/2.5/3 PC Cards in PLX9052 based
 	PCI adaptors.
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v3 00/38] Kconfig: Introduce HAS_IOPORT config option
  2023-03-14 12:11 [PATCH v3 00/38] Kconfig: Introduce HAS_IOPORT config option Niklas Schnelle
                   ` (2 preceding siblings ...)
  2023-03-14 12:12 ` [PATCH v3 37/38] wireless: add " Niklas Schnelle
@ 2023-03-14 14:05 ` Arnd Bergmann
  3 siblings, 0 replies; 9+ messages in thread
From: Arnd Bergmann @ 2023-03-14 14:05 UTC (permalink / raw)
  To: Niklas Schnelle, Richard Cochran, Paul Walmsley, Palmer Dabbelt,
	Albert Ou
  Cc: Greg Kroah-Hartman, Bjorn Helgaas, Uwe Kleine-König,
	Mauro Carvalho Chehab, Alan Stern, Rafael J . Wysocki,
	Geert Uytterhoeven, linux-kernel, Linux-Arch, linux-pci, Netdev,
	linux-riscv

On Tue, Mar 14, 2023, at 13:11, Niklas Schnelle wrote:
> Hello Kernel Hackers,
>
> Some platforms such as s390 do not support PCI I/O spaces. On such platforms
> I/O space accessors like inb()/outb() are stubs that can never actually work.
> The way these stubs are implemented in asm-generic/io.h leads to compiler
> warnings because any use will be a NULL pointer access on these platforms. In
> a previous patch we tried handling this with a run-time warning on access. This
> approach however was rejected by Linus[0] with the argument that this really
> should be a compile-time check and, though a much more invasive change, we
> believe that is indeed the right approach.
>
> This patch series aims to do exactly that by introducing a HAS_IOPORT config
> option akin to the existing HAS_IOMEM. When this is unset inb()/outb() and
> friends may not be defined. This is also the same approach originally planned by
> Uwe Kleine-König as mentioned in commit ce816fa88cca ("Kconfig: rename
> HAS_IOPORT to HAS_IOPORT_MAP").
>
> This series builds heavily on an original patch for demonstating the concept by
> Arnd Bergmann[1] and incoporates feedback of previous RFC versions [2] and [3].
>
> This version is based on v6.3-rc1 and is also available on my kernel.org tree
> in the has_ioport_v3 branch with the PGP signed tag has_ioport_v3_signed:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/niks/linux.git

Thanks a lot for the rebase, hopefully we can finally get this merged.
I'll go through all patches and note everything I spot that should
be improved. I'd like to make sure that at least the first patch
can get merged quickly so we can continue on the rest.

Since this is all related to asm-generic/io.h and cross-architecture
work, I can pick up anything that has nobody else maintaining it
through the asm-generic tree.

   Arnd

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v3 37/38] wireless: add HAS_IOPORT dependencies
  2023-03-14 12:12 ` [PATCH v3 37/38] wireless: add " Niklas Schnelle
@ 2023-03-15  5:26   ` Kalle Valo
  0 siblings, 0 replies; 9+ messages in thread
From: Kalle Valo @ 2023-03-15  5:26 UTC (permalink / raw)
  To: Niklas Schnelle
  Cc: Arnd Bergmann, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Jouni Malinen, Greg Kroah-Hartman, Bjorn Helgaas,
	Uwe Kleine-König, Mauro Carvalho Chehab, Alan Stern,
	Rafael J. Wysocki, Geert Uytterhoeven, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, linux-kernel, linux-arch, linux-pci,
	Arnd Bergmann, linux-wireless, netdev

Niklas Schnelle <schnelle@linux.ibm.com> writes:

> In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> not being declared. We thus need to add HAS_IOPORT as dependency for
> those drivers using them.
>
> Co-developed-by: Arnd Bergmann <arnd@kernel.org>
> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>

Acked-by: Kalle Valo <kvalo@kernel.org>

Let me know if I should take this to wireless-next.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v3 20/38] net: handle HAS_IOPORT dependencies
  2023-03-14 12:11 ` [PATCH v3 20/38] net: handle " Niklas Schnelle
@ 2023-03-15  5:41   ` Jakub Kicinski
  2023-03-15  9:47   ` Maciej W. Rozycki
  1 sibling, 0 replies; 9+ messages in thread
From: Jakub Kicinski @ 2023-03-15  5:41 UTC (permalink / raw)
  To: Niklas Schnelle
  Cc: Arnd Bergmann, David S. Miller, Eric Dumazet, Paolo Abeni,
	Michael Grzeschik, Wolfgang Grandegger, Marc Kleine-Budde,
	Jesse Brandeburg, Tony Nguyen, Maciej W. Rozycki, Ralf Baechle,
	Greg Kroah-Hartman, Bjorn Helgaas, Uwe Kleine-König,
	Mauro Carvalho Chehab, Alan Stern, Rafael J. Wysocki,
	Geert Uytterhoeven, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	linux-kernel, linux-arch, linux-pci, Arnd Bergmann, netdev,
	linux-can, intel-wired-lan, linux-hams

On Tue, 14 Mar 2023 13:11:58 +0100 Niklas Schnelle wrote:
> In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> not being declared. We thus need to add HAS_IOPORT as dependency for
> those drivers requiring them. For the DEFXX driver there use of I/O
> ports is optional and we only need to fence those paths.can It also
> turns out that with HAS_IOPORT handled explicitly HAMRADIO does not need
> the !S390 dependency and successfully builds the bpqether driver.

Acked-by: Jakub Kicinski <kuba@kernel.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v3 18/38] mISDN: add HAS_IOPORT dependencies
  2023-03-14 12:11 ` [PATCH v3 18/38] mISDN: add HAS_IOPORT dependencies Niklas Schnelle
@ 2023-03-15  5:41   ` Jakub Kicinski
  0 siblings, 0 replies; 9+ messages in thread
From: Jakub Kicinski @ 2023-03-15  5:41 UTC (permalink / raw)
  To: Niklas Schnelle
  Cc: Arnd Bergmann, Karsten Keil, Greg Kroah-Hartman, Bjorn Helgaas,
	Uwe Kleine-König, Mauro Carvalho Chehab, Alan Stern,
	Rafael J. Wysocki, Geert Uytterhoeven, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, linux-kernel, linux-arch, linux-pci,
	Arnd Bergmann, netdev

On Tue, 14 Mar 2023 13:11:56 +0100 Niklas Schnelle wrote:
> In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> not being declared. We thus need to add HAS_IOPORT as dependency for
> those drivers using them. With that the !S390 dependency on ISDN can be
> removed as all drivers without HAS_IOPORT requirement now build.
> 
> Co-developed-by: Arnd Bergmann <arnd@kernel.org>
> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>

I'm guessing this is going via some global route so:

Acked-by: Jakub Kicinski <kuba@kernel.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v3 20/38] net: handle HAS_IOPORT dependencies
  2023-03-14 12:11 ` [PATCH v3 20/38] net: handle " Niklas Schnelle
  2023-03-15  5:41   ` Jakub Kicinski
@ 2023-03-15  9:47   ` Maciej W. Rozycki
  1 sibling, 0 replies; 9+ messages in thread
From: Maciej W. Rozycki @ 2023-03-15  9:47 UTC (permalink / raw)
  To: Niklas Schnelle
  Cc: Arnd Bergmann, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Michael Grzeschik, Wolfgang Grandegger,
	Marc Kleine-Budde, Jesse Brandeburg, Tony Nguyen, Ralf Baechle,
	Greg Kroah-Hartman, Bjorn Helgaas, Uwe Kleine-König,
	Mauro Carvalho Chehab, Alan Stern, Rafael J. Wysocki,
	Geert Uytterhoeven, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	linux-kernel, linux-arch, linux-pci, Arnd Bergmann, netdev,
	linux-can, intel-wired-lan, linux-hams

On Tue, 14 Mar 2023, Niklas Schnelle wrote:

> those drivers requiring them. For the DEFXX driver there use of I/O
> ports is optional and we only need to fence those paths.can It also

 Some writing mess-up here, should it read:

"For the DEFXX driver the use of I/O ports is optional and we only need to 
fence those paths. It also [...]"

?

> diff --git a/drivers/net/fddi/Kconfig b/drivers/net/fddi/Kconfig
> index 846bf41c2717..fa3f1e0fe143 100644
> --- a/drivers/net/fddi/Kconfig
> +++ b/drivers/net/fddi/Kconfig
> @@ -29,7 +29,7 @@ config DEFZA
>  
>  config DEFXX
>  	tristate "Digital DEFTA/DEFEA/DEFPA adapter support"
> -	depends on FDDI && (PCI || EISA || TC)
> +	depends on FDDI && (PCI || EISA || TC) && HAS_IOPORT

 This part would incorrectly disable the driver for !HAS_IOPORT and is not 
needed given the change below:

> diff --git a/drivers/net/fddi/defxx.c b/drivers/net/fddi/defxx.c
> index 1fef8a9b1a0f..5f386eba9618 100644
> --- a/drivers/net/fddi/defxx.c
> +++ b/drivers/net/fddi/defxx.c
> @@ -254,7 +254,7 @@ static const char version[] =
>  #define DFX_BUS_TC(dev) 0
>  #endif
>  
> -#if defined(CONFIG_EISA) || defined(CONFIG_PCI)
> +#ifdef HAS_IOPORT
>  #define dfx_use_mmio bp->mmio
>  #else
>  #define dfx_use_mmio true

is it?

  Maciej

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-03-15  9:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-14 12:11 [PATCH v3 00/38] Kconfig: Introduce HAS_IOPORT config option Niklas Schnelle
2023-03-14 12:11 ` [PATCH v3 18/38] mISDN: add HAS_IOPORT dependencies Niklas Schnelle
2023-03-15  5:41   ` Jakub Kicinski
2023-03-14 12:11 ` [PATCH v3 20/38] net: handle " Niklas Schnelle
2023-03-15  5:41   ` Jakub Kicinski
2023-03-15  9:47   ` Maciej W. Rozycki
2023-03-14 12:12 ` [PATCH v3 37/38] wireless: add " Niklas Schnelle
2023-03-15  5:26   ` Kalle Valo
2023-03-14 14:05 ` [PATCH v3 00/38] Kconfig: Introduce HAS_IOPORT config option Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).