Skip to contentSkip to conversation

build failure of next-20220720 due to undefined calls in modpost

DISCUSSION Sudip Mukherjee (Codethink) 3 participants 3 messages Jul 20, 2022 – Jul 21, 2022 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi All,

Not sure if it has been reported, builds of arm64 allmodconfig have failed to build next-20220720 with the error:

ERROR: modpost: "free_nmi" [drivers/soc/fujitsu/a64fx-diag.ko] undefined!
ERROR: modpost: "request_nmi" [drivers/soc/fujitsu/a64fx-diag.ko] undefined!
ERROR: modpost: "enable_nmi" [drivers/soc/fujitsu/a64fx-diag.ko] undefined!

--
Regards
Sudip

#1 lore raw
Quoted 10 lines · Sudip Mukherjee (Codethink)

Hi All,

Not sure if it has been reported, builds of arm64 allmodconfig have failed to build next-20220720 with the error:

ERROR: modpost: "free_nmi" [drivers/soc/fujitsu/a64fx-diag.ko] undefined!
ERROR: modpost: "request_nmi" [drivers/soc/fujitsu/a64fx-diag.ko] undefined!
ERROR: modpost: "enable_nmi" [drivers/soc/fujitsu/a64fx-diag.ko] undefined!

Thanks a lot for the report, I had not noticed this myself. It appears that this is
the first driver in a loadable module that uses NMIs directly. Adding Thomas Gleixner, Marc Zyngier and Julien Thierry to Cc for the NMI infrastructure.

There are two ways to fix this, either the driver can be made built-in only or we export those symbols. I've applied a hotfix on top to do the Kconfig change for the moment, see below.

It would be nice to allow this driver to be a loadable module. If Thomas agrees to added exports, I can send a new patch that adds the three EXPORT_SYMBOL_GPL() lines to kernel/irq/manage.c instead.

Arnd

8<---
commit f740949d41a7ff85aa23ce62c29d095066e5e6d4 (HEAD -> arm/drivers)

Author: Arnd Bergmann <[email protected]>
Date:   Wed Jul 20 17:58:18 2022 +0200

soc: a64fx-diag: disable modular build

The NMI infrastructure cannot currently be used in loadable modules:

ERROR: modpost: "free_nmi" [drivers/soc/fujitsu/a64fx-diag.ko] undefined!
ERROR: modpost: "request_nmi" [drivers/soc/fujitsu/a64fx-diag.ko] undefined!
ERROR: modpost: "enable_nmi" [drivers/soc/fujitsu/a64fx-diag.ko] undefined!

Disable this for now to make allmodconfig build again. We may revisit this and export those symbols instead in the future.

drivers/soc/fujitsu/Kconfig +1 -1
index 56275b44b293..987731e80612 100644
@@ -2,7 +2,7 @@
 menu "fujitsu SoC drivers"
 
 config A64FX_DIAG
-       tristate "A64FX diag driver"
+       bool "A64FX diag driver"
        depends on ARM64
        depends on ACPI
        help
#2 lore raw

Hi Arnd,

I intended to set that to bool, but it seems that I made a mistake somewhere. Thank you for fixing it.

Thank you.
Hitomi Hasegawa