2023-07-07 14:12:59

by Baoquan He

[permalink] [raw]
Subject: [PATCH 0/8] Make several Kconfig options depend on HAS_IOMEM

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

https://lore.kernel.org/all/[email protected]/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 <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

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



2023-07-07 14:51:17

by Baoquan He

[permalink] [raw]
Subject: [PATCH 6/8] irqchip/al-fic: make AL_FIC depend on HAS_IOMEM

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 <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Baoquan He <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Marc Zyngier <[email protected]>
---
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


2023-07-11 16:52:45

by Vinod Koul

[permalink] [raw]
Subject: Re: (subset) [PATCH 0/8] Make several Kconfig options depend on HAS_IOMEM


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/[email protected]/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