diff options
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 |