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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 20, 2022 at 5:28 PM Sudip Mukherjee (Codethink)
<sudipm.mukherjee@xxxxxxxxx> wrote:
>
> 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 <arnd@xxxxxxxx>
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.

    Reported-by: Sudip Mukherjee <sudipm.mukherjee@xxxxxxxxx>
    Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

diff --git a/drivers/soc/fujitsu/Kconfig b/drivers/soc/fujitsu/Kconfig
index 56275b44b293..987731e80612 100644
--- a/drivers/soc/fujitsu/Kconfig
+++ b/drivers/soc/fujitsu/Kconfig
@@ -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



[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux