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