All of lore.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Rafael Wysocki <rafael.j.wysocki@intel.com>,
	qiuxu.zhuo@intel.com, aris@redhat.com, mchehab@s-opensource.com,
	"open list:EDAC-CORE" <linux-edac@vger.kernel.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>
Subject: [v3,1/3] ACPI / adxl: Add address translation interface using ACPI DSM
Date: Wed, 31 Oct 2018 19:00:33 +0100	[thread overview]
Message-ID: <20181031180033.GM15955@zn.tnic> (raw)

On Wed, Oct 31, 2018 at 10:57:54AM -0700, Luck, Tony wrote:
> That make Kconfig happy, but leads to a couple of link errors:
> 
>   MODPOST vmlinux.o
> drivers/edac/skx_edac.o: In function `skx_mce_check_error':
> skx_edac.c:(.text+0xab): undefined reference to `adxl_decode'
> drivers/edac/skx_edac.o: In function `skx_init':
> skx_edac.c:(.init.text+0x863): undefined reference to `adxl_get_component_names'
> make: *** [Makefile:1036: vmlinux] Error 1
> 
> Perhaps Boris is right and we do need to make ACPI_ADXL user selectable,
> and have the skylake EDAC driver "depends on ACPI_ADXL" :-(

That seems to work:

diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig
index ffd349c12479..68e479b4d9c9 100644
--- a/drivers/edac/Kconfig
+++ b/drivers/edac/Kconfig
@@ -234,7 +234,7 @@ config EDAC_SKX
 	depends on PCI && X86_64 && X86_MCE_INTEL && PCI_MMCONFIG
 	depends on ACPI_NFIT || !ACPI_NFIT # if ACPI_NFIT=m, EDAC_SKX can't be y
 	select DMI
-	select ACPI_ADXL
+	select ACPI_ADXL if ACPI
 	help
 	  Support for error detection and correction the Intel
 	  Skylake server Integrated Memory Controllers. If your
diff --git a/include/linux/adxl.h b/include/linux/adxl.h
index 2a629acb4c3f..6d04991962b0 100644
--- a/include/linux/adxl.h
+++ b/include/linux/adxl.h
@@ -7,7 +7,12 @@
 #ifndef _LINUX_ADXL_H
 #define _LINUX_ADXL_H
 
+#ifdef CONFIG_ACPI_ADXL
 const char * const *adxl_get_component_names(void);
 int adxl_decode(u64 addr, u64 component_values[]);
+#else
+static inline const char * const *adxl_get_component_names(void)  { return NULL; }
+static inline int adxl_decode(u64 addr, u64 component_values[])   { return false; }
+#endif
 
 #endif /* _LINUX_ADXL_H */

             reply	other threads:[~2018-10-31 18:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-31 18:00 Borislav Petkov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-10-31 18:16 [v3,1/3] ACPI / adxl: Add address translation interface using ACPI DSM Borislav Petkov
2018-10-31 18:12 Luck, Tony
2018-10-31 18:08 Luck, Tony
2018-10-15 15:07 Luck, Tony
2018-10-15  7:38 Rafael J. Wysocki
2018-10-12 18:01 Luck, Tony

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=20181031180033.GM15955@zn.tnic \
    --to=bp@alien8.de \
    --cc=aris@redhat.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-edac@vger.kernel.org \
    --cc=mchehab@s-opensource.com \
    --cc=qiuxu.zhuo@intel.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rafael@kernel.org \
    --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.