virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Glauber de Oliveira Costa <gcosta@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: ehabkost@redhat.com, ak@suse.de,
	virtualization@lists.linux-foundation.org, chrisw@sous-sol.org,
	tglx@linutronix.de, anthony@codemonkey.ws, hpa@zytor.com,
	akpm@linux-foundation.org,
	Glauber de Oliveira Costa <gcosta@redhat.com>,
	mingo@elte.hu, roland@redhat.com
Subject: [PATCH 10/10] change function orders in paravirt.h
Date: Fri, 18 Jan 2008 15:20:25 -0200	[thread overview]
Message-ID: <12006768843721-git-send-email-gcosta@redhat.com> (raw)
In-Reply-To: <12006768793416-git-send-email-gcosta@redhat.com>

__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

  reply	other threads:[~2008-01-18 17:20 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-18 17:20 [PATCH 0/10] Tree fixes for PARAVIRT Glauber de Oliveira Costa
2008-01-18 17:20 ` [PATCH 1/10] add missing parameter for lookup_address Glauber de Oliveira Costa
2008-01-18 17:20   ` [PATCH 2/10] add stringify header Glauber de Oliveira Costa
     [not found]   ` <1200676842822-git-send-email-gcosta@redhat.com>
2008-01-18 17:20     ` [PATCH 3/10] provide a native_init_IRQ function to x86_64 Glauber de Oliveira Costa
     [not found]     ` <12006768473571-git-send-email-gcosta@redhat.com>
2008-01-18 17:20       ` [PATCH 4/10] put generic mm_hooks include into PARAVIRT Glauber de Oliveira Costa
     [not found]       ` <12006768521391-git-send-email-gcosta@redhat.com>
2008-01-18 17:20         ` [PATCH 5/10] puts read and write cr8 into pv_cpu_ops Glauber de Oliveira Costa
2008-01-18 17:20           ` [PATCH 6/10] provide read and write cr8 paravirt hooks Glauber de Oliveira Costa
2008-01-18 17:20             ` [PATCH 7/10] fill pv_cpu_ops structure with cr8 fields Glauber de Oliveira Costa
2008-01-18 17:20               ` [PATCH 8/10] add asm_offset PARAVIRT constants Glauber de Oliveira Costa
2008-01-18 17:20                 ` [PATCH 9/10] provide __parainstructions section Glauber de Oliveira Costa
2008-01-18 17:20                   ` Glauber de Oliveira Costa [this message]
2008-01-18 20:24                     ` [PATCH 10/10] change function orders in paravirt.h Jeremy Fitzhardinge
2008-01-18 20:41                   ` [PATCH 9/10] provide __parainstructions section Sam Ravnborg
     [not found]                   ` <20080118204125.GA20904@uranus.ravnborg.org>
2008-01-18 22:47                     ` Jeremy Fitzhardinge
2008-01-18 20:26   ` [PATCH 1/10] add missing parameter for lookup_address Chris Wright
2008-01-19  1:16     ` Andi Kleen
2008-01-18 20:32 ` [PATCH 0/10] Tree fixes for PARAVIRT Ingo Molnar
     [not found] ` <20080118203259.GA3079@elte.hu>
2008-01-18 21:37   ` Ingo Molnar
     [not found]   ` <20080118213711.GA24979@elte.hu>
2008-01-18 21:54     ` Zachary Amsden
     [not found]     ` <1200693248.21817.157.camel@bodhitayantram.eng.vmware.com>
2008-01-18 22:02       ` Ingo Molnar
2008-01-18 22:31       ` Jeremy Fitzhardinge
     [not found]       ` <20080118220200.GA1071@elte.hu>
2008-01-19  1:24         ` Glauber de Oliveira Costa
     [not found]         ` <5d6222a80801181724p40bdedebgded1d43b052d168e@mail.gmail.com>
2008-01-22 12:20           ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12006768843721-git-send-email-gcosta@redhat.com \
    --to=gcosta@redhat.com \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=anthony@codemonkey.ws \
    --cc=chrisw@sous-sol.org \
    --cc=ehabkost@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=roland@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).