aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/include/asm/pgtable.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h
index 45d7fd5e1466..3aa982b50a10 100644
--- a/arch/mips/include/asm/pgtable.h
+++ b/arch/mips/include/asm/pgtable.h
@@ -116,14 +116,6 @@ do { \
116} while(0) 116} while(0)
117 117
118 118
119#define htw_reset() \
120do { \
121 if (cpu_has_htw) { \
122 htw_stop(); \
123 htw_start(); \
124 } \
125} while(0)
126
127extern void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, 119extern void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep,
128 pte_t pteval); 120 pte_t pteval);
129 121
@@ -155,12 +147,13 @@ static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *pt
155{ 147{
156 pte_t null = __pte(0); 148 pte_t null = __pte(0);
157 149
150 htw_stop();
158 /* Preserve global status for the pair */ 151 /* Preserve global status for the pair */
159 if (ptep_buddy(ptep)->pte_low & _PAGE_GLOBAL) 152 if (ptep_buddy(ptep)->pte_low & _PAGE_GLOBAL)
160 null.pte_low = null.pte_high = _PAGE_GLOBAL; 153 null.pte_low = null.pte_high = _PAGE_GLOBAL;
161 154
162 set_pte_at(mm, addr, ptep, null); 155 set_pte_at(mm, addr, ptep, null);
163 htw_reset(); 156 htw_start();
164} 157}
165#else 158#else
166 159
@@ -190,6 +183,7 @@ static inline void set_pte(pte_t *ptep, pte_t pteval)
190 183
191static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) 184static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
192{ 185{
186 htw_stop();
193#if !defined(CONFIG_CPU_R3000) && !defined(CONFIG_CPU_TX39XX) 187#if !defined(CONFIG_CPU_R3000) && !defined(CONFIG_CPU_TX39XX)
194 /* Preserve global status for the pair */ 188 /* Preserve global status for the pair */
195 if (pte_val(*ptep_buddy(ptep)) & _PAGE_GLOBAL) 189 if (pte_val(*ptep_buddy(ptep)) & _PAGE_GLOBAL)
@@ -197,7 +191,7 @@ static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *pt
197 else 191 else
198#endif 192#endif
199 set_pte_at(mm, addr, ptep, __pte(0)); 193 set_pte_at(mm, addr, ptep, __pte(0));
200 htw_reset(); 194 htw_start();
201} 195}
202#endif 196#endif
203 197