Russell King | 3ff1559 | 2006-11-30 13:53:54 +0000 | [diff] [blame] | 1 | #ifdef CONFIG_MMU |
| 2 | |
Nicolas Pitre | 5f0fbf9 | 2008-09-16 13:05:53 -0400 | [diff] [blame] | 3 | /* the upper-most page table pointer */ |
Russell King | 1b2e2b7 | 2006-08-21 17:06:38 +0100 | [diff] [blame] | 4 | extern pmd_t *top_pmd; |
| 5 | |
| 6 | #define TOP_PTE(x) pte_offset_kernel(top_pmd, x) |
| 7 | |
Russell King | 1b2e2b7 | 2006-08-21 17:06:38 +0100 | [diff] [blame] | 8 | static inline pmd_t *pmd_off_k(unsigned long virt) |
| 9 | { |
Russell King | cc780af | 2011-05-26 19:50:30 +0100 | [diff] [blame] | 10 | return pmd_offset(pud_offset(pgd_offset_k(virt), virt), virt); |
Russell King | 1b2e2b7 | 2006-08-21 17:06:38 +0100 | [diff] [blame] | 11 | } |
| 12 | |
Russell King | b29e9f5 | 2007-04-21 10:47:29 +0100 | [diff] [blame] | 13 | struct mem_type { |
Russell King | f6e3354 | 2010-11-16 00:22:09 +0000 | [diff] [blame] | 14 | pteval_t prot_pte; |
Catalin Marinas | 442e70c | 2011-09-05 17:51:56 +0100 | [diff] [blame] | 15 | pmdval_t prot_l1; |
| 16 | pmdval_t prot_sect; |
Russell King | b29e9f5 | 2007-04-21 10:47:29 +0100 | [diff] [blame] | 17 | unsigned int domain; |
| 18 | }; |
| 19 | |
| 20 | const struct mem_type *get_mem_type(unsigned int type); |
| 21 | |
Russell King | 7b0a100 | 2009-10-24 14:11:59 +0100 | [diff] [blame] | 22 | extern void __flush_dcache_page(struct address_space *mapping, struct page *page); |
| 23 | |
Nicolas Pitre | 576d2f2 | 2011-09-16 01:14:23 -0400 | [diff] [blame] | 24 | /* |
| 25 | * ARM specific vm_struct->flags bits. |
| 26 | */ |
| 27 | |
| 28 | /* (super)section-mapped I/O regions used by ioremap()/iounmap() */ |
| 29 | #define VM_ARM_SECTION_MAPPING 0x80000000 |
| 30 | |
| 31 | /* permanent static mappings from iotable_init() */ |
| 32 | #define VM_ARM_STATIC_MAPPING 0x40000000 |
| 33 | |
| 34 | /* mapping type (attributes) for permanent static mappings */ |
| 35 | #define VM_ARM_MTYPE(mt) ((mt) << 20) |
| 36 | #define VM_ARM_MTYPE_MASK (0x1f << 20) |
| 37 | |
Russell King | 3ff1559 | 2006-11-30 13:53:54 +0000 | [diff] [blame] | 38 | #endif |
| 39 | |
Russell King | 022ae53 | 2011-07-08 21:26:59 +0100 | [diff] [blame] | 40 | #ifdef CONFIG_ZONE_DMA |
| 41 | extern u32 arm_dma_limit; |
| 42 | #else |
| 43 | #define arm_dma_limit ((u32)~0) |
| 44 | #endif |
| 45 | |
Russell King | 8d717a5 | 2010-05-22 19:47:18 +0100 | [diff] [blame] | 46 | void __init bootmem_init(void); |
Russell King | 2778f62 | 2010-07-09 16:27:52 +0100 | [diff] [blame] | 47 | void arm_mm_memblock_reserve(void); |