aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2009-01-22 17:24:16 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-22 17:35:20 -0500
commitab897d2013128f470240a541b31cf5e636984e71 (patch)
tree844ade53ec6d74f84631cac2fe8975738022929f
parentf3b8436ad9a8ad36b3c9fa1fe030c7f38e5d3d0b (diff)
x86/pvops: remove pte_flags pvop
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>
-rw-r--r--arch/x86/include/asm/page.h3
-rw-r--r--arch/x86/include/asm/paravirt.h18
-rw-r--r--arch/x86/kernel/paravirt.c1
-rw-r--r--arch/x86/xen/enlighten.c1
4 files changed, 1 insertions, 22 deletions
diff --git a/arch/x86/include/asm/page.h b/arch/x86/include/asm/page.h
index e9873a2e8695..6b9810859daf 100644
--- a/arch/x86/include/asm/page.h
+++ b/arch/x86/include/asm/page.h
@@ -147,7 +147,7 @@ static inline pteval_t native_pte_val(pte_t pte)
147 return pte.pte; 147 return pte.pte;
148} 148}
149 149
150static inline pteval_t native_pte_flags(pte_t pte) 150static inline pteval_t pte_flags(pte_t pte)
151{ 151{
152 return native_pte_val(pte) & PTE_FLAGS_MASK; 152 return native_pte_val(pte) & PTE_FLAGS_MASK;
153} 153}
@@ -173,7 +173,6 @@ static inline pteval_t native_pte_flags(pte_t pte)
173#endif 173#endif
174 174
175#define pte_val(x) native_pte_val(x) 175#define pte_val(x) native_pte_val(x)
176#define pte_flags(x) native_pte_flags(x)
177#define __pte(x) native_make_pte(x) 176#define __pte(x) native_make_pte(x)
178 177
179#endif /* CONFIG_PARAVIRT */ 178#endif /* CONFIG_PARAVIRT */
diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
index ba3e2ff6aedc..e25c410f3d8c 100644
--- a/arch/x86/include/asm/paravirt.h
+++ b/arch/x86/include/asm/paravirt.h
@@ -279,7 +279,6 @@ struct pv_mmu_ops {
279 pte_t *ptep, pte_t pte); 279 pte_t *ptep, pte_t pte);
280 280
281 pteval_t (*pte_val)(pte_t); 281 pteval_t (*pte_val)(pte_t);
282 pteval_t (*pte_flags)(pte_t);
283 pte_t (*make_pte)(pteval_t pte); 282 pte_t (*make_pte)(pteval_t pte);
284 283
285 pgdval_t (*pgd_val)(pgd_t); 284 pgdval_t (*pgd_val)(pgd_t);
@@ -1084,23 +1083,6 @@ static inline pteval_t pte_val(pte_t pte)
1084 return ret; 1083 return ret;
1085} 1084}
1086 1085
1087static inline pteval_t pte_flags(pte_t pte)
1088{
1089 pteval_t ret;
1090
1091 if (sizeof(pteval_t) > sizeof(long))
1092 ret = PVOP_CALL2(pteval_t, pv_mmu_ops.pte_flags,
1093 pte.pte, (u64)pte.pte >> 32);
1094 else
1095 ret = PVOP_CALL1(pteval_t, pv_mmu_ops.pte_flags,
1096 pte.pte);
1097
1098#ifdef CONFIG_PARAVIRT_DEBUG
1099 BUG_ON(ret & PTE_PFN_MASK);
1100#endif
1101 return ret;
1102}
1103
1104static inline pgd_t __pgd(pgdval_t val) 1086static inline pgd_t __pgd(pgdval_t val)
1105{ 1087{
1106 pgdval_t ret; 1088 pgdval_t ret;
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
index e4c8fb608873..202514be5923 100644
--- a/arch/x86/kernel/paravirt.c
+++ b/arch/x86/kernel/paravirt.c
@@ -435,7 +435,6 @@ struct pv_mmu_ops pv_mmu_ops = {
435#endif /* PAGETABLE_LEVELS >= 3 */ 435#endif /* PAGETABLE_LEVELS >= 3 */
436 436
437 .pte_val = native_pte_val, 437 .pte_val = native_pte_val,
438 .pte_flags = native_pte_flags,
439 .pgd_val = native_pgd_val, 438 .pgd_val = native_pgd_val,
440 439
441 .make_pte = native_make_pte, 440 .make_pte = native_make_pte,
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index bea215230b20..6f1bb71aa13a 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1314,7 +1314,6 @@ static const struct pv_mmu_ops xen_mmu_ops __initdata = {
1314 .ptep_modify_prot_commit = __ptep_modify_prot_commit, 1314 .ptep_modify_prot_commit = __ptep_modify_prot_commit,
1315 1315
1316 .pte_val = xen_pte_val, 1316 .pte_val = xen_pte_val,
1317 .pte_flags = native_pte_flags,
1318 .pgd_val = xen_pgd_val, 1317 .pgd_val = xen_pgd_val,
1319 1318
1320 .make_pte = xen_make_pte, 1319 .make_pte = xen_make_pte,