xref: /OK3568_Linux_fs/kernel/drivers/dax/Kconfig (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0-only
2*4882a593Smuzhiyunconfig DAX_DRIVER
3*4882a593Smuzhiyun	select DAX
4*4882a593Smuzhiyun	bool
5*4882a593Smuzhiyun
6*4882a593Smuzhiyunmenuconfig DAX
7*4882a593Smuzhiyun	tristate "DAX: direct access to differentiated memory"
8*4882a593Smuzhiyun	select SRCU
9*4882a593Smuzhiyun	default m if NVDIMM_DAX
10*4882a593Smuzhiyun
11*4882a593Smuzhiyunif DAX
12*4882a593Smuzhiyun
13*4882a593Smuzhiyunconfig DEV_DAX
14*4882a593Smuzhiyun	tristate "Device DAX: direct access mapping device"
15*4882a593Smuzhiyun	depends on TRANSPARENT_HUGEPAGE
16*4882a593Smuzhiyun	help
17*4882a593Smuzhiyun	  Support raw access to differentiated (persistence, bandwidth,
18*4882a593Smuzhiyun	  latency...) memory via an mmap(2) capable character
19*4882a593Smuzhiyun	  device.  Platform firmware or a device driver may identify a
20*4882a593Smuzhiyun	  platform memory resource that is differentiated from the
21*4882a593Smuzhiyun	  baseline memory pool.  Mappings of a /dev/daxX.Y device impose
22*4882a593Smuzhiyun	  restrictions that make the mapping behavior deterministic.
23*4882a593Smuzhiyun
24*4882a593Smuzhiyunconfig DEV_DAX_PMEM
25*4882a593Smuzhiyun	tristate "PMEM DAX: direct access to persistent memory"
26*4882a593Smuzhiyun	depends on LIBNVDIMM && NVDIMM_DAX && DEV_DAX
27*4882a593Smuzhiyun	default DEV_DAX
28*4882a593Smuzhiyun	help
29*4882a593Smuzhiyun	  Support raw access to persistent memory.  Note that this
30*4882a593Smuzhiyun	  driver consumes memory ranges allocated and exported by the
31*4882a593Smuzhiyun	  libnvdimm sub-system.
32*4882a593Smuzhiyun
33*4882a593Smuzhiyun	  Say M if unsure
34*4882a593Smuzhiyun
35*4882a593Smuzhiyunconfig DEV_DAX_HMEM
36*4882a593Smuzhiyun	tristate "HMEM DAX: direct access to 'specific purpose' memory"
37*4882a593Smuzhiyun	depends on EFI_SOFT_RESERVE
38*4882a593Smuzhiyun	select NUMA_KEEP_MEMINFO if (NUMA && X86)
39*4882a593Smuzhiyun	default DEV_DAX
40*4882a593Smuzhiyun	help
41*4882a593Smuzhiyun	  EFI 2.8 platforms, and others, may advertise 'specific purpose'
42*4882a593Smuzhiyun	  memory. For example, a high bandwidth memory pool. The
43*4882a593Smuzhiyun	  indication from platform firmware is meant to reserve the
44*4882a593Smuzhiyun	  memory from typical usage by default. This driver creates
45*4882a593Smuzhiyun	  device-dax instances for these memory ranges, and that also
46*4882a593Smuzhiyun	  enables the possibility to assign them to the DEV_DAX_KMEM
47*4882a593Smuzhiyun	  driver to override the reservation and add them to kernel
48*4882a593Smuzhiyun	  "System RAM" pool.
49*4882a593Smuzhiyun
50*4882a593Smuzhiyun	  Say M if unsure.
51*4882a593Smuzhiyun
52*4882a593Smuzhiyunconfig DEV_DAX_HMEM_DEVICES
53*4882a593Smuzhiyun	depends on DEV_DAX_HMEM && DAX=y
54*4882a593Smuzhiyun	def_bool y
55*4882a593Smuzhiyun
56*4882a593Smuzhiyunconfig DEV_DAX_KMEM
57*4882a593Smuzhiyun	tristate "KMEM DAX: volatile-use of persistent memory"
58*4882a593Smuzhiyun	default DEV_DAX
59*4882a593Smuzhiyun	depends on DEV_DAX
60*4882a593Smuzhiyun	depends on MEMORY_HOTPLUG # for add_memory() and friends
61*4882a593Smuzhiyun	help
62*4882a593Smuzhiyun	  Support access to persistent, or other performance
63*4882a593Smuzhiyun	  differentiated memory as if it were System RAM. This allows
64*4882a593Smuzhiyun	  easier use of persistent memory by unmodified applications, or
65*4882a593Smuzhiyun	  adds core kernel memory services to heterogeneous memory types
66*4882a593Smuzhiyun	  (HMEM) marked "reserved" by platform firmware.
67*4882a593Smuzhiyun
68*4882a593Smuzhiyun	  To use this feature, a DAX device must be unbound from the
69*4882a593Smuzhiyun	  device_dax driver and bound to this kmem driver on each boot.
70*4882a593Smuzhiyun
71*4882a593Smuzhiyun	  Say N if unsure.
72*4882a593Smuzhiyun
73*4882a593Smuzhiyunconfig DEV_DAX_PMEM_COMPAT
74*4882a593Smuzhiyun	tristate "PMEM DAX: support the deprecated /sys/class/dax interface"
75*4882a593Smuzhiyun	depends on m && DEV_DAX_PMEM=m
76*4882a593Smuzhiyun	default DEV_DAX_PMEM
77*4882a593Smuzhiyun	help
78*4882a593Smuzhiyun	  Older versions of the libdaxctl library expect to find all
79*4882a593Smuzhiyun	  device-dax instances under /sys/class/dax. If libdaxctl in
80*4882a593Smuzhiyun	  your distribution is older than v58 say M, otherwise say N.
81*4882a593Smuzhiyun
82*4882a593Smuzhiyunendif
83