aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-05-12 16:54:58 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-12 16:54:58 -0400
commit301d5bbb52e076caf0ee5abf68652a50168dc732 (patch)
tree8492ee641766b8af245dc1b22a404a8c5518acf3 /arch/sparc/include
parentf755f77a3a8ca03102d09e7f8bd84e020a6eeda4 (diff)
sparc32: Un-btfixup more PTE constants and PTE ops.
pte_{filei,wrprotecti,mkcleani,mkoldi} pte_{mkwrite,mkdirty,mkyoung} Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include')
-rw-r--r--arch/sparc/include/asm/pgtable_32.h39
1 files changed, 17 insertions, 22 deletions
diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h
index 4b46396ae4fb..6c823f920a5b 100644
--- a/arch/sparc/include/asm/pgtable_32.h
+++ b/arch/sparc/include/asm/pgtable_32.h
@@ -225,12 +225,9 @@ static inline int pte_young(pte_t pte)
225/* 225/*
226 * The following only work if pte_present() is not true. 226 * The following only work if pte_present() is not true.
227 */ 227 */
228BTFIXUPDEF_HALF(pte_filei)
229
230static int pte_file(pte_t pte) __attribute_const__;
231static inline int pte_file(pte_t pte) 228static inline int pte_file(pte_t pte)
232{ 229{
233 return pte_val(pte) & BTFIXUP_HALF(pte_filei); 230 return pte_val(pte) & SRMMU_FILE;
234} 231}
235 232
236static inline int pte_special(pte_t pte) 233static inline int pte_special(pte_t pte)
@@ -238,37 +235,35 @@ static inline int pte_special(pte_t pte)
238 return 0; 235 return 0;
239} 236}
240 237
241/*
242 */
243BTFIXUPDEF_HALF(pte_wrprotecti)
244BTFIXUPDEF_HALF(pte_mkcleani)
245BTFIXUPDEF_HALF(pte_mkoldi)
246
247static pte_t pte_wrprotect(pte_t pte) __attribute_const__;
248static inline pte_t pte_wrprotect(pte_t pte) 238static inline pte_t pte_wrprotect(pte_t pte)
249{ 239{
250 return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_wrprotecti)); 240 return __pte(pte_val(pte) & ~SRMMU_WRITE);
251} 241}
252 242
253static pte_t pte_mkclean(pte_t pte) __attribute_const__;
254static inline pte_t pte_mkclean(pte_t pte) 243static inline pte_t pte_mkclean(pte_t pte)
255{ 244{
256 return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkcleani)); 245 return __pte(pte_val(pte) & ~SRMMU_DIRTY);
257} 246}
258 247
259static pte_t pte_mkold(pte_t pte) __attribute_const__;
260static inline pte_t pte_mkold(pte_t pte) 248static inline pte_t pte_mkold(pte_t pte)
261{ 249{
262 return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkoldi)); 250 return __pte(pte_val(pte) & ~SRMMU_REF);
263} 251}
264 252
265BTFIXUPDEF_CALL_CONST(pte_t, pte_mkwrite, pte_t) 253static inline pte_t pte_mkwrite(pte_t pte)
266BTFIXUPDEF_CALL_CONST(pte_t, pte_mkdirty, pte_t) 254{
267BTFIXUPDEF_CALL_CONST(pte_t, pte_mkyoung, pte_t) 255 return __pte(pte_val(pte) | SRMMU_WRITE);
256}
268 257
269#define pte_mkwrite(pte) BTFIXUP_CALL(pte_mkwrite)(pte) 258static inline pte_t pte_mkdirty(pte_t pte)
270#define pte_mkdirty(pte) BTFIXUP_CALL(pte_mkdirty)(pte) 259{
271#define pte_mkyoung(pte) BTFIXUP_CALL(pte_mkyoung)(pte) 260 return __pte(pte_val(pte) | SRMMU_DIRTY);
261}
262
263static inline pte_t pte_mkyoung(pte_t pte)
264{
265 return __pte(pte_val(pte) | SRMMU_REF);
266}
272 267
273#define pte_mkspecial(pte) (pte) 268#define pte_mkspecial(pte) (pte)
274 269