aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGlauber de Oliveira Costa <gcosta@redhat.com>2008-01-30 07:33:19 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:33:19 -0500
commit1fe91514a3dc07ab540bc891589c46aaa47e92f6 (patch)
tree31501aac4221fe8e924819359c53ec76f1a90396 /include
parentfbf519240c840f51e4d4af35c3c19e1df160dc48 (diff)
x86: change function orders in paravirt.h
__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> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/asm-x86/paravirt.h84
1 files changed, 42 insertions, 42 deletions
diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h
index a55f95e921ee..62cecb7778ee 100644
--- a/include/asm-x86/paravirt.h
+++ b/include/asm-x86/paravirt.h
@@ -1025,6 +1025,48 @@ static inline void set_pmd(pmd_t *pmdp, pmd_t pmd)
1025 PVOP_VCALL2(pv_mmu_ops.set_pmd, pmdp, val); 1025 PVOP_VCALL2(pv_mmu_ops.set_pmd, pmdp, val);
1026} 1026}
1027 1027
1028#if PAGETABLE_LEVELS >= 3
1029static inline pmd_t __pmd(pmdval_t val)
1030{
1031 pmdval_t ret;
1032
1033 if (sizeof(pmdval_t) > sizeof(long))
1034 ret = PVOP_CALL2(pmdval_t, pv_mmu_ops.make_pmd,
1035 val, (u64)val >> 32);
1036 else
1037 ret = PVOP_CALL1(pmdval_t, pv_mmu_ops.make_pmd,
1038 val);
1039
1040 return (pmd_t) { ret };
1041}
1042
1043static inline pmdval_t pmd_val(pmd_t pmd)
1044{
1045 pmdval_t ret;
1046
1047 if (sizeof(pmdval_t) > sizeof(long))
1048 ret = PVOP_CALL2(pmdval_t, pv_mmu_ops.pmd_val,
1049 pmd.pmd, (u64)pmd.pmd >> 32);
1050 else
1051 ret = PVOP_CALL1(pmdval_t, pv_mmu_ops.pmd_val,
1052 pmd.pmd);
1053
1054 return ret;
1055}
1056
1057static inline void set_pud(pud_t *pudp, pud_t pud)
1058{
1059 pudval_t val = native_pud_val(pud);
1060
1061 if (sizeof(pudval_t) > sizeof(long))
1062 PVOP_VCALL3(pv_mmu_ops.set_pud, pudp,
1063 val, (u64)val >> 32);
1064 else
1065 PVOP_VCALL2(pv_mmu_ops.set_pud, pudp,
1066 val);
1067}
1068#endif /* PAGETABLE_LEVELS >= 3 */
1069
1028#ifdef CONFIG_X86_PAE 1070#ifdef CONFIG_X86_PAE
1029/* Special-case pte-setting operations for PAE, which can't update a 1071/* Special-case pte-setting operations for PAE, which can't update a
1030 64-bit pte atomically */ 1072 64-bit pte atomically */
@@ -1075,48 +1117,6 @@ static inline void pmd_clear(pmd_t *pmdp)
1075} 1117}
1076#endif /* CONFIG_X86_PAE */ 1118#endif /* CONFIG_X86_PAE */
1077 1119
1078#if PAGETABLE_LEVELS >= 3
1079static inline pmd_t __pmd(pmdval_t val)
1080{
1081 pmdval_t ret;
1082
1083 if (sizeof(pmdval_t) > sizeof(long))
1084 ret = PVOP_CALL2(pmdval_t, pv_mmu_ops.make_pmd,
1085 val, (u64)val >> 32);
1086 else
1087 ret = PVOP_CALL1(pmdval_t, pv_mmu_ops.make_pmd,
1088 val);
1089
1090 return (pmd_t) { ret };
1091}
1092
1093static inline pmdval_t pmd_val(pmd_t pmd)
1094{
1095 pmdval_t ret;
1096
1097 if (sizeof(pmdval_t) > sizeof(long))
1098 ret = PVOP_CALL2(pmdval_t, pv_mmu_ops.pmd_val,
1099 pmd.pmd, (u64)pmd.pmd >> 32);
1100 else
1101 ret = PVOP_CALL1(pmdval_t, pv_mmu_ops.pmd_val,
1102 pmd.pmd);
1103
1104 return ret;
1105}
1106
1107static inline void set_pud(pud_t *pudp, pud_t pud)
1108{
1109 pudval_t val = native_pud_val(pud);
1110
1111 if (sizeof(pudval_t) > sizeof(long))
1112 PVOP_VCALL3(pv_mmu_ops.set_pud, pudp,
1113 val, (u64)val >> 32);
1114 else
1115 PVOP_VCALL2(pv_mmu_ops.set_pud, pudp,
1116 val);
1117}
1118#endif /* PAGETABLE_LEVELS >= 3 */
1119
1120/* Lazy mode for batching updates / context switch */ 1120/* Lazy mode for batching updates / context switch */
1121enum paravirt_lazy_mode { 1121enum paravirt_lazy_mode {
1122 PARAVIRT_LAZY_NONE, 1122 PARAVIRT_LAZY_NONE,