aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/asm-x86/paravirt.h50
1 files changed, 28 insertions, 22 deletions
diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h
index b7342efab834..eac25b5323a2 100644
--- a/include/asm-x86/paravirt.h
+++ b/include/asm-x86/paravirt.h
@@ -950,16 +950,38 @@ static inline pteval_t pte_val(pte_t pte)
950 return ret; 950 return ret;
951} 951}
952 952
953#ifdef CONFIG_X86_PAE 953static inline pgd_t __pgd(pgdval_t val)
954static inline pmd_t __pmd(unsigned long long val)
955{ 954{
956 return (pmd_t) { PVOP_CALL2(unsigned long long, pv_mmu_ops.make_pmd, 955 pgdval_t ret;
957 val, val >> 32) }; 956
957 if (sizeof(pgdval_t) > sizeof(long))
958 ret = PVOP_CALL2(pgdval_t, pv_mmu_ops.make_pgd,
959 val, (u64)val >> 32);
960 else
961 ret = PVOP_CALL1(pgdval_t, pv_mmu_ops.make_pgd,
962 val);
963
964 return (pgd_t) { ret };
965}
966
967static inline pgdval_t pgd_val(pgd_t pgd)
968{
969 pgdval_t ret;
970
971 if (sizeof(pgdval_t) > sizeof(long))
972 ret = PVOP_CALL2(pgdval_t, pv_mmu_ops.pgd_val,
973 pgd.pgd, (u64)pgd.pgd >> 32);
974 else
975 ret = PVOP_CALL1(pgdval_t, pv_mmu_ops.pgd_val,
976 pgd.pgd);
977
978 return ret;
958} 979}
959 980
960static inline pgd_t __pgd(unsigned long long val) 981#ifdef CONFIG_X86_PAE
982static inline pmd_t __pmd(unsigned long long val)
961{ 983{
962 return (pgd_t) { PVOP_CALL2(unsigned long long, pv_mmu_ops.make_pgd, 984 return (pmd_t) { PVOP_CALL2(unsigned long long, pv_mmu_ops.make_pmd,
963 val, val >> 32) }; 985 val, val >> 32) };
964} 986}
965 987
@@ -969,12 +991,6 @@ static inline unsigned long long pmd_val(pmd_t x)
969 x.pmd, x.pmd >> 32); 991 x.pmd, x.pmd >> 32);
970} 992}
971 993
972static inline unsigned long long pgd_val(pgd_t x)
973{
974 return PVOP_CALL2(unsigned long long, pv_mmu_ops.pgd_val,
975 x.pgd, x.pgd >> 32);
976}
977
978static inline void set_pte(pte_t *ptep, pte_t pteval) 994static inline void set_pte(pte_t *ptep, pte_t pteval)
979{ 995{
980 PVOP_VCALL3(pv_mmu_ops.set_pte, ptep, pteval.pte_low, pteval.pte_high); 996 PVOP_VCALL3(pv_mmu_ops.set_pte, ptep, pteval.pte_low, pteval.pte_high);
@@ -1024,16 +1040,6 @@ static inline void pmd_clear(pmd_t *pmdp)
1024 1040
1025#else /* !CONFIG_X86_PAE */ 1041#else /* !CONFIG_X86_PAE */
1026 1042
1027static inline pgd_t __pgd(unsigned long val)
1028{
1029 return (pgd_t) { PVOP_CALL1(unsigned long, pv_mmu_ops.make_pgd, val) };
1030}
1031
1032static inline unsigned long pgd_val(pgd_t x)
1033{
1034 return PVOP_CALL1(unsigned long, pv_mmu_ops.pgd_val, x.pgd);
1035}
1036
1037static inline void set_pte(pte_t *ptep, pte_t pteval) 1043static inline void set_pte(pte_t *ptep, pte_t pteval)
1038{ 1044{
1039 PVOP_VCALL2(pv_mmu_ops.set_pte, ptep, pteval.pte_low); 1045 PVOP_VCALL2(pv_mmu_ops.set_pte, ptep, pteval.pte_low);