Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0-only
0002 menuconfig LIBNVDIMM
0003         tristate "NVDIMM (Non-Volatile Memory Device) Support"
0004         depends on PHYS_ADDR_T_64BIT
0005         depends on HAS_IOMEM
0006         depends on BLK_DEV
0007         select MEMREGION
0008         help
0009           Generic support for non-volatile memory devices including
0010           ACPI-6-NFIT defined resources.  On platforms that define an
0011           NFIT, or otherwise can discover NVDIMM resources, a libnvdimm
0012           bus is registered to advertise PMEM (persistent memory)
0013           namespaces (/dev/pmemX). A PMEM namespace refers to a
0014           memory resource that may span multiple DIMMs and support DAX
0015           (see CONFIG_DAX).
0016 
0017 if LIBNVDIMM
0018 
0019 config BLK_DEV_PMEM
0020         tristate "PMEM: Persistent memory block device support"
0021         default LIBNVDIMM
0022         select DAX
0023         select ND_BTT if BTT
0024         select ND_PFN if NVDIMM_PFN
0025         help
0026           Memory ranges for PMEM are described by either an NFIT
0027           (NVDIMM Firmware Interface Table, see CONFIG_NFIT_ACPI), a
0028           non-standard OEM-specific E820 memory type (type-12, see
0029           CONFIG_X86_PMEM_LEGACY), or it is manually specified by the
0030           'memmap=nn[KMG]!ss[KMG]' kernel command line (see
0031           Documentation/admin-guide/kernel-parameters.rst).  This driver converts
0032           these persistent memory ranges into block devices that are
0033           capable of DAX (direct-access) file system mappings.  See
0034           Documentation/driver-api/nvdimm/nvdimm.rst for more details.
0035 
0036           Say Y if you want to use an NVDIMM
0037 
0038 config ND_CLAIM
0039         bool
0040 
0041 config ND_BTT
0042         tristate
0043 
0044 config BTT
0045         bool "BTT: Block Translation Table (atomic sector updates)"
0046         default y if LIBNVDIMM
0047         select ND_CLAIM
0048         help
0049           The Block Translation Table (BTT) provides atomic sector
0050           update semantics for persistent memory devices, so that
0051           applications that rely on sector writes not being torn (a
0052           guarantee that typical disks provide) can continue to do so.
0053           The BTT manifests itself as an alternate personality for an
0054           NVDIMM namespace, i.e. a namespace can be in raw mode pmemX,
0055           or 'sectored' mode.
0056 
0057           Select Y if unsure
0058 
0059 config ND_PFN
0060         tristate
0061 
0062 config NVDIMM_PFN
0063         bool "PFN: Map persistent (device) memory"
0064         default LIBNVDIMM
0065         depends on ZONE_DEVICE
0066         select ND_CLAIM
0067         help
0068           Map persistent memory, i.e. advertise it to the memory
0069           management sub-system.  By default persistent memory does
0070           not support direct I/O, RDMA, or any other usage that
0071           requires a 'struct page' to mediate an I/O request.  This
0072           driver allocates and initializes the infrastructure needed
0073           to support those use cases.
0074 
0075           Select Y if unsure
0076 
0077 config NVDIMM_DAX
0078         bool "NVDIMM DAX: Raw access to persistent memory"
0079         default LIBNVDIMM
0080         depends on NVDIMM_PFN
0081         help
0082           Support raw device dax access to a persistent memory
0083           namespace.  For environments that want to hard partition
0084           persistent memory, this capability provides a mechanism to
0085           sub-divide a namespace into character devices that can only be
0086           accessed via DAX (mmap(2)).
0087 
0088           Select Y if unsure
0089 
0090 config OF_PMEM
0091         tristate "Device-tree support for persistent memory regions"
0092         depends on OF
0093         default LIBNVDIMM
0094         help
0095           Allows regions of persistent memory to be described in the
0096           device-tree.
0097 
0098           Select Y if unsure.
0099 
0100 config NVDIMM_KEYS
0101         def_bool y
0102         depends on ENCRYPTED_KEYS
0103         depends on (LIBNVDIMM=ENCRYPTED_KEYS) || LIBNVDIMM=m
0104 
0105 config NVDIMM_TEST_BUILD
0106         tristate "Build the unit test core"
0107         depends on m
0108         depends on COMPILE_TEST && X86_64
0109         default m if COMPILE_TEST
0110         help
0111           Build the core of the unit test infrastructure. The result of
0112           this build is non-functional for unit test execution, but it
0113           otherwise helps catch build errors induced by changes to the
0114           core devm_memremap_pages() implementation and other
0115           infrastructure.
0116 
0117 endif