ec8f24b7faaf3 (Thomas Gleixner 2019-05-19 13:07:45 +0100 1) # SPDX-License-Identifier: GPL-2.0-only
18da2c9ee41a0 (Dan Williams 2015-06-09 14:13:37 -0400 2) menuconfig LIBNVDIMM
b94d5230d06eb (Dan Williams 2015-05-19 22:54:31 -0400 3) tristate "NVDIMM (Non-Volatile Memory Device) Support"
b94d5230d06eb (Dan Williams 2015-05-19 22:54:31 -0400 4) depends on PHYS_ADDR_T_64BIT
29b9aa0aa3837 (Dan Williams 2016-06-06 17:42:38 -0700 5) depends on HAS_IOMEM
b94d5230d06eb (Dan Williams 2015-05-19 22:54:31 -0400 6) depends on BLK_DEV
33dd70752cd76 (Dan Williams 2019-11-06 17:43:31 -0800 7) select MEMREGION
b94d5230d06eb (Dan Williams 2015-05-19 22:54:31 -0400 8) help
b94d5230d06eb (Dan Williams 2015-05-19 22:54:31 -0400 9) Generic support for non-volatile memory devices including
b94d5230d06eb (Dan Williams 2015-05-19 22:54:31 -0400 10) ACPI-6-NFIT defined resources. On platforms that define an
b94d5230d06eb (Dan Williams 2015-05-19 22:54:31 -0400 11) NFIT, or otherwise can discover NVDIMM resources, a libnvdimm
b94d5230d06eb (Dan Williams 2015-05-19 22:54:31 -0400 12) bus is registered to advertise PMEM (persistent memory)
b94d5230d06eb (Dan Williams 2015-05-19 22:54:31 -0400 13) namespaces (/dev/pmemX) and BLK (sliding mmio window(s))
5212e11fde4d4 (Vishal Verma 2015-06-25 04:20:32 -0400 14) namespaces (/dev/ndblkX.Y). A PMEM namespace refers to a
5212e11fde4d4 (Vishal Verma 2015-06-25 04:20:32 -0400 15) memory resource that may span multiple DIMMs and support DAX
5212e11fde4d4 (Vishal Verma 2015-06-25 04:20:32 -0400 16) (see CONFIG_DAX). A BLK namespace refers to an NVDIMM control
5212e11fde4d4 (Vishal Verma 2015-06-25 04:20:32 -0400 17) region which exposes an mmio register set for windowed access
5212e11fde4d4 (Vishal Verma 2015-06-25 04:20:32 -0400 18) mode to non-volatile memory.
18da2c9ee41a0 (Dan Williams 2015-06-09 14:13:37 -0400 19)
18da2c9ee41a0 (Dan Williams 2015-06-09 14:13:37 -0400 20) if LIBNVDIMM
18da2c9ee41a0 (Dan Williams 2015-06-09 14:13:37 -0400 21)
18da2c9ee41a0 (Dan Williams 2015-06-09 14:13:37 -0400 22) config BLK_DEV_PMEM
18da2c9ee41a0 (Dan Williams 2015-06-09 14:13:37 -0400 23) tristate "PMEM: Persistent memory block device support"
18da2c9ee41a0 (Dan Williams 2015-06-09 14:13:37 -0400 24) default LIBNVDIMM
2080e88aecd78 (Dan Williams 2018-03-29 17:20:39 -0700 25) select DAX_DRIVER
5212e11fde4d4 (Vishal Verma 2015-06-25 04:20:32 -0400 26) select ND_BTT if BTT
e1455744b27c9 (Dan Williams 2015-07-30 17:57:47 -0400 27) select ND_PFN if NVDIMM_PFN
18da2c9ee41a0 (Dan Williams 2015-06-09 14:13:37 -0400 28) help
18da2c9ee41a0 (Dan Williams 2015-06-09 14:13:37 -0400 29) Memory ranges for PMEM are described by either an NFIT
18da2c9ee41a0 (Dan Williams 2015-06-09 14:13:37 -0400 30) (NVDIMM Firmware Interface Table, see CONFIG_NFIT_ACPI), a
18da2c9ee41a0 (Dan Williams 2015-06-09 14:13:37 -0400 31) non-standard OEM-specific E820 memory type (type-12, see
18da2c9ee41a0 (Dan Williams 2015-06-09 14:13:37 -0400 32) CONFIG_X86_PMEM_LEGACY), or it is manually specified by the
18da2c9ee41a0 (Dan Williams 2015-06-09 14:13:37 -0400 33) 'memmap=nn[KMG]!ss[KMG]' kernel command line (see
8c27ceff3604b (Mauro Carvalho Chehab 2016-10-18 10:12:27 -0200 34) Documentation/admin-guide/kernel-parameters.rst). This driver converts
18da2c9ee41a0 (Dan Williams 2015-06-09 14:13:37 -0400 35) these persistent memory ranges into block devices that are
18da2c9ee41a0 (Dan Williams 2015-06-09 14:13:37 -0400 36) capable of DAX (direct-access) file system mappings. See
ae4a05027e2f8 (Mauro Carvalho Chehab 2019-06-18 16:32:31 -0300 37) Documentation/driver-api/nvdimm/nvdimm.rst for more details.
18da2c9ee41a0 (Dan Williams 2015-06-09 14:13:37 -0400 38)
18da2c9ee41a0 (Dan Williams 2015-06-09 14:13:37 -0400 39) Say Y if you want to use an NVDIMM
18da2c9ee41a0 (Dan Williams 2015-06-09 14:13:37 -0400 40)
047fc8a1f9a63 (Ross Zwisler 2015-06-25 04:21:02 -0400 41) config ND_BLK
047fc8a1f9a63 (Ross Zwisler 2015-06-25 04:21:02 -0400 42) tristate "BLK: Block data window (aperture) device support"
047fc8a1f9a63 (Ross Zwisler 2015-06-25 04:21:02 -0400 43) default LIBNVDIMM
047fc8a1f9a63 (Ross Zwisler 2015-06-25 04:21:02 -0400 44) select ND_BTT if BTT
047fc8a1f9a63 (Ross Zwisler 2015-06-25 04:21:02 -0400 45) help
047fc8a1f9a63 (Ross Zwisler 2015-06-25 04:21:02 -0400 46) Support NVDIMMs, or other devices, that implement a BLK-mode
047fc8a1f9a63 (Ross Zwisler 2015-06-25 04:21:02 -0400 47) access capability. BLK-mode access uses memory-mapped-i/o
047fc8a1f9a63 (Ross Zwisler 2015-06-25 04:21:02 -0400 48) apertures to access persistent media.
047fc8a1f9a63 (Ross Zwisler 2015-06-25 04:21:02 -0400 49)
047fc8a1f9a63 (Ross Zwisler 2015-06-25 04:21:02 -0400 50) Say Y if your platform firmware emits an ACPI.NFIT table
047fc8a1f9a63 (Ross Zwisler 2015-06-25 04:21:02 -0400 51) (CONFIG_ACPI_NFIT), or otherwise exposes BLK-mode
047fc8a1f9a63 (Ross Zwisler 2015-06-25 04:21:02 -0400 52) capabilities.
047fc8a1f9a63 (Ross Zwisler 2015-06-25 04:21:02 -0400 53)
e1455744b27c9 (Dan Williams 2015-07-30 17:57:47 -0400 54) config ND_CLAIM
e1455744b27c9 (Dan Williams 2015-07-30 17:57:47 -0400 55) bool
e1455744b27c9 (Dan Williams 2015-07-30 17:57:47 -0400 56)
5212e11fde4d4 (Vishal Verma 2015-06-25 04:20:32 -0400 57) config ND_BTT
5212e11fde4d4 (Vishal Verma 2015-06-25 04:20:32 -0400 58) tristate
5212e11fde4d4 (Vishal Verma 2015-06-25 04:20:32 -0400 59)
8c2f7e8658df1 (Dan Williams 2015-06-25 04:20:04 -0400 60) config BTT
5212e11fde4d4 (Vishal Verma 2015-06-25 04:20:32 -0400 61) bool "BTT: Block Translation Table (atomic sector updates)"
5212e11fde4d4 (Vishal Verma 2015-06-25 04:20:32 -0400 62) default y if LIBNVDIMM
e1455744b27c9 (Dan Williams 2015-07-30 17:57:47 -0400 63) select ND_CLAIM
5212e11fde4d4 (Vishal Verma 2015-06-25 04:20:32 -0400 64) help
5212e11fde4d4 (Vishal Verma 2015-06-25 04:20:32 -0400 65) The Block Translation Table (BTT) provides atomic sector
5212e11fde4d4 (Vishal Verma 2015-06-25 04:20:32 -0400 66) update semantics for persistent memory devices, so that
5212e11fde4d4 (Vishal Verma 2015-06-25 04:20:32 -0400 67) applications that rely on sector writes not being torn (a
5212e11fde4d4 (Vishal Verma 2015-06-25 04:20:32 -0400 68) guarantee that typical disks provide) can continue to do so.
5212e11fde4d4 (Vishal Verma 2015-06-25 04:20:32 -0400 69) The BTT manifests itself as an alternate personality for an
5212e11fde4d4 (Vishal Verma 2015-06-25 04:20:32 -0400 70) NVDIMM namespace, i.e. a namespace can be in raw mode (pmemX,
5212e11fde4d4 (Vishal Verma 2015-06-25 04:20:32 -0400 71) ndblkX.Y, etc...), or 'sectored' mode, (pmemXs, ndblkX.Ys,
5212e11fde4d4 (Vishal Verma 2015-06-25 04:20:32 -0400 72) etc...).
5212e11fde4d4 (Vishal Verma 2015-06-25 04:20:32 -0400 73)
5212e11fde4d4 (Vishal Verma 2015-06-25 04:20:32 -0400 74) Select Y if unsure
8c2f7e8658df1 (Dan Williams 2015-06-25 04:20:04 -0400 75)
e1455744b27c9 (Dan Williams 2015-07-30 17:57:47 -0400 76) config ND_PFN
e1455744b27c9 (Dan Williams 2015-07-30 17:57:47 -0400 77) tristate
e1455744b27c9 (Dan Williams 2015-07-30 17:57:47 -0400 78)
e1455744b27c9 (Dan Williams 2015-07-30 17:57:47 -0400 79) config NVDIMM_PFN
e1455744b27c9 (Dan Williams 2015-07-30 17:57:47 -0400 80) bool "PFN: Map persistent (device) memory"
e1455744b27c9 (Dan Williams 2015-07-30 17:57:47 -0400 81) default LIBNVDIMM
32ab0a3f51701 (Dan Williams 2015-08-01 02:16:37 -0400 82) depends on ZONE_DEVICE
e1455744b27c9 (Dan Williams 2015-07-30 17:57:47 -0400 83) select ND_CLAIM
e1455744b27c9 (Dan Williams 2015-07-30 17:57:47 -0400 84) help
e1455744b27c9 (Dan Williams 2015-07-30 17:57:47 -0400 85) Map persistent memory, i.e. advertise it to the memory
e1455744b27c9 (Dan Williams 2015-07-30 17:57:47 -0400 86) management sub-system. By default persistent memory does
e1455744b27c9 (Dan Williams 2015-07-30 17:57:47 -0400 87) not support direct I/O, RDMA, or any other usage that
e1455744b27c9 (Dan Williams 2015-07-30 17:57:47 -0400 88) requires a 'struct page' to mediate an I/O request. This
e1455744b27c9 (Dan Williams 2015-07-30 17:57:47 -0400 89) driver allocates and initializes the infrastructure needed
e1455744b27c9 (Dan Williams 2015-07-30 17:57:47 -0400 90) to support those use cases.
e1455744b27c9 (Dan Williams 2015-07-30 17:57:47 -0400 91)
e1455744b27c9 (Dan Williams 2015-07-30 17:57:47 -0400 92) Select Y if unsure
e1455744b27c9 (Dan Williams 2015-07-30 17:57:47 -0400 93)
cd03412a51ac4 (Dan Williams 2016-03-11 10:15:36 -0800 94) config NVDIMM_DAX
867dfe342118b (Arnd Bergmann 2016-10-25 17:52:04 +0200 95) bool "NVDIMM DAX: Raw access to persistent memory"
cd03412a51ac4 (Dan Williams 2016-03-11 10:15:36 -0800 96) default LIBNVDIMM
cd03412a51ac4 (Dan Williams 2016-03-11 10:15:36 -0800 97) depends on NVDIMM_PFN
cd03412a51ac4 (Dan Williams 2016-03-11 10:15:36 -0800 98) help
cd03412a51ac4 (Dan Williams 2016-03-11 10:15:36 -0800 99) Support raw device dax access to a persistent memory
cd03412a51ac4 (Dan Williams 2016-03-11 10:15:36 -0800 100) namespace. For environments that want to hard partition
83fc61a563cb4 (Masanari Iida 2017-09-26 12:47:59 +0900 101) persistent memory, this capability provides a mechanism to
cd03412a51ac4 (Dan Williams 2016-03-11 10:15:36 -0800 102) sub-divide a namespace into character devices that can only be
cd03412a51ac4 (Dan Williams 2016-03-11 10:15:36 -0800 103) accessed via DAX (mmap(2)).
cd03412a51ac4 (Dan Williams 2016-03-11 10:15:36 -0800 104)
cd03412a51ac4 (Dan Williams 2016-03-11 10:15:36 -0800 105) Select Y if unsure
cd03412a51ac4 (Dan Williams 2016-03-11 10:15:36 -0800 106)
7171976089528 (Oliver O'Halloran 2018-04-06 15:21:14 +1000 107) config OF_PMEM
f22acf82746dd (Dan Williams 2018-04-19 15:07:42 -0700 108) tristate "Device-tree support for persistent memory regions"
7171976089528 (Oliver O'Halloran 2018-04-06 15:21:14 +1000 109) depends on OF
7171976089528 (Oliver O'Halloran 2018-04-06 15:21:14 +1000 110) default LIBNVDIMM
7171976089528 (Oliver O'Halloran 2018-04-06 15:21:14 +1000 111) help
7171976089528 (Oliver O'Halloran 2018-04-06 15:21:14 +1000 112) Allows regions of persistent memory to be described in the
7171976089528 (Oliver O'Halloran 2018-04-06 15:21:14 +1000 113) device-tree.
7171976089528 (Oliver O'Halloran 2018-04-06 15:21:14 +1000 114)
7171976089528 (Oliver O'Halloran 2018-04-06 15:21:14 +1000 115) Select Y if unsure.
7171976089528 (Oliver O'Halloran 2018-04-06 15:21:14 +1000 116)
4c6926a23b76e (Dave Jiang 2018-12-06 12:40:01 -0800 117) config NVDIMM_KEYS
4c6926a23b76e (Dave Jiang 2018-12-06 12:40:01 -0800 118) def_bool y
4c6926a23b76e (Dave Jiang 2018-12-06 12:40:01 -0800 119) depends on ENCRYPTED_KEYS
4c6926a23b76e (Dave Jiang 2018-12-06 12:40:01 -0800 120) depends on (LIBNVDIMM=ENCRYPTED_KEYS) || LIBNVDIMM=m
4c6926a23b76e (Dave Jiang 2018-12-06 12:40:01 -0800 121)
62974fc389b36 (Dan Williams 2019-09-04 15:43:31 -0700 122) config NVDIMM_TEST_BUILD
62974fc389b36 (Dan Williams 2019-09-04 15:43:31 -0700 123) tristate "Build the unit test core"
62974fc389b36 (Dan Williams 2019-09-04 15:43:31 -0700 124) depends on m
62974fc389b36 (Dan Williams 2019-09-04 15:43:31 -0700 125) depends on COMPILE_TEST && X86_64
62974fc389b36 (Dan Williams 2019-09-04 15:43:31 -0700 126) default m if COMPILE_TEST
62974fc389b36 (Dan Williams 2019-09-04 15:43:31 -0700 127) help
62974fc389b36 (Dan Williams 2019-09-04 15:43:31 -0700 128) Build the core of the unit test infrastructure. The result of
62974fc389b36 (Dan Williams 2019-09-04 15:43:31 -0700 129) this build is non-functional for unit test execution, but it
62974fc389b36 (Dan Williams 2019-09-04 15:43:31 -0700 130) otherwise helps catch build errors induced by changes to the
62974fc389b36 (Dan Williams 2019-09-04 15:43:31 -0700 131) core devm_memremap_pages() implementation and other
62974fc389b36 (Dan Williams 2019-09-04 15:43:31 -0700 132) infrastructure.
62974fc389b36 (Dan Williams 2019-09-04 15:43:31 -0700 133)
18da2c9ee41a0 (Dan Williams 2015-06-09 14:13:37 -0400 134) endif