xref: /openbmc/linux/arch/arm/include/asm/pgtable-nommu.h (revision 7ae9fb1b7ecbb5d85d07857943f677fd1a559b18)
1*d2912cb1SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */
24baa9922SRussell King /*
34baa9922SRussell King  *  arch/arm/include/asm/pgtable-nommu.h
44baa9922SRussell King  *
54baa9922SRussell King  *  Copyright (C) 1995-2002 Russell King
64baa9922SRussell King  *  Copyright (C) 2004  Hyok S. Choi
74baa9922SRussell King  */
84baa9922SRussell King #ifndef _ASMARM_PGTABLE_NOMMU_H
94baa9922SRussell King #define _ASMARM_PGTABLE_NOMMU_H
104baa9922SRussell King 
114baa9922SRussell King #ifndef __ASSEMBLY__
124baa9922SRussell King 
134baa9922SRussell King #include <linux/slab.h>
144baa9922SRussell King #include <asm/processor.h>
154baa9922SRussell King #include <asm/page.h>
164baa9922SRussell King 
174baa9922SRussell King /*
184baa9922SRussell King  * Trivial page table functions.
194baa9922SRussell King  */
204baa9922SRussell King #define pgd_present(pgd)	(1)
214baa9922SRussell King #define pgd_none(pgd)		(0)
224baa9922SRussell King #define pgd_bad(pgd)		(0)
234baa9922SRussell King #define pgd_clear(pgdp)
244baa9922SRussell King /*
254baa9922SRussell King  * PMD_SHIFT determines the size of the area a second-level page table can map
264baa9922SRussell King  * PGDIR_SHIFT determines what a third-level page table entry can map
274baa9922SRussell King  */
284baa9922SRussell King #define PGDIR_SHIFT		21
294baa9922SRussell King 
304baa9922SRussell King #define PGDIR_SIZE		(1UL << PGDIR_SHIFT)
314baa9922SRussell King #define PGDIR_MASK		(~(PGDIR_SIZE-1))
324baa9922SRussell King /* FIXME */
334baa9922SRussell King 
344baa9922SRussell King #define PAGE_NONE	__pgprot(0)
354baa9922SRussell King #define PAGE_SHARED	__pgprot(0)
364baa9922SRussell King #define PAGE_COPY	__pgprot(0)
374baa9922SRussell King #define PAGE_READONLY	__pgprot(0)
384baa9922SRussell King #define PAGE_KERNEL	__pgprot(0)
394baa9922SRussell King 
404baa9922SRussell King #define swapper_pg_dir ((pgd_t *) 0)
414baa9922SRussell King 
424baa9922SRussell King 
434baa9922SRussell King typedef pte_t *pte_addr_t;
444baa9922SRussell King 
454baa9922SRussell King /*
464baa9922SRussell King  * Mark the prot value as uncacheable and unbufferable.
474baa9922SRussell King  */
48e2fce0a2SArnd Bergmann #define pgprot_noncached(prot)	(prot)
49e2fce0a2SArnd Bergmann #define pgprot_writecombine(prot) (prot)
507ef4783eSVladimir Murzin #define pgprot_device(prot)	(prot)
514baa9922SRussell King 
524baa9922SRussell King 
534baa9922SRussell King /*
544baa9922SRussell King  * These would be in other places but having them here reduces the diffs.
554baa9922SRussell King  */
564baa9922SRussell King extern unsigned int kobjsize(const void *objp);
574baa9922SRussell King 
584baa9922SRussell King /*
594baa9922SRussell King  * All 32bit addresses are effectively valid for vmalloc...
604baa9922SRussell King  * Sort of meaningless for non-VM targets.
614baa9922SRussell King  */
62c931b4f6SFenkart/Bostandzhyan #define	VMALLOC_START	0UL
63c931b4f6SFenkart/Bostandzhyan #define	VMALLOC_END	0xffffffffUL
644baa9922SRussell King 
65d016bf7eSKirill A. Shutemov #define FIRST_USER_ADDRESS      0UL
664baa9922SRussell King 
674baa9922SRussell King #else
684baa9922SRussell King 
694baa9922SRussell King /*
704baa9922SRussell King  * dummy tlb and user structures.
714baa9922SRussell King  */
724baa9922SRussell King #define v3_tlb_fns	(0)
734baa9922SRussell King #define v4_tlb_fns	(0)
744baa9922SRussell King #define v4wb_tlb_fns	(0)
754baa9922SRussell King #define v4wbi_tlb_fns	(0)
764baa9922SRussell King #define v6wbi_tlb_fns	(0)
774baa9922SRussell King #define v7wbi_tlb_fns	(0)
784baa9922SRussell King 
794baa9922SRussell King #define v3_user_fns	(0)
804baa9922SRussell King #define v4_user_fns	(0)
814baa9922SRussell King #define v4_mc_user_fns	(0)
824baa9922SRussell King #define v4wb_user_fns	(0)
834baa9922SRussell King #define v4wt_user_fns	(0)
844baa9922SRussell King #define v6_user_fns	(0)
854baa9922SRussell King #define xscale_mc_user_fns (0)
864baa9922SRussell King 
874baa9922SRussell King #endif /*__ASSEMBLY__*/
884baa9922SRussell King 
894baa9922SRussell King #endif /* _ASMARM_PGTABLE_H */
90