1 /* SPDX-License-Identifier: GPL-2.0 */
3 #include <linux/list.h>
4 #include <linux/vmalloc.h>
5 #include <linux/pgtable.h>
7 /* the upper-most page table pointer */
10 extern int icache_size
;
13 * 0xffff8000 to 0xffffffff is reserved for any ARM architecture
14 * specific hacks for copying pages efficiently, while 0xffff4000
15 * is reserved for VIPT aliasing flushing by generic code.
17 * Note that we don't allow VIPT aliasing caches with SMP.
19 #define COPYPAGE_MINICACHE 0xffff8000
20 #define COPYPAGE_V6_FROM 0xffff8000
21 #define COPYPAGE_V6_TO 0xffffc000
22 /* PFN alias flushing, for VIPT caches */
23 #define FLUSH_ALIAS_START 0xffff4000
25 static inline void set_top_pte(unsigned long va
, pte_t pte
)
27 pte_t
*ptep
= pte_offset_kernel(top_pmd
, va
);
28 set_pte_ext(ptep
, pte
, 0);
29 local_flush_tlb_kernel_page(va
);
32 static inline pte_t
get_top_pte(unsigned long va
)
34 pte_t
*ptep
= pte_offset_kernel(top_pmd
, va
);
46 const struct mem_type
*get_mem_type(unsigned int type
);
48 extern void __flush_dcache_page(struct address_space
*mapping
, struct page
*page
);
51 * ARM specific vm_struct->flags bits.
54 /* (super)section-mapped I/O regions used by ioremap()/iounmap() */
55 #define VM_ARM_SECTION_MAPPING 0x80000000
57 /* permanent static mappings from iotable_init() */
58 #define VM_ARM_STATIC_MAPPING 0x40000000
61 #define VM_ARM_EMPTY_MAPPING 0x20000000
63 /* mapping type (attributes) for permanent static mappings */
64 #define VM_ARM_MTYPE(mt) ((mt) << 20)
65 #define VM_ARM_MTYPE_MASK (0x1f << 20)
70 struct list_head list
;
73 extern struct list_head static_vmlist
;
74 extern struct static_vm
*find_static_vm_vaddr(void *vaddr
);
75 extern __init
void add_static_vm_early(struct static_vm
*svm
);
79 #ifdef CONFIG_ZONE_DMA
80 extern phys_addr_t arm_dma_limit
;
81 extern unsigned long arm_dma_pfn_limit
;
83 #define arm_dma_limit ((phys_addr_t)~0)
84 #define arm_dma_pfn_limit (~0ul >> PAGE_SHIFT)
87 extern phys_addr_t arm_lowmem_limit
;
89 void __init
bootmem_init(void);
90 void arm_mm_memblock_reserve(void);
91 void dma_contiguous_remap(void);
93 unsigned long __clear_cr(unsigned long mask
);