aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAttilio Rao <attilio.rao@citrix.com>2012-08-21 16:22:40 -0400
committerThomas Gleixner <tglx@linutronix.de>2012-09-12 09:33:06 -0400
commitc711288727a62f74d48032e56e51333dd104bf58 (patch)
treecd1bda716eb85172410e80d71844abaa61f49f67 /arch
parent843b8ed2ec598aae5e3516b21957ede62a070e36 (diff)
x86: xen: Cleanup and remove x86_init.paging.pagetable_setup_done()
At this stage x86_init.paging.pagetable_setup_done is only used in the XEN case. Move its content in the x86_init.paging.pagetable_init setup function and remove the now unused x86_init.paging.pagetable_setup_done remaining infrastructure. Signed-off-by: Attilio Rao <attilio.rao@citrix.com> Acked-by: <konrad.wilk@oracle.com> Cc: <Ian.Campbell@citrix.com> Cc: <Stefano.Stabellini@eu.citrix.com> Cc: <xen-devel@lists.xensource.com> Link: http://lkml.kernel.org/r/1345580561-8506-5-git-send-email-attilio.rao@citrix.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/include/asm/pgtable_types.h2
-rw-r--r--arch/x86/include/asm/x86_init.h2
-rw-r--r--arch/x86/kernel/setup.c1
-rw-r--r--arch/x86/kernel/x86_init.c2
-rw-r--r--arch/x86/mm/init_32.c4
-rw-r--r--arch/x86/xen/mmu.c13
6 files changed, 4 insertions, 20 deletions
diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h
index c93cb8eec7cc..db8fec6d2953 100644
--- a/arch/x86/include/asm/pgtable_types.h
+++ b/arch/x86/include/asm/pgtable_types.h
@@ -304,10 +304,8 @@ void set_pte_vaddr(unsigned long vaddr, pte_t pte);
304extern void native_pagetable_reserve(u64 start, u64 end); 304extern void native_pagetable_reserve(u64 start, u64 end);
305#ifdef CONFIG_X86_32 305#ifdef CONFIG_X86_32
306extern void native_pagetable_init(void); 306extern void native_pagetable_init(void);
307extern void native_pagetable_setup_done(pgd_t *base);
308#else 307#else
309#define native_pagetable_init paging_init 308#define native_pagetable_init paging_init
310#define native_pagetable_setup_done x86_init_pgd_done_noop
311#endif 309#endif
312 310
313struct seq_file; 311struct seq_file;
diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h
index 24084b2b3a43..995ea5c3fbf4 100644
--- a/arch/x86/include/asm/x86_init.h
+++ b/arch/x86/include/asm/x86_init.h
@@ -82,11 +82,9 @@ struct x86_init_mapping {
82/** 82/**
83 * struct x86_init_paging - platform specific paging functions 83 * struct x86_init_paging - platform specific paging functions
84 * @pagetable_init: platform specific paging initialization call 84 * @pagetable_init: platform specific paging initialization call
85 * @pagetable_setup_done: platform specific post paging_init() call
86 */ 85 */
87struct x86_init_paging { 86struct x86_init_paging {
88 void (*pagetable_init)(void); 87 void (*pagetable_init)(void);
89 void (*pagetable_setup_done)(pgd_t *base);
90}; 88};
91 89
92/** 90/**
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 315fd24131ed..4f165479c453 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -962,7 +962,6 @@ void __init setup_arch(char **cmdline_p)
962#endif 962#endif
963 963
964 x86_init.paging.pagetable_init(); 964 x86_init.paging.pagetable_init();
965 x86_init.paging.pagetable_setup_done(swapper_pg_dir);
966 965
967 if (boot_cpu_data.cpuid_level >= 0) { 966 if (boot_cpu_data.cpuid_level >= 0) {
968 /* A CPU has %cr4 if and only if it has CPUID */ 967 /* A CPU has %cr4 if and only if it has CPUID */
diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c
index 5f2478fb3d6d..7a3d075a814a 100644
--- a/arch/x86/kernel/x86_init.c
+++ b/arch/x86/kernel/x86_init.c
@@ -26,7 +26,6 @@
26 26
27void __cpuinit x86_init_noop(void) { } 27void __cpuinit x86_init_noop(void) { }
28void __init x86_init_uint_noop(unsigned int unused) { } 28void __init x86_init_uint_noop(unsigned int unused) { }
29void __init x86_init_pgd_done_noop(pgd_t *unused) { }
30int __init iommu_init_noop(void) { return 0; } 29int __init iommu_init_noop(void) { return 0; }
31void iommu_shutdown_noop(void) { } 30void iommu_shutdown_noop(void) { }
32 31
@@ -69,7 +68,6 @@ struct x86_init_ops x86_init __initdata = {
69 68
70 .paging = { 69 .paging = {
71 .pagetable_init = native_pagetable_init, 70 .pagetable_init = native_pagetable_init,
72 .pagetable_setup_done = native_pagetable_setup_done,
73 }, 71 },
74 72
75 .timers = { 73 .timers = {
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index e35b4b17189a..4f04db150027 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -478,10 +478,6 @@ void __init native_pagetable_init(void)
478 paging_init(); 478 paging_init();
479} 479}
480 480
481void __init native_pagetable_setup_done(pgd_t *base)
482{
483}
484
485/* 481/*
486 * Build a proper pagetable for the kernel mappings. Up until this 482 * Build a proper pagetable for the kernel mappings. Up until this
487 * point, we've been running on some set of pagetables constructed by 483 * point, we've been running on some set of pagetables constructed by
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index c2ff7ea37b8c..7a769b7526cb 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -1174,9 +1174,13 @@ static void xen_exit_mmap(struct mm_struct *mm)
1174 spin_unlock(&mm->page_table_lock); 1174 spin_unlock(&mm->page_table_lock);
1175} 1175}
1176 1176
1177static void xen_post_allocator_init(void);
1178
1177static void __init xen_pagetable_init(void) 1179static void __init xen_pagetable_init(void)
1178{ 1180{
1179 paging_init(); 1181 paging_init();
1182 xen_setup_shared_info();
1183 xen_post_allocator_init();
1180} 1184}
1181 1185
1182static __init void xen_mapping_pagetable_reserve(u64 start, u64 end) 1186static __init void xen_mapping_pagetable_reserve(u64 start, u64 end)
@@ -1193,14 +1197,6 @@ static __init void xen_mapping_pagetable_reserve(u64 start, u64 end)
1193 } 1197 }
1194} 1198}
1195 1199
1196static void xen_post_allocator_init(void);
1197
1198static void __init xen_pagetable_setup_done(pgd_t *base)
1199{
1200 xen_setup_shared_info();
1201 xen_post_allocator_init();
1202}
1203
1204static void xen_write_cr2(unsigned long cr2) 1200static void xen_write_cr2(unsigned long cr2)
1205{ 1201{
1206 this_cpu_read(xen_vcpu)->arch.cr2 = cr2; 1202 this_cpu_read(xen_vcpu)->arch.cr2 = cr2;
@@ -2070,7 +2066,6 @@ void __init xen_init_mmu_ops(void)
2070{ 2066{
2071 x86_init.mapping.pagetable_reserve = xen_mapping_pagetable_reserve; 2067 x86_init.mapping.pagetable_reserve = xen_mapping_pagetable_reserve;
2072 x86_init.paging.pagetable_init = xen_pagetable_init; 2068 x86_init.paging.pagetable_init = xen_pagetable_init;
2073 x86_init.paging.pagetable_setup_done = xen_pagetable_setup_done;
2074 pv_mmu_ops = xen_mmu_ops; 2069 pv_mmu_ops = xen_mmu_ops;
2075 2070
2076 memset(dummy_mapping, 0xff, PAGE_SIZE); 2071 memset(dummy_mapping, 0xff, PAGE_SIZE);