From patchwork Tue Mar 5 13:21:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 159645 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp4964549jad; Tue, 5 Mar 2019 05:22:08 -0800 (PST) X-Google-Smtp-Source: APXvYqxKgeP5+VhOyntvLaL8RD1i0vFt51ZuDSBwigVEzjD/kSJw5rW60y7GbZRjU9Hsfg2SDjwu X-Received: by 2002:a17:902:bd87:: with SMTP id q7mr1138162pls.227.1551792127909; Tue, 05 Mar 2019 05:22:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551792127; cv=none; d=google.com; s=arc-20160816; b=m4wXhgk6AYsIN57tacwCmwQL4XNYpabNIU5PfwHiwmygKY+SqwRljsLVereeADwp/i RDd6RCKwRcmUGgSlIWGbRVg6OJ4bhaIcRc5qlnLx25dqiPzgg/tdZGzxmhAVnqEEyCcz 9n/CFnp8Jl5ykPIkrBdjLI/IZlmmrTb32KBg1V+ldzJrAAXsSgsB0xGw6/PaRcwQg5zv LwznKanj0PPmmOTmcfDvGQ1p/4MAxVuXRXHWWa/EJMxea7G6vIhvfyXT/wnTmRyN7uOb o2D0RDRlnPMyARNA3YlsU3a1r1x5sk6grQpRJ9ELLXtDY3cjOiOkj28klZdovYH4FDcg YGNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=mZCOg0WuE5ekWowIshprChfrjrYcQxVYwyvdRp96vzc=; b=dvktUFUh/tjC9AHYSuDFTIyQ5igdBEbmdMzlAoiRVFAr65ZK0UQlIc2kNGkxZCMbii 8no9doPbMc7aj3vFFuc4b3JHmOqodFkwXITPznqzJZ2Qht0RmvWE6R5iQ7WCgxU5OqIQ UD2QwTuxk13pjZM2Pj0pMjrClX8/dSF6iPiiB6Ih7i2oozffTRTcCqyNXyFj8lQx6dp/ y9jCFgYkSUmo1ldX1nCJCqDfQ5slIdVCsRWDYedQoAlYcQ6hg3cygVjM4SJrPMCrae3S Uvp3mswTi7qqIPpPlMN45R2DKoE6oGSi1UqE2GdEOaP58iuArwHl4UkeKDCjN1Zxj0Kh HcPw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x2si5468209pgr.203.2019.03.05.05.22.07; Tue, 05 Mar 2019 05:22:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728354AbfCENWF (ORCPT + 31 others); Tue, 5 Mar 2019 08:22:05 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:46355 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727245AbfCENWE (ORCPT ); Tue, 5 Mar 2019 08:22:04 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1N3Kc8-1h9RQE473i-010Js4; Tue, 05 Mar 2019 14:21:49 +0100 From: Arnd Bergmann To: Borislav Petkov , Mauro Carvalho Chehab Cc: Arnd Bergmann , James Morse , Qiuxu Zhuo , Tony Luck , linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] EDAC: i10nm, skx: fix randconfig builds Date: Tue, 5 Mar 2019 14:21:30 +0100 Message-Id: <20190305132147.3739133-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:DG3N/3ueq6q9PTMKpnrJ3WdtP6DHHvJU0tQ9ryMCYiPPgKrrUsL Ni8fhsxLi33Cj/g7DRnGTdhU8o8uahsemZgB7ss44KGuHltlkXX8c8PbRyEJPLz8fm+ENRa 3/RsA6GmTJHdlQ+Uouta6CBq5SW9OY6I+zU4EmlPhFaurxYO+trgpfToPkhTR21akgICD1l jc6u2iJTU42J8zh4ONL9A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:dCIGAx79iUo=:GWTG1Ij+FaoxBx6AlVRH/Y Fd3o6OLIZbHwlyLGSkZwCw7nWApZOVzr6QpP0iWzP7xSc5aVrc3H7e0Kj6HGVFb4igamQXNtQ lImFhzDFqHducKmY6QBV/PB03fKNvvF85tjyz314u0QBuSpFhRzOJizWJ9B4GV/chOszPEJrp Bjz6JowW/swKo29JC9lvUH7KTcG1iq7BykzcCKhzmwd0l00+XSBCFZcR0jTT8W1526OPUpi/W kceiKZ8qu+lvKkxLA6hOiUMjBYVxfhGVxJ4O3PDSxi4Oa12UKtpzjZEzsGLWTRNbrXH8uyOso pVgf0a61o7I8ZdVyLOHY5IWlZk3tITAb9kewF9zIN8izMf/c+GuAPEnjiL4/mE4jqhxpO7UTD H5w6XsWgWEoCy7owPMLgLExz33XCWxUltkHw27DR/rOuFA1XGw4Ww3gkmGAoaYKA7aftmdhIa HNRi+CfdA2TVZBS8xjr5NAn3iDHtZ8MqAdjj/nBvzUZAljz81zuJe+GTZWojAcGj7BKccF8Ye XMQP9zBzJceoqtskTQfcsulcfSck9gQ8s/7gvP3kauZMBJoUM3sR+8+QejICKnqB+mgpVjuhM 9arY+WHFkYcAgv+z5X1c7vy0wGOuMNtDUCz1JgpC6aOviDIAlfOXVOYzu5wkPYSP5ia/oxy/N kN+IPo36o9BvDBbcGTCqKzWBfJSsLWWJoIxobadDe8FERH1F2OaE/f24wfCzr36Ndp9QUEynq uG8NCtyhfEoOgpX0iUssqc2MjbGDOj7ZXsnDbA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In a configuration where one of the two drivers is built-in and the other one is a module, kbuild tries to add the modular file into vmlinux, and fails with drivers/edac/skx_common.o:(.rodata+0xc0): undefined reference to `__this_module' We either have to make both drivers be configured the same way all the time, or make skx_common a separate module. This takes the second approach, which is more logical, but has the downside of requiring lots of new EXPORT_SYMBOL_GPL() statements. Fixes: d4dc89d069aa ("EDAC, i10nm: Add a driver for Intel 10nm server processors") Signed-off-by: Arnd Bergmann --- drivers/edac/Makefile | 8 ++++---- drivers/edac/skx_common.c | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) -- 2.20.0 Reported-by: Arnd Bergmann Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Reported-by: Arnd Bergmann Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov diff --git a/drivers/edac/Makefile b/drivers/edac/Makefile index 89ad4a84a0f6..ab01d15be46c 100644 --- a/drivers/edac/Makefile +++ b/drivers/edac/Makefile @@ -57,11 +57,11 @@ obj-$(CONFIG_EDAC_MPC85XX) += mpc85xx_edac_mod.o layerscape_edac_mod-y := fsl_ddr_edac.o layerscape_edac.o obj-$(CONFIG_EDAC_LAYERSCAPE) += layerscape_edac_mod.o -skx_edac-y := skx_common.o skx_base.o -obj-$(CONFIG_EDAC_SKX) += skx_edac.o +skx_edac-y := skx_base.o +obj-$(CONFIG_EDAC_SKX) += skx_common.o skx_edac.o -i10nm_edac-y := skx_common.o i10nm_base.o -obj-$(CONFIG_EDAC_I10NM) += i10nm_edac.o +i10nm_edac-y := i10nm_base.o +obj-$(CONFIG_EDAC_I10NM) += skx_common.o i10nm_edac.o obj-$(CONFIG_EDAC_MV64X60) += mv64x60_edac.o obj-$(CONFIG_EDAC_CELL) += cell_edac.o diff --git a/drivers/edac/skx_common.c b/drivers/edac/skx_common.c index 0e96e7b5b0a7..bb183035df5c 100644 --- a/drivers/edac/skx_common.c +++ b/drivers/edac/skx_common.c @@ -83,12 +83,14 @@ int __init skx_adxl_get(void) return -ENODEV; } +EXPORT_SYMBOL_GPL(skx_adxl_get); void __exit skx_adxl_put(void) { kfree(adxl_values); kfree(adxl_msg); } +EXPORT_SYMBOL_GPL(skx_adxl_put); static bool skx_adxl_decode(struct decoded_addr *res) { @@ -127,6 +129,7 @@ void skx_set_decode(skx_decode_f decode) { skx_decode = decode; } +EXPORT_SYMBOL_GPL(skx_set_decode); int skx_get_src_id(struct skx_dev *d, u8 *id) { @@ -140,6 +143,7 @@ int skx_get_src_id(struct skx_dev *d, u8 *id) *id = GET_BITFIELD(reg, 12, 14); return 0; } +EXPORT_SYMBOL_GPL(skx_get_src_id); int skx_get_node_id(struct skx_dev *d, u8 *id) { @@ -153,6 +157,7 @@ int skx_get_node_id(struct skx_dev *d, u8 *id) *id = GET_BITFIELD(reg, 0, 2); return 0; } +EXPORT_SYMBOL_GPL(skx_get_node_id); static int get_width(u32 mtr) { @@ -219,6 +224,7 @@ int skx_get_all_bus_mappings(unsigned int did, int off, enum type type, *list = &dev_edac_list; return ndev; } +EXPORT_SYMBOL_GPL(skx_get_all_bus_mappings); int skx_get_hi_lo(unsigned int did, int off[], u64 *tolm, u64 *tohm) { @@ -258,6 +264,7 @@ int skx_get_hi_lo(unsigned int did, int off[], u64 *tolm, u64 *tohm) pci_dev_put(pdev); return -ENODEV; } +EXPORT_SYMBOL_GPL(skx_get_hi_lo); static int skx_get_dimm_attr(u32 reg, int lobit, int hibit, int add, int minval, int maxval, const char *name) @@ -311,6 +318,7 @@ int skx_get_dimm_info(u32 mtr, u32 amap, struct dimm_info *dimm, return 1; } +EXPORT_SYMBOL_GPL(skx_get_dimm_info); int skx_get_nvdimm_info(struct dimm_info *dimm, struct skx_imc *imc, int chan, int dimmno, const char *mod_str) @@ -359,6 +367,7 @@ int skx_get_nvdimm_info(struct dimm_info *dimm, struct skx_imc *imc, return (size == 0 || size == ~0ull) ? 0 : 1; } +EXPORT_SYMBOL_GPL(skx_get_nvdimm_info); int skx_register_mci(struct skx_imc *imc, struct pci_dev *pdev, const char *ctl_name, const char *mod_str, @@ -426,6 +435,7 @@ int skx_register_mci(struct skx_imc *imc, struct pci_dev *pdev, imc->mci = NULL; return rc; } +EXPORT_SYMBOL_GPL(skx_register_mci); static void skx_unregister_mci(struct skx_imc *imc) { @@ -609,6 +619,7 @@ int skx_mce_check_error(struct notifier_block *nb, unsigned long val, return NOTIFY_DONE; } +EXPORT_SYMBOL_GPL(skx_mce_check_error); void skx_remove(void) { @@ -644,6 +655,7 @@ void skx_remove(void) kfree(d); } } +EXPORT_SYMBOL_GPL(skx_remove); #ifdef CONFIG_EDAC_DEBUG /* @@ -683,9 +695,11 @@ void setup_skx_debug(const char *dirname) skx_test = NULL; } } +EXPORT_SYMBOL_GPL(setup_skx_debug); void teardown_skx_debug(void) { debugfs_remove_recursive(skx_test); } +EXPORT_SYMBOL_GPL(teardown_skx_debug); #endif /*CONFIG_EDAC_DEBUG*/