This source file includes following definitions.
- local_flush_tlb_all
- local_flush_tlb_page
- flush_tlb_range
- flush_tlb_kernel_range
   1 
   2 
   3 
   4 
   5 
   6 
   7 #ifndef _ASM_RISCV_TLBFLUSH_H
   8 #define _ASM_RISCV_TLBFLUSH_H
   9 
  10 #include <linux/mm_types.h>
  11 #include <asm/smp.h>
  12 
  13 static inline void local_flush_tlb_all(void)
  14 {
  15         __asm__ __volatile__ ("sfence.vma" : : : "memory");
  16 }
  17 
  18 
  19 static inline void local_flush_tlb_page(unsigned long addr)
  20 {
  21         __asm__ __volatile__ ("sfence.vma %0" : : "r" (addr) : "memory");
  22 }
  23 
  24 #ifdef CONFIG_SMP
  25 void flush_tlb_all(void);
  26 void flush_tlb_mm(struct mm_struct *mm);
  27 void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr);
  28 void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
  29                      unsigned long end);
  30 #else 
  31 #define flush_tlb_all() local_flush_tlb_all()
  32 #define flush_tlb_page(vma, addr) local_flush_tlb_page(addr)
  33 
  34 static inline void flush_tlb_range(struct vm_area_struct *vma,
  35                 unsigned long start, unsigned long end)
  36 {
  37         local_flush_tlb_all();
  38 }
  39 
  40 #define flush_tlb_mm(mm) flush_tlb_all()
  41 #endif 
  42 
  43 
  44 static inline void flush_tlb_kernel_range(unsigned long start,
  45         unsigned long end)
  46 {
  47         flush_tlb_all();
  48 }
  49 
  50 #endif