restricted ia64 patches to ia64 again, they still break builds on
[linux-flexiantxendom0-3.2.10.git] / arch / ia64 / kernel / machvec.c
1 #include <linux/config.h>
2
3 #ifdef CONFIG_IA64_GENERIC
4
5 #include <linux/kernel.h>
6 #include <linux/string.h>
7
8 #include <asm/page.h>
9 #include <asm/machvec.h>
10
11 struct ia64_machine_vector ia64_mv;
12
13 static struct ia64_machine_vector *
14 lookup_machvec (const char *name)
15 {
16         extern struct ia64_machine_vector machvec_start[];
17         extern struct ia64_machine_vector machvec_end[];
18         struct ia64_machine_vector *mv;
19
20         for (mv = machvec_start; mv < machvec_end; ++mv)
21                 if (strcmp (mv->name, name) == 0)
22                         return mv;
23
24         return 0;
25 }
26
27 void
28 machvec_init (const char *name)
29 {
30         struct ia64_machine_vector *mv;
31
32         mv = lookup_machvec(name);
33         if (!mv) {
34                 panic("generic kernel failed to find machine vector for platform %s!", name);
35         }
36         ia64_mv = *mv;
37         printk(KERN_INFO "booting generic kernel on platform %s\n", name);
38 }
39
40 #endif /* CONFIG_IA64_GENERIC */
41
42 void
43 machvec_noop (void)
44 {
45 }