summaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/machvec.c
blob: 2afb5613e46661704b3a54dd0e3e61094a1d2d12 (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
#include <linux/config.h>
#include <linux/kernel.h>

#include <asm/page.h>
#include <asm/machvec.h>

#ifdef CONFIG_IA64_GENERIC

struct ia64_machine_vector ia64_mv;

/*
 * Most platforms use this routine for mapping page frame addresses
 * into a memory map index.
 */
unsigned long
map_nr_dense (unsigned long addr)
{
	return MAP_NR_DENSE(addr);
}

static struct ia64_machine_vector *
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
machvec_init (const char *name)
{
	struct ia64_machine_vector *mv;

	mv = lookup_machvec(name);
	if (!mv) {
		panic("generic kernel failed to find machine vector for platform %s!", name);
	}
	ia64_mv = *mv;
	printk("booting generic kernel on platform %s\n", name);
}

#endif /* CONFIG_IA64_GENERIC */

void
machvec_noop (void)
{
}