From patchwork Fri Mar 22 14:02:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 160893 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp850996jan; Fri, 22 Mar 2019 07:02:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqyptQ1JEdU6TJfhuqqpXSa16kIa4jQ2yrfSFMnAe5drnEo6LaTMV2OW7j0OUOdU8Uiw0ZTt X-Received: by 2002:a65:610d:: with SMTP id z13mr9274303pgu.104.1553263377911; Fri, 22 Mar 2019 07:02:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553263377; cv=none; d=google.com; s=arc-20160816; b=ju8smS8mD7TSDtnMYUplmL01JRJXZF3MmAnm87lRzrJzRILmNqH5+GWarx59Keutey wr73XQ0aKjLAG1wO7EjBsuyF6K3tPw7kW+hPyFuoOp4Zz7+jj1pb1FlPCP0ccrc8rZD1 r8d34xE3MvsmLgAve8gt7nTLBqvqr2ZV6Y70uF1Vjq1FXiIASY2+Qvz76h395Su8c3mm fnl2kPfoQ7wuJQmS7YoPY+AoZeTeDxWTsJyMRQMHTj0yDWlw3J+nFjU967SifidZn5YP sSWz6v6fFLex9Glvs4lRyfFSZAWbmD9lT5hIUDH/7mpQOwIp/XwuqWxrMv0GkAunfDCb aKEw== 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=X25HmjRnB8lVdwxdxPrA2T6k/P2Mk7pMDoIZ/J+9bPc=; b=e+qDI0pmVu9MBrIRFDDxSiuQP1m5TbKK0bcKq7rIcEKmMQk+buqQF6PVcytK7Oglxo dgPRpMZzmLg8pp36pCC60GGCa2oLCaqxvl+62zPJaMOsQIEQt7RKDyRybes46ADsczty zKUoC193bMEk4m9ye0VNUaznKYaAvjv0IGt/MKu/ZKj43SFPxJ83MoDL8RwTq0sIwybd hE78VQDkUfJ4ttsG+b3t+HDf1QSGrI/lfmLDw++NhYNePBKQkYxP/YT2HPxtEl6DAuqe QurdMDjmKZ69CVciHhii7rBZyNn+VwWIWxTmj1pTvlQYfSV+3hWOpSmFCjICRPXLcvdU aFwg== 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 q13si1165757pff.3.2019.03.22.07.02.57; Fri, 22 Mar 2019 07:02:57 -0700 (PDT) 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 S1727884AbfCVOC4 (ORCPT + 31 others); Fri, 22 Mar 2019 10:02:56 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:35007 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727487AbfCVOCz (ORCPT ); Fri, 22 Mar 2019 10:02:55 -0400 Received: from wuerfel.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1N0Fh1-1gksC41oTH-00xHb5; Fri, 22 Mar 2019 15:02:43 +0100 From: Arnd Bergmann To: Borislav Petkov , Mauro Carvalho Chehab Cc: Arnd Bergmann , James Morse , Tony Luck , Qiuxu Zhuo , Thor Thayer , linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] EDAC, {skx|i10nm}_edac: Fix randconfig build error Date: Fri, 22 Mar 2019 15:02:26 +0100 Message-Id: <20190322140241.4171530-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:Dp9ZRsPxecNlIjLmRl+hmaeVN/jA0KGkR6kC9RGmz1v9wug9RZf u9liQou4XYpDcE0z6K3BmeW4rj6xnNOLav6GkQvv4APUbgOqnBeNAzLgA3bx1PCg0zLHL3C BnTcR6bragtIyOX68CcnzKp+vXu+V96zRHmHFk2KMzBmtJrvrb4mx465qGyUbkmOXnxCIV3 P7w7apfDBDCKLoXJ/gNPw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:1ul4WU+k5uI=:a61oJR4ykm8GoOy8V086Kt 7DdXUrxeCMRX8+03AX1S3nkg5xoYIMD5Q347tyPvpB7UxA2eZPQPCDlH1ipkTiWfbeBFDdYh2 d9v4qvtxF34ybp4uny4kSwAys6uAzOzuvKqh6Sm0kutaB8boq4y1f38GDR1WQr0qEeEmENxF2 Mh+fwJ5PwVNwncWSM10FlGAPcLmkqbieakxsrsUAJQFU9k9H3otn6B+gNjfMwL6YuxjXlD7gt wa6h1uYLw8XZDzQ/xdxmjxxff0XiDKP0ObD6vTxyTB6YgJWDV+Tjuhad0AlckAQICLrg1h0TT bl3guzn2Y0HtIdBhEE0Wayqis0GVEoGw6p8+q1Vid6fU5sdU9+a1wlEBw6Df9amESYAa+ln2+ hXrw8cmRUSjbTIkxrZyNtovCfTTXzoOb8asRVPSnKgCwhJ0Ik3IxG6VUy/MYERKlRGxPkDLXY FYWjPsCa3KtrHzuteo4VF1GzifZw4dm04ei+a9V3Hd3gQOe67Rr+nK9wTJsgcLGg2fuFzlsDx nbMQDyQzg22SHrUcn/lJp9ylrJJSep8iybzfq0/ClETdt0UyW9IVtxhU0joSH+BlLlynJgsEs EFMlgTyh0IEBhh9J2DM0oVM7MXclBnQH2yUOb3ZnNovi/kXejnqJZDigF7vqbwjrdQCwngKOu mfRiaaXQPF96fKqqHxvagr1QRNwkwtEkutEI4XWLQpxPjSttlckN4BunONhdTObgwvvhgXUVo fCdPAsbo1bOG+JruF9eKvHMfQB+BzUEW9SBwiw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Configurations with CONFIG_EDAC_SKX and CONFIG_EDAC_I10NM both enabled, but only one of them built-in and the other being a loadable module fail to link because the common file is built the wrong way: skx_common.c:672: undefined reference to `__this_module' This overrides the way the modules are built, building both into the zImage file if that happens. Signed-off-by: Arnd Bergmann --- drivers/edac/Kconfig | 9 +++++++++ drivers/edac/Makefile | 8 ++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) -- 2.20.0 diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig index 47eb4d13ed5f..70080926329f 100644 --- a/drivers/edac/Kconfig +++ b/drivers/edac/Kconfig @@ -235,6 +235,7 @@ config EDAC_SKX depends on ACPI_NFIT || !ACPI_NFIT # if ACPI_NFIT=m, EDAC_SKX can't be y select DMI select ACPI_ADXL + select EDAC_SKX_COMMON help Support for error detection and correction the Intel Skylake server Integrated Memory Controllers. If your @@ -247,12 +248,20 @@ config EDAC_I10NM depends on ACPI_NFIT || !ACPI_NFIT # if ACPI_NFIT=m, EDAC_I10NM can't be y select DMI select ACPI_ADXL + select EDAC_SKX_COMMON help Support for error detection and correction the Intel 10nm server Integrated Memory Controllers. If your system has non-volatile DIMMs you should also manually select CONFIG_ACPI_NFIT. +config EDAC_SKX_COMMON + tristate + help + This is an internal helper symbol to ensure that all variants + of the EDAC_SKX driver are either built-in or modular, as mixing + the two causes link time problems. + config EDAC_PND2 tristate "Intel Pondicherry2" depends on PCI && X86_64 && X86_MCE_INTEL diff --git a/drivers/edac/Makefile b/drivers/edac/Makefile index 89ad4a84a0f6..0f363309f662 100644 --- a/drivers/edac/Makefile +++ b/drivers/edac/Makefile @@ -58,10 +58,14 @@ 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 +ifdef CONFIG_EDAC_SKX +obj-$(CONFIG_EDAC_SKX_COMMON) += skx_edac.o +endif i10nm_edac-y := skx_common.o i10nm_base.o -obj-$(CONFIG_EDAC_I10NM) += i10nm_edac.o +ifdef CONFIG_EDAC_I10NM +obj-$(CONFIG_EDAC_SKX_COMMON)) += i10nm_edac.o +endif obj-$(CONFIG_EDAC_MV64X60) += mv64x60_edac.o obj-$(CONFIG_EDAC_CELL) += cell_edac.o