aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/machvec.c
diff options
context:
space:
mode:
authorHorms <horms@verge.net.au>2006-03-23 14:27:12 -0800
committerTony Luck <tony.luck@intel.com>2006-03-23 14:27:12 -0800
commita5b00bb4fe60796c791238cf5653b82110031c93 (patch)
tree05938f68e51ad465e7ff76f05945210523061c1b /arch/ia64/kernel/machvec.c
parent[IA64] move patchlist and machvec into init section (diff)
downloadlinux-dev-a5b00bb4fe60796c791238cf5653b82110031c93.tar.xz
linux-dev-a5b00bb4fe60796c791238cf5653b82110031c93.zip
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.c19
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 @@
struct ia64_machine_vector ia64_mv;
EXPORT_SYMBOL(ia64_mv);
-static struct ia64_machine_vector *
+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)
{
extern struct ia64_machine_vector machvec_start[];
@@ -33,10 +41,13 @@ machvec_init (const char *name)
{
struct ia64_machine_vector *mv;
+ if (!name)
+ name = mvec_name ? mvec_name : acpi_get_sysname();
mv = lookup_machvec(name);
- if (!mv) {
- panic("generic kernel failed to find machine vector for platform %s!", name);
- }
+ if (!mv)
+ panic("generic kernel failed to find machine vector for"
+ " platform %s!", name);
+
ia64_mv = *mv;
printk(KERN_INFO "booting generic kernel on platform %s\n", name);
}