blob: 010566799c80c27680390154ae85a0a7b5124567 [file] [log] [blame]
Russell King3ff15592006-11-30 13:53:54 +00001#ifdef CONFIG_MMU
2
Nicolas Pitre5f0fbf92008-09-16 13:05:53 -04003/* the upper-most page table pointer */
Russell King1b2e2b72006-08-21 17:06:38 +01004extern pmd_t *top_pmd;
5
6#define TOP_PTE(x) pte_offset_kernel(top_pmd, x)
7
Russell King1b2e2b72006-08-21 17:06:38 +01008static inline pmd_t *pmd_off_k(unsigned long virt)
9{
Russell Kingcc780af2011-05-26 19:50:30 +010010 return pmd_offset(pud_offset(pgd_offset_k(virt), virt), virt);
Russell King1b2e2b72006-08-21 17:06:38 +010011}
12
Russell Kingb29e9f52007-04-21 10:47:29 +010013struct mem_type {
Russell Kingf6e33542010-11-16 00:22:09 +000014 pteval_t prot_pte;
Russell Kingb29e9f52007-04-21 10:47:29 +010015 unsigned int prot_l1;
16 unsigned int prot_sect;
17 unsigned int domain;
18};
19
20const struct mem_type *get_mem_type(unsigned int type);
21
Russell King7b0a1002009-10-24 14:11:59 +010022extern void __flush_dcache_page(struct address_space *mapping, struct page *page);
23
Russell King3ff15592006-11-30 13:53:54 +000024#endif
25
Russell King022ae532011-07-08 21:26:59 +010026#ifdef CONFIG_ZONE_DMA
27extern u32 arm_dma_limit;
28#else
29#define arm_dma_limit ((u32)~0)
30#endif
31
Russell King8d717a52010-05-22 19:47:18 +010032void __init bootmem_init(void);
Russell King2778f622010-07-09 16:27:52 +010033void arm_mm_memblock_reserve(void);