All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Borislav Petkov <bp@alien8.de>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>, James Morse <james.morse@arm.com>,
	Tony Luck <tony.luck@intel.com>,
	Qiuxu Zhuo <qiuxu.zhuo@intel.com>,
	Thor Thayer <thor.thayer@linux.intel.com>,
	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	[thread overview]
Message-ID: <20190322140241.4171530-1-arnd@arndb.de> (raw)

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 <arnd@arndb.de>
---
 drivers/edac/Kconfig  | 9 +++++++++
 drivers/edac/Makefile | 8 ++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)

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
-- 
2.20.0


WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: Borislav Petkov <bp@alien8.de>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>, James Morse <james.morse@arm.com>,
	Tony Luck <tony.luck@intel.com>,
	Qiuxu Zhuo <qiuxu.zhuo@intel.com>,
	Thor Thayer <thor.thayer@linux.intel.com>,
	linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: EDAC, {skx|i10nm}_edac: Fix randconfig build error
Date: Fri, 22 Mar 2019 15:02:26 +0100	[thread overview]
Message-ID: <20190322140241.4171530-1-arnd@arndb.de> (raw)

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 <arnd@arndb.de>
---
 drivers/edac/Kconfig  | 9 +++++++++
 drivers/edac/Makefile | 8 ++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)

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

             reply	other threads:[~2019-03-22 14:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-22 14:02 Arnd Bergmann [this message]
2019-03-22 14:02 ` EDAC, {skx|i10nm}_edac: Fix randconfig build error Arnd Bergmann
  -- strict thread matches above, loose matches on Subject: below --
2019-03-05 13:21 [PATCH] EDAC: i10nm, skx: fix randconfig builds Arnd Bergmann
2019-03-05 14:34 ` Borislav Petkov
2019-03-06 13:48   ` Arnd Bergmann
2019-03-06 17:58     ` [PATCH] EDAC, {skx|i10nm}_edac: Fix randconfig build error Luck, Tony
2019-03-06 20:15       ` Arnd Bergmann
2019-03-13 23:01         ` Luck, Tony
2019-03-14  7:09           ` Arnd Bergmann
2019-03-14 11:04             ` Borislav Petkov
2019-03-14 21:59               ` Luck, Tony
2019-03-15  9:43                 ` Borislav Petkov
2019-03-15 15:57                   ` Luck, Tony
2019-03-15 17:37                     ` Borislav Petkov
2019-03-15 17:49                       ` Luck, Tony
2019-03-15 18:02                         ` Borislav Petkov
2019-03-15 18:11                           ` Luck, Tony
2019-03-15 21:03                             ` Arnd Bergmann
2019-03-15 21:28                               ` Luck, Tony
2019-03-22 14:00                                 ` Arnd Bergmann
2019-03-22 17:55                                   ` Luck, Tony
2019-03-22 19:56                                     ` Arnd Bergmann
2019-03-21 22:13                               ` Luck, Tony
2019-03-22 22:59                                 ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190322140241.4171530-1-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=bp@alien8.de \
    --cc=james.morse@arm.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=qiuxu.zhuo@intel.com \
    --cc=thor.thayer@linux.intel.com \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.