14f04d8f0SCatalin Marinas /* 24f04d8f0SCatalin Marinas * Copyright (C) 2012 ARM Ltd. 34f04d8f0SCatalin Marinas * 44f04d8f0SCatalin Marinas * This program is free software; you can redistribute it and/or modify 54f04d8f0SCatalin Marinas * it under the terms of the GNU General Public License version 2 as 64f04d8f0SCatalin Marinas * published by the Free Software Foundation. 74f04d8f0SCatalin Marinas * 84f04d8f0SCatalin Marinas * This program is distributed in the hope that it will be useful, 94f04d8f0SCatalin Marinas * but WITHOUT ANY WARRANTY; without even the implied warranty of 104f04d8f0SCatalin Marinas * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 114f04d8f0SCatalin Marinas * GNU General Public License for more details. 124f04d8f0SCatalin Marinas * 134f04d8f0SCatalin Marinas * You should have received a copy of the GNU General Public License 144f04d8f0SCatalin Marinas * along with this program. If not, see <http://www.gnu.org/licenses/>. 154f04d8f0SCatalin Marinas */ 164f04d8f0SCatalin Marinas #ifndef __ASM_MMU_H 174f04d8f0SCatalin Marinas #define __ASM_MMU_H 184f04d8f0SCatalin Marinas 194f04d8f0SCatalin Marinas typedef struct { 20*5aec715dSWill Deacon atomic64_t id; 214f04d8f0SCatalin Marinas void *vdso; 224f04d8f0SCatalin Marinas } mm_context_t; 234f04d8f0SCatalin Marinas 24*5aec715dSWill Deacon /* 25*5aec715dSWill Deacon * This macro is only used by the TLBI code, which cannot race with an 26*5aec715dSWill Deacon * ASID change and therefore doesn't need to reload the counter using 27*5aec715dSWill Deacon * atomic64_read. 28*5aec715dSWill Deacon */ 29*5aec715dSWill Deacon #define ASID(mm) ((mm)->context.id.counter & 0xffff) 304f04d8f0SCatalin Marinas 314f04d8f0SCatalin Marinas extern void paging_init(void); 322475ff9dSCatalin Marinas extern void __iomem *early_io_map(phys_addr_t phys, unsigned long virt); 330bf757c7SMark Salter extern void init_mem_pgprot(void); 348ce837ceSArd Biesheuvel extern void create_pgd_mapping(struct mm_struct *mm, phys_addr_t phys, 358ce837ceSArd Biesheuvel unsigned long virt, phys_addr_t size, 368ce837ceSArd Biesheuvel pgprot_t prot); 3761bd93ceSArd Biesheuvel extern void *fixmap_remap_fdt(phys_addr_t dt_phys); 384f04d8f0SCatalin Marinas 394f04d8f0SCatalin Marinas #endif 40