diff options
author | Nanyong Sun <sunnanyong@huawei.com> | 2021-04-30 10:28:50 +0200 |
---|---|---|
committer | Palmer Dabbelt <palmerdabbelt@google.com> | 2021-05-22 19:20:02 +0200 |
commit | e88b333142e4aba7410d6d3292ad97b3a8588bfe (patch) | |
tree | 008c1338b23ece27844daf6eff5406b2e759a03d /arch/riscv/mm/tlbflush.c | |
parent | riscv: mm: add param stride for __sbi_tlb_flush_range (diff) | |
download | linux-e88b333142e4aba7410d6d3292ad97b3a8588bfe.tar.xz linux-e88b333142e4aba7410d6d3292ad97b3a8588bfe.zip |
riscv: mm: add THP support on 64-bit
Bring Transparent HugePage support to riscv. A
transparent huge page is always represented as a pmd.
Signed-off-by: Nanyong Sun <sunnanyong@huawei.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv/mm/tlbflush.c')
-rw-r--r-- | arch/riscv/mm/tlbflush.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/riscv/mm/tlbflush.c b/arch/riscv/mm/tlbflush.c index 382781abffd0..fea45af91f53 100644 --- a/arch/riscv/mm/tlbflush.c +++ b/arch/riscv/mm/tlbflush.c @@ -54,3 +54,10 @@ void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, { __sbi_tlb_flush_range(mm_cpumask(vma->vm_mm), start, end - start, PAGE_SIZE); } +#ifdef CONFIG_TRANSPARENT_HUGEPAGE +void flush_pmd_tlb_range(struct vm_area_struct *vma, unsigned long start, + unsigned long end) +{ + __sbi_tlb_flush_range(mm_cpumask(vma->vm_mm), start, end - start, PMD_SIZE); +} +#endif |