提交 301d5bbb 编写于 作者: D David S. Miller

sparc32: Un-btfixup more PTE constants and PTE ops.

pte_{filei,wrprotecti,mkcleani,mkoldi}
pte_{mkwrite,mkdirty,mkyoung}
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f755f77a
...@@ -225,12 +225,9 @@ static inline int pte_young(pte_t pte) ...@@ -225,12 +225,9 @@ static inline int pte_young(pte_t pte)
/* /*
* The following only work if pte_present() is not true. * The following only work if pte_present() is not true.
*/ */
BTFIXUPDEF_HALF(pte_filei)
static int pte_file(pte_t pte) __attribute_const__;
static inline int pte_file(pte_t pte) static inline int pte_file(pte_t pte)
{ {
return pte_val(pte) & BTFIXUP_HALF(pte_filei); return pte_val(pte) & SRMMU_FILE;
} }
static inline int pte_special(pte_t pte) static inline int pte_special(pte_t pte)
...@@ -238,37 +235,35 @@ static inline int pte_special(pte_t pte) ...@@ -238,37 +235,35 @@ static inline int pte_special(pte_t pte)
return 0; return 0;
} }
/*
*/
BTFIXUPDEF_HALF(pte_wrprotecti)
BTFIXUPDEF_HALF(pte_mkcleani)
BTFIXUPDEF_HALF(pte_mkoldi)
static pte_t pte_wrprotect(pte_t pte) __attribute_const__;
static inline pte_t pte_wrprotect(pte_t pte) static inline pte_t pte_wrprotect(pte_t pte)
{ {
return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_wrprotecti)); return __pte(pte_val(pte) & ~SRMMU_WRITE);
} }
static pte_t pte_mkclean(pte_t pte) __attribute_const__;
static inline pte_t pte_mkclean(pte_t pte) static inline pte_t pte_mkclean(pte_t pte)
{ {
return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkcleani)); return __pte(pte_val(pte) & ~SRMMU_DIRTY);
} }
static pte_t pte_mkold(pte_t pte) __attribute_const__;
static inline pte_t pte_mkold(pte_t pte) static inline pte_t pte_mkold(pte_t pte)
{ {
return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkoldi)); return __pte(pte_val(pte) & ~SRMMU_REF);
} }
BTFIXUPDEF_CALL_CONST(pte_t, pte_mkwrite, pte_t) static inline pte_t pte_mkwrite(pte_t pte)
BTFIXUPDEF_CALL_CONST(pte_t, pte_mkdirty, pte_t) {
BTFIXUPDEF_CALL_CONST(pte_t, pte_mkyoung, pte_t) return __pte(pte_val(pte) | SRMMU_WRITE);
}
#define pte_mkwrite(pte) BTFIXUP_CALL(pte_mkwrite)(pte) static inline pte_t pte_mkdirty(pte_t pte)
#define pte_mkdirty(pte) BTFIXUP_CALL(pte_mkdirty)(pte) {
#define pte_mkyoung(pte) BTFIXUP_CALL(pte_mkyoung)(pte) return __pte(pte_val(pte) | SRMMU_DIRTY);
}
static inline pte_t pte_mkyoung(pte_t pte)
{
return __pte(pte_val(pte) | SRMMU_REF);
}
#define pte_mkspecial(pte) (pte) #define pte_mkspecial(pte) (pte)
......
...@@ -128,15 +128,6 @@ static inline pte_t srmmu_pte_mkclean(pte_t pte) ...@@ -128,15 +128,6 @@ static inline pte_t srmmu_pte_mkclean(pte_t pte)
static inline pte_t srmmu_pte_mkold(pte_t pte) static inline pte_t srmmu_pte_mkold(pte_t pte)
{ return __pte(pte_val(pte) & ~SRMMU_REF);} { return __pte(pte_val(pte) & ~SRMMU_REF);}
static inline pte_t srmmu_pte_mkwrite(pte_t pte)
{ return __pte(pte_val(pte) | SRMMU_WRITE);}
static inline pte_t srmmu_pte_mkdirty(pte_t pte)
{ return __pte(pte_val(pte) | SRMMU_DIRTY);}
static inline pte_t srmmu_pte_mkyoung(pte_t pte)
{ return __pte(pte_val(pte) | SRMMU_REF);}
/* XXX should we hyper_flush_whole_icache here - Anton */ /* XXX should we hyper_flush_whole_icache here - Anton */
static inline void srmmu_ctxd_set(ctxd_t *ctxp, pgd_t *pgdp) static inline void srmmu_ctxd_set(ctxd_t *ctxp, pgd_t *pgdp)
{ set_pte((pte_t *)ctxp, (SRMMU_ET_PTD | (__nocache_pa((unsigned long) pgdp) >> 4))); } { set_pte((pte_t *)ctxp, (SRMMU_ET_PTD | (__nocache_pa((unsigned long) pgdp) >> 4))); }
...@@ -2073,13 +2064,6 @@ void __init load_mmu(void) ...@@ -2073,13 +2064,6 @@ void __init load_mmu(void)
BTFIXUPSET_CALL(free_pgd_fast, srmmu_free_pgd_fast, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(free_pgd_fast, srmmu_free_pgd_fast, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(get_pgd_fast, srmmu_get_pgd_fast, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(get_pgd_fast, srmmu_get_pgd_fast, BTFIXUPCALL_NORM);
BTFIXUPSET_HALF(pte_filei, SRMMU_FILE);
BTFIXUPSET_HALF(pte_wrprotecti, SRMMU_WRITE);
BTFIXUPSET_HALF(pte_mkcleani, SRMMU_DIRTY);
BTFIXUPSET_HALF(pte_mkoldi, SRMMU_REF);
BTFIXUPSET_CALL(pte_mkwrite, srmmu_pte_mkwrite, BTFIXUPCALL_ORINT(SRMMU_WRITE));
BTFIXUPSET_CALL(pte_mkdirty, srmmu_pte_mkdirty, BTFIXUPCALL_ORINT(SRMMU_DIRTY));
BTFIXUPSET_CALL(pte_mkyoung, srmmu_pte_mkyoung, BTFIXUPCALL_ORINT(SRMMU_REF));
BTFIXUPSET_CALL(update_mmu_cache, srmmu_update_mmu_cache, BTFIXUPCALL_NOP); BTFIXUPSET_CALL(update_mmu_cache, srmmu_update_mmu_cache, BTFIXUPCALL_NOP);
BTFIXUPSET_CALL(destroy_context, srmmu_destroy_context, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(destroy_context, srmmu_destroy_context, BTFIXUPCALL_NORM);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册