diff options
author | Horms <horms@verge.net.au> | 2006-03-23 17:27:12 -0500 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2006-03-23 17:27:12 -0500 |
commit | a5b00bb4fe60796c791238cf5653b82110031c93 (patch) | |
tree | 05938f68e51ad465e7ff76f05945210523061c1b /arch/ia64/kernel/machvec.c | |
parent | 39e18de810049e836390830174a248ad241b156a (diff) |
IA64: Use early_parm to handle mvec_name and nomca
I'm not sure of the worthiness of this idea, so please consider it an RFC.
Its key merits are:
* Reuse existing infrastructure
* Greatly tightens up the parsing of nomca
* Greatly simplifies the parsing of machvec
Addition cleanup (moving setup_mvec() to machvec.c) by Ken Chen.
Signed-Off-By: Horms <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 | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/arch/ia64/kernel/machvec.c b/arch/ia64/kernel/machvec.c index c3a04ee7f4f6..4b0b71d5aef4 100644 --- a/arch/ia64/kernel/machvec.c +++ b/arch/ia64/kernel/machvec.c | |||
@@ -14,7 +14,15 @@ | |||
14 | struct ia64_machine_vector ia64_mv; | 14 | struct ia64_machine_vector ia64_mv; |
15 | EXPORT_SYMBOL(ia64_mv); | 15 | EXPORT_SYMBOL(ia64_mv); |
16 | 16 | ||
17 | static struct ia64_machine_vector * | 17 | static __initdata const char *mvec_name; |
18 | static __init int setup_mvec(char *s) | ||
19 | { | ||
20 | mvec_name = s; | ||
21 | return 0; | ||
22 | } | ||
23 | early_param("machvec", setup_mvec); | ||
24 | |||
25 | static struct ia64_machine_vector * __init | ||
18 | lookup_machvec (const char *name) | 26 | lookup_machvec (const char *name) |
19 | { | 27 | { |
20 | extern struct ia64_machine_vector machvec_start[]; | 28 | extern struct ia64_machine_vector machvec_start[]; |
@@ -33,10 +41,13 @@ machvec_init (const char *name) | |||
33 | { | 41 | { |
34 | struct ia64_machine_vector *mv; | 42 | struct ia64_machine_vector *mv; |
35 | 43 | ||
44 | if (!name) | ||
45 | name = mvec_name ? mvec_name : acpi_get_sysname(); | ||
36 | mv = lookup_machvec(name); | 46 | mv = lookup_machvec(name); |
37 | if (!mv) { | 47 | if (!mv) |
38 | panic("generic kernel failed to find machine vector for platform %s!", name); | 48 | panic("generic kernel failed to find machine vector for" |
39 | } | 49 | " platform %s!", name); |
50 | |||
40 | ia64_mv = *mv; | 51 | ia64_mv = *mv; |
41 | printk(KERN_INFO "booting generic kernel on platform %s\n", name); | 52 | printk(KERN_INFO "booting generic kernel on platform %s\n", name); |
42 | } | 53 | } |