[PATCH 8 of 8] x86/paravirt: make set_pud operation common

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: LKML <linux-kernel@...>, Andi Kleen <ak@...>, Glauber de Oliveira Costa <glommer@...>, Jan Beulich <jbeulich@...>
Date: Wednesday, January 16, 2008 - 7:27 pm

Remove duplicate set_pud()s.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
---
 include/asm-x86/paravirt.h |   22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h
--- 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;
 }
+
+static inline void set_pud(pud_t *pudp, pud_t pud)
+{
+	pudval_t val = native_pud_val(pud);
+
+	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 */
-
-#ifdef CONFIG_X86_PAE
-
-static inline void set_pud(pud_t *pudp, pud_t pudval)
-{
-	PVOP_VCALL3(pv_mmu_ops.set_pud, pudp,
-		    pudval.pgd.pgd, pudval.pgd.pgd >> 32);
-}
-
-#endif	/* CONFIG_X86_PAE */
 
 /* Lazy mode for batching updates / context switch */
 enum paravirt_lazy_mode {


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0 of 8] x86: refactored paravirt mmu_ops, Jeremy Fitzhardinge, (Wed Jan 16, 7:27 pm)
Re: [PATCH 0 of 8] x86: refactored paravirt mmu_ops, Ingo Molnar, (Thu Jan 17, 3:01 am)
[PATCH 3 of 8] x86/paravirt: common implementation for pte v..., Jeremy Fitzhardinge, (Wed Jan 16, 7:27 pm)
[PATCH 5 of 8] x86/paravirt: common implementation for pmd v..., Jeremy Fitzhardinge, (Wed Jan 16, 7:27 pm)
[PATCH 8 of 8] x86/paravirt: make set_pud operation common, Jeremy Fitzhardinge, (Wed Jan 16, 7:27 pm)
[PATCH 7 of 8] x86/paravirt: make set_pmd operation common, Jeremy Fitzhardinge, (Wed Jan 16, 7:27 pm)
[PATCH 6 of 8] x86/paravirt: make set_pte operations common, Jeremy Fitzhardinge, (Wed Jan 16, 7:27 pm)
[PATCH 4 of 8] x86/paravirt: common implementation for pgd v..., Jeremy Fitzhardinge, (Wed Jan 16, 7:27 pm)
[PATCH 2 of 8] x86/paravirt: rearrange common mmu_ops, Jeremy Fitzhardinge, (Wed Jan 16, 7:27 pm)
[PATCH 1 of 8] add native_pud_val and _pmd_val for 2 and 3 l..., Jeremy Fitzhardinge, (Wed Jan 16, 7:27 pm)