fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / arch / ia64 / kernel / machvec.c
index b47d7d2..9620822 100644 (file)
@@ -1,6 +1,6 @@
-#include <linux/config.h>
 #include <linux/module.h>
 
+#include <asm/machvec.h>
 #include <asm/system.h>
 
 #ifdef CONFIG_IA64_GENERIC
@@ -8,13 +8,20 @@
 #include <linux/kernel.h>
 #include <linux/string.h>
 
-#include <asm/machvec.h>
 #include <asm/page.h>
 
 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,22 +40,19 @@ 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);
 }
 
 #endif /* CONFIG_IA64_GENERIC */
 
-void
-machvec_noop (void)
-{
-}
-EXPORT_SYMBOL(machvec_noop);
-
 void
 machvec_setup (char **arg)
 {
@@ -56,7 +60,7 @@ machvec_setup (char **arg)
 EXPORT_SYMBOL(machvec_setup);
 
 void
-machvec_timer_interrupt (int irq, void *dev_id, struct pt_regs *regs)
+machvec_timer_interrupt (int irq, void *dev_id)
 {
 }
 EXPORT_SYMBOL(machvec_timer_interrupt);