diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-08-20 08:30:02 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-08-31 03:35:45 -0400 |
commit | 030cb6c00d242c20e92a3327d0cac17ce02d0cc3 (patch) | |
tree | f821964ab9ec5b781bf0b9a7831deec04c8f58c8 /arch/x86/xen | |
parent | 6f30c1ac3fcf11e08f00670f293546a112cdf4e3 (diff) |
x86: Move paravirt pagetable_setup to x86_init_ops
Replace more paravirt hackery by proper x86_init_ops.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/xen')
-rw-r--r-- | arch/x86/xen/enlighten.c | 2 | ||||
-rw-r--r-- | arch/x86/xen/mmu.c | 11 | ||||
-rw-r--r-- | arch/x86/xen/mmu.h | 2 |
3 files changed, 9 insertions, 6 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 46e23cde143a..12ea09ec39b5 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -977,7 +977,6 @@ asmlinkage void __init xen_start_kernel(void) | |||
977 | pv_time_ops = xen_time_ops; | 977 | pv_time_ops = xen_time_ops; |
978 | pv_cpu_ops = xen_cpu_ops; | 978 | pv_cpu_ops = xen_cpu_ops; |
979 | pv_apic_ops = xen_apic_ops; | 979 | pv_apic_ops = xen_apic_ops; |
980 | pv_mmu_ops = xen_mmu_ops; | ||
981 | 980 | ||
982 | x86_init.resources.memory_setup = xen_memory_setup; | 981 | x86_init.resources.memory_setup = xen_memory_setup; |
983 | x86_init.oem.arch_setup = xen_arch_setup; | 982 | x86_init.oem.arch_setup = xen_arch_setup; |
@@ -991,6 +990,7 @@ asmlinkage void __init xen_start_kernel(void) | |||
991 | load_percpu_segment(0); | 990 | load_percpu_segment(0); |
992 | #endif | 991 | #endif |
993 | 992 | ||
993 | xen_init_mmu_ops(); | ||
994 | xen_init_irq_ops(); | 994 | xen_init_irq_ops(); |
995 | xen_init_cpuid_mask(); | 995 | xen_init_cpuid_mask(); |
996 | 996 | ||
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 4ceb28581652..dbec51da930e 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -1875,10 +1875,7 @@ static void xen_leave_lazy_mmu(void) | |||
1875 | preempt_enable(); | 1875 | preempt_enable(); |
1876 | } | 1876 | } |
1877 | 1877 | ||
1878 | const struct pv_mmu_ops xen_mmu_ops __initdata = { | 1878 | static const struct pv_mmu_ops xen_mmu_ops __initdata = { |
1879 | .pagetable_setup_start = xen_pagetable_setup_start, | ||
1880 | .pagetable_setup_done = xen_pagetable_setup_done, | ||
1881 | |||
1882 | .read_cr2 = xen_read_cr2, | 1879 | .read_cr2 = xen_read_cr2, |
1883 | .write_cr2 = xen_write_cr2, | 1880 | .write_cr2 = xen_write_cr2, |
1884 | 1881 | ||
@@ -1954,6 +1951,12 @@ const struct pv_mmu_ops xen_mmu_ops __initdata = { | |||
1954 | .set_fixmap = xen_set_fixmap, | 1951 | .set_fixmap = xen_set_fixmap, |
1955 | }; | 1952 | }; |
1956 | 1953 | ||
1954 | void __init xen_init_mmu_ops(void) | ||
1955 | { | ||
1956 | x86_init.paging.pagetable_setup_start = xen_pagetable_setup_start; | ||
1957 | x86_init.paging.pagetable_setup_done = xen_pagetable_setup_done; | ||
1958 | pv_mmu_ops = xen_mmu_ops; | ||
1959 | } | ||
1957 | 1960 | ||
1958 | #ifdef CONFIG_XEN_DEBUG_FS | 1961 | #ifdef CONFIG_XEN_DEBUG_FS |
1959 | 1962 | ||
diff --git a/arch/x86/xen/mmu.h b/arch/x86/xen/mmu.h index da7302624897..5fe6bc7f5ecf 100644 --- a/arch/x86/xen/mmu.h +++ b/arch/x86/xen/mmu.h | |||
@@ -59,5 +59,5 @@ void xen_ptep_modify_prot_commit(struct mm_struct *mm, unsigned long addr, | |||
59 | 59 | ||
60 | unsigned long xen_read_cr2_direct(void); | 60 | unsigned long xen_read_cr2_direct(void); |
61 | 61 | ||
62 | extern const struct pv_mmu_ops xen_mmu_ops; | 62 | extern void xen_init_mmu_ops(void); |
63 | #endif /* _XEN_MMU_H */ | 63 | #endif /* _XEN_MMU_H */ |