x86/pvops: remove pte_flags pvop
authorJeremy Fitzhardinge <jeremy@goop.org>
Thu, 22 Jan 2009 22:24:16 +0000 (14:24 -0800)
committerIngo Molnar <mingo@elte.hu>
Thu, 22 Jan 2009 22:35:20 +0000 (23:35 +0100)
pte_flags() was introduced as a new pvop in order to extract just the
flags portion of a pte, which is a potentially cheaper operation than
extracting the page number as well.  It turns out this operation is
not needed, because simply using a mask to extract the flags from a
pte is sufficient for all current users.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/include/asm/page.h
arch/x86/include/asm/paravirt.h
arch/x86/kernel/paravirt.c
arch/x86/xen/enlighten.c

index e9873a2e86951d10c7a5576e3b908956d0e3e6f8..6b9810859daf3eb619b12e11f7341c3d753e0483 100644 (file)
@@ -147,7 +147,7 @@ static inline pteval_t native_pte_val(pte_t pte)
        return pte.pte;
 }
 
-static inline pteval_t native_pte_flags(pte_t pte)
+static inline pteval_t pte_flags(pte_t pte)
 {
        return native_pte_val(pte) & PTE_FLAGS_MASK;
 }
@@ -173,7 +173,6 @@ static inline pteval_t native_pte_flags(pte_t pte)
 #endif
 
 #define pte_val(x)     native_pte_val(x)
-#define pte_flags(x)   native_pte_flags(x)
 #define __pte(x)       native_make_pte(x)
 
 #endif /* CONFIG_PARAVIRT */
index ba3e2ff6aedcb1a7c6648acdc9257ad0bb7e3202..e25c410f3d8c54d34a48bf54685838a318624e54 100644 (file)
@@ -279,7 +279,6 @@ struct pv_mmu_ops {
                                        pte_t *ptep, pte_t pte);
 
        pteval_t (*pte_val)(pte_t);
-       pteval_t (*pte_flags)(pte_t);
        pte_t (*make_pte)(pteval_t pte);
 
        pgdval_t (*pgd_val)(pgd_t);
@@ -1084,23 +1083,6 @@ static inline pteval_t pte_val(pte_t pte)
        return ret;
 }
 
-static inline pteval_t pte_flags(pte_t pte)
-{
-       pteval_t ret;
-
-       if (sizeof(pteval_t) > sizeof(long))
-               ret = PVOP_CALL2(pteval_t, pv_mmu_ops.pte_flags,
-                                pte.pte, (u64)pte.pte >> 32);
-       else
-               ret = PVOP_CALL1(pteval_t, pv_mmu_ops.pte_flags,
-                                pte.pte);
-
-#ifdef CONFIG_PARAVIRT_DEBUG
-       BUG_ON(ret & PTE_PFN_MASK);
-#endif
-       return ret;
-}
-
 static inline pgd_t __pgd(pgdval_t val)
 {
        pgdval_t ret;
index e4c8fb608873797c381f825cc874c5a4e0506e1b..202514be592349b7c99f005d4524e139dab20cd6 100644 (file)
@@ -435,7 +435,6 @@ struct pv_mmu_ops pv_mmu_ops = {
 #endif /* PAGETABLE_LEVELS >= 3 */
 
        .pte_val = native_pte_val,
-       .pte_flags = native_pte_flags,
        .pgd_val = native_pgd_val,
 
        .make_pte = native_make_pte,
index bea215230b20cdf4fc41ac5fd4e060dcbaec4ec1..6f1bb71aa13afe544b55d870aa1ea3d7e2f737e5 100644 (file)
@@ -1314,7 +1314,6 @@ static const struct pv_mmu_ops xen_mmu_ops __initdata = {
        .ptep_modify_prot_commit = __ptep_modify_prot_commit,
 
        .pte_val = xen_pte_val,
-       .pte_flags = native_pte_flags,
        .pgd_val = xen_pgd_val,
 
        .make_pte = xen_make_pte,