diff options
-rw-r--r-- | arch/ia64/kernel/machvec.c | 27 | ||||
-rw-r--r-- | arch/ia64/kernel/setup.c | 11 | ||||
-rw-r--r-- | include/asm-ia64/machvec.h | 1 |
3 files changed, 27 insertions, 12 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 |
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index cf06fe799041..7cecd2964200 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -491,12 +491,17 @@ setup_arch (char **cmdline_p) | |||
491 | efi_init(); | 491 | efi_init(); |
492 | io_port_init(); | 492 | io_port_init(); |
493 | 493 | ||
494 | parse_early_param(); | ||
495 | |||
496 | #ifdef CONFIG_IA64_GENERIC | 494 | #ifdef CONFIG_IA64_GENERIC |
497 | machvec_init(NULL); | 495 | /* machvec needs to be parsed from the command line |
496 | * before parse_early_param() is called to ensure | ||
497 | * that ia64_mv is initialised before any command line | ||
498 | * settings may cause console setup to occur | ||
499 | */ | ||
500 | machvec_init_from_cmdline(*cmdline_p); | ||
498 | #endif | 501 | #endif |
499 | 502 | ||
503 | parse_early_param(); | ||
504 | |||
500 | if (early_console_setup(*cmdline_p) == 0) | 505 | if (early_console_setup(*cmdline_p) == 0) |
501 | mark_bsp_online(); | 506 | mark_bsp_online(); |
502 | 507 | ||
diff --git a/include/asm-ia64/machvec.h b/include/asm-ia64/machvec.h index ca33eb181ff2..5cf8bf1e805e 100644 --- a/include/asm-ia64/machvec.h +++ b/include/asm-ia64/machvec.h | |||
@@ -275,6 +275,7 @@ struct ia64_machine_vector { | |||
275 | 275 | ||
276 | extern struct ia64_machine_vector ia64_mv; | 276 | extern struct ia64_machine_vector ia64_mv; |
277 | extern void machvec_init (const char *name); | 277 | extern void machvec_init (const char *name); |
278 | extern void machvec_init_from_cmdline(const char *cmdline); | ||
278 | 279 | ||
279 | # else | 280 | # else |
280 | # error Unknown configuration. Update asm-ia64/machvec.h. | 281 | # error Unknown configuration. Update asm-ia64/machvec.h. |