162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci#ifndef __ARM_MMU_H 362306a36Sopenharmony_ci#define __ARM_MMU_H 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci#ifdef CONFIG_MMU 662306a36Sopenharmony_ci 762306a36Sopenharmony_citypedef struct { 862306a36Sopenharmony_ci#ifdef CONFIG_CPU_HAS_ASID 962306a36Sopenharmony_ci atomic64_t id; 1062306a36Sopenharmony_ci#else 1162306a36Sopenharmony_ci int switch_pending; 1262306a36Sopenharmony_ci#endif 1362306a36Sopenharmony_ci atomic_t vmalloc_seq; 1462306a36Sopenharmony_ci unsigned long sigpage; 1562306a36Sopenharmony_ci#ifdef CONFIG_VDSO 1662306a36Sopenharmony_ci unsigned long vdso; 1762306a36Sopenharmony_ci#endif 1862306a36Sopenharmony_ci#ifdef CONFIG_BINFMT_ELF_FDPIC 1962306a36Sopenharmony_ci unsigned long exec_fdpic_loadmap; 2062306a36Sopenharmony_ci unsigned long interp_fdpic_loadmap; 2162306a36Sopenharmony_ci#endif 2262306a36Sopenharmony_ci} mm_context_t; 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ci#ifdef CONFIG_CPU_HAS_ASID 2562306a36Sopenharmony_ci#define ASID_BITS 8 2662306a36Sopenharmony_ci#define ASID_MASK ((~0ULL) << ASID_BITS) 2762306a36Sopenharmony_ci#define ASID(mm) ((unsigned int)((mm)->context.id.counter & ~ASID_MASK)) 2862306a36Sopenharmony_ci#else 2962306a36Sopenharmony_ci#define ASID(mm) (0) 3062306a36Sopenharmony_ci#endif 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ci#else 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ci/* 3562306a36Sopenharmony_ci * From nommu.h: 3662306a36Sopenharmony_ci * Copyright (C) 2002, David McCullough <davidm@snapgear.com> 3762306a36Sopenharmony_ci * modified for 2.6 by Hyok S. Choi <hyok.choi@samsung.com> 3862306a36Sopenharmony_ci */ 3962306a36Sopenharmony_citypedef struct { 4062306a36Sopenharmony_ci unsigned long end_brk; 4162306a36Sopenharmony_ci#ifdef CONFIG_BINFMT_ELF_FDPIC 4262306a36Sopenharmony_ci unsigned long exec_fdpic_loadmap; 4362306a36Sopenharmony_ci unsigned long interp_fdpic_loadmap; 4462306a36Sopenharmony_ci#endif 4562306a36Sopenharmony_ci} mm_context_t; 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci#endif 4862306a36Sopenharmony_ci 4962306a36Sopenharmony_ci#endif 50