mmu.h 607 Bytes
Newer Older
Linus Torvalds's avatar
Linus Torvalds committed
1
2
3
#ifndef __ARM_MMU_H
#define __ARM_MMU_H

4
5
#ifdef CONFIG_MMU

Linus Torvalds's avatar
Linus Torvalds committed
6
typedef struct {
7
#ifdef CONFIG_CPU_HAS_ASID
8
	atomic64_t	id;
9
10
#else
	int		switch_pending;
Linus Torvalds's avatar
Linus Torvalds committed
11
#endif
12
	unsigned int	vmalloc_seq;
Linus Torvalds's avatar
Linus Torvalds committed
13
14
} mm_context_t;

15
#ifdef CONFIG_CPU_HAS_ASID
16
17
#define ASID_BITS	8
#define ASID_MASK	((~0ULL) << ASID_BITS)
18
#define ASID(mm)	((mm)->context.id.counter & ~ASID_MASK)
Linus Torvalds's avatar
Linus Torvalds committed
19
20
21
22
#else
#define ASID(mm)	(0)
#endif

23
24
25
26
27
28
29
30
#else

/*
 * From nommu.h:
 *  Copyright (C) 2002, David McCullough <davidm@snapgear.com>
 *  modified for 2.6 by Hyok S. Choi <hyok.choi@samsung.com>
 */
typedef struct {
31
	unsigned long	end_brk;
32
33
34
35
} mm_context_t;

#endif

Linus Torvalds's avatar
Linus Torvalds committed
36
#endif