diff --git a/mm/ksm.c b/mm/ksm.c index 25b8362a4f89537abe7c03156d7407d9a18383c1..582c02058baf94e30c511b1faf9d4130aa4de6fe 100644 --- a/mm/ksm.c +++ b/mm/ksm.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include "internal.h" @@ -2454,6 +2455,11 @@ int ksm_madvise(struct vm_area_struct *vma, unsigned long start, if (vma_is_dax(vma)) return 0; +#ifdef CONFIG_COHERENT_DEVICE + if (is_cdm_vma(vma)) + return 0; +#endif + #ifdef VM_SAO if (*vm_flags & VM_SAO) return 0;