1#include <linux/config.h>
2
3#ifdef CONFIG_IA64_GENERIC
4
5#include <linux/kernel.h>
6#include <linux/string.h>
7
8#include <asm/page.h>
9#include <asm/machvec.h>
10
11struct ia64_machine_vector ia64_mv;
12
13/*
14 * Most platforms use this routine for mapping page frame addresses
15 * into a memory map index.
16 */
17unsigned long
18map_nr_dense (unsigned long addr)
19{
20	return MAP_NR_DENSE(addr);
21}
22
23static struct ia64_machine_vector *
24lookup_machvec (const char *name)
25{
26	extern struct ia64_machine_vector machvec_start[];
27	extern struct ia64_machine_vector machvec_end[];
28	struct ia64_machine_vector *mv;
29
30	for (mv = machvec_start; mv < machvec_end; ++mv)
31		if (strcmp (mv->name, name) == 0)
32			return mv;
33
34	return 0;
35}
36
37void
38machvec_init (const char *name)
39{
40	struct ia64_machine_vector *mv;
41
42	mv = lookup_machvec(name);
43	if (!mv) {
44		panic("generic kernel failed to find machine vector for platform %s!", name);
45	}
46	ia64_mv = *mv;
47	printk("booting generic kernel on platform %s\n", name);
48}
49
50#endif /* CONFIG_IA64_GENERIC */
51
52void
53machvec_noop (void)
54{
55}
56