lkml.org 
[lkml]   [2022]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: build failure of next-20220720 due to undefined calls in modpost
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
\
 
 \ /
  Last update: 2022-07-20 18:05    [W:0.051 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site