summaryrefslogtreecommitdiff
path: root/arch/ia64/kernel/machvec.c
blob: f5a1e5246b3e02e3f1039c848c894407b6e273b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#include <linux/module.h>
#include <linux/dma-mapping.h>
#include <asm/machvec.h>

#ifdef CONFIG_IA64_GENERIC

#include <linux/kernel.h>
#include <linux/string.h>

#include <asm/page.h>

struct ia64_machine_vector ia64_mv;
EXPORT_SYMBOL(ia64_mv);

static struct ia64_machine_vector * __init
lookup_machvec (const char *name)
{
	extern struct ia64_machine_vector machvec_start[];
	extern struct ia64_machine_vector machvec_end[];
	struct ia64_machine_vector *mv;

	for (mv = machvec_start; mv < machvec_end; ++mv)
		if (strcmp (mv->name, name) == 0)
			return mv;

	return 0;
}

void __init
machvec_init (const char *name)
{
	struct ia64_machine_vector *mv;

	if (!name)
		name = acpi_get_sysname();
	mv = lookup_machvec(name);
	if (!mv)
		panic("generic kernel failed to find machine vector for"
		      " platform %s!", name);

	ia64_mv = *mv;
	printk(KERN_INFO "booting generic kernel on platform %s\n", name);
}

void __init
machvec_init_from_cmdline(const char *cmdline)
{
	char str[64];
	const char *start;
	char *end;

	if (! (start = strstr(cmdline, "machvec=")) )
		return machvec_init(NULL);

	strlcpy(str, start + strlen("machvec="), sizeof(str));
	if ( (end = strchr(str, ' ')) )
		*end = '\0';

	return machvec_init(str);
}

#endif /* CONFIG_IA64_GENERIC */

void
machvec_setup (char **arg)
{
}
EXPORT_SYMBOL(machvec_setup);

void
machvec_timer_interrupt (int irq, void *dev_id)
{
}
EXPORT_SYMBOL(machvec_timer_interrupt);

void
machvec_dma_sync_single(struct device *hwdev, dma_addr_t dma_handle, size_t size,
			enum dma_data_direction dir)
{
	mb();
}
EXPORT_SYMBOL(machvec_dma_sync_single);

void
machvec_dma_sync_sg(struct device *hwdev, struct scatterlist *sg, int n,
		    enum dma_data_direction dir)
{
	mb();
}
EXPORT_SYMBOL(machvec_dma_sync_sg);