aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-i386/tlbflush.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-i386/tlbflush.h')
-rw-r--r--include/asm-i386/tlbflush.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/include/asm-i386/tlbflush.h b/include/asm-i386/tlbflush.h
index 4dd82840d53b..fc525c5cd5a9 100644
--- a/include/asm-i386/tlbflush.h
+++ b/include/asm-i386/tlbflush.h
@@ -79,13 +79,19 @@
79 * - flush_tlb_range(vma, start, end) flushes a range of pages 79 * - flush_tlb_range(vma, start, end) flushes a range of pages
80 * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages 80 * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages
81 * - flush_tlb_pgtables(mm, start, end) flushes a range of page tables 81 * - flush_tlb_pgtables(mm, start, end) flushes a range of page tables
82 * - flush_tlb_others(cpumask, mm, va) flushes a TLBs on other cpus
82 * 83 *
83 * ..but the i386 has somewhat limited tlb flushing capabilities, 84 * ..but the i386 has somewhat limited tlb flushing capabilities,
84 * and page-granular flushes are available only on i486 and up. 85 * and page-granular flushes are available only on i486 and up.
85 */ 86 */
86 87
88#define TLB_FLUSH_ALL 0xffffffff
89
90
87#ifndef CONFIG_SMP 91#ifndef CONFIG_SMP
88 92
93#include <linux/sched.h>
94
89#define flush_tlb() __flush_tlb() 95#define flush_tlb() __flush_tlb()
90#define flush_tlb_all() __flush_tlb_all() 96#define flush_tlb_all() __flush_tlb_all()
91#define local_flush_tlb() __flush_tlb() 97#define local_flush_tlb() __flush_tlb()
@@ -110,7 +116,12 @@ static inline void flush_tlb_range(struct vm_area_struct *vma,
110 __flush_tlb(); 116 __flush_tlb();
111} 117}
112 118
113#else 119static inline void native_flush_tlb_others(const cpumask_t *cpumask,
120 struct mm_struct *mm, unsigned long va)
121{
122}
123
124#else /* SMP */
114 125
115#include <asm/smp.h> 126#include <asm/smp.h>
116 127
@@ -129,6 +140,9 @@ static inline void flush_tlb_range(struct vm_area_struct * vma, unsigned long st
129 flush_tlb_mm(vma->vm_mm); 140 flush_tlb_mm(vma->vm_mm);
130} 141}
131 142
143void native_flush_tlb_others(const cpumask_t *cpumask, struct mm_struct *mm,
144 unsigned long va);
145
132#define TLBSTATE_OK 1 146#define TLBSTATE_OK 1
133#define TLBSTATE_LAZY 2 147#define TLBSTATE_LAZY 2
134 148
@@ -139,8 +153,11 @@ struct tlb_state
139 char __cacheline_padding[L1_CACHE_BYTES-8]; 153 char __cacheline_padding[L1_CACHE_BYTES-8];
140}; 154};
141DECLARE_PER_CPU(struct tlb_state, cpu_tlbstate); 155DECLARE_PER_CPU(struct tlb_state, cpu_tlbstate);
156#endif /* SMP */
142 157
143 158#ifndef CONFIG_PARAVIRT
159#define flush_tlb_others(mask, mm, va) \
160 native_flush_tlb_others(&mask, mm, va)
144#endif 161#endif
145 162
146#define flush_tlb_kernel_range(start, end) flush_tlb_all() 163#define flush_tlb_kernel_range(start, end) flush_tlb_all()