public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* build failure of next-20220720 due to undefined calls in modpost
@ 2022-07-20 15:28 Sudip Mukherjee (Codethink)
  2022-07-20 16:04 ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Sudip Mukherjee (Codethink) @ 2022-07-20 15:28 UTC (permalink / raw)
  To: Hitomi Hasegawa, Arnd Bergmann; +Cc: linux-kernel, linux-next

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

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

* Re: build failure of next-20220720 due to undefined calls in modpost
  2022-07-20 15:28 build failure of next-20220720 due to undefined calls in modpost Sudip Mukherjee (Codethink)
@ 2022-07-20 16:04 ` Arnd Bergmann
  2022-07-21  8:39   ` hasegawa-hitomi
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2022-07-20 16:04 UTC (permalink / raw)
  To: Sudip Mukherjee (Codethink)
  Cc: Hitomi Hasegawa, Arnd Bergmann, Linux Kernel Mailing List,
	Linux-Next Mailing List, Thomas Gleixner, Marc Zyngier, Linux ARM,
	Julien Thierry

On Wed, Jul 20, 2022 at 5:28 PM Sudip Mukherjee (Codethink)
<sudipm.mukherjee@gmail.com> 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@arndb.de>
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@gmail.com>
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>

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

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

* Re: build failure of next-20220720 due to undefined calls in modpost
  2022-07-20 16:04 ` Arnd Bergmann
@ 2022-07-21  8:39   ` hasegawa-hitomi
  0 siblings, 0 replies; 3+ messages in thread
From: hasegawa-hitomi @ 2022-07-21  8:39 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Linux Kernel Mailing List, Linux-Next Mailing List,
	Thomas Gleixner, Marc Zyngier, Linux ARM, Julien Thierry,
	Sudip Mukherjee (Codethink)

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

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

end of thread, other threads:[~2022-07-21  8:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-20 15:28 build failure of next-20220720 due to undefined calls in modpost Sudip Mukherjee (Codethink)
2022-07-20 16:04 ` Arnd Bergmann
2022-07-21  8:39   ` hasegawa-hitomi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox