]> Pileus Git - ~andy/linux/commitdiff
sparc64: Define pte_accessible()
authorDavid S. Miller <davem@davemloft.net>
Wed, 19 Dec 2012 00:06:16 +0000 (16:06 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Dec 2012 00:06:16 +0000 (16:06 -0800)
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>
arch/sparc/include/asm/pgtable_64.h

index 95515f1e7cef7006beb397c8f0e60026b2664290..7870be0f5adc4d922c21874f06af9bedacc2dfd2 100644 (file)
@@ -617,6 +617,12 @@ static inline unsigned long pte_present(pte_t pte)
        return val;
 }
 
+#define pte_accessible pte_accessible
+static inline unsigned long pte_accessible(pte_t a)
+{
+       return pte_val(a) & _PAGE_VALID;
+}
+
 static inline unsigned long pte_special(pte_t pte)
 {
        return pte_val(pte) & _PAGE_SPECIAL;
@@ -802,7 +808,7 @@ static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr,
         * SUN4V NOTE: _PAGE_VALID is the same value in both the SUN4U
         *             and SUN4V pte layout, so this inline test is fine.
         */
-       if (likely(mm != &init_mm) && (pte_val(orig) & _PAGE_VALID))
+       if (likely(mm != &init_mm) && pte_accessible(orig))
                tlb_batch_add(mm, addr, ptep, orig, fullmm);
 }