diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-08-20 07:13:52 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-08-31 03:35:45 -0400 |
commit | f1d7062a235d057e5d85ed2860bef609e0160cde (patch) | |
tree | 69c65f74fb105dde838409bf312c766af9991b32 | |
parent | 030cb6c00d242c20e92a3327d0cac17ce02d0cc3 (diff) |
x86: Move xen_post_allocator_init into xen_pagetable_setup_done
We really do not need two paravirt/x86_init_ops functions which are
called in two consecutive source lines. Move the only user of
post_allocator_init into the already existing pagetable_setup_done
function.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | arch/x86/include/asm/paravirt.h | 6 | ||||
-rw-r--r-- | arch/x86/include/asm/paravirt_types.h | 3 | ||||
-rw-r--r-- | arch/x86/include/asm/setup.h | 4 | ||||
-rw-r--r-- | arch/x86/kernel/setup.c | 1 | ||||
-rw-r--r-- | arch/x86/xen/enlighten.c | 2 | ||||
-rw-r--r-- | arch/x86/xen/mmu.c | 5 | ||||
-rw-r--r-- | arch/x86/xen/xen-ops.h | 2 |
7 files changed, 4 insertions, 19 deletions
diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h index 1caf25b91e6b..7ce415e844b6 100644 --- a/arch/x86/include/asm/paravirt.h +++ b/arch/x86/include/asm/paravirt.h | |||
@@ -345,12 +345,6 @@ static inline void setup_secondary_clock(void) | |||
345 | } | 345 | } |
346 | #endif | 346 | #endif |
347 | 347 | ||
348 | static inline void paravirt_post_allocator_init(void) | ||
349 | { | ||
350 | if (pv_init_ops.post_allocator_init) | ||
351 | (*pv_init_ops.post_allocator_init)(); | ||
352 | } | ||
353 | |||
354 | #ifdef CONFIG_SMP | 348 | #ifdef CONFIG_SMP |
355 | static inline void startup_ipi_hook(int phys_apicid, unsigned long start_eip, | 349 | static inline void startup_ipi_hook(int phys_apicid, unsigned long start_eip, |
356 | unsigned long start_esp) | 350 | unsigned long start_esp) |
diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h index 4039eefd3ebc..ecc74e5ad407 100644 --- a/arch/x86/include/asm/paravirt_types.h +++ b/arch/x86/include/asm/paravirt_types.h | |||
@@ -78,9 +78,6 @@ struct pv_init_ops { | |||
78 | */ | 78 | */ |
79 | unsigned (*patch)(u8 type, u16 clobber, void *insnbuf, | 79 | unsigned (*patch)(u8 type, u16 clobber, void *insnbuf, |
80 | unsigned long addr, unsigned len); | 80 | unsigned long addr, unsigned len); |
81 | |||
82 | /* Basic arch-specific setup */ | ||
83 | void (*post_allocator_init)(void); | ||
84 | }; | 81 | }; |
85 | 82 | ||
86 | 83 | ||
diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h index 7751d1f92bc9..58b58952b80d 100644 --- a/arch/x86/include/asm/setup.h +++ b/arch/x86/include/asm/setup.h | |||
@@ -63,10 +63,6 @@ static inline int is_visws_box(void) { return 0; } | |||
63 | extern struct x86_quirks *x86_quirks; | 63 | extern struct x86_quirks *x86_quirks; |
64 | extern unsigned long saved_video_mode; | 64 | extern unsigned long saved_video_mode; |
65 | 65 | ||
66 | #ifndef CONFIG_PARAVIRT | ||
67 | #define paravirt_post_allocator_init() do {} while (0) | ||
68 | #endif | ||
69 | |||
70 | extern void reserve_standard_io_resources(void); | 66 | extern void reserve_standard_io_resources(void); |
71 | extern void i386_reserve_resources(void); | 67 | extern void i386_reserve_resources(void); |
72 | 68 | ||
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 4952d63dd67a..43ec6aa175bd 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 | x86_init.paging.pagetable_setup_start(swapper_pg_dir); | 962 | x86_init.paging.pagetable_setup_start(swapper_pg_dir); |
963 | paging_init(); | 963 | paging_init(); |
964 | x86_init.paging.pagetable_setup_done(swapper_pg_dir); | 964 | x86_init.paging.pagetable_setup_done(swapper_pg_dir); |
965 | paravirt_post_allocator_init(); | ||
966 | 965 | ||
967 | #ifdef CONFIG_X86_64 | 966 | #ifdef CONFIG_X86_64 |
968 | map_vsyscall(); | 967 | map_vsyscall(); |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 12ea09ec39b5..a924caa168dd 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -839,8 +839,6 @@ static const struct pv_info xen_info __initdata = { | |||
839 | 839 | ||
840 | static const struct pv_init_ops xen_init_ops __initdata = { | 840 | static const struct pv_init_ops xen_init_ops __initdata = { |
841 | .patch = xen_patch, | 841 | .patch = xen_patch, |
842 | |||
843 | .post_allocator_init = xen_post_allocator_init, | ||
844 | }; | 842 | }; |
845 | 843 | ||
846 | static const struct pv_time_ops xen_time_ops __initdata = { | 844 | static const struct pv_time_ops xen_time_ops __initdata = { |
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index dbec51da930e..093dd59b5385 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -1229,9 +1229,12 @@ static __init void xen_pagetable_setup_start(pgd_t *base) | |||
1229 | { | 1229 | { |
1230 | } | 1230 | } |
1231 | 1231 | ||
1232 | static void xen_post_allocator_init(void); | ||
1233 | |||
1232 | static __init void xen_pagetable_setup_done(pgd_t *base) | 1234 | static __init void xen_pagetable_setup_done(pgd_t *base) |
1233 | { | 1235 | { |
1234 | xen_setup_shared_info(); | 1236 | xen_setup_shared_info(); |
1237 | xen_post_allocator_init(); | ||
1235 | } | 1238 | } |
1236 | 1239 | ||
1237 | static void xen_write_cr2(unsigned long cr2) | 1240 | static void xen_write_cr2(unsigned long cr2) |
@@ -1841,7 +1844,7 @@ static void xen_set_fixmap(unsigned idx, phys_addr_t phys, pgprot_t prot) | |||
1841 | #endif | 1844 | #endif |
1842 | } | 1845 | } |
1843 | 1846 | ||
1844 | __init void xen_post_allocator_init(void) | 1847 | static __init void xen_post_allocator_init(void) |
1845 | { | 1848 | { |
1846 | pv_mmu_ops.set_pte = xen_set_pte; | 1849 | pv_mmu_ops.set_pte = xen_set_pte; |
1847 | pv_mmu_ops.set_pmd = xen_set_pmd; | 1850 | pv_mmu_ops.set_pmd = xen_set_pmd; |
diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h index 22494fd4c9b5..355fa6b99c9c 100644 --- a/arch/x86/xen/xen-ops.h +++ b/arch/x86/xen/xen-ops.h | |||
@@ -30,8 +30,6 @@ pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn); | |||
30 | void xen_ident_map_ISA(void); | 30 | void xen_ident_map_ISA(void); |
31 | void xen_reserve_top(void); | 31 | void xen_reserve_top(void); |
32 | 32 | ||
33 | void xen_post_allocator_init(void); | ||
34 | |||
35 | char * __init xen_memory_setup(void); | 33 | char * __init xen_memory_setup(void); |
36 | void __init xen_arch_setup(void); | 34 | void __init xen_arch_setup(void); |
37 | void __init xen_init_IRQ(void); | 35 | void __init xen_init_IRQ(void); |