[PATCH v2 1/4] asm/tlbflush: Add flush_tlb_pgtable() for ARM64
From: Chintan Pandya
Date: Thu Mar 15 2018 - 08:45:36 EST
ARM64 MMU implements invalidation of TLB for
intermediate page tables for perticular VA. This
may or may not be available for other arch. So,
provide this API hook only for ARM64, for now.
Signed-off-by: Chintan Pandya <cpandya@xxxxxxxxxxxxxx>
---
arch/arm64/include/asm/tlbflush.h | 5 +++++
include/asm-generic/tlb.h | 6 ++++++
2 files changed, 11 insertions(+)
diff --git a/arch/arm64/include/asm/tlbflush.h b/arch/arm64/include/asm/tlbflush.h
index 9e82dd7..5f656f0 100644
--- a/arch/arm64/include/asm/tlbflush.h
+++ b/arch/arm64/include/asm/tlbflush.h
@@ -209,6 +209,11 @@ static inline void __flush_tlb_pgtable(struct mm_struct *mm,
dsb(ish);
}
+static inline void flush_tlb_pgtable(struct mm_struct *mm,
+ unsigned long uaddr)
+{
+ __flush_tlb_pgtable(mm, uaddr);
+}
#endif
#endif
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h
index faddde4..7832c0a 100644
--- a/include/asm-generic/tlb.h
+++ b/include/asm-generic/tlb.h
@@ -295,4 +295,10 @@ static inline void tlb_remove_check_page_size_change(struct mmu_gather *tlb,
#define tlb_migrate_finish(mm) do {} while (0)
+#ifndef CONFIG_ARM64
+static inline void flush_tlb_pgtable(struct mm_struct *mm,
+ unsigned long uaddr)
+{
+}
+#endif
#endif /* _ASM_GENERIC__TLB_H */
--
Qualcomm India Private Limited, on behalf of Qualcomm Innovation
Center, Inc., is a member of Code Aurora Forum, a Linux Foundation
Collaborative Project