diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-08-20 07:19:57 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-08-31 03:35:45 -0400 |
commit | 6f30c1ac3fcf11e08f00670f293546a112cdf4e3 (patch) | |
tree | d392c751369ea01055a5fc2aeb5320cde13abe0d /arch/x86 | |
parent | 42bbdb43b16d233b2dacb4cd76e28f61c2a86dc6 (diff) |
x86: Move paravirt banner printout to x86_init_ops
Replace another obscure paravirt magic and move it to
x86_init_ops. Such a hook is also useful for embedded and special
hardware.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86')
-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/x86_init.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/paravirt.c | 10 | ||||
-rw-r--r-- | arch/x86/kernel/setup.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/x86_init.c | 2 | ||||
-rw-r--r-- | arch/x86/xen/enlighten.c | 2 |
7 files changed, 12 insertions, 14 deletions
diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h index 22cb3872f6d1..3de6435a106a 100644 --- a/arch/x86/include/asm/paravirt.h +++ b/arch/x86/include/asm/paravirt.h | |||
@@ -918,6 +918,8 @@ static inline unsigned long __raw_local_irq_save(void) | |||
918 | #undef PVOP_VCALL4 | 918 | #undef PVOP_VCALL4 |
919 | #undef PVOP_CALL4 | 919 | #undef PVOP_CALL4 |
920 | 920 | ||
921 | extern void default_banner(void); | ||
922 | |||
921 | #else /* __ASSEMBLY__ */ | 923 | #else /* __ASSEMBLY__ */ |
922 | 924 | ||
923 | #define _PVSITE(ptype, clobbers, ops, word, algn) \ | 925 | #define _PVSITE(ptype, clobbers, ops, word, algn) \ |
@@ -1058,5 +1060,7 @@ static inline unsigned long __raw_local_irq_save(void) | |||
1058 | #endif /* CONFIG_X86_32 */ | 1060 | #endif /* CONFIG_X86_32 */ |
1059 | 1061 | ||
1060 | #endif /* __ASSEMBLY__ */ | 1062 | #endif /* __ASSEMBLY__ */ |
1061 | #endif /* CONFIG_PARAVIRT */ | 1063 | #else /* CONFIG_PARAVIRT */ |
1064 | # define default_banner x86_init_noop | ||
1065 | #endif /* !CONFIG_PARAVIRT */ | ||
1062 | #endif /* _ASM_X86_PARAVIRT_H */ | 1066 | #endif /* _ASM_X86_PARAVIRT_H */ |
diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h index a05085e5fdbb..ce7723c81a1e 100644 --- a/arch/x86/include/asm/paravirt_types.h +++ b/arch/x86/include/asm/paravirt_types.h | |||
@@ -81,9 +81,6 @@ struct pv_init_ops { | |||
81 | 81 | ||
82 | /* Basic arch-specific setup */ | 82 | /* Basic arch-specific setup */ |
83 | void (*post_allocator_init)(void); | 83 | void (*post_allocator_init)(void); |
84 | |||
85 | /* Print a banner to identify the environment */ | ||
86 | void (*banner)(void); | ||
87 | }; | 84 | }; |
88 | 85 | ||
89 | 86 | ||
diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h index ceffbf358fc0..ee7c59df7814 100644 --- a/arch/x86/include/asm/x86_init.h +++ b/arch/x86/include/asm/x86_init.h | |||
@@ -59,9 +59,11 @@ struct x86_init_irqs { | |||
59 | /** | 59 | /** |
60 | * struct x86_init_oem - oem platform specific customizing functions | 60 | * struct x86_init_oem - oem platform specific customizing functions |
61 | * @arch_setup: platform specific architecure setup | 61 | * @arch_setup: platform specific architecure setup |
62 | * @banner: print a platform specific banner | ||
62 | */ | 63 | */ |
63 | struct x86_init_oem { | 64 | struct x86_init_oem { |
64 | void (*arch_setup)(void); | 65 | void (*arch_setup)(void); |
66 | void (*banner)(void); | ||
65 | }; | 67 | }; |
66 | 68 | ||
67 | /** | 69 | /** |
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index 80275ef1651a..f7a5fb79d18a 100644 --- a/arch/x86/kernel/paravirt.c +++ b/arch/x86/kernel/paravirt.c | |||
@@ -54,7 +54,7 @@ u64 _paravirt_ident_64(u64 x) | |||
54 | return x; | 54 | return x; |
55 | } | 55 | } |
56 | 56 | ||
57 | static void __init default_banner(void) | 57 | void __init default_banner(void) |
58 | { | 58 | { |
59 | printk(KERN_INFO "Booting paravirtualized kernel on %s\n", | 59 | printk(KERN_INFO "Booting paravirtualized kernel on %s\n", |
60 | pv_info.name); | 60 | pv_info.name); |
@@ -208,13 +208,6 @@ extern void native_irq_enable_sysexit(void); | |||
208 | extern void native_usergs_sysret32(void); | 208 | extern void native_usergs_sysret32(void); |
209 | extern void native_usergs_sysret64(void); | 209 | extern void native_usergs_sysret64(void); |
210 | 210 | ||
211 | static int __init print_banner(void) | ||
212 | { | ||
213 | pv_init_ops.banner(); | ||
214 | return 0; | ||
215 | } | ||
216 | core_initcall(print_banner); | ||
217 | |||
218 | static struct resource reserve_ioports = { | 211 | static struct resource reserve_ioports = { |
219 | .start = 0, | 212 | .start = 0, |
220 | .end = IO_SPACE_LIMIT, | 213 | .end = IO_SPACE_LIMIT, |
@@ -310,7 +303,6 @@ struct pv_info pv_info = { | |||
310 | 303 | ||
311 | struct pv_init_ops pv_init_ops = { | 304 | struct pv_init_ops pv_init_ops = { |
312 | .patch = native_patch, | 305 | .patch = native_patch, |
313 | .banner = default_banner, | ||
314 | }; | 306 | }; |
315 | 307 | ||
316 | struct pv_time_ops pv_time_ops = { | 308 | struct pv_time_ops pv_time_ops = { |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index d12aa82c9c32..bc5f0e561cfd 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -1012,6 +1012,7 @@ void __init setup_arch(char **cmdline_p) | |||
1012 | conswitchp = &dummy_con; | 1012 | conswitchp = &dummy_con; |
1013 | #endif | 1013 | #endif |
1014 | #endif | 1014 | #endif |
1015 | x86_init.oem.banner(); | ||
1015 | } | 1016 | } |
1016 | 1017 | ||
1017 | #ifdef CONFIG_X86_32 | 1018 | #ifdef CONFIG_X86_32 |
diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c index fa2d849be35a..08fea49d59a2 100644 --- a/arch/x86/kernel/x86_init.c +++ b/arch/x86/kernel/x86_init.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
7 | 7 | ||
8 | #include <asm/bios_ebda.h> | 8 | #include <asm/bios_ebda.h> |
9 | #include <asm/paravirt.h> | ||
9 | #include <asm/mpspec.h> | 10 | #include <asm/mpspec.h> |
10 | #include <asm/setup.h> | 11 | #include <asm/setup.h> |
11 | #include <asm/e820.h> | 12 | #include <asm/e820.h> |
@@ -45,5 +46,6 @@ struct __initdata x86_init_ops x86_init = { | |||
45 | 46 | ||
46 | .oem = { | 47 | .oem = { |
47 | .arch_setup = x86_init_noop, | 48 | .arch_setup = x86_init_noop, |
49 | .banner = default_banner, | ||
48 | }, | 50 | }, |
49 | }; | 51 | }; |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 73c7b1d610f3..46e23cde143a 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -840,7 +840,6 @@ static const struct pv_info xen_info __initdata = { | |||
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 | 842 | ||
843 | .banner = xen_banner, | ||
844 | .post_allocator_init = xen_post_allocator_init, | 843 | .post_allocator_init = xen_post_allocator_init, |
845 | }; | 844 | }; |
846 | 845 | ||
@@ -982,6 +981,7 @@ asmlinkage void __init xen_start_kernel(void) | |||
982 | 981 | ||
983 | x86_init.resources.memory_setup = xen_memory_setup; | 982 | x86_init.resources.memory_setup = xen_memory_setup; |
984 | x86_init.oem.arch_setup = xen_arch_setup; | 983 | x86_init.oem.arch_setup = xen_arch_setup; |
984 | x86_init.oem.banner = xen_banner; | ||
985 | 985 | ||
986 | #ifdef CONFIG_X86_64 | 986 | #ifdef CONFIG_X86_64 |
987 | /* | 987 | /* |