Skip to content

Commit a7ac1cf

Browse files
Zhenyu Yectmarinas
authored andcommitted
arm64: tlb: Set the TTL field in flush_*_tlb_range
This patch implement flush_{pmd|pud}_tlb_range() in arm64 by calling __flush_tlb_range() with the corresponding stride and tlb_level values. Signed-off-by: Zhenyu Ye <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent c4ab2cb commit a7ac1cf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

arch/arm64/include/asm/pgtable.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@ extern void __pmd_error(const char *file, int line, unsigned long val);
4040
extern void __pud_error(const char *file, int line, unsigned long val);
4141
extern void __pgd_error(const char *file, int line, unsigned long val);
4242

43+
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
44+
#define __HAVE_ARCH_FLUSH_PMD_TLB_RANGE
45+
46+
/* Set stride and tlb_level in flush_*_tlb_range */
47+
#define flush_pmd_tlb_range(vma, addr, end) \
48+
__flush_tlb_range(vma, addr, end, PMD_SIZE, false, 2)
49+
#define flush_pud_tlb_range(vma, addr, end) \
50+
__flush_tlb_range(vma, addr, end, PUD_SIZE, false, 1)
51+
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
52+
4353
/*
4454
* ZERO_PAGE is a global shared page that is always zero: used
4555
* for zero-mapped memory areas etc..

0 commit comments

Comments
 (0)