Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp519266lqb; Wed, 29 May 2024 02:52:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWo7HkkICgqltBTbH+LCpGDzL/O+SF7cj2RDke1DWKSIJfwPdGRD1xea1OsLTpZaIMuveDxDDJaxPurKffBoWHSwRrx5+BpfQbTrub9qQ== X-Google-Smtp-Source: AGHT+IER7SnqC7iYlnxvmB70WN3K3xuCEKfJ7hPQQ/zwgIRIcAWlDPI2n6xfbr5kXq6A51dWg3Z9 X-Received: by 2002:a17:906:3b88:b0:a63:41f7:d47 with SMTP id a640c23a62f3a-a6341f7167dmr321536566b.39.1716976343709; Wed, 29 May 2024 02:52:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716976343; cv=pass; d=google.com; s=arc-20160816; b=NeYJOVfYEqEU9O/sGxtpXDqH4velIvbCr1wkzOD16epkvxYbJoEidJJ01HRwX5XRq3 4eZ8Ig3sdWCT4D+aJ9jgcFzUK+JfPbMEpkBmxksGDSD1SeftEqC+14ZvA/0RbQOROnh7 DdF5kmvQCmo/CDchwa7bT59j5zwpQTBnfhMS/yJ+Qw27rIQJPSH1k4kCvhP7oASA8Dx8 tRv/mMMk+dlIXu0WDVz5LVLzJv8J/tvpl+pCYc89Y25FlIuVD7T6TUrKZaM9g58raFZF jO6yUxcp25HMZHeo316AzydfpeO2Umo8B8GNZN8VhFSP29QaYh7yEjPk1cwj9mftAPYk Cmkg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=JY2vjah2RIx6dZA/etRN4tGFumGbuRuSFxbcV2g/XHs=; fh=gYKvKFEqs/AORMsx51ICupHfHfYpZ+lnzgTlsM04abM=; b=qi467eQjL7Y4Vq3eKpbXXEtL3zr5ZWPpQ3PYGFYhP0fhyVsPwMLcoBHqtd6r9ZFQUo 005syALXZuq28YHzo0yxEnpq4yjGj/nsRU1EUHdqRBFocSqb319VyIQamvCQnHZQncWd Q2UnycoHEdXAxbvsdfQYEx6TiAbJL4hErKI6y9++l1p0azyCX+CjiuqDMM2aQOP3ocQz UTyTNKXhY0Wb+y5kLiojxOGDej2WRia+Pr+LpN8aF8vryHT5hfZ8HDErNw1NhYuPRSN9 Fv4Q6fjfHw8TKmRWzCbl7j16nT8tImW/zlB2BxW7b2oLr8RkYD7BvxAdpKcBLHv+m/tA o07g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BohEjhST; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-193892-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193892-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6338fe295bsi216067066b.470.2024.05.29.02.52.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 02:52:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193892-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BohEjhST; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-193892-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193892-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 3BDFE1F2958A for ; Wed, 29 May 2024 09:52:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A648177991; Wed, 29 May 2024 09:51:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BohEjhST" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8CA06173359; Wed, 29 May 2024 09:51:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716976298; cv=none; b=gLqTriNpcDtfbQm7isdIqYYE+MHSxqbE8l340PZg+qlkO6WkZx5JbHykVxHqozOawK88LT7vqHK9rjt9JLvEVjqevucQuiY++2Mn38ytG28kpzv/s+pZTIbBMpOOhVKcZ9px0nMsvUlFlLhlVCAiXWtXZXPqAsWoQF35ktMNy8g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716976298; c=relaxed/simple; bh=Vv+BaY4iMh9LAabSCIsXW40L4YUilFaxA1vyLO43b9c=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Z0IjHjvw5N4u6FyCL7jojxXB5Gd+ipbSHeb8yptfSyQXhM1RaWlJoU5YBq74LVSArkUD4XgDx7ADuiZo8GpT2n7gd+9V6zr9muul35VapoJXZlAEzsRQAa2GcwXJhgIwa53F8zL7hwIzI1SFI0sDH1FKV/HJapNi8g7rhi6XuKE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BohEjhST; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97A2BC2BD10; Wed, 29 May 2024 09:51:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716976298; bh=Vv+BaY4iMh9LAabSCIsXW40L4YUilFaxA1vyLO43b9c=; h=From:To:Cc:Subject:Date:From; b=BohEjhSTj6rXCsmdffpmVZc9z9Dmu5GHfH8Glr5ttRqeI8cVMkOelrQj33Rj4QHTw 1xpBtVTLpiW3aKnSo8fDieTMIhyL8VV+ER+HTm16Rm1I9ZsjFzLdrsE+cJeM7U9gUS 2/6NBalyAZgZgdJcTQ8uB6AElfSGnauc6+FMEvdOfSzC885pkE9PhHz8VLuI+xVmoR C4sayyd6nAr/UaFIxs24T9J++O7ViaivXB+5FXUCj0+z9W6z8fYjpKxBaituPpoX2X N2Q0HaomiKEk2NS4fR1gVa/2+3qbS1LGjIP3KTgCx2AZ65giVjJaQGNYw8Jfkv0GEf buodoqEBn+9CA== From: Arnd Bergmann To: Borislav Petkov , Tony Luck , Qiuxu Zhuo Cc: Arnd Bergmann , James Morse , Mauro Carvalho Chehab , Robert Richter , Marvin Lin , Shubhrajyoti Datta , Sai Krishna Potthuri , linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] EDAC, i10nm: make skx_common.o a separate module Date: Wed, 29 May 2024 11:51:11 +0200 Message-Id: <20240529095132.1929397-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann Linking an object file into multiple modules causes a warning: scripts/Makefile.build:236: drivers/edac/Makefile: skx_common.o is added to multiple modules: i10nm_edac skx_edac Make this a separate module instead. Fixes: d4dc89d069aa ("EDAC, i10nm: Add a driver for Intel 10nm server processors") Signed-off-by: Arnd Bergmann --- drivers/edac/Makefile | 10 ++++++---- drivers/edac/skx_common.c | 21 +++++++++++++++++++-- drivers/edac/skx_common.h | 4 ++-- 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/drivers/edac/Makefile b/drivers/edac/Makefile index 9c09893695b7..4edfb83ffbee 100644 --- a/drivers/edac/Makefile +++ b/drivers/edac/Makefile @@ -54,11 +54,13 @@ 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_common-y := skx_common.o -i10nm_edac-y := skx_common.o i10nm_base.o -obj-$(CONFIG_EDAC_I10NM) += i10nm_edac.o +skx_edac-y := skx_base.o +obj-$(CONFIG_EDAC_SKX) += skx_edac.o skx_edac_common.o + +i10nm_edac-y := i10nm_base.o +obj-$(CONFIG_EDAC_I10NM) += i10nm_edac.o skx_edac_common.o obj-$(CONFIG_EDAC_CELL) += cell_edac.o obj-$(CONFIG_EDAC_PPC4XX) += ppc4xx_edac.o diff --git a/drivers/edac/skx_common.c b/drivers/edac/skx_common.c index 27996b7924c8..8d18099fd528 100644 --- a/drivers/edac/skx_common.c +++ b/drivers/edac/skx_common.c @@ -48,7 +48,7 @@ static u64 skx_tolm, skx_tohm; static LIST_HEAD(dev_edac_list); static bool skx_mem_cfg_2lm; -int __init skx_adxl_get(void) +int skx_adxl_get(void) { const char * const *names; int i, j; @@ -110,12 +110,14 @@ int __init skx_adxl_get(void) return -ENODEV; } +EXPORT_SYMBOL_GPL(skx_adxl_get); -void __exit skx_adxl_put(void) +void 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, bool error_in_1st_level_mem) { @@ -187,12 +189,14 @@ void skx_set_mem_cfg(bool mem_cfg_2lm) { skx_mem_cfg_2lm = mem_cfg_2lm; } +EXPORT_SYMBOL_GPL(skx_set_mem_cfg); void skx_set_decode(skx_decode_f decode, skx_show_retry_log_f show_retry_log) { driver_decode = decode; skx_show_retry_rd_err_log = show_retry_log; } +EXPORT_SYMBOL_GPL(skx_set_decode); int skx_get_src_id(struct skx_dev *d, int off, u8 *id) { @@ -206,6 +210,7 @@ int skx_get_src_id(struct skx_dev *d, int off, 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) { @@ -219,6 +224,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) { @@ -284,6 +290,7 @@ int skx_get_all_bus_mappings(struct res_config *cfg, struct list_head **list) *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) { @@ -323,6 +330,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) @@ -394,6 +402,7 @@ int skx_get_dimm_info(u32 mtr, u32 mcmtr, 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) @@ -442,6 +451,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, @@ -512,6 +522,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) { @@ -688,6 +699,7 @@ int skx_mce_check_error(struct notifier_block *nb, unsigned long val, mce->kflags |= MCE_HANDLED_EDAC; return NOTIFY_DONE; } +EXPORT_SYMBOL_GPL(skx_mce_check_error); void skx_remove(void) { @@ -725,3 +737,8 @@ void skx_remove(void) kfree(d); } } +EXPORT_SYMBOL_GPL(skx_remove); + +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Tony Luck"); +MODULE_DESCRIPTION("MC Driver for Intel server processors"); diff --git a/drivers/edac/skx_common.h b/drivers/edac/skx_common.h index b6d3607dffe2..11faf1db4fa4 100644 --- a/drivers/edac/skx_common.h +++ b/drivers/edac/skx_common.h @@ -231,8 +231,8 @@ typedef int (*get_dimm_config_f)(struct mem_ctl_info *mci, typedef bool (*skx_decode_f)(struct decoded_addr *res); typedef void (*skx_show_retry_log_f)(struct decoded_addr *res, char *msg, int len, bool scrub_err); -int __init skx_adxl_get(void); -void __exit skx_adxl_put(void); +int skx_adxl_get(void); +void skx_adxl_put(void); void skx_set_decode(skx_decode_f decode, skx_show_retry_log_f show_retry_log); void skx_set_mem_cfg(bool mem_cfg_2lm); -- 2.39.2