1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef __ARM_MMU_H 3 #define __ARM_MMU_H 4 5 #ifdef CONFIG_MMU 6 7 typedef struct { 8 #ifdef CONFIG_CPU_HAS_ASID 9 atomic64_t id; 10 #else 11 int switch_pending; 12 #endif 13 unsigned int vmalloc_seq; 14 unsigned long sigpage; 15 #ifdef CONFIG_VDSO 16 unsigned long vdso; 17 #endif 18 } mm_context_t; 19 20 #ifdef CONFIG_CPU_HAS_ASID 21 #define ASID_BITS 8 22 #define ASID_MASK ((~0ULL) << ASID_BITS) 23 #define ASID(mm) ((unsigned int)((mm)->context.id.counter & ~ASID_MASK)) 24 #else 25 #define ASID(mm) (0) 26 #endif 27 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 { 36 unsigned long end_brk; 37 } mm_context_t; 38 39 #endif 40 41 #endif 42