[PATCH 10/10] change function orders in paravirt.h

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Glauber de Oliveira Costa
Date: Friday, January 18, 2008 - 10:20 am

__pmd, pmd_val and set_pud are used before they are defined (as static)
We move them a little up in the file, so it doesn't happen.

Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
---
 include/asm-x86/paravirt.h |   84 ++++++++++++++++++++++----------------------
 1 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h
index 3e7ca42..12caaf1 100644
--- a/include/asm-x86/paravirt.h
+++ b/include/asm-x86/paravirt.h
@@ -1023,6 +1023,48 @@ static inline void set_pmd(pmd_t *pmdp, pmd_t pmd)
 		PVOP_VCALL2(pv_mmu_ops.set_pmd, pmdp, val);
 }
 
+#if PAGETABLE_LEVELS >= 3
+static inline pmd_t __pmd(pmdval_t val)
+{
+	pmdval_t ret;
+
+	if (sizeof(pmdval_t) > sizeof(long))
+		ret = PVOP_CALL2(pmdval_t, pv_mmu_ops.make_pmd,
+				 val, (u64)val >> 32);
+	else
+		ret = PVOP_CALL1(pmdval_t, pv_mmu_ops.make_pmd,
+				 val);
+
+	return (pmd_t) { ret };
+}
+
+static inline pmdval_t pmd_val(pmd_t pmd)
+{
+	pmdval_t ret;
+
+	if (sizeof(pmdval_t) > sizeof(long))
+		ret =  PVOP_CALL2(pmdval_t, pv_mmu_ops.pmd_val,
+				  pmd.pmd, (u64)pmd.pmd >> 32);
+	else
+		ret =  PVOP_CALL1(pmdval_t, pv_mmu_ops.pmd_val,
+				  pmd.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
 /* Special-case pte-setting operations for PAE, which can't update a
    64-bit pte atomically */
@@ -1073,48 +1115,6 @@ static inline void pmd_clear(pmd_t *pmdp)
 }
 #endif	/* CONFIG_X86_PAE */
 
-#if PAGETABLE_LEVELS >= 3
-static inline pmd_t __pmd(pmdval_t val)
-{
-	pmdval_t ret;
-
-	if (sizeof(pmdval_t) > sizeof(long))
-		ret = PVOP_CALL2(pmdval_t, pv_mmu_ops.make_pmd,
-				 val, (u64)val >> 32);
-	else
-		ret = PVOP_CALL1(pmdval_t, pv_mmu_ops.make_pmd,
-				 val);
-
-	return (pmd_t) { ret };
-}
-
-static inline pmdval_t pmd_val(pmd_t pmd)
-{
-	pmdval_t ret;
-
-	if (sizeof(pmdval_t) > sizeof(long))
-		ret =  PVOP_CALL2(pmdval_t, pv_mmu_ops.pmd_val,
-				  pmd.pmd, (u64)pmd.pmd >> 32);
-	else
-		ret =  PVOP_CALL1(pmdval_t, pv_mmu_ops.pmd_val,
-				  pmd.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 */
-
 /* Lazy mode for batching updates / context switch */
 enum paravirt_lazy_mode {
 	PARAVIRT_LAZY_NONE,
-- 
1.4.4.2

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

Messages in current thread:
[PATCH 0/10] Tree fixes for PARAVIRT, Glauber de Oliveira ..., (Fri Jan 18, 10:20 am)
[PATCH 1/10] add missing parameter for lookup_address, Glauber de Oliveira ..., (Fri Jan 18, 10:20 am)
[PATCH 2/10] add stringify header, Glauber de Oliveira ..., (Fri Jan 18, 10:20 am)
[PATCH 3/10] provide a native_init_IRQ function to x86_64, Glauber de Oliveira ..., (Fri Jan 18, 10:20 am)
[PATCH 4/10] put generic mm_hooks include into PARAVIRT, Glauber de Oliveira ..., (Fri Jan 18, 10:20 am)
[PATCH 5/10] puts read and write cr8 into pv_cpu_ops, Glauber de Oliveira ..., (Fri Jan 18, 10:20 am)
[PATCH 6/10] provide read and write cr8 paravirt hooks, Glauber de Oliveira ..., (Fri Jan 18, 10:20 am)
[PATCH 7/10] fill pv_cpu_ops structure with cr8 fields, Glauber de Oliveira ..., (Fri Jan 18, 10:20 am)
[PATCH 8/10] add asm_offset PARAVIRT constants, Glauber de Oliveira ..., (Fri Jan 18, 10:20 am)
[PATCH 9/10] provide __parainstructions section, Glauber de Oliveira ..., (Fri Jan 18, 10:20 am)
[PATCH 10/10] change function orders in paravirt.h, Glauber de Oliveira ..., (Fri Jan 18, 10:20 am)
Re: [PATCH 10/10] change function orders in paravirt.h, Jeremy Fitzhardinge, (Fri Jan 18, 1:24 pm)
Re: [PATCH 0/10] Tree fixes for PARAVIRT, Ingo Molnar, (Fri Jan 18, 1:32 pm)
Re: [PATCH 9/10] provide __parainstructions section, Sam Ravnborg, (Fri Jan 18, 1:41 pm)
Re: [PATCH 0/10] Tree fixes for PARAVIRT, Ingo Molnar, (Fri Jan 18, 2:37 pm)
Re: [PATCH 0/10] Tree fixes for PARAVIRT, Zachary Amsden, (Fri Jan 18, 2:54 pm)
Re: [PATCH 0/10] Tree fixes for PARAVIRT, Ingo Molnar, (Fri Jan 18, 3:02 pm)
Re: [PATCH 0/10] Tree fixes for PARAVIRT, Jeremy Fitzhardinge, (Fri Jan 18, 3:31 pm)
Re: [PATCH 9/10] provide __parainstructions section, Jeremy Fitzhardinge, (Fri Jan 18, 3:47 pm)
Re: [PATCH] fill in missing pv_mmu_ops entries for PAGETAB ..., Jeremy Fitzhardinge, (Sat Jan 19, 10:05 pm)
Re: [PATCH] fill in missing pv_mmu_ops entries for PAGETAB ..., Eduardo Pereira Habkost, (Mon Jan 21, 1:44 pm)
Re: [PATCH] fill in missing pv_mmu_ops entries for PAGETAB ..., Jeremy Fitzhardinge, (Mon Jan 21, 2:19 pm)
Re: [PATCH] fill in missing pv_mmu_ops entries for PAGETAB ..., Glauber de Oliveira ..., (Mon Jan 28, 3:33 pm)