Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[pandora-kernel.git] / arch / ia64 / kernel / machvec.c
1 #include <linux/module.h>
2
3 #include <asm/machvec.h>
4 #include <asm/system.h>
5
6 #ifdef CONFIG_IA64_GENERIC
7
8 #include <linux/kernel.h>
9 #include <linux/string.h>
10
11 #include <asm/page.h>
12
13 struct ia64_machine_vector ia64_mv;
14 EXPORT_SYMBOL(ia64_mv);
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
25 lookup_machvec (const char *name)
26 {
27         extern struct ia64_machine_vector machvec_start[];
28         extern struct ia64_machine_vector machvec_end[];
29         struct ia64_machine_vector *mv;
30
31         for (mv = machvec_start; mv < machvec_end; ++mv)
32                 if (strcmp (mv->name, name) == 0)
33                         return mv;
34
35         return 0;
36 }
37
38 void
39 machvec_init (const char *name)
40 {
41         struct ia64_machine_vector *mv;
42
43         if (!name)
44                 name = mvec_name ? mvec_name : acpi_get_sysname();
45         mv = lookup_machvec(name);
46         if (!mv)
47                 panic("generic kernel failed to find machine vector for"
48                       " platform %s!", name);
49
50         ia64_mv = *mv;
51         printk(KERN_INFO "booting generic kernel on platform %s\n", name);
52 }
53
54 #endif /* CONFIG_IA64_GENERIC */
55
56 void
57 machvec_setup (char **arg)
58 {
59 }
60 EXPORT_SYMBOL(machvec_setup);
61
62 void
63 machvec_timer_interrupt (int irq, void *dev_id)
64 {
65 }
66 EXPORT_SYMBOL(machvec_timer_interrupt);
67
68 void
69 machvec_dma_sync_single (struct device *hwdev, dma_addr_t dma_handle, size_t size, int dir)
70 {
71         mb();
72 }
73 EXPORT_SYMBOL(machvec_dma_sync_single);
74
75 void
76 machvec_dma_sync_sg (struct device *hwdev, struct scatterlist *sg, int n, int dir)
77 {
78         mb();
79 }
80 EXPORT_SYMBOL(machvec_dma_sync_sg);