All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] Make several Kconfig options depend on HAS_IOMEM
@ 2023-07-07 13:58 Baoquan He
  2023-07-07 13:58 ` [PATCH 1/8] idmaengine: make FSL_EDMA and INTEL_IDMA64 depends " Baoquan He
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Baoquan He @ 2023-07-07 13:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: akpm, linux-mm, schnelle, vkoul, eli.billauer, arnd, gregkh,
	derek.kiernan, dragan.cvetic, linux, Jonathan.Cameron,
	linus.walleij, tsbogend, joyce.ooi, davem, edumazet, kuba,
	pabeni, tglx, maz, mturquette, sboyd, robh+dt, frowand.list,
	Baoquan He, kernel test robot

In thread of one patch posting, LKP test robot reported some compiling
errors, paste the LKP report link here: 

https://lore.kernel.org/all/202306211329.ticOJCSv-lkp@intel.com/T/#u

In the config file, several Kconfig options are like below:
------
'# CONFIG_PCI is not set'
CONFIG_OF_EARLY_FLATTREE=y
CONFIG_DMA_DECLARE_COHERENT=y
------

The reason is (words arranged from Niklas):
===
On s390 systems (aka mainframes), it has classic channel devices for
networking and permanent storage that are currently even more common
than PCI devices. Hence it could have a fully functional s390 kernel
with CONFIG_PCI=n, then the relevant iomem mapping functions
[including ioremap(), devm_ioremap(), etc.] are not available.

So make several Kconfig options depend on HAS_IOMEM so that it won't
build in those driver code if PCI is unset.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202306211329.ticOJCSv-lkp@intel.com/

Baoquan He (8):
  idmaengine: make FSL_EDMA and INTEL_IDMA64 depends on HAS_IOMEM
  char: xillybus: make XILLYBUS_OF depend on HAS_IOMEM
  misc: open-dice: make OPEN_DICE depend on HAS_IOMEM
  pcmcia : make PCMCIA depend on HAS_IOMEM
  net: altera-tse: make ALTERA_TSE depend on HAS_IOMEM
  irqchip/al-fic: make AL_FIC depend on HAS_IOMEM
  clk: fixed-mmio: make COMMON_CLK_FIXED_MMIO depend on HAS_IOMEM
  of: make OF_EARLY_FLATTREE depend on HAS_IOMEM

 drivers/char/xillybus/Kconfig       | 2 +-
 drivers/clk/Kconfig                 | 1 +
 drivers/dma/Kconfig                 | 2 ++
 drivers/irqchip/Kconfig             | 1 +
 drivers/misc/Kconfig                | 1 +
 drivers/net/ethernet/altera/Kconfig | 1 +
 drivers/of/Kconfig                  | 2 +-
 drivers/pcmcia/Kconfig              | 1 +
 8 files changed, 9 insertions(+), 2 deletions(-)

-- 
2.34.1


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

* [PATCH 1/8] idmaengine: make FSL_EDMA and INTEL_IDMA64 depends on HAS_IOMEM
  2023-07-07 13:58 [PATCH 0/8] Make several Kconfig options depend on HAS_IOMEM Baoquan He
@ 2023-07-07 13:58 ` Baoquan He
  2023-07-07 13:58 ` [PATCH 2/8] char: xillybus: make XILLYBUS_OF depend " Baoquan He
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Baoquan He @ 2023-07-07 13:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: akpm, linux-mm, schnelle, vkoul, eli.billauer, arnd, gregkh,
	derek.kiernan, dragan.cvetic, linux, Jonathan.Cameron,
	linus.walleij, tsbogend, joyce.ooi, davem, edumazet, kuba,
	pabeni, tglx, maz, mturquette, sboyd, robh+dt, frowand.list,
	Baoquan He, kernel test robot, dmaengine

On s390 systems (aka mainframes), it has classic channel devices for
networking and permanent storage that are currently even more common
than PCI devices. Hence it could have a fully functional s390 kernel
with CONFIG_PCI=n, then the relevant iomem mapping functions
[including ioremap(), devm_ioremap(), etc.] are not available.

Here let FSL_EDMA and INTEL_IDMA64 depend on HAS_IOMEM so that it
won't be built to cause below compiling error if PCI is unset.

--------
ERROR: modpost: "devm_platform_ioremap_resource" [drivers/dma/fsl-edma.ko] undefined!
ERROR: modpost: "devm_platform_ioremap_resource" [drivers/dma/idma64.ko] undefined!
--------

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202306211329.ticOJCSv-lkp@intel.com/
Signed-off-by: Baoquan He <bhe@redhat.com>
Cc: Vinod Koul <vkoul@kernel.org>
Cc: dmaengine@vger.kernel.org
---
 drivers/dma/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index 644c188d6a11..08fdd0e2ed1b 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -211,6 +211,7 @@ config FSL_DMA
 config FSL_EDMA
 	tristate "Freescale eDMA engine support"
 	depends on OF
+	depends on HAS_IOMEM
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 	help
@@ -280,6 +281,7 @@ config IMX_SDMA
 
 config INTEL_IDMA64
 	tristate "Intel integrated DMA 64-bit support"
+	depends on HAS_IOMEM
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 	help
-- 
2.34.1


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

* [PATCH 2/8] char: xillybus: make XILLYBUS_OF depend on HAS_IOMEM
  2023-07-07 13:58 [PATCH 0/8] Make several Kconfig options depend on HAS_IOMEM Baoquan He
  2023-07-07 13:58 ` [PATCH 1/8] idmaengine: make FSL_EDMA and INTEL_IDMA64 depends " Baoquan He
@ 2023-07-07 13:58 ` Baoquan He
  2023-07-08  6:00   ` Eli Billauer
  2023-07-07 13:58 ` [PATCH 3/8] misc: open-dice: make OPEN_DICE " Baoquan He
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: Baoquan He @ 2023-07-07 13:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: akpm, linux-mm, schnelle, vkoul, eli.billauer, arnd, gregkh,
	derek.kiernan, dragan.cvetic, linux, Jonathan.Cameron,
	linus.walleij, tsbogend, joyce.ooi, davem, edumazet, kuba,
	pabeni, tglx, maz, mturquette, sboyd, robh+dt, frowand.list,
	Baoquan He, kernel test robot

On s390 systems (aka mainframes), it has classic channel devices for
networking and permanent storage that are currently even more common
than PCI devices. Hence it could have a fully functional s390 kernel
with CONFIG_PCI=n, then the relevant iomem mapping functions
[including ioremap(), devm_ioremap(), etc.] are not available.

Here let XILLYBUS_OF depend on HAS_IOMEM so that it won't be built
to cause below compiling error if PCI is unset:

------
ERROR: modpost: "devm_platform_ioremap_resource" [drivers/char/xillybus/xillybus_of.ko] undefined!
------

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202306211329.ticOJCSv-lkp@intel.com/
Signed-off-by: Baoquan He <bhe@redhat.com>
Cc: Eli Billauer <eli.billauer@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/char/xillybus/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/xillybus/Kconfig b/drivers/char/xillybus/Kconfig
index a8036dad437e..f51d533390a9 100644
--- a/drivers/char/xillybus/Kconfig
+++ b/drivers/char/xillybus/Kconfig
@@ -29,7 +29,7 @@ config XILLYBUS_PCIE
 
 config XILLYBUS_OF
 	tristate "Xillybus over Device Tree"
-	depends on OF && HAS_DMA
+	depends on OF && HAS_DMA && HAS_IOMEM
 	help
 	  Set to M if you want Xillybus to find its resources from the
 	  Open Firmware Flattened Device Tree. If the target is an embedded
-- 
2.34.1


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

* [PATCH 3/8] misc: open-dice: make OPEN_DICE depend on HAS_IOMEM
  2023-07-07 13:58 [PATCH 0/8] Make several Kconfig options depend on HAS_IOMEM Baoquan He
  2023-07-07 13:58 ` [PATCH 1/8] idmaengine: make FSL_EDMA and INTEL_IDMA64 depends " Baoquan He
  2023-07-07 13:58 ` [PATCH 2/8] char: xillybus: make XILLYBUS_OF depend " Baoquan He
@ 2023-07-07 13:58 ` Baoquan He
  2023-07-07 13:58 ` [PATCH 4/8] pcmcia : make PCMCIA " Baoquan He
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Baoquan He @ 2023-07-07 13:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: akpm, linux-mm, schnelle, vkoul, eli.billauer, arnd, gregkh,
	derek.kiernan, dragan.cvetic, linux, Jonathan.Cameron,
	linus.walleij, tsbogend, joyce.ooi, davem, edumazet, kuba,
	pabeni, tglx, maz, mturquette, sboyd, robh+dt, frowand.list,
	Baoquan He, kernel test robot

On s390 systems (aka mainframes), it has classic channel devices for
networking and permanent storage that are currently even more common
than PCI devices. Hence it could have a fully functional s390 kernel
with CONFIG_PCI=n, then the relevant iomem mapping functions
[including ioremap(), devm_ioremap(), etc.] are not available.

Here let OPEN_DICE depend on HAS_IOMEM so that it won't be built
to cause below compiling error if PCI is unset:

------
ERROR: modpost: "devm_memremap" [drivers/misc/open-dice.ko] undefined!
ERROR: modpost: "devm_memunmap" [drivers/misc/open-dice.ko] undefined!
------

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202306211329.ticOJCSv-lkp@intel.com/
Signed-off-by: Baoquan He <bhe@redhat.com>
Cc: Derek Kiernan <derek.kiernan@amd.com>
Cc: Dragan Cvetic <dragan.cvetic@amd.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/misc/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 75e427f124b2..cadd4a820c03 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -496,6 +496,7 @@ config HISI_HIKEY_USB
 config OPEN_DICE
 	tristate "Open Profile for DICE driver"
 	depends on OF_RESERVED_MEM
+	depends on HAS_IOMEM
 	help
 	  This driver exposes a DICE reserved memory region to userspace via
 	  a character device. The memory region contains Compound Device
-- 
2.34.1


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

* [PATCH 4/8] pcmcia : make PCMCIA depend on HAS_IOMEM
  2023-07-07 13:58 [PATCH 0/8] Make several Kconfig options depend on HAS_IOMEM Baoquan He
                   ` (2 preceding siblings ...)
  2023-07-07 13:58 ` [PATCH 3/8] misc: open-dice: make OPEN_DICE " Baoquan He
@ 2023-07-07 13:58 ` Baoquan He
  2023-07-07 13:58 ` [PATCH 5/8] net: altera-tse: make ALTERA_TSE " Baoquan He
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Baoquan He @ 2023-07-07 13:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: akpm, linux-mm, schnelle, vkoul, eli.billauer, arnd, gregkh,
	derek.kiernan, dragan.cvetic, linux, Jonathan.Cameron,
	linus.walleij, tsbogend, joyce.ooi, davem, edumazet, kuba,
	pabeni, tglx, maz, mturquette, sboyd, robh+dt, frowand.list,
	Baoquan He, kernel test robot

On s390 systems (aka mainframes), it has classic channel devices for
networking and permanent storage that are currently even more common
than PCI devices. Hence it could have a fully functional s390 kernel
with CONFIG_PCI=n, then the relevant iomem mapping functions
[including ioremap(), devm_ioremap(), etc.] are not available.

Here let depend PCMCIA on HAS_IOMEM so that it won't be built to
cause below compiling error if PCI is unset.

------
ld: drivers/pcmcia/cistpl.o: in function `set_cis_map':
cistpl.c:(.text+0x1202): undefined reference to `ioremap'
ld: cistpl.c:(.text+0x13b0): undefined reference to `iounmap'
ld: cistpl.c:(.text+0x14a6): undefined reference to `iounmap'
ld: cistpl.c:(.text+0x1544): undefined reference to `ioremap'
ld: drivers/pcmcia/cistpl.o: in function `release_cis_mem':
cistpl.c:(.text+0x3f14): undefined reference to `iounmap'
------

Besides, many other Kconfig option, e.g IPWIRELESS, PCMCIA_PCNET,
PCMCIA_FMVJ18X, PCMCIA_SMC91C92 which depends on PCMCIA also will
cause compiling error if enabled.

------
ERROR: modpost: "iounmap" [drivers/tty/ipwireless/ipwireless.ko] undefined!
ERROR: modpost: "ioremap" [drivers/tty/ipwireless/ipwireless.ko] undefined!

ERROR: modpost: "iounmap" [drivers/net/ethernet/8390/pcnet_cs.ko] undefined!
ERROR: modpost: "ioremap" [drivers/net/ethernet/8390/pcnet_cs.ko] undefined!
ERROR: modpost: "iounmap" [drivers/net/ethernet/fujitsu/fmvj18x_cs.ko] undefined!
ERROR: modpost: "ioremap" [drivers/net/ethernet/fujitsu/fmvj18x_cs.ko] undefined!
ERROR: modpost: "iounmap" [drivers/net/ethernet/smsc/smc91c92_cs.ko] undefined!
ERROR: modpost: "ioremap" [drivers/net/ethernet/smsc/smc91c92_cs.ko] undefined!
ERROR: modpost: "iounmap" [drivers/net/ethernet/xircom/xirc2ps_cs.ko] undefined!
ERROR: modpost: "ioremap" [drivers/net/ethernet/xircom/xirc2ps_cs.ko] undefined!
ERROR: modpost: "devm_ioremap" [drivers/net/ethernet/altera/altera_tse.ko] undefined!
ERROR: modpost: "iounmap" [drivers/net/arcnet/com90xx.ko] undefined!
------

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202306211329.ticOJCSv-lkp@intel.com/
Signed-off-by: Baoquan He <bhe@redhat.com>
Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
---
 drivers/pcmcia/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig
index e72419d7e72e..dddb235dd020 100644
--- a/drivers/pcmcia/Kconfig
+++ b/drivers/pcmcia/Kconfig
@@ -19,6 +19,7 @@ if PCCARD
 
 config PCMCIA
 	tristate "16-bit PCMCIA support"
+	depends on HAS_IOMEM
 	select CRC32
 	default y
 	help
-- 
2.34.1


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

* [PATCH 5/8] net: altera-tse: make ALTERA_TSE depend on HAS_IOMEM
  2023-07-07 13:58 [PATCH 0/8] Make several Kconfig options depend on HAS_IOMEM Baoquan He
                   ` (3 preceding siblings ...)
  2023-07-07 13:58 ` [PATCH 4/8] pcmcia : make PCMCIA " Baoquan He
@ 2023-07-07 13:58 ` Baoquan He
  2023-07-11 17:17   ` Simon Horman
  2023-07-07 13:58 ` [PATCH 6/8] irqchip/al-fic: make AL_FIC " Baoquan He
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: Baoquan He @ 2023-07-07 13:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: akpm, linux-mm, schnelle, vkoul, eli.billauer, arnd, gregkh,
	derek.kiernan, dragan.cvetic, linux, Jonathan.Cameron,
	linus.walleij, tsbogend, joyce.ooi, davem, edumazet, kuba,
	pabeni, tglx, maz, mturquette, sboyd, robh+dt, frowand.list,
	Baoquan He, kernel test robot, netdev

On s390 systems (aka mainframes), it has classic channel devices for
networking and permanent storage that are currently even more common
than PCI devices. Hence it could have a fully functional s390 kernel
with CONFIG_PCI=n, then the relevant iomem mapping functions
[including ioremap(), devm_ioremap(), etc.] are not available.

Here let ALTERA_TSE depend on HAS_IOMEM so that it won't be built
to cause below compiling error if PCI is unset:

------
ERROR: modpost: "devm_ioremap" [drivers/net/ethernet/altera/altera_tse.ko] undefined!
------

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202306211329.ticOJCSv-lkp@intel.com/
Signed-off-by: Baoquan He <bhe@redhat.com>
Cc: Joyce Ooi <joyce.ooi@intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org

---
 drivers/net/ethernet/altera/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/altera/Kconfig b/drivers/net/ethernet/altera/Kconfig
index 17985319088c..4ef819a9a1ad 100644
--- a/drivers/net/ethernet/altera/Kconfig
+++ b/drivers/net/ethernet/altera/Kconfig
@@ -2,6 +2,7 @@
 config ALTERA_TSE
 	tristate "Altera Triple-Speed Ethernet MAC support"
 	depends on HAS_DMA
+	depends on HAS_IOMEM
 	select PHYLIB
 	select PHYLINK
 	select PCS_LYNX
-- 
2.34.1


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

* [PATCH 6/8] irqchip/al-fic: make AL_FIC depend on HAS_IOMEM
  2023-07-07 13:58 [PATCH 0/8] Make several Kconfig options depend on HAS_IOMEM Baoquan He
                   ` (4 preceding siblings ...)
  2023-07-07 13:58 ` [PATCH 5/8] net: altera-tse: make ALTERA_TSE " Baoquan He
@ 2023-07-07 13:58 ` Baoquan He
  2023-07-07 13:58 ` [PATCH 7/8] clk: fixed-mmio: make COMMON_CLK_FIXED_MMIO " Baoquan He
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Baoquan He @ 2023-07-07 13:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: akpm, linux-mm, schnelle, vkoul, eli.billauer, arnd, gregkh,
	derek.kiernan, dragan.cvetic, linux, Jonathan.Cameron,
	linus.walleij, tsbogend, joyce.ooi, davem, edumazet, kuba,
	pabeni, tglx, maz, mturquette, sboyd, robh+dt, frowand.list,
	Baoquan He, kernel test robot

On s390 systems (aka mainframes), it has classic channel devices for
networking and permanent storage that are currently even more common
than PCI devices. Hence it could have a fully functional s390 kernel
with CONFIG_PCI=n, then the relevant iomem mapping functions
[including ioremap(), devm_ioremap(), etc.] are not available.

Here let AL_FIC depend on HAS_IOMEM so that it won't be built
to cause below compiling error if PCI is unset:

------
ld: drivers/irqchip/irq-al-fic.o: in function `al_fic_init_dt':
irq-al-fic.c:(.init.text+0x76): undefined reference to `of_iomap'
ld: irq-al-fic.c:(.init.text+0x4ce): undefined reference to `iounmap'
------

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202306211329.ticOJCSv-lkp@intel.com/
Signed-off-by: Baoquan He <bhe@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Marc Zyngier <maz@kernel.org>
---
 drivers/irqchip/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index 09e422da482f..4b9036c6d45b 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -89,6 +89,7 @@ config ALPINE_MSI
 config AL_FIC
 	bool "Amazon's Annapurna Labs Fabric Interrupt Controller"
 	depends on OF
+	depends on HAS_IOMEM
 	select GENERIC_IRQ_CHIP
 	select IRQ_DOMAIN
 	help
-- 
2.34.1


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

* [PATCH 7/8] clk: fixed-mmio: make COMMON_CLK_FIXED_MMIO depend on HAS_IOMEM
  2023-07-07 13:58 [PATCH 0/8] Make several Kconfig options depend on HAS_IOMEM Baoquan He
                   ` (5 preceding siblings ...)
  2023-07-07 13:58 ` [PATCH 6/8] irqchip/al-fic: make AL_FIC " Baoquan He
@ 2023-07-07 13:58 ` Baoquan He
  2023-07-19 21:51   ` Stephen Boyd
  2023-07-07 13:58 ` [PATCH 8/8] of: make OF_EARLY_FLATTREE " Baoquan He
  2023-07-11 16:43 ` (subset) [PATCH 0/8] Make several Kconfig options " Vinod Koul
  8 siblings, 1 reply; 15+ messages in thread
From: Baoquan He @ 2023-07-07 13:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: akpm, linux-mm, schnelle, vkoul, eli.billauer, arnd, gregkh,
	derek.kiernan, dragan.cvetic, linux, Jonathan.Cameron,
	linus.walleij, tsbogend, joyce.ooi, davem, edumazet, kuba,
	pabeni, tglx, maz, mturquette, sboyd, robh+dt, frowand.list,
	Baoquan He, kernel test robot, linux-clk

On s390 systems (aka mainframes), it has classic channel devices for
networking and permanent storage that are currently even more common
than PCI devices. Hence it could have a fully functional s390 kernel
with CONFIG_PCI=n, then the relevant iomem mapping functions
[including ioremap(), devm_ioremap(), etc.] are not available.

Here let COMMON_CLK_FIXED_MMIO depend on HAS_IOMEM so that it won't
be built to cause below compiling error if PCI is unset:

------
ld: drivers/clk/clk-fixed-mmio.o: in function `fixed_mmio_clk_setup':
clk-fixed-mmio.c:(.text+0x5e): undefined reference to `of_iomap'
ld: clk-fixed-mmio.c:(.text+0xba): undefined reference to `iounmap'
------

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202306211329.ticOJCSv-lkp@intel.com/
Signed-off-by: Baoquan He <bhe@redhat.com>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: linux-clk@vger.kernel.org
---
 drivers/clk/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index 93f38a8178ba..6b3b424addab 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -444,6 +444,7 @@ config COMMON_CLK_BD718XX
 config COMMON_CLK_FIXED_MMIO
 	bool "Clock driver for Memory Mapped Fixed values"
 	depends on COMMON_CLK && OF
+	depends on HAS_IOMEM
 	help
 	  Support for Memory Mapped IO Fixed clocks
 
-- 
2.34.1


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

* [PATCH 8/8] of: make OF_EARLY_FLATTREE depend on HAS_IOMEM
  2023-07-07 13:58 [PATCH 0/8] Make several Kconfig options depend on HAS_IOMEM Baoquan He
                   ` (6 preceding siblings ...)
  2023-07-07 13:58 ` [PATCH 7/8] clk: fixed-mmio: make COMMON_CLK_FIXED_MMIO " Baoquan He
@ 2023-07-07 13:58 ` Baoquan He
  2023-07-10 14:54   ` Rob Herring
  2023-07-11 16:43 ` (subset) [PATCH 0/8] Make several Kconfig options " Vinod Koul
  8 siblings, 1 reply; 15+ messages in thread
From: Baoquan He @ 2023-07-07 13:58 UTC (permalink / raw)
  To: linux-kernel
  Cc: akpm, linux-mm, schnelle, vkoul, eli.billauer, arnd, gregkh,
	derek.kiernan, dragan.cvetic, linux, Jonathan.Cameron,
	linus.walleij, tsbogend, joyce.ooi, davem, edumazet, kuba,
	pabeni, tglx, maz, mturquette, sboyd, robh+dt, frowand.list,
	Baoquan He, kernel test robot, devicetree

On s390 systems (aka mainframes), it has classic channel devices for
networking and permanent storage that are currently even more common
than PCI devices. Hence it could have a fully functional s390 kernel
with CONFIG_PCI=n, then the relevant iomem mapping functions
[including ioremap(), devm_ioremap(), etc.] are not available.

In LKP error report at below on s390:
------
ld: kernel/dma/coherent.o: in function `dma_init_coherent_memory':
coherent.c:(.text+0x102): undefined reference to `memremap'
ld: coherent.c:(.text+0x226): undefined reference to `memunmap'
ld: kernel/dma/coherent.o: in function `dma_declare_coherent_memory':
coherent.c:(.text+0x8b8): undefined reference to `memunmap'
ld: kernel/dma/coherent.o: in function `dma_release_coherent_memory':
coherent.c:(.text+0x9aa): undefined reference to `memunmap'
------

In the config file, several Kconfig options are:
------
'# CONFIG_PCI is not set'
CONFIG_OF_EARLY_FLATTREE=y
CONFIG_DMA_DECLARE_COHERENT=y
------

So, enabling OF_EARLY_FLATTREE will select DMA_DECLARE_COHERENT
and cause above building errors even though they are not needed
because CONFIG_PCI is disabled.

Here let OF_EARLY_FLATTREE depend on HAS_IOMEM so that it won't
be built to cause compiling error if PCI is unset.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202306211329.ticOJCSv-lkp@intel.com/
Signed-off-by: Baoquan He <bhe@redhat.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: devicetree@vger.kernel.org
---
 drivers/of/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig
index e40f10bf2ba4..da9826accb1b 100644
--- a/drivers/of/Kconfig
+++ b/drivers/of/Kconfig
@@ -55,7 +55,7 @@ config OF_FLATTREE
 
 config OF_EARLY_FLATTREE
 	bool
-	select DMA_DECLARE_COHERENT if HAS_DMA
+	select DMA_DECLARE_COHERENT if HAS_DMA && HAS_IOMEM
 	select OF_FLATTREE
 
 config OF_PROMTREE
-- 
2.34.1


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

* Re: [PATCH 2/8] char: xillybus: make XILLYBUS_OF depend on HAS_IOMEM
  2023-07-07 13:58 ` [PATCH 2/8] char: xillybus: make XILLYBUS_OF depend " Baoquan He
@ 2023-07-08  6:00   ` Eli Billauer
  0 siblings, 0 replies; 15+ messages in thread
From: Eli Billauer @ 2023-07-08  6:00 UTC (permalink / raw)
  To: Baoquan He, linux-kernel; +Cc: arnd, gregkh

I stand corrected. Thank you.

   Eli

Acked-by: Eli Billauer <eli.billauer@gmail.com>

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

* Re: [PATCH 8/8] of: make OF_EARLY_FLATTREE depend on HAS_IOMEM
  2023-07-07 13:58 ` [PATCH 8/8] of: make OF_EARLY_FLATTREE " Baoquan He
@ 2023-07-10 14:54   ` Rob Herring
  0 siblings, 0 replies; 15+ messages in thread
From: Rob Herring @ 2023-07-10 14:54 UTC (permalink / raw)
  To: Baoquan He
  Cc: devicetree, mturquette, kernel test robot, Jonathan.Cameron, maz,
	vkoul, dragan.cvetic, edumazet, tglx, tsbogend, linux-kernel,
	frowand.list, eli.billauer, derek.kiernan, kuba, sboyd, schnelle,
	robh+dt, linus.walleij, arnd, pabeni, davem, linux-mm, akpm,
	linux, gregkh, joyce.ooi


On Fri, 07 Jul 2023 21:58:52 +0800, Baoquan He wrote:
> On s390 systems (aka mainframes), it has classic channel devices for
> networking and permanent storage that are currently even more common
> than PCI devices. Hence it could have a fully functional s390 kernel
> with CONFIG_PCI=n, then the relevant iomem mapping functions
> [including ioremap(), devm_ioremap(), etc.] are not available.
> 
> In LKP error report at below on s390:
> ------
> ld: kernel/dma/coherent.o: in function `dma_init_coherent_memory':
> coherent.c:(.text+0x102): undefined reference to `memremap'
> ld: coherent.c:(.text+0x226): undefined reference to `memunmap'
> ld: kernel/dma/coherent.o: in function `dma_declare_coherent_memory':
> coherent.c:(.text+0x8b8): undefined reference to `memunmap'
> ld: kernel/dma/coherent.o: in function `dma_release_coherent_memory':
> coherent.c:(.text+0x9aa): undefined reference to `memunmap'
> ------
> 
> In the config file, several Kconfig options are:
> ------
> '# CONFIG_PCI is not set'
> CONFIG_OF_EARLY_FLATTREE=y
> CONFIG_DMA_DECLARE_COHERENT=y
> ------
> 
> So, enabling OF_EARLY_FLATTREE will select DMA_DECLARE_COHERENT
> and cause above building errors even though they are not needed
> because CONFIG_PCI is disabled.
> 
> Here let OF_EARLY_FLATTREE depend on HAS_IOMEM so that it won't
> be built to cause compiling error if PCI is unset.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202306211329.ticOJCSv-lkp@intel.com/
> Signed-off-by: Baoquan He <bhe@redhat.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Frank Rowand <frowand.list@gmail.com>
> Cc: devicetree@vger.kernel.org
> ---
>  drivers/of/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied, thanks!


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

* Re: (subset) [PATCH 0/8] Make several Kconfig options depend on HAS_IOMEM
  2023-07-07 13:58 [PATCH 0/8] Make several Kconfig options depend on HAS_IOMEM Baoquan He
                   ` (7 preceding siblings ...)
  2023-07-07 13:58 ` [PATCH 8/8] of: make OF_EARLY_FLATTREE " Baoquan He
@ 2023-07-11 16:43 ` Vinod Koul
  8 siblings, 0 replies; 15+ messages in thread
From: Vinod Koul @ 2023-07-11 16:43 UTC (permalink / raw)
  To: linux-kernel, Baoquan He
  Cc: akpm, linux-mm, schnelle, eli.billauer, arnd, gregkh,
	derek.kiernan, dragan.cvetic, linux, Jonathan.Cameron,
	linus.walleij, tsbogend, joyce.ooi, davem, edumazet, kuba,
	pabeni, tglx, maz, mturquette, sboyd, robh+dt, frowand.list,
	kernel test robot


On Fri, 07 Jul 2023 21:58:44 +0800, Baoquan He wrote:
> In thread of one patch posting, LKP test robot reported some compiling
> errors, paste the LKP report link here:
> 
> https://lore.kernel.org/all/202306211329.ticOJCSv-lkp@intel.com/T/#u
> 
> In the config file, several Kconfig options are like below:
> ------
> '# CONFIG_PCI is not set'
> CONFIG_OF_EARLY_FLATTREE=y
> CONFIG_DMA_DECLARE_COHERENT=y
> ------
> 
> [...]

Applied, thanks!

[1/8] idmaengine: make FSL_EDMA and INTEL_IDMA64 depends on HAS_IOMEM
      commit: 33629b377856fe5722a2a813b83d21e88281d474

Best regards,
-- 
~Vinod



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

* Re: [PATCH 5/8] net: altera-tse: make ALTERA_TSE depend on HAS_IOMEM
  2023-07-07 13:58 ` [PATCH 5/8] net: altera-tse: make ALTERA_TSE " Baoquan He
@ 2023-07-11 17:17   ` Simon Horman
  2023-07-12  0:46     ` Baoquan He
  0 siblings, 1 reply; 15+ messages in thread
From: Simon Horman @ 2023-07-11 17:17 UTC (permalink / raw)
  To: Baoquan He
  Cc: linux-kernel, akpm, linux-mm, schnelle, vkoul, eli.billauer,
	arnd, gregkh, derek.kiernan, dragan.cvetic, linux,
	Jonathan.Cameron, linus.walleij, tsbogend, joyce.ooi, davem,
	edumazet, kuba, pabeni, tglx, maz, mturquette, sboyd, robh+dt,
	frowand.list, kernel test robot, netdev

On Fri, Jul 07, 2023 at 09:58:49PM +0800, Baoquan He wrote:
> On s390 systems (aka mainframes), it has classic channel devices for
> networking and permanent storage that are currently even more common
> than PCI devices. Hence it could have a fully functional s390 kernel
> with CONFIG_PCI=n, then the relevant iomem mapping functions
> [including ioremap(), devm_ioremap(), etc.] are not available.
> 
> Here let ALTERA_TSE depend on HAS_IOMEM so that it won't be built
> to cause below compiling error if PCI is unset:
> 
> ------
> ERROR: modpost: "devm_ioremap" [drivers/net/ethernet/altera/altera_tse.ko] undefined!
> ------
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202306211329.ticOJCSv-lkp@intel.com/
> Signed-off-by: Baoquan He <bhe@redhat.com>


Reviewed-by: Simon Horman <simon.horman@corigine.com>
Tested-by: Simon Horman <simon.horman@corigine.com> # build-tested

I wonder if this should also have:

  Fixes: ed33ef648964 ("Altera TSE: Add Altera Ethernet Driver Makefile and Kconfig")

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

* Re: [PATCH 5/8] net: altera-tse: make ALTERA_TSE depend on HAS_IOMEM
  2023-07-11 17:17   ` Simon Horman
@ 2023-07-12  0:46     ` Baoquan He
  0 siblings, 0 replies; 15+ messages in thread
From: Baoquan He @ 2023-07-12  0:46 UTC (permalink / raw)
  To: Simon Horman
  Cc: linux-kernel, akpm, linux-mm, schnelle, vkoul, eli.billauer,
	arnd, gregkh, derek.kiernan, dragan.cvetic, linux,
	Jonathan.Cameron, linus.walleij, tsbogend, joyce.ooi, davem,
	edumazet, kuba, pabeni, tglx, maz, mturquette, sboyd, robh+dt,
	frowand.list, kernel test robot, netdev

On 07/11/23 at 06:17pm, Simon Horman wrote:
> On Fri, Jul 07, 2023 at 09:58:49PM +0800, Baoquan He wrote:
> > On s390 systems (aka mainframes), it has classic channel devices for
> > networking and permanent storage that are currently even more common
> > than PCI devices. Hence it could have a fully functional s390 kernel
> > with CONFIG_PCI=n, then the relevant iomem mapping functions
> > [including ioremap(), devm_ioremap(), etc.] are not available.
> > 
> > Here let ALTERA_TSE depend on HAS_IOMEM so that it won't be built
> > to cause below compiling error if PCI is unset:
> > 
> > ------
> > ERROR: modpost: "devm_ioremap" [drivers/net/ethernet/altera/altera_tse.ko] undefined!
> > ------
> > 
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202306211329.ticOJCSv-lkp@intel.com/
> > Signed-off-by: Baoquan He <bhe@redhat.com>
> 
> 
> Reviewed-by: Simon Horman <simon.horman@corigine.com>
> Tested-by: Simon Horman <simon.horman@corigine.com> # build-tested

Thanks, Simon.

> 
> I wonder if this should also have:
> 
>   Fixes: ed33ef648964 ("Altera TSE: Add Altera Ethernet Driver Makefile and Kconfig")

Agree, it's worth having Fixes tag.


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

* Re: [PATCH 7/8] clk: fixed-mmio: make COMMON_CLK_FIXED_MMIO depend on HAS_IOMEM
  2023-07-07 13:58 ` [PATCH 7/8] clk: fixed-mmio: make COMMON_CLK_FIXED_MMIO " Baoquan He
@ 2023-07-19 21:51   ` Stephen Boyd
  0 siblings, 0 replies; 15+ messages in thread
From: Stephen Boyd @ 2023-07-19 21:51 UTC (permalink / raw)
  To: Baoquan He, linux-kernel
  Cc: akpm, linux-mm, schnelle, vkoul, eli.billauer, arnd, gregkh,
	derek.kiernan, dragan.cvetic, linux, Jonathan.Cameron,
	linus.walleij, tsbogend, joyce.ooi, davem, edumazet, kuba,
	pabeni, tglx, maz, mturquette, robh+dt, frowand.list, Baoquan He,
	kernel test robot, linux-clk

Quoting Baoquan He (2023-07-07 06:58:51)
> On s390 systems (aka mainframes), it has classic channel devices for
> networking and permanent storage that are currently even more common
> than PCI devices. Hence it could have a fully functional s390 kernel
> with CONFIG_PCI=n, then the relevant iomem mapping functions
> [including ioremap(), devm_ioremap(), etc.] are not available.
> 
> Here let COMMON_CLK_FIXED_MMIO depend on HAS_IOMEM so that it won't
> be built to cause below compiling error if PCI is unset:
> 
> ------

Applied to clk-fixes

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

end of thread, other threads:[~2023-07-19 21:51 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-07 13:58 [PATCH 0/8] Make several Kconfig options depend on HAS_IOMEM Baoquan He
2023-07-07 13:58 ` [PATCH 1/8] idmaengine: make FSL_EDMA and INTEL_IDMA64 depends " Baoquan He
2023-07-07 13:58 ` [PATCH 2/8] char: xillybus: make XILLYBUS_OF depend " Baoquan He
2023-07-08  6:00   ` Eli Billauer
2023-07-07 13:58 ` [PATCH 3/8] misc: open-dice: make OPEN_DICE " Baoquan He
2023-07-07 13:58 ` [PATCH 4/8] pcmcia : make PCMCIA " Baoquan He
2023-07-07 13:58 ` [PATCH 5/8] net: altera-tse: make ALTERA_TSE " Baoquan He
2023-07-11 17:17   ` Simon Horman
2023-07-12  0:46     ` Baoquan He
2023-07-07 13:58 ` [PATCH 6/8] irqchip/al-fic: make AL_FIC " Baoquan He
2023-07-07 13:58 ` [PATCH 7/8] clk: fixed-mmio: make COMMON_CLK_FIXED_MMIO " Baoquan He
2023-07-19 21:51   ` Stephen Boyd
2023-07-07 13:58 ` [PATCH 8/8] of: make OF_EARLY_FLATTREE " Baoquan He
2023-07-10 14:54   ` Rob Herring
2023-07-11 16:43 ` (subset) [PATCH 0/8] Make several Kconfig options " Vinod Koul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.