LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* drivers/edac/skx_edac.c:399: undefined reference to `nfit_get_smbios_id'
@ 2018-05-12 20:51 kbuild test robot
  2018-05-14  8:05 ` Jean Delvare
  0 siblings, 1 reply; 4+ messages in thread
From: kbuild test robot @ 2018-05-12 20:51 UTC (permalink / raw)
  To: Tony Luck; +Cc: kbuild-all, linux-kernel, Borislav Petkov, Jean Delvare

[-- Attachment #1: Type: text/plain, Size: 2599 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   427fbe89261d8f11cd20b5a4ba94e977061f69d6
commit: 58ca9ac1463d07d24b9fa8befe065192abca6f76 EDAC, skx_edac: Detect non-volatile DIMMs
date:   8 weeks ago
config: x86_64-randconfig-v0-05130337 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        git checkout 58ca9ac1463d07d24b9fa8befe065192abca6f76
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/edac/skx_edac.o: In function `get_nvdimm_info':
>> drivers/edac/skx_edac.c:399: undefined reference to `nfit_get_smbios_id'

vim +399 drivers/edac/skx_edac.c

   387	
   388	static int get_nvdimm_info(struct dimm_info *dimm, struct skx_imc *imc,
   389				   int chan, int dimmno)
   390	{
   391		int smbios_handle;
   392		u32 dev_handle;
   393		u16 flags;
   394		u64 size = 0;
   395	
   396		dev_handle = ACPI_NFIT_BUILD_DEVICE_HANDLE(dimmno, chan, imc->lmc,
   397							   imc->src_id, 0);
   398	
 > 399		smbios_handle = nfit_get_smbios_id(dev_handle, &flags);
   400		if (smbios_handle == -EOPNOTSUPP) {
   401			pr_warn_once(EDAC_MOD_STR ": Can't find size of NVDIMM. Try enabling CONFIG_ACPI_NFIT\n");
   402			goto unknown_size;
   403		}
   404	
   405		if (smbios_handle < 0) {
   406			skx_printk(KERN_ERR, "Can't find handle for NVDIMM ADR=%x\n", dev_handle);
   407			goto unknown_size;
   408		}
   409	
   410		if (flags & ACPI_NFIT_MEM_MAP_FAILED) {
   411			skx_printk(KERN_ERR, "NVDIMM ADR=%x is not mapped\n", dev_handle);
   412			goto unknown_size;
   413		}
   414	
   415		size = dmi_memdev_size(smbios_handle);
   416		if (size == ~0ull)
   417			skx_printk(KERN_ERR, "Can't find size for NVDIMM ADR=%x/SMBIOS=%x\n",
   418				   dev_handle, smbios_handle);
   419	
   420	unknown_size:
   421		dimm->nr_pages = size >> PAGE_SHIFT;
   422		dimm->grain = 32;
   423		dimm->dtype = DEV_UNKNOWN;
   424		dimm->mtype = MEM_NVDIMM;
   425		dimm->edac_mode = EDAC_SECDED; /* likely better than this */
   426	
   427		edac_dbg(0, "mc#%d: channel %d, dimm %d, %llu Mb (%u pages)\n",
   428			 imc->mc, chan, dimmno, size >> 20, dimm->nr_pages);
   429	
   430		snprintf(dimm->label, sizeof(dimm->label), "CPU_SrcID#%u_MC#%u_Chan#%u_DIMM#%u",
   431			 imc->src_id, imc->lmc, chan, dimmno);
   432	
   433		return (size == 0 || size == ~0ull) ? 0 : 1;
   434	}
   435	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31840 bytes --]

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

* Re: drivers/edac/skx_edac.c:399: undefined reference to `nfit_get_smbios_id'
  2018-05-12 20:51 drivers/edac/skx_edac.c:399: undefined reference to `nfit_get_smbios_id' kbuild test robot
@ 2018-05-14  8:05 ` Jean Delvare
  2018-05-14  8:12   ` Borislav Petkov
  0 siblings, 1 reply; 4+ messages in thread
From: Jean Delvare @ 2018-05-14  8:05 UTC (permalink / raw)
  To: kbuild test robot; +Cc: Tony Luck, kbuild-all, linux-kernel, Borislav Petkov

On Sun, 13 May 2018 04:51:21 +0800, kbuild test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   427fbe89261d8f11cd20b5a4ba94e977061f69d6
> commit: 58ca9ac1463d07d24b9fa8befe065192abca6f76 EDAC, skx_edac: Detect non-volatile DIMMs
> date:   8 weeks ago
> config: x86_64-randconfig-v0-05130337 (attached as .config)
> compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
> reproduce:
>         git checkout 58ca9ac1463d07d24b9fa8befe065192abca6f76
>         # save the attached .config to linux build tree
>         make ARCH=x86_64 
> 
> All errors (new ones prefixed by >>):
> 
>    drivers/edac/skx_edac.o: In function `get_nvdimm_info':
> >> drivers/edac/skx_edac.c:399: undefined reference to `nfit_get_smbios_id'

This is caused by the following combination of options:

CONFIG_ACPI_NFIT=m
CONFIG_EDAC_SKX=y

Built-in code (skx_edac) can't reference a function from a module
(nfit).

I'll send a candidate fix shortly.

-- 
Jean Delvare
SUSE L3 Support

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

* Re: drivers/edac/skx_edac.c:399: undefined reference to `nfit_get_smbios_id'
  2018-05-14  8:05 ` Jean Delvare
@ 2018-05-14  8:12   ` Borislav Petkov
  2018-05-14  8:19     ` Jean Delvare
  0 siblings, 1 reply; 4+ messages in thread
From: Borislav Petkov @ 2018-05-14  8:12 UTC (permalink / raw)
  To: Jean Delvare; +Cc: kbuild test robot, Tony Luck, kbuild-all, linux-kernel

On Mon, May 14, 2018 at 10:05:30AM +0200, Jean Delvare wrote:
> I'll send a candidate fix shortly.

https://lkml.kernel.org/r/3af91354-8e19-d2af-1bba-ced8dce053f1@infradead.org

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 

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

* Re: drivers/edac/skx_edac.c:399: undefined reference to `nfit_get_smbios_id'
  2018-05-14  8:12   ` Borislav Petkov
@ 2018-05-14  8:19     ` Jean Delvare
  0 siblings, 0 replies; 4+ messages in thread
From: Jean Delvare @ 2018-05-14  8:19 UTC (permalink / raw)
  To: Borislav Petkov; +Cc: kbuild test robot, Tony Luck, kbuild-all, linux-kernel

On Mon, 14 May 2018 10:12:00 +0200, Borislav Petkov wrote:
> On Mon, May 14, 2018 at 10:05:30AM +0200, Jean Delvare wrote:
> > I'll send a candidate fix shortly.  
> 
> https://lkml.kernel.org/r/3af91354-8e19-d2af-1bba-ced8dce053f1@infradead.org

Thanks for the link, apparently I'm late to the party. Oh well.

-- 
Jean Delvare
SUSE L3 Support

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

end of thread, other threads:[~2018-05-14  8:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-12 20:51 drivers/edac/skx_edac.c:399: undefined reference to `nfit_get_smbios_id' kbuild test robot
2018-05-14  8:05 ` Jean Delvare
2018-05-14  8:12   ` Borislav Petkov
2018-05-14  8:19     ` Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).