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