lkml.org 
[lkml]   [2019]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mm/hmm: kconfig split HMM address space mirroring from device memory
Date
From: Jérôme Glisse <jglisse@redhat.com>

To allow building device driver that only care about address space
mirroring (like RDMA ODP) on platform that do not have all the pre-
requisite for HMM device memory (like ZONE_DEVICE on ARM) split the
HMM_MIRROR option dependency from the HMM_DEVICE dependency.

Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
Cc: Leon Romanovsky <leonro@mellanox.com>
Cc: Jason Gunthorpe <jgg@mellanox.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ralph Campbell <rcampbell@nvidia.com>
Cc: John Hubbard <jhubbard@nvidia.com>
---
mm/Kconfig | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/mm/Kconfig b/mm/Kconfig
index 2e6d24d783f7..00d9febbc775 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -679,12 +679,13 @@ config ZONE_DEVICE
config ARCH_HAS_HMM
bool
default y
- depends on (X86_64 || PPC64)
- depends on ZONE_DEVICE
depends on MMU && 64BIT
- depends on MEMORY_HOTPLUG
- depends on MEMORY_HOTREMOVE
- depends on SPARSEMEM_VMEMMAP
+
+config ARCH_HAS_HMM_DEVICE
+ bool
+ default y
+ depends on (X86_64 || PPC64)
+ depends on ARCH_HAS_ZONE_DEVICE

config MIGRATE_VMA_HELPER
bool
@@ -710,7 +711,8 @@ config HMM_MIRROR

config DEVICE_PRIVATE
bool "Unaddressable device memory (GPU memory, ...)"
- depends on ARCH_HAS_HMM
+ depends on ARCH_HAS_HMM_DEVICE
+ depends on ZONE_DEVICE
select HMM
select DEV_PAGEMAP_OPS

@@ -721,7 +723,8 @@ config DEVICE_PRIVATE

config DEVICE_PUBLIC
bool "Addressable device memory (like GPU memory)"
- depends on ARCH_HAS_HMM
+ depends on ARCH_HAS_HMM_DEVICE
+ depends on ZONE_DEVICE
select HMM
select DEV_PAGEMAP_OPS

--
2.20.1
\
 
 \ /
  Last update: 2019-04-11 20:04    [W:0.076 / U:1.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site