diff options
author | Horms <horms@verge.net.au> | 2007-07-25 03:06:25 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2007-07-25 14:12:47 -0400 |
commit | a07ee86205808d36973440e68c7277f9ed63b87f (patch) | |
tree | 183d1d592c42fce8081a40a881300e4cf304ec56 /arch/ia64/kernel/machvec.c | |
parent | 6ffbc82351c62eeeeaeb9e817ddf93049353493d (diff) |
[IA64] Ensure that machvec is set up takes place before serial console
Parse the machvec command line option outside of the early_param()
so that ia64_mv is set before any console intialisation that
may result from early_param parsing.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/kernel/machvec.c')
-rw-r--r-- | arch/ia64/kernel/machvec.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/arch/ia64/kernel/machvec.c b/arch/ia64/kernel/machvec.c index 13df337508e7..7ccb228ceedc 100644 --- a/arch/ia64/kernel/machvec.c +++ b/arch/ia64/kernel/machvec.c | |||
@@ -13,14 +13,6 @@ | |||
13 | struct ia64_machine_vector ia64_mv; | 13 | struct ia64_machine_vector ia64_mv; |
14 | EXPORT_SYMBOL(ia64_mv); | 14 | EXPORT_SYMBOL(ia64_mv); |
15 | 15 | ||
16 | static __initdata const char *mvec_name; | ||
17 | static __init int setup_mvec(char *s) | ||
18 | { | ||
19 | mvec_name = s; | ||
20 | return 0; | ||
21 | } | ||
22 | early_param("machvec", setup_mvec); | ||
23 | |||
24 | static struct ia64_machine_vector * __init | 16 | static struct ia64_machine_vector * __init |
25 | lookup_machvec (const char *name) | 17 | lookup_machvec (const char *name) |
26 | { | 18 | { |
@@ -41,7 +33,7 @@ machvec_init (const char *name) | |||
41 | struct ia64_machine_vector *mv; | 33 | struct ia64_machine_vector *mv; |
42 | 34 | ||
43 | if (!name) | 35 | if (!name) |
44 | name = mvec_name ? mvec_name : acpi_get_sysname(); | 36 | name = acpi_get_sysname(); |
45 | mv = lookup_machvec(name); | 37 | mv = lookup_machvec(name); |
46 | if (!mv) | 38 | if (!mv) |
47 | panic("generic kernel failed to find machine vector for" | 39 | panic("generic kernel failed to find machine vector for" |
@@ -51,6 +43,23 @@ machvec_init (const char *name) | |||
51 | printk(KERN_INFO "booting generic kernel on platform %s\n", name); | 43 | printk(KERN_INFO "booting generic kernel on platform %s\n", name); |
52 | } | 44 | } |
53 | 45 | ||
46 | void __init | ||
47 | machvec_init_from_cmdline(const char *cmdline) | ||
48 | { | ||
49 | char str[64]; | ||
50 | const char *start; | ||
51 | char *end; | ||
52 | |||
53 | if (! (start = strstr(cmdline, "machvec=")) ) | ||
54 | return machvec_init(NULL); | ||
55 | |||
56 | strlcpy(str, start + strlen("machvec="), sizeof(str)); | ||
57 | if ( (end = strchr(str, ' ')) ) | ||
58 | *end = '\0'; | ||
59 | |||
60 | return machvec_init(str); | ||
61 | } | ||
62 | |||
54 | #endif /* CONFIG_IA64_GENERIC */ | 63 | #endif /* CONFIG_IA64_GENERIC */ |
55 | 64 | ||
56 | void | 65 | void |