Linux 4.13.16
[linux/fpc-iii.git] / arch / ia64 / kernel / machvec.c
blobf5a1e5246b3e02e3f1039c848c894407b6e273b2
1 #include <linux/module.h>
2 #include <linux/dma-mapping.h>
3 #include <asm/machvec.h>
5 #ifdef CONFIG_IA64_GENERIC
7 #include <linux/kernel.h>
8 #include <linux/string.h>
10 #include <asm/page.h>
12 struct ia64_machine_vector ia64_mv;
13 EXPORT_SYMBOL(ia64_mv);
15 static struct ia64_machine_vector * __init
16 lookup_machvec (const char *name)
18 extern struct ia64_machine_vector machvec_start[];
19 extern struct ia64_machine_vector machvec_end[];
20 struct ia64_machine_vector *mv;
22 for (mv = machvec_start; mv < machvec_end; ++mv)
23 if (strcmp (mv->name, name) == 0)
24 return mv;
26 return 0;
29 void __init
30 machvec_init (const char *name)
32 struct ia64_machine_vector *mv;
34 if (!name)
35 name = acpi_get_sysname();
36 mv = lookup_machvec(name);
37 if (!mv)
38 panic("generic kernel failed to find machine vector for"
39 " platform %s!", name);
41 ia64_mv = *mv;
42 printk(KERN_INFO "booting generic kernel on platform %s\n", name);
45 void __init
46 machvec_init_from_cmdline(const char *cmdline)
48 char str[64];
49 const char *start;
50 char *end;
52 if (! (start = strstr(cmdline, "machvec=")) )
53 return machvec_init(NULL);
55 strlcpy(str, start + strlen("machvec="), sizeof(str));
56 if ( (end = strchr(str, ' ')) )
57 *end = '\0';
59 return machvec_init(str);
62 #endif /* CONFIG_IA64_GENERIC */
64 void
65 machvec_setup (char **arg)
68 EXPORT_SYMBOL(machvec_setup);
70 void
71 machvec_timer_interrupt (int irq, void *dev_id)
74 EXPORT_SYMBOL(machvec_timer_interrupt);
76 void
77 machvec_dma_sync_single(struct device *hwdev, dma_addr_t dma_handle, size_t size,
78 enum dma_data_direction dir)
80 mb();
82 EXPORT_SYMBOL(machvec_dma_sync_single);
84 void
85 machvec_dma_sync_sg(struct device *hwdev, struct scatterlist *sg, int n,
86 enum dma_data_direction dir)
88 mb();
90 EXPORT_SYMBOL(machvec_dma_sync_sg);