#define tlb_flag(f) ((always_tlb_flags & (f)) || (__tlb_flag & possible_tlb_flags & (f)))
--static inline void flush_tlb_all(void)
++static inline void local_flush_tlb_all(void)
{
const int zero = 0;
const unsigned int __tlb_flag = __cpu_tlb_flags;
asm("mcr%? p15, 0, %0, c8, c5, 0" : : "r" (zero));
}
--static inline void flush_tlb_mm(struct mm_struct *mm)
++static inline void local_flush_tlb_mm(struct mm_struct *mm)
{
const int zero = 0;
const int asid = ASID(mm);
}
static inline void
--flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr)
++local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr)
{
const int zero = 0;
const unsigned int __tlb_flag = __cpu_tlb_flags;
asm("mcr%? p15, 0, %0, c8, c5, 1" : : "r" (uaddr));
}
--static inline void flush_tlb_kernel_page(unsigned long kaddr)
++static inline void local_flush_tlb_kernel_page(unsigned long kaddr)
{
const int zero = 0;
const unsigned int __tlb_flag = __cpu_tlb_flags;
/*
* Convert calls to our calling convention.
*/
--#define flush_tlb_range(vma,start,end) __cpu_flush_user_tlb_range(start,end,vma)
--#define flush_tlb_kernel_range(s,e) __cpu_flush_kern_tlb_range(s,e)
++#define local_flush_tlb_range(vma,start,end) __cpu_flush_user_tlb_range(start,end,vma)
++#define local_flush_tlb_kernel_range(s,e) __cpu_flush_kern_tlb_range(s,e)
++
++#ifndef CONFIG_SMP
++#define flush_tlb_all local_flush_tlb_all
++#define flush_tlb_mm local_flush_tlb_mm
++#define flush_tlb_page local_flush_tlb_page
++#define flush_tlb_kernel_page local_flush_tlb_kernel_page
++#define flush_tlb_range local_flush_tlb_range
++#define flush_tlb_kernel_range local_flush_tlb_kernel_range
++#else
++extern void flush_tlb_all(void);
++extern void flush_tlb_mm(struct mm_struct *mm);
++extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr);
++extern void flush_tlb_kernel_page(unsigned long kaddr);
++extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end);
++extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
++#endif
/*
* if PG_dcache_dirty is set for the page, we need to ensure that any