blob: 4b0b71d5aef4520700c259258eddd801378e0fb9 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#include <linux/config.h>
2#include <linux/module.h>
3
4#include <asm/machvec.h>
5#include <asm/system.h>
6
7#ifdef CONFIG_IA64_GENERIC
8
9#include <linux/kernel.h>
10#include <linux/string.h>
11
12#include <asm/page.h>
13
14struct ia64_machine_vector ia64_mv;
15EXPORT_SYMBOL(ia64_mv);
16
Hormsa5b00bb2006-03-23 14:27:12 -080017static __initdata const char *mvec_name;
18static __init int setup_mvec(char *s)
19{
20 mvec_name = s;
21 return 0;
22}
23early_param("machvec", setup_mvec);
24
25static struct ia64_machine_vector * __init
Linus Torvalds1da177e2005-04-16 15:20:36 -070026lookup_machvec (const char *name)
27{
28 extern struct ia64_machine_vector machvec_start[];
29 extern struct ia64_machine_vector machvec_end[];
30 struct ia64_machine_vector *mv;
31
32 for (mv = machvec_start; mv < machvec_end; ++mv)
33 if (strcmp (mv->name, name) == 0)
34 return mv;
35
36 return 0;
37}
38
39void
40machvec_init (const char *name)
41{
42 struct ia64_machine_vector *mv;
43
Hormsa5b00bb2006-03-23 14:27:12 -080044 if (!name)
45 name = mvec_name ? mvec_name : acpi_get_sysname();
Linus Torvalds1da177e2005-04-16 15:20:36 -070046 mv = lookup_machvec(name);
Hormsa5b00bb2006-03-23 14:27:12 -080047 if (!mv)
48 panic("generic kernel failed to find machine vector for"
49 " platform %s!", name);
50
Linus Torvalds1da177e2005-04-16 15:20:36 -070051 ia64_mv = *mv;
52 printk(KERN_INFO "booting generic kernel on platform %s\n", name);
53}
54
55#endif /* CONFIG_IA64_GENERIC */
56
57void
58machvec_setup (char **arg)
59{
60}
61EXPORT_SYMBOL(machvec_setup);
62
63void
64machvec_timer_interrupt (int irq, void *dev_id, struct pt_regs *regs)
65{
66}
67EXPORT_SYMBOL(machvec_timer_interrupt);
68
69void
70machvec_dma_sync_single (struct device *hwdev, dma_addr_t dma_handle, size_t size, int dir)
71{
72 mb();
73}
74EXPORT_SYMBOL(machvec_dma_sync_single);
75
76void
77machvec_dma_sync_sg (struct device *hwdev, struct scatterlist *sg, int n, int dir)
78{
79 mb();
80}
81EXPORT_SYMBOL(machvec_dma_sync_sg);