From cf6daf24938809ad4777f189a0bce4febb378354 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Mon, 27 Jul 2026 17:31:14 -0700 Subject: [PATCH] mm/hmm: make CONFIG_HMM_MIRROR select CONFIG_MMU_NOTIFIER hmm doesn't currently build well with MMU_NOTIFIER=n: With microblaze https://download.01.org/0day-ci/archive/20260702/202607021433.DYT5fDqE-lkp@intel.com/config (CONFIG_MMU_NOTIFIER=n): mm/hmm.c: In function 'hmm_range_fault_unlocked_timeout': mm/hmm.c:804:25: error: implicit declaration of function 'mmu_interval_read_begin'; did you mean 'mmu_interval_check_retry'? [-Wimplicit-function-declaration] 804 | mmu_interval_read_begin(range->notifier); | ^~~~~~~~~~~~~~~~~~~~~~~ | mmu_interval_check_retry Quoting Stanislav: : Documentation/mm/hmm.rst explicitly states: : : "Address space mirroring's main objective is to allow duplication of a : range of CPU page table into a device page table; HMM helps keep both : synchronized. A device driver that wants to mirror a process address : space must start with the registration of a mmu_interval_notifier" : : I think making CONFIG_HMM_MIRROR dependent on the CONFIG_MMU_NOTIFIER : is the right thing to do. So select MMU_NOTIFIER if hmm.c is to be compiled. Cc: David Hildenbrand Cc: Jason Gunthorpe Cc: Leon Romanovsky Cc: Stanislav Kinsburskii Signed-off-by: Andrew Morton --- mm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/Kconfig b/mm/Kconfig index 0d06e96ff3c9..3185500ce7b7 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -1252,6 +1252,7 @@ config ZONE_DEVICE config HMM_MIRROR bool depends on MMU + select MMU_NOTIFIER config GET_FREE_REGION bool