]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/blame - arch/ia64/kernel/machvec.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-disco-kernel.git] / arch / ia64 / kernel / machvec.c
CommitLineData
b2441318 1// SPDX-License-Identifier: GPL-2.0
1da177e4 2#include <linux/module.h>
160c1d8e 3#include <linux/dma-mapping.h>
1da177e4 4#include <asm/machvec.h>
1da177e4
LT
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
a5b00bb4 16static struct ia64_machine_vector * __init
1da177e4
LT
17lookup_machvec (const char *name)
18{
19 extern struct ia64_machine_vector machvec_start[];
20 extern struct ia64_machine_vector machvec_end[];
21 struct ia64_machine_vector *mv;
22
23 for (mv = machvec_start; mv < machvec_end; ++mv)
24 if (strcmp (mv->name, name) == 0)
25 return mv;
26
27 return 0;
28}
29
9a86bbb9 30void __init
1da177e4
LT
31machvec_init (const char *name)
32{
33 struct ia64_machine_vector *mv;
34
a5b00bb4 35 if (!name)
a07ee862 36 name = acpi_get_sysname();
1da177e4 37 mv = lookup_machvec(name);
a5b00bb4
H
38 if (!mv)
39 panic("generic kernel failed to find machine vector for"
40 " platform %s!", name);
41
1da177e4
LT
42 ia64_mv = *mv;
43 printk(KERN_INFO "booting generic kernel on platform %s\n", name);
44}
45
a07ee862
H
46void __init
47machvec_init_from_cmdline(const char *cmdline)
48{
49 char str[64];
50 const char *start;
51 char *end;
52
53 if (! (start = strstr(cmdline, "machvec=")) )
54 return machvec_init(NULL);
55
56 strlcpy(str, start + strlen("machvec="), sizeof(str));
57 if ( (end = strchr(str, ' ')) )
58 *end = '\0';
59
60 return machvec_init(str);
61}
62
1da177e4
LT
63#endif /* CONFIG_IA64_GENERIC */
64
65void
66machvec_setup (char **arg)
67{
68}
69EXPORT_SYMBOL(machvec_setup);
70
71void
7d12e780 72machvec_timer_interrupt (int irq, void *dev_id)
1da177e4
LT
73{
74}
75EXPORT_SYMBOL(machvec_timer_interrupt);
76
77void
160c1d8e
FT
78machvec_dma_sync_single(struct device *hwdev, dma_addr_t dma_handle, size_t size,
79 enum dma_data_direction dir)
1da177e4
LT
80{
81 mb();
82}
83EXPORT_SYMBOL(machvec_dma_sync_single);
84
85void
160c1d8e
FT
86machvec_dma_sync_sg(struct device *hwdev, struct scatterlist *sg, int n,
87 enum dma_data_direction dir)
1da177e4
LT
88{
89 mb();
90}
91EXPORT_SYMBOL(machvec_dma_sync_sg);