mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:46:16 +00:00
1b5695b024
The x86 implementation of range-to-target_node lookup (i.e. phys_to_target_node() and memory_add_physaddr_to_nid()) relies on numa_memblks. Since numa_memblks are now part of the generic code, move these functions from x86 to mm/numa_memblks.c and select CONFIG_NUMA_KEEP_MEMINFO when CONFIG_NUMA_MEMBLKS=y for dax and cxl. [rppt@kernel.org: fix build] Link: https://lkml.kernel.org/r/ZtVfSt_zloPdDqVB@kernel.org Link: https://lkml.kernel.org/r/20240807064110.1003856-26-rppt@kernel.org Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Tested-by: Zi Yan <ziy@nvidia.com> # for x86_64 and arm64 Tested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> [arm64 + CXL via QEMU] Reviewed-by: Dan Williams <dan.j.williams@intel.com> Acked-by: David Hildenbrand <david@redhat.com> Cc: Alexander Gordeev <agordeev@linux.ibm.com> Cc: Andreas Larsson <andreas@gaisler.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Borislav Petkov <bp@alien8.de> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: David S. Miller <davem@davemloft.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Heiko Carstens <hca@linux.ibm.com> Cc: Huacai Chen <chenhuacai@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiaxun Yang <jiaxun.yang@flygoat.com> Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Rafael J. Wysocki <rafael@kernel.org> Cc: Rob Herring (Arm) <robh@kernel.org> Cc: Samuel Holland <samuel.holland@sifive.com> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vasily Gorbik <gor@linux.ibm.com> Cc: Will Deacon <will@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
82 lines
2.9 KiB
Plaintext
82 lines
2.9 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
menuconfig DAX
|
|
tristate "DAX: direct access to differentiated memory"
|
|
default m if NVDIMM_DAX
|
|
|
|
if DAX
|
|
|
|
config DEV_DAX
|
|
tristate "Device DAX: direct access mapping device"
|
|
depends on TRANSPARENT_HUGEPAGE
|
|
help
|
|
Support raw access to differentiated (persistence, bandwidth,
|
|
latency...) memory via an mmap(2) capable character
|
|
device. Platform firmware or a device driver may identify a
|
|
platform memory resource that is differentiated from the
|
|
baseline memory pool. Mappings of a /dev/daxX.Y device impose
|
|
restrictions that make the mapping behavior deterministic.
|
|
|
|
config DEV_DAX_PMEM
|
|
tristate "PMEM DAX: direct access to persistent memory"
|
|
depends on LIBNVDIMM && NVDIMM_DAX && DEV_DAX
|
|
default DEV_DAX
|
|
help
|
|
Support raw access to persistent memory. Note that this
|
|
driver consumes memory ranges allocated and exported by the
|
|
libnvdimm sub-system.
|
|
|
|
Say M if unsure
|
|
|
|
config DEV_DAX_HMEM
|
|
tristate "HMEM DAX: direct access to 'specific purpose' memory"
|
|
depends on EFI_SOFT_RESERVE
|
|
select NUMA_KEEP_MEMINFO if NUMA_MEMBLKS
|
|
default DEV_DAX
|
|
help
|
|
EFI 2.8 platforms, and others, may advertise 'specific purpose'
|
|
memory. For example, a high bandwidth memory pool. The
|
|
indication from platform firmware is meant to reserve the
|
|
memory from typical usage by default. This driver creates
|
|
device-dax instances for these memory ranges, and that also
|
|
enables the possibility to assign them to the DEV_DAX_KMEM
|
|
driver to override the reservation and add them to kernel
|
|
"System RAM" pool.
|
|
|
|
Say M if unsure.
|
|
|
|
config DEV_DAX_CXL
|
|
tristate "CXL DAX: direct access to CXL RAM regions"
|
|
depends on CXL_BUS && CXL_REGION && DEV_DAX
|
|
default CXL_REGION && DEV_DAX
|
|
help
|
|
CXL RAM regions are either mapped by platform-firmware
|
|
and published in the initial system-memory map as "System RAM", mapped
|
|
by platform-firmware as "Soft Reserved", or dynamically provisioned
|
|
after boot by the CXL driver. In the latter two cases a device-dax
|
|
instance is created to access that unmapped-by-default address range.
|
|
Per usual it can remain as dedicated access via a device interface, or
|
|
converted to "System RAM" via the dax_kmem facility.
|
|
|
|
config DEV_DAX_HMEM_DEVICES
|
|
depends on DEV_DAX_HMEM && DAX
|
|
def_bool y
|
|
|
|
config DEV_DAX_KMEM
|
|
tristate "KMEM DAX: map dax-devices as System-RAM"
|
|
default DEV_DAX
|
|
depends on DEV_DAX
|
|
depends on MEMORY_HOTPLUG # for add_memory() and friends
|
|
help
|
|
Support access to persistent, or other performance
|
|
differentiated memory as if it were System RAM. This allows
|
|
easier use of persistent memory by unmodified applications, or
|
|
adds core kernel memory services to heterogeneous memory types
|
|
(HMEM) marked "reserved" by platform firmware.
|
|
|
|
To use this feature, a DAX device must be unbound from the
|
|
device_dax driver and bound to this kmem driver on each boot.
|
|
|
|
Say N if unsure.
|
|
|
|
endif
|