Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef __ARM_MMU_H |
2 | #define __ARM_MMU_H | ||||
3 | |||||
Russell King | 002547b | 2006-06-20 20:46:52 +0100 | [diff] [blame] | 4 | #ifdef CONFIG_MMU |
5 | |||||
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | typedef struct { |
Russell King | 516793c | 2007-05-17 10:19:23 +0100 | [diff] [blame] | 7 | #ifdef CONFIG_CPU_HAS_ASID |
Will Deacon | 8a4e3a9 | 2013-02-28 17:47:36 +0100 | [diff] [blame] | 8 | atomic64_t id; |
Catalin Marinas | bdae73c | 2013-07-23 16:15:36 +0100 | [diff] [blame] | 9 | #else |
10 | int switch_pending; | ||||
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | #endif |
Will Deacon | 8a4e3a9 | 2013-02-28 17:47:36 +0100 | [diff] [blame] | 12 | unsigned int vmalloc_seq; |
Russell King | 48be69a | 2013-07-24 00:29:18 +0100 | [diff] [blame] | 13 | unsigned long sigpage; |
Nathan Lynch | 1713ce7 | 2015-03-25 19:13:16 +0100 | [diff] [blame] | 14 | #ifdef CONFIG_VDSO |
15 | unsigned long vdso; | ||||
16 | #endif | ||||
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | } mm_context_t; |
18 | |||||
Russell King | 516793c | 2007-05-17 10:19:23 +0100 | [diff] [blame] | 19 | #ifdef CONFIG_CPU_HAS_ASID |
Will Deacon | b5466f8 | 2012-06-15 14:47:31 +0100 | [diff] [blame] | 20 | #define ASID_BITS 8 |
21 | #define ASID_MASK ((~0ULL) << ASID_BITS) | ||||
Victor Kamensky | a1af347 | 2013-10-07 08:48:23 -0700 | [diff] [blame] | 22 | #define ASID(mm) ((unsigned int)((mm)->context.id.counter & ~ASID_MASK)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | #else |
24 | #define ASID(mm) (0) | ||||
25 | #endif | ||||
26 | |||||
Russell King | 002547b | 2006-06-20 20:46:52 +0100 | [diff] [blame] | 27 | #else |
28 | |||||
29 | /* | ||||
30 | * From nommu.h: | ||||
31 | * Copyright (C) 2002, David McCullough <davidm@snapgear.com> | ||||
32 | * modified for 2.6 by Hyok S. Choi <hyok.choi@samsung.com> | ||||
33 | */ | ||||
34 | typedef struct { | ||||
Will Deacon | 8a4e3a9 | 2013-02-28 17:47:36 +0100 | [diff] [blame] | 35 | unsigned long end_brk; |
Russell King | 002547b | 2006-06-20 20:46:52 +0100 | [diff] [blame] | 36 | } mm_context_t; |
37 | |||||
38 | #endif | ||||
39 | |||||
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | #endif |