18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * arch/arm/include/asm/pgtable-nommu.h 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 1995-2002 Russell King 68c2ecf20Sopenharmony_ci * Copyright (C) 2004 Hyok S. Choi 78c2ecf20Sopenharmony_ci */ 88c2ecf20Sopenharmony_ci#ifndef _ASMARM_PGTABLE_NOMMU_H 98c2ecf20Sopenharmony_ci#define _ASMARM_PGTABLE_NOMMU_H 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#ifndef __ASSEMBLY__ 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci#include <linux/slab.h> 148c2ecf20Sopenharmony_ci#include <asm/processor.h> 158c2ecf20Sopenharmony_ci#include <asm/page.h> 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci/* 188c2ecf20Sopenharmony_ci * Trivial page table functions. 198c2ecf20Sopenharmony_ci */ 208c2ecf20Sopenharmony_ci#define pgd_present(pgd) (1) 218c2ecf20Sopenharmony_ci#define pgd_none(pgd) (0) 228c2ecf20Sopenharmony_ci#define pgd_bad(pgd) (0) 238c2ecf20Sopenharmony_ci#define pgd_clear(pgdp) 248c2ecf20Sopenharmony_ci#define kern_addr_valid(addr) (1) 258c2ecf20Sopenharmony_ci/* FIXME */ 268c2ecf20Sopenharmony_ci/* 278c2ecf20Sopenharmony_ci * PMD_SHIFT determines the size of the area a second-level page table can map 288c2ecf20Sopenharmony_ci * PGDIR_SHIFT determines what a third-level page table entry can map 298c2ecf20Sopenharmony_ci */ 308c2ecf20Sopenharmony_ci#define PGDIR_SHIFT 21 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci#define PGDIR_SIZE (1UL << PGDIR_SHIFT) 338c2ecf20Sopenharmony_ci#define PGDIR_MASK (~(PGDIR_SIZE-1)) 348c2ecf20Sopenharmony_ci/* FIXME */ 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci#define PAGE_NONE __pgprot(0) 378c2ecf20Sopenharmony_ci#define PAGE_SHARED __pgprot(0) 388c2ecf20Sopenharmony_ci#define PAGE_COPY __pgprot(0) 398c2ecf20Sopenharmony_ci#define PAGE_READONLY __pgprot(0) 408c2ecf20Sopenharmony_ci#define PAGE_KERNEL __pgprot(0) 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci#define swapper_pg_dir ((pgd_t *) 0) 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_citypedef pte_t *pte_addr_t; 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci/* 488c2ecf20Sopenharmony_ci * Mark the prot value as uncacheable and unbufferable. 498c2ecf20Sopenharmony_ci */ 508c2ecf20Sopenharmony_ci#define pgprot_noncached(prot) (prot) 518c2ecf20Sopenharmony_ci#define pgprot_writecombine(prot) (prot) 528c2ecf20Sopenharmony_ci#define pgprot_device(prot) (prot) 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci/* 568c2ecf20Sopenharmony_ci * These would be in other places but having them here reduces the diffs. 578c2ecf20Sopenharmony_ci */ 588c2ecf20Sopenharmony_ciextern unsigned int kobjsize(const void *objp); 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci/* 618c2ecf20Sopenharmony_ci * All 32bit addresses are effectively valid for vmalloc... 628c2ecf20Sopenharmony_ci * Sort of meaningless for non-VM targets. 638c2ecf20Sopenharmony_ci */ 648c2ecf20Sopenharmony_ci#define VMALLOC_START 0UL 658c2ecf20Sopenharmony_ci#define VMALLOC_END 0xffffffffUL 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci#define FIRST_USER_ADDRESS 0UL 688c2ecf20Sopenharmony_ci 698c2ecf20Sopenharmony_ci#else 708c2ecf20Sopenharmony_ci 718c2ecf20Sopenharmony_ci/* 728c2ecf20Sopenharmony_ci * dummy tlb and user structures. 738c2ecf20Sopenharmony_ci */ 748c2ecf20Sopenharmony_ci#define v3_tlb_fns (0) 758c2ecf20Sopenharmony_ci#define v4_tlb_fns (0) 768c2ecf20Sopenharmony_ci#define v4wb_tlb_fns (0) 778c2ecf20Sopenharmony_ci#define v4wbi_tlb_fns (0) 788c2ecf20Sopenharmony_ci#define v6wbi_tlb_fns (0) 798c2ecf20Sopenharmony_ci#define v7wbi_tlb_fns (0) 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ci#define v3_user_fns (0) 828c2ecf20Sopenharmony_ci#define v4_user_fns (0) 838c2ecf20Sopenharmony_ci#define v4_mc_user_fns (0) 848c2ecf20Sopenharmony_ci#define v4wb_user_fns (0) 858c2ecf20Sopenharmony_ci#define v4wt_user_fns (0) 868c2ecf20Sopenharmony_ci#define v6_user_fns (0) 878c2ecf20Sopenharmony_ci#define xscale_mc_user_fns (0) 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ci#endif /*__ASSEMBLY__*/ 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_ci#endif /* _ASMARM_PGTABLE_H */ 92