]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - mm/hmm.c
Merge branch 'drm-next-4.15-dc' of git://people.freedesktop.org/~agd5f/linux into...
[mirror_ubuntu-bionic-kernel.git] / mm / hmm.c
index bdb49b836bf22d6de63b5cb8dd89d96b32862e44..a88a847bccba700a1c0f51d0a819dcf365995ed1 100644 (file)
--- a/mm/hmm.c
+++ b/mm/hmm.c
 
 #define PA_SECTION_SIZE (1UL << PA_SECTION_SHIFT)
 
-
+#if defined(CONFIG_DEVICE_PRIVATE) || defined(CONFIG_DEVICE_PUBLIC)
 /*
  * Device private memory see HMM (Documentation/vm/hmm.txt) or hmm.h
  */
 DEFINE_STATIC_KEY_FALSE(device_private_key);
 EXPORT_SYMBOL(device_private_key);
+#endif /* CONFIG_DEVICE_PRIVATE || CONFIG_DEVICE_PUBLIC */
 
 
-#ifdef CONFIG_HMM
+#if IS_ENABLED(CONFIG_HMM_MIRROR)
 static const struct mmu_notifier_ops hmm_mmu_notifier_ops;
 
 /*
@@ -128,9 +129,7 @@ void hmm_mm_destroy(struct mm_struct *mm)
 {
        kfree(mm->hmm);
 }
-#endif /* CONFIG_HMM */
 
-#if IS_ENABLED(CONFIG_HMM_MIRROR)
 static void hmm_invalidate_range(struct hmm *hmm,
                                 enum hmm_update_type action,
                                 unsigned long start,