Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | #ifndef __ARM_MMU_H |
2 | #define __ARM_MMU_H | |
3 | ||
002547b4 RK |
4 | #ifdef CONFIG_MMU |
5 | ||
1da177e4 | 6 | typedef struct { |
516793c6 | 7 | #ifdef CONFIG_CPU_HAS_ASID |
8a4e3a9e | 8 | atomic64_t id; |
1da177e4 | 9 | #endif |
8a4e3a9e | 10 | unsigned int vmalloc_seq; |
1da177e4 LT |
11 | } mm_context_t; |
12 | ||
516793c6 | 13 | #ifdef CONFIG_CPU_HAS_ASID |
b5466f87 WD |
14 | #define ASID_BITS 8 |
15 | #define ASID_MASK ((~0ULL) << ASID_BITS) | |
8a4e3a9e | 16 | #define ASID(mm) ((mm)->context.id.counter & ~ASID_MASK) |
1da177e4 LT |
17 | #else |
18 | #define ASID(mm) (0) | |
19 | #endif | |
20 | ||
002547b4 RK |
21 | #else |
22 | ||
23 | /* | |
24 | * From nommu.h: | |
25 | * Copyright (C) 2002, David McCullough <davidm@snapgear.com> | |
26 | * modified for 2.6 by Hyok S. Choi <hyok.choi@samsung.com> | |
27 | */ | |
28 | typedef struct { | |
8a4e3a9e | 29 | unsigned long end_brk; |
002547b4 RK |
30 | } mm_context_t; |
31 | ||
32 | #endif | |
33 | ||
1da177e4 | 34 | #endif |