1 #ifndef __ASM_ARM_FLUSHTLB_H__ 2 #define __ASM_ARM_FLUSHTLB_H__ 3 4 #include <xen/cpumask.h> 5 6 /* 7 * Filter the given set of CPUs, removing those that definitely flushed their 8 * TLB since @page_timestamp. 9 */ 10 /* XXX lazy implementation just doesn't clear anything.... */ tlbflush_filter(cpumask_t * mask,uint32_t page_timestamp)11static inline void tlbflush_filter(cpumask_t *mask, uint32_t page_timestamp) {} 12 13 #define tlbflush_current_time() (0) 14 page_set_tlbflush_timestamp(struct page_info * page)15static inline void page_set_tlbflush_timestamp(struct page_info *page) 16 { 17 page->tlbflush_timestamp = tlbflush_current_time(); 18 } 19 20 #if defined(CONFIG_ARM_32) 21 # include <asm/arm32/flushtlb.h> 22 #elif defined(CONFIG_ARM_64) 23 # include <asm/arm64/flushtlb.h> 24 #else 25 # error "unknown ARM variant" 26 #endif 27 28 /* Flush specified CPUs' TLBs */ 29 void arch_flush_tlb_mask(const cpumask_t *mask); 30 31 /* 32 * Flush a range of VA's hypervisor mappings from the TLB of the local 33 * processor. 34 */ flush_xen_tlb_range_va_local(vaddr_t va,unsigned long size)35static inline void flush_xen_tlb_range_va_local(vaddr_t va, 36 unsigned long size) 37 { 38 vaddr_t end = va + size; 39 40 dsb(sy); /* Ensure preceding are visible */ 41 while ( va < end ) 42 { 43 __flush_xen_tlb_one_local(va); 44 va += PAGE_SIZE; 45 } 46 dsb(sy); /* Ensure completion of the TLB flush */ 47 isb(); 48 } 49 50 /* 51 * Flush a range of VA's hypervisor mappings from the TLB of all 52 * processors in the inner-shareable domain. 53 */ flush_xen_tlb_range_va(vaddr_t va,unsigned long size)54static inline void flush_xen_tlb_range_va(vaddr_t va, 55 unsigned long size) 56 { 57 vaddr_t end = va + size; 58 59 dsb(sy); /* Ensure preceding are visible */ 60 while ( va < end ) 61 { 62 __flush_xen_tlb_one(va); 63 va += PAGE_SIZE; 64 } 65 dsb(sy); /* Ensure completion of the TLB flush */ 66 isb(); 67 } 68 69 #endif /* __ASM_ARM_FLUSHTLB_H__ */ 70 /* 71 * Local variables: 72 * mode: C 73 * c-file-style: "BSD" 74 * c-basic-offset: 4 75 * indent-tabs-mode: nil 76 * End: 77 */ 78