iommu/sva: include mmu_notifier.h header
PATCH 1/1 iommu/sva: include mmu_notifier.h header
A call to mmu_notifier_arch_invalidate_secondary_tlbs() was introduced in commit e37d5a2d60a3 ("iommu/sva: invalidate stale IOTLB entries for kernel address space") but without explicitly adding its corresponding header file <linux/mmu_notifier.h>. This was evidenced while trying to enable compile testing support for IOMMU_SVA:
config IOMMU_SVA
select IOMMU_MM_DATA
- bool
+ bool "Shared Virtual Addressing" if COMPILE_TEST
The thing is for certain architectures this header file is indirectly included via <asm/tlbflush.h>. However, for others such as 32-bit arm the header is missing and it results in a build failure:
$ make ARCH=arm allmodconfig
[...]
drivers/iommu/iommu-sva.c:340:3: error: call to undeclared function 'mmu_notifier_arch_invalidate_secondary_tlbs' [...]
340 | mmu_notifier_arch_invalidate_secondary_tlbs(iommu_mm->mm, start, end);
| ^Fix this by including the appropriate header file.
--- drivers/iommu/iommu-sva.c | 1 + 1 file changed, 1 insertion(+)
drivers/iommu/iommu-sva.c +1 -0
@@ -3,6 +3,7 @@* Helpers for IOMMU drivers implementing SVA */ #include <linux/mmu_context.h> +#include <linux/mmu_notifier.h> #include <linux/mutex.h> #include <linux/sched/mm.h> #include <linux/iommu.h>
Signature · 1 line
2.52.0.358.g0dd7633a29-goog
Joerg Roedel
maintainerQuoted 10 lines · Carlos Llamas
A call to
mmu_notifier_arch_invalidate_secondary_tlbs()was introduced in commite37d5a2d60a3("iommu/sva: invalidate stale IOTLB entries for kernel address space") but without explicitly adding its corresponding header file <linux/mmu_notifier.h>. This was evidenced while trying to enable compile testing support forIOMMU_SVA:config
IOMMU_SVA
selectIOMMU_MM_DATA
- bool
+ bool "Shared Virtual Addressing" ifCOMPILE_TEST
This patch should be part of a patch-set which does the above. As-is, this does not qualify as a fix or a standalone change.
-Joerg