18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
28c2ecf20Sopenharmony_ciconfig DAX_DRIVER
38c2ecf20Sopenharmony_ci	select DAX
48c2ecf20Sopenharmony_ci	bool
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_cimenuconfig DAX
78c2ecf20Sopenharmony_ci	tristate "DAX: direct access to differentiated memory"
88c2ecf20Sopenharmony_ci	select SRCU
98c2ecf20Sopenharmony_ci	default m if NVDIMM_DAX
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ciif DAX
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ciconfig DEV_DAX
148c2ecf20Sopenharmony_ci	tristate "Device DAX: direct access mapping device"
158c2ecf20Sopenharmony_ci	depends on TRANSPARENT_HUGEPAGE
168c2ecf20Sopenharmony_ci	help
178c2ecf20Sopenharmony_ci	  Support raw access to differentiated (persistence, bandwidth,
188c2ecf20Sopenharmony_ci	  latency...) memory via an mmap(2) capable character
198c2ecf20Sopenharmony_ci	  device.  Platform firmware or a device driver may identify a
208c2ecf20Sopenharmony_ci	  platform memory resource that is differentiated from the
218c2ecf20Sopenharmony_ci	  baseline memory pool.  Mappings of a /dev/daxX.Y device impose
228c2ecf20Sopenharmony_ci	  restrictions that make the mapping behavior deterministic.
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ciconfig DEV_DAX_PMEM
258c2ecf20Sopenharmony_ci	tristate "PMEM DAX: direct access to persistent memory"
268c2ecf20Sopenharmony_ci	depends on LIBNVDIMM && NVDIMM_DAX && DEV_DAX
278c2ecf20Sopenharmony_ci	default DEV_DAX
288c2ecf20Sopenharmony_ci	help
298c2ecf20Sopenharmony_ci	  Support raw access to persistent memory.  Note that this
308c2ecf20Sopenharmony_ci	  driver consumes memory ranges allocated and exported by the
318c2ecf20Sopenharmony_ci	  libnvdimm sub-system.
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci	  Say M if unsure
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ciconfig DEV_DAX_HMEM
368c2ecf20Sopenharmony_ci	tristate "HMEM DAX: direct access to 'specific purpose' memory"
378c2ecf20Sopenharmony_ci	depends on EFI_SOFT_RESERVE
388c2ecf20Sopenharmony_ci	select NUMA_KEEP_MEMINFO if (NUMA && X86)
398c2ecf20Sopenharmony_ci	default DEV_DAX
408c2ecf20Sopenharmony_ci	help
418c2ecf20Sopenharmony_ci	  EFI 2.8 platforms, and others, may advertise 'specific purpose'
428c2ecf20Sopenharmony_ci	  memory. For example, a high bandwidth memory pool. The
438c2ecf20Sopenharmony_ci	  indication from platform firmware is meant to reserve the
448c2ecf20Sopenharmony_ci	  memory from typical usage by default. This driver creates
458c2ecf20Sopenharmony_ci	  device-dax instances for these memory ranges, and that also
468c2ecf20Sopenharmony_ci	  enables the possibility to assign them to the DEV_DAX_KMEM
478c2ecf20Sopenharmony_ci	  driver to override the reservation and add them to kernel
488c2ecf20Sopenharmony_ci	  "System RAM" pool.
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ci	  Say M if unsure.
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ciconfig DEV_DAX_HMEM_DEVICES
538c2ecf20Sopenharmony_ci	depends on DEV_DAX_HMEM && DAX=y
548c2ecf20Sopenharmony_ci	def_bool y
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ciconfig DEV_DAX_KMEM
578c2ecf20Sopenharmony_ci	tristate "KMEM DAX: volatile-use of persistent memory"
588c2ecf20Sopenharmony_ci	default DEV_DAX
598c2ecf20Sopenharmony_ci	depends on DEV_DAX
608c2ecf20Sopenharmony_ci	depends on MEMORY_HOTPLUG # for add_memory() and friends
618c2ecf20Sopenharmony_ci	help
628c2ecf20Sopenharmony_ci	  Support access to persistent, or other performance
638c2ecf20Sopenharmony_ci	  differentiated memory as if it were System RAM. This allows
648c2ecf20Sopenharmony_ci	  easier use of persistent memory by unmodified applications, or
658c2ecf20Sopenharmony_ci	  adds core kernel memory services to heterogeneous memory types
668c2ecf20Sopenharmony_ci	  (HMEM) marked "reserved" by platform firmware.
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_ci	  To use this feature, a DAX device must be unbound from the
698c2ecf20Sopenharmony_ci	  device_dax driver and bound to this kmem driver on each boot.
708c2ecf20Sopenharmony_ci
718c2ecf20Sopenharmony_ci	  Say N if unsure.
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_ciconfig DEV_DAX_PMEM_COMPAT
748c2ecf20Sopenharmony_ci	tristate "PMEM DAX: support the deprecated /sys/class/dax interface"
758c2ecf20Sopenharmony_ci	depends on m && DEV_DAX_PMEM=m
768c2ecf20Sopenharmony_ci	default DEV_DAX_PMEM
778c2ecf20Sopenharmony_ci	help
788c2ecf20Sopenharmony_ci	  Older versions of the libdaxctl library expect to find all
798c2ecf20Sopenharmony_ci	  device-dax instances under /sys/class/dax. If libdaxctl in
808c2ecf20Sopenharmony_ci	  your distribution is older than v58 say M, otherwise say N.
818c2ecf20Sopenharmony_ci
828c2ecf20Sopenharmony_ciendif
83