RE: [PATCH 0/7] EDAC: Add Intel Diamond Rapids server support

Zhuo, Qiuxu posted 7 patches 1 week, 3 days ago
Only 0 patches received!
There is a newer version of this series
RE: [PATCH 0/7] EDAC: Add Intel Diamond Rapids server support
Posted by Zhuo, Qiuxu 1 week, 3 days ago
Hi Boris,

> From: Borislav Petkov <bp@alien8.de>
> Sent: Friday, November 21, 2025 6:59 PM
> To: Zhuo, Qiuxu <qiuxu.zhuo@intel.com>
> Cc: Luck, Tony <tony.luck@intel.com>; Lai Yi <yi1.lai@linux.intel.com>; linux-
> edac@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH 0/7] EDAC: Add Intel Diamond Rapids server support
> 
> [...]
> ld: drivers/edac/skx_common.o: in function `skx_get_nvdimm_info':
> skx_common.c:(.text+0x93c): undefined reference to `nfit_get_smbios_id'
> make[2]: *** [scripts/Makefile.vmlinux:72: vmlinux.unstripped] Error 1
> make[1]: *** [/home/amd/kernel/linux/Makefile:1242: vmlinux] Error 2
> make[1]: *** Waiting for unfinished jobs....
> make: *** [Makefile:248: __sub-make] Error 2
> 
> It must be coming from this set because I didn't see this before.
> 
> .config attached.
> 

Thanks for reporting this build error and providing the .config file.
I can reproduce this error with your .config file.

I fixed this error with the following diff, which worked ok on my side.
Could you please check whether this diff works on your side? 

Thanks so much in advance!

---

Author: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Date:   Fri Nov 21 21:42:13 2025 +0800

    EDAC/imh: Fix imh_edac build error when CONFIG_ACPI_NFIT=m and CONFIG_EDAC_IMH=y

    When CONFIG_ACPI_NFIT=m and CONFIG_EDAC_IMH=y, it results in the
    following build error:

      ld: drivers/edac/skx_common.o: in function skx_get_nvdimm_info':
      skx_common.c:(.text+0x93c): undefined reference to nfit_get_smbios_id'

    This is because the library 'skx_edac_common' needed by the built-in
    imh_edac driver calls nfit_get_smbios_id() from the ACPI_NFIT
    module. Built-in code can't call functions from modules.

    Fix this build error by ensuring CONFIG_EDAC_IMH can't be y when
    CONFIG_ACPI_NFIT=m.

    Reported-by: Borislav Petkov <bp@alien8.de>
    Closes: https://lore.kernel.org/all/20251121105905.GAaSBF-XQZCXnR6UIx@fat_crate.local/
    Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>

diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig
index dbdfc86656d1..26fa76e162c3 100644
--- a/drivers/edac/Kconfig
+++ b/drivers/edac/Kconfig
@@ -294,6 +294,8 @@ config EDAC_I10NM
 config EDAC_IMH
        tristate "Intel Integrated Memory/IO Hub MC"
        depends on X86_64 && X86_MCE_INTEL && ACPI
+       depends on ACPI_NFIT || !ACPI_NFIT # if ACPI_NFIT=m, EDAC_IMH can't be y
+       select DMI
        select ACPI_ADXL
        help
          Support for error detection and correction the Intel







RE: [PATCH 0/7] EDAC: Add Intel Diamond Rapids server support
Posted by Luck, Tony 1 week, 3 days ago
>     When CONFIG_ACPI_NFIT=m and CONFIG_EDAC_IMH=y, it results in the
>     following build error:
>
>       ld: drivers/edac/skx_common.o: in function skx_get_nvdimm_info':
>       skx_common.c:(.text+0x93c): undefined reference to nfit_get_smbios_id'
>
>     This is because the library 'skx_edac_common' needed by the built-in
>     imh_edac driver calls nfit_get_smbios_id() from the ACPI_NFIT
>     module. Built-in code can't call functions from modules.
>
>     Fix this build error by ensuring CONFIG_EDAC_IMH can't be y when
>     CONFIG_ACPI_NFIT=m.

Merged fix into original commit and then force pushed to ras tree,

Thanks

-Tony