summaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/machvec.c
diff options
context:
space:
mode:
authorHorms <horms@verge.net.au>2007-07-25 16:06:25 +0900
committerTony Luck <tony.luck@intel.com>2007-07-25 11:12:47 -0700
commita07ee86205808d36973440e68c7277f9ed63b87f (patch)
tree183d1d592c42fce8081a40a881300e4cf304ec56 /arch/ia64/kernel/machvec.c
parent6ffbc82351c62eeeeaeb9e817ddf93049353493d (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.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/arch/ia64/kernel/machvec.c b/arch/ia64/kernel/machvec.c
index 13df337508e..7ccb228ceed 100644
--- a/arch/ia64/kernel/machvec.c
+++ b/arch/ia64/kernel/machvec.c
@@ -13,14 +13,6 @@
struct ia64_machine_vector ia64_mv;
EXPORT_SYMBOL(ia64_mv);
-static __initdata const char *mvec_name;
-static __init int setup_mvec(char *s)
-{
- mvec_name = s;
- return 0;
-}
-early_param("machvec", setup_mvec);
-
static struct ia64_machine_vector * __init
lookup_machvec (const char *name)
{
@@ -41,7 +33,7 @@ machvec_init (const char *name)
struct ia64_machine_vector *mv;
if (!name)
- name = mvec_name ? mvec_name : acpi_get_sysname();
+ name = acpi_get_sysname();
mv = lookup_machvec(name);
if (!mv)
panic("generic kernel failed to find machine vector for"
@@ -51,6 +43,23 @@ machvec_init (const char *name)
printk(KERN_INFO "booting generic kernel on platform %s\n", name);
}
+void __init
+machvec_init_from_cmdline(const char *cmdline)
+{
+ char str[64];
+ const char *start;
+ char *end;
+
+ if (! (start = strstr(cmdline, "machvec=")) )
+ return machvec_init(NULL);
+
+ strlcpy(str, start + strlen("machvec="), sizeof(str));
+ if ( (end = strchr(str, ' ')) )
+ *end = '\0';
+
+ return machvec_init(str);
+}
+
#endif /* CONFIG_IA64_GENERIC */
void