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; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | #endif |
Will Deacon | 8a4e3a9 | 2013-02-28 17:47:36 +0100 | [diff] [blame] | 10 | unsigned int vmalloc_seq; |
Russell King | a5510da | 2013-07-24 00:29:18 +0100 | [diff] [blame^] | 11 | unsigned long sigpage; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | } mm_context_t; |
13 | |||||
Russell King | 516793c | 2007-05-17 10:19:23 +0100 | [diff] [blame] | 14 | #ifdef CONFIG_CPU_HAS_ASID |
Will Deacon | b5466f8 | 2012-06-15 14:47:31 +0100 | [diff] [blame] | 15 | #define ASID_BITS 8 |
16 | #define ASID_MASK ((~0ULL) << ASID_BITS) | ||||
Will Deacon | 8a4e3a9 | 2013-02-28 17:47:36 +0100 | [diff] [blame] | 17 | #define ASID(mm) ((mm)->context.id.counter & ~ASID_MASK) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | #else |
19 | #define ASID(mm) (0) | ||||
20 | #endif | ||||
21 | |||||
Russell King | 002547b | 2006-06-20 20:46:52 +0100 | [diff] [blame] | 22 | #else |
23 | |||||
24 | /* | ||||
25 | * From nommu.h: | ||||
26 | * Copyright (C) 2002, David McCullough <davidm@snapgear.com> | ||||
27 | * modified for 2.6 by Hyok S. Choi <hyok.choi@samsung.com> | ||||
28 | */ | ||||
29 | typedef struct { | ||||
Will Deacon | 8a4e3a9 | 2013-02-28 17:47:36 +0100 | [diff] [blame] | 30 | unsigned long end_brk; |
Russell King | 002547b | 2006-06-20 20:46:52 +0100 | [diff] [blame] | 31 | } mm_context_t; |
32 | |||||
33 | #endif | ||||
34 | |||||
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | #endif |