aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/paravirt.h
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-01-30 07:33:15 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:33:15 -0500
commita632da2fc9c1e4e8021c5665fc34201fea485dcf (patch)
tree666058d99a0e63460062b332781fef754b3a89ae /include/asm-x86/paravirt.h
parentef38503e034f82ad16a75a9dfea40ed7adaf00a8 (diff)
x86/paravirt: common implementation for pmd value ops
Remove duplicate __pmd/pmd_val functions. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/paravirt.h')
-rw-r--r--include/asm-x86/paravirt.h33
1 files changed, 26 insertions, 7 deletions
diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h
index eac25b5323a2..3593211e345b 100644
--- a/include/asm-x86/paravirt.h
+++ b/include/asm-x86/paravirt.h
@@ -978,18 +978,37 @@ static inline pgdval_t pgd_val(pgd_t pgd)
978 return ret; 978 return ret;
979} 979}
980 980
981#ifdef CONFIG_X86_PAE 981#if PAGETABLE_LEVELS >= 3
982static inline pmd_t __pmd(unsigned long long val) 982static inline pmd_t __pmd(pmdval_t val)
983{ 983{
984 return (pmd_t) { PVOP_CALL2(unsigned long long, pv_mmu_ops.make_pmd, 984 pmdval_t ret;
985 val, val >> 32) }; 985
986 if (sizeof(pmdval_t) > sizeof(long))
987 ret = PVOP_CALL2(pmdval_t, pv_mmu_ops.make_pmd,
988 val, (u64)val >> 32);
989 else
990 ret = PVOP_CALL1(pmdval_t, pv_mmu_ops.make_pmd,
991 val);
992
993 return (pmd_t) { ret };
986} 994}
987 995
988static inline unsigned long long pmd_val(pmd_t x) 996static inline pmdval_t pmd_val(pmd_t pmd)
989{ 997{
990 return PVOP_CALL2(unsigned long long, pv_mmu_ops.pmd_val, 998 pmdval_t ret;
991 x.pmd, x.pmd >> 32); 999
1000 if (sizeof(pmdval_t) > sizeof(long))
1001 ret = PVOP_CALL2(pmdval_t, pv_mmu_ops.pmd_val,
1002 pmd.pmd, (u64)pmd.pmd >> 32);
1003 else
1004 ret = PVOP_CALL1(pmdval_t, pv_mmu_ops.pmd_val,
1005 pmd.pmd);
1006
1007 return ret;
992} 1008}
1009#endif /* PAGETABLE_LEVELS >= 3 */
1010
1011#ifdef CONFIG_X86_PAE
993 1012
994static inline void set_pte(pte_t *ptep, pte_t pteval) 1013static inline void set_pte(pte_t *ptep, pte_t pteval)
995{ 1014{