All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
To: akpm@linux-foundation.org,
	Dan Williams <dan.j.williams@intel.com>,
	Oliver <oohall@gmail.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Subject: [RFC PATCH 1/2] mm/nvidmm: Drop x86 dependency on nvdimm e820 device
Date: Fri,  6 Jul 2018 13:59:10 +0530	[thread overview]
Message-ID: <20180706082911.13405-1-aneesh.kumar@linux.ibm.com> (raw)

This patch adds new Kconfig variable PMEM_PLATFORM_DEVICE and use that to select
the nvdimm e820 device. The x86 config is now named X86_PMEM_LEGACY_DEVICE.

Not-Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
 arch/x86/Kconfig                  | 5 +----
 arch/x86/include/asm/e820/types.h | 2 +-
 arch/x86/include/uapi/asm/e820.h  | 2 +-
 drivers/nvdimm/Kconfig            | 5 ++++-
 drivers/nvdimm/Makefile           | 2 +-
 tools/testing/nvdimm/Kbuild       | 2 +-
 6 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index f1dbb4ee19d7..1186e1330876 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1641,13 +1641,10 @@ config ILLEGAL_POINTER_VALUE
 source "mm/Kconfig"
 
 config X86_PMEM_LEGACY_DEVICE
-	bool
-
-config X86_PMEM_LEGACY
 	tristate "Support non-standard NVDIMMs and ADR protected memory"
 	depends on PHYS_ADDR_T_64BIT
 	depends on BLK_DEV
-	select X86_PMEM_LEGACY_DEVICE
+	select PMEM_PLATFORM_DEVICE
 	select LIBNVDIMM
 	help
 	  Treat memory marked using the non-standard e820 type of 12 as used
diff --git a/arch/x86/include/asm/e820/types.h b/arch/x86/include/asm/e820/types.h
index c3aa4b5e49e2..0fb25d04dd26 100644
--- a/arch/x86/include/asm/e820/types.h
+++ b/arch/x86/include/asm/e820/types.h
@@ -20,7 +20,7 @@ enum e820_type {
 	 * NVDIMM regions that persist over a reboot.
 	 *
 	 * The kernel will ignore their special capabilities
-	 * unless the CONFIG_X86_PMEM_LEGACY=y option is set.
+	 * unless the CONFIG_X86_PMEM_LEGACY_DEVICE=y option is set.
 	 *
 	 * ( Note that older platforms also used 6 for the same
 	 *   type of memory, but newer versions switched to 12 as
diff --git a/arch/x86/include/uapi/asm/e820.h b/arch/x86/include/uapi/asm/e820.h
index 2f491efe3a12..b8ae7c221269 100644
--- a/arch/x86/include/uapi/asm/e820.h
+++ b/arch/x86/include/uapi/asm/e820.h
@@ -38,7 +38,7 @@
 /*
  * This is a non-standardized way to represent ADR or NVDIMM regions that
  * persist over a reboot.  The kernel will ignore their special capabilities
- * unless the CONFIG_X86_PMEM_LEGACY option is set.
+ * unless the CONFIG_X86_PMEM_LEGACY_DEVICE option is set.
  *
  * ( Note that older platforms also used 6 for the same type of memory,
  *   but newer versions switched to 12 as 6 was assigned differently.  Some
diff --git a/drivers/nvdimm/Kconfig b/drivers/nvdimm/Kconfig
index 9d36473dc2a2..50d2a33de441 100644
--- a/drivers/nvdimm/Kconfig
+++ b/drivers/nvdimm/Kconfig
@@ -27,7 +27,7 @@ config BLK_DEV_PMEM
 	  Memory ranges for PMEM are described by either an NFIT
 	  (NVDIMM Firmware Interface Table, see CONFIG_NFIT_ACPI), a
 	  non-standard OEM-specific E820 memory type (type-12, see
-	  CONFIG_X86_PMEM_LEGACY), or it is manually specified by the
+	  CONFIG_X86_PMEM_LEGACY_DEVICE), or it is manually specified by the
 	  'memmap=nn[KMG]!ss[KMG]' kernel command line (see
 	  Documentation/admin-guide/kernel-parameters.rst).  This driver converts
 	  these persistent memory ranges into block devices that are
@@ -112,4 +112,7 @@ config OF_PMEM
 
 	  Select Y if unsure.
 
+config PMEM_PLATFORM_DEVICE
+       bool
+
 endif
diff --git a/drivers/nvdimm/Makefile b/drivers/nvdimm/Makefile
index e8847045dac0..94f7f29146ce 100644
--- a/drivers/nvdimm/Makefile
+++ b/drivers/nvdimm/Makefile
@@ -3,7 +3,7 @@ obj-$(CONFIG_LIBNVDIMM) += libnvdimm.o
 obj-$(CONFIG_BLK_DEV_PMEM) += nd_pmem.o
 obj-$(CONFIG_ND_BTT) += nd_btt.o
 obj-$(CONFIG_ND_BLK) += nd_blk.o
-obj-$(CONFIG_X86_PMEM_LEGACY) += nd_e820.o
+obj-$(CONFIG_PMEM_PLATFORM_DEVICE) += nd_e820.o
 obj-$(CONFIG_OF_PMEM) += of_pmem.o
 
 nd_pmem-y := pmem.o
diff --git a/tools/testing/nvdimm/Kbuild b/tools/testing/nvdimm/Kbuild
index 0392153a0009..82e84253a6ae 100644
--- a/tools/testing/nvdimm/Kbuild
+++ b/tools/testing/nvdimm/Kbuild
@@ -27,7 +27,7 @@ obj-$(CONFIG_LIBNVDIMM) += libnvdimm.o
 obj-$(CONFIG_BLK_DEV_PMEM) += nd_pmem.o
 obj-$(CONFIG_ND_BTT) += nd_btt.o
 obj-$(CONFIG_ND_BLK) += nd_blk.o
-obj-$(CONFIG_X86_PMEM_LEGACY) += nd_e820.o
+obj-$(CONFIG_PMEM_PLATFORM_DEVICE) += nd_e820.o
 obj-$(CONFIG_ACPI_NFIT) += nfit.o
 ifeq ($(CONFIG_DAX),m)
 obj-$(CONFIG_DAX) += dax.o
-- 
2.17.1


             reply	other threads:[~2018-07-06  8:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-06  8:29 Aneesh Kumar K.V [this message]
2018-07-06  8:29 ` [RFC PATCH 2/2] mm/pmem: Add memblock based e820 platform driver Aneesh Kumar K.V
2018-07-06 18:46   ` Randy Dunlap
2018-07-06 19:38   ` Dan Williams
2018-07-07  7:15     ` Oliver
2018-07-07 17:36       ` Dan Williams
2018-07-09  5:17         ` Aneesh Kumar K.V
2018-07-09  6:06           ` Dan Williams
2018-07-07  7:50   ` Oliver
2018-07-09  5:16     ` Aneesh Kumar K.V

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=20180706082911.13405-1-aneesh.kumar@linux.ibm.com \
    --to=aneesh.kumar@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=dan.j.williams@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=oohall@gmail.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.