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