blob: 9620822270a6e122d00c48cc5bb2acb89b313e10 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#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
13struct ia64_machine_vector ia64_mv;
14EXPORT_SYMBOL(ia64_mv);
15
Hormsa5b00bb2006-03-23 14:27:12 -080016static __initdata const char *mvec_name;
17static __init int setup_mvec(char *s)
18{
19 mvec_name = s;
20 return 0;
21}
22early_param("machvec", setup_mvec);
23
24static struct ia64_machine_vector * __init
Linus Torvalds1da177e2005-04-16 15:20:36 -070025lookup_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
38void
39machvec_init (const char *name)
40{
41 struct ia64_machine_vector *mv;
42
Hormsa5b00bb2006-03-23 14:27:12 -080043 if (!name)
44 name = mvec_name ? mvec_name : acpi_get_sysname();
Linus Torvalds1da177e2005-04-16 15:20:36 -070045 mv = lookup_machvec(name);
Hormsa5b00bb2006-03-23 14:27:12 -080046 if (!mv)
47 panic("generic kernel failed to find machine vector for"
48 " platform %s!", name);
49
Linus Torvalds1da177e2005-04-16 15:20:36 -070050 ia64_mv = *mv;
51 printk(KERN_INFO "booting generic kernel on platform %s\n", name);
52}
53
54#endif /* CONFIG_IA64_GENERIC */
55
56void
57machvec_setup (char **arg)
58{
59}
60EXPORT_SYMBOL(machvec_setup);
61
62void
David Howells7d12e782006-10-05 14:55:46 +010063machvec_timer_interrupt (int irq, void *dev_id)
Linus Torvalds1da177e2005-04-16 15:20:36 -070064{
65}
66EXPORT_SYMBOL(machvec_timer_interrupt);
67
68void
69machvec_dma_sync_single (struct device *hwdev, dma_addr_t dma_handle, size_t size, int dir)
70{
71 mb();
72}
73EXPORT_SYMBOL(machvec_dma_sync_single);
74
75void
76machvec_dma_sync_sg (struct device *hwdev, struct scatterlist *sg, int n, int dir)
77{
78 mb();
79}
80EXPORT_SYMBOL(machvec_dma_sync_sg);