From: Jeremy Fitzhardinge Date: Wed, 30 Jan 2008 12:33:15 +0000 (+0100) Subject: x86/paravirt: make set_pud operation common X-Git-Tag: v2.6.25-rc1~1143^2~268 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28c6075c72a312986f6d7802005251bdb91ca80c;p=linux-2.6 x86/paravirt: make set_pud operation common Remove duplicate set_pud()s. Signed-off-by: Jeremy Fitzhardinge Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h index d9957ece49..c56b17a5eb 100644 --- a/include/asm-x86/paravirt.h +++ b/include/asm-x86/paravirt.h @@ -1086,17 +1086,19 @@ static inline pmdval_t pmd_val(pmd_t pmd) return ret; } -#endif /* PAGETABLE_LEVELS >= 3 */ - -#ifdef CONFIG_X86_PAE -static inline void set_pud(pud_t *pudp, pud_t pudval) +static inline void set_pud(pud_t *pudp, pud_t pud) { - PVOP_VCALL3(pv_mmu_ops.set_pud, pudp, - pudval.pgd.pgd, pudval.pgd.pgd >> 32); -} + pudval_t val = native_pud_val(pud); -#endif /* CONFIG_X86_PAE */ + if (sizeof(pudval_t) > sizeof(long)) + PVOP_VCALL3(pv_mmu_ops.set_pud, pudp, + val, (u64)val >> 32); + else + PVOP_VCALL2(pv_mmu_ops.set_pud, pudp, + val); +} +#endif /* PAGETABLE_LEVELS >= 3 */ /* Lazy mode for batching updates / context switch */ enum paravirt_lazy_mode {