libnvdimm/altmap: Track namespace boundaries in altmap
[linux-2.6-block.git] / drivers / nvdimm / Kconfig
CommitLineData
ec8f24b7 1# SPDX-License-Identifier: GPL-2.0-only
18da2c9e 2menuconfig LIBNVDIMM
b94d5230
DW
3 tristate "NVDIMM (Non-Volatile Memory Device) Support"
4 depends on PHYS_ADDR_T_64BIT
29b9aa0a 5 depends on HAS_IOMEM
b94d5230
DW
6 depends on BLK_DEV
7 help
8 Generic support for non-volatile memory devices including
9 ACPI-6-NFIT defined resources. On platforms that define an
10 NFIT, or otherwise can discover NVDIMM resources, a libnvdimm
11 bus is registered to advertise PMEM (persistent memory)
12 namespaces (/dev/pmemX) and BLK (sliding mmio window(s))
5212e11f
VV
13 namespaces (/dev/ndblkX.Y). A PMEM namespace refers to a
14 memory resource that may span multiple DIMMs and support DAX
15 (see CONFIG_DAX). A BLK namespace refers to an NVDIMM control
16 region which exposes an mmio register set for windowed access
17 mode to non-volatile memory.
18da2c9e
DW
18
19if LIBNVDIMM
20
21config BLK_DEV_PMEM
22 tristate "PMEM: Persistent memory block device support"
23 default LIBNVDIMM
2080e88a 24 select DAX_DRIVER
5212e11f 25 select ND_BTT if BTT
e1455744 26 select ND_PFN if NVDIMM_PFN
18da2c9e
DW
27 help
28 Memory ranges for PMEM are described by either an NFIT
29 (NVDIMM Firmware Interface Table, see CONFIG_NFIT_ACPI), a
30 non-standard OEM-specific E820 memory type (type-12, see
31 CONFIG_X86_PMEM_LEGACY), or it is manually specified by the
32 'memmap=nn[KMG]!ss[KMG]' kernel command line (see
8c27ceff 33 Documentation/admin-guide/kernel-parameters.rst). This driver converts
18da2c9e
DW
34 these persistent memory ranges into block devices that are
35 capable of DAX (direct-access) file system mappings. See
ae4a0502 36 Documentation/driver-api/nvdimm/nvdimm.rst for more details.
18da2c9e
DW
37
38 Say Y if you want to use an NVDIMM
39
047fc8a1
RZ
40config ND_BLK
41 tristate "BLK: Block data window (aperture) device support"
42 default LIBNVDIMM
43 select ND_BTT if BTT
44 help
45 Support NVDIMMs, or other devices, that implement a BLK-mode
46 access capability. BLK-mode access uses memory-mapped-i/o
47 apertures to access persistent media.
48
49 Say Y if your platform firmware emits an ACPI.NFIT table
50 (CONFIG_ACPI_NFIT), or otherwise exposes BLK-mode
51 capabilities.
52
e1455744
DW
53config ND_CLAIM
54 bool
55
5212e11f
VV
56config ND_BTT
57 tristate
58
8c2f7e86 59config BTT
5212e11f
VV
60 bool "BTT: Block Translation Table (atomic sector updates)"
61 default y if LIBNVDIMM
e1455744 62 select ND_CLAIM
5212e11f
VV
63 help
64 The Block Translation Table (BTT) provides atomic sector
65 update semantics for persistent memory devices, so that
66 applications that rely on sector writes not being torn (a
67 guarantee that typical disks provide) can continue to do so.
68 The BTT manifests itself as an alternate personality for an
69 NVDIMM namespace, i.e. a namespace can be in raw mode (pmemX,
70 ndblkX.Y, etc...), or 'sectored' mode, (pmemXs, ndblkX.Ys,
71 etc...).
72
73 Select Y if unsure
8c2f7e86 74
e1455744
DW
75config ND_PFN
76 tristate
77
78config NVDIMM_PFN
79 bool "PFN: Map persistent (device) memory"
80 default LIBNVDIMM
32ab0a3f 81 depends on ZONE_DEVICE
e1455744
DW
82 select ND_CLAIM
83 help
84 Map persistent memory, i.e. advertise it to the memory
85 management sub-system. By default persistent memory does
86 not support direct I/O, RDMA, or any other usage that
87 requires a 'struct page' to mediate an I/O request. This
88 driver allocates and initializes the infrastructure needed
89 to support those use cases.
90
91 Select Y if unsure
92
cd03412a 93config NVDIMM_DAX
867dfe34 94 bool "NVDIMM DAX: Raw access to persistent memory"
cd03412a
DW
95 default LIBNVDIMM
96 depends on NVDIMM_PFN
97 help
98 Support raw device dax access to a persistent memory
99 namespace. For environments that want to hard partition
83fc61a5 100 persistent memory, this capability provides a mechanism to
cd03412a
DW
101 sub-divide a namespace into character devices that can only be
102 accessed via DAX (mmap(2)).
103
104 Select Y if unsure
105
71719760 106config OF_PMEM
f22acf82 107 tristate "Device-tree support for persistent memory regions"
71719760
OH
108 depends on OF
109 default LIBNVDIMM
110 help
111 Allows regions of persistent memory to be described in the
112 device-tree.
113
114 Select Y if unsure.
115
4c6926a2
DJ
116config NVDIMM_KEYS
117 def_bool y
118 depends on ENCRYPTED_KEYS
119 depends on (LIBNVDIMM=ENCRYPTED_KEYS) || LIBNVDIMM=m
120
18da2c9e 121endif