aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/pgtable_64.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-12-18 19:06:16 -0500
committerDavid S. Miller <davem@davemloft.net>2012-12-18 19:06:16 -0500
commit4a9d1946b0135b15d901d7e7c9796d36f352aaea (patch)
tree2c5edf477500773fd406ae5622bce07350385aae /arch/sparc/include/asm/pgtable_64.h
parent6cb9c3697585c47977c42c5cc1b9fc49247ac530 (diff)
sparc64: Define pte_accessible()
We can elide flush_tlb_*() calls when _PAGE_VALID is clear as that is the test used to determine whether or not to queue up a TLB flush in set_pte_at(). Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm/pgtable_64.h')
-rw-r--r--arch/sparc/include/asm/pgtable_64.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h
index 95515f1e7cef..7870be0f5adc 100644
--- a/arch/sparc/include/asm/pgtable_64.h
+++ b/arch/sparc/include/asm/pgtable_64.h
@@ -617,6 +617,12 @@ static inline unsigned long pte_present(pte_t pte)
617 return val; 617 return val;
618} 618}
619 619
620#define pte_accessible pte_accessible
621static inline unsigned long pte_accessible(pte_t a)
622{
623 return pte_val(a) & _PAGE_VALID;
624}
625
620static inline unsigned long pte_special(pte_t pte) 626static inline unsigned long pte_special(pte_t pte)
621{ 627{
622 return pte_val(pte) & _PAGE_SPECIAL; 628 return pte_val(pte) & _PAGE_SPECIAL;
@@ -802,7 +808,7 @@ static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr,
802 * SUN4V NOTE: _PAGE_VALID is the same value in both the SUN4U 808 * SUN4V NOTE: _PAGE_VALID is the same value in both the SUN4U
803 * and SUN4V pte layout, so this inline test is fine. 809 * and SUN4V pte layout, so this inline test is fine.
804 */ 810 */
805 if (likely(mm != &init_mm) && (pte_val(orig) & _PAGE_VALID)) 811 if (likely(mm != &init_mm) && pte_accessible(orig))
806 tlb_batch_add(mm, addr, ptep, orig, fullmm); 812 tlb_batch_add(mm, addr, ptep, orig, fullmm);
807} 813}
808 814