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