aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen/enlighten.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-08 06:24:29 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-08 06:24:29 -0400
commit6236af82d8a989e150a02800c210eb61cb1e17be (patch)
treed5e83e66b09fc405ac70925f9b83152abaf48a03 /arch/x86/xen/enlighten.c
parente3ae0acf59244ecf5b023ec99cef4b6b29d649bc (diff)
parent8b7ef4ec5b1ac8b6feebf5ae9cda85a7514728f8 (diff)
Merge branch 'x86/fixmap' into x86/devel
Conflicts: arch/x86/mm/init_64.c Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/xen/enlighten.c')
-rw-r--r--arch/x86/xen/enlighten.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index fe60aa9fed0a..316623cf411f 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1013,6 +1013,33 @@ static unsigned xen_patch(u8 type, u16 clobbers, void *insnbuf,
1013 return ret; 1013 return ret;
1014} 1014}
1015 1015
1016static void xen_set_fixmap(unsigned idx, unsigned long phys, pgprot_t prot)
1017{
1018 pte_t pte;
1019
1020 phys >>= PAGE_SHIFT;
1021
1022 switch (idx) {
1023 case FIX_BTMAP_END ... FIX_BTMAP_BEGIN:
1024#ifdef CONFIG_X86_F00F_BUG
1025 case FIX_F00F_IDT:
1026#endif
1027 case FIX_WP_TEST:
1028 case FIX_VDSO:
1029#ifdef CONFIG_X86_LOCAL_APIC
1030 case FIX_APIC_BASE: /* maps dummy local APIC */
1031#endif
1032 pte = pfn_pte(phys, prot);
1033 break;
1034
1035 default:
1036 pte = mfn_pte(phys, prot);
1037 break;
1038 }
1039
1040 __native_set_fixmap(idx, pte);
1041}
1042
1016static const struct pv_info xen_info __initdata = { 1043static const struct pv_info xen_info __initdata = {
1017 .paravirt_enabled = 1, 1044 .paravirt_enabled = 1,
1018 .shared_kernel_pmd = 0, 1045 .shared_kernel_pmd = 0,
@@ -1167,6 +1194,8 @@ static const struct pv_mmu_ops xen_mmu_ops __initdata = {
1167 .enter = paravirt_enter_lazy_mmu, 1194 .enter = paravirt_enter_lazy_mmu,
1168 .leave = xen_leave_lazy, 1195 .leave = xen_leave_lazy,
1169 }, 1196 },
1197
1198 .set_fixmap = xen_set_fixmap,
1170}; 1199};
1171 1200
1172#ifdef CONFIG_SMP 1201#ifdef CONFIG_SMP