blob: a888363398f8528fcb6bc1bb7aeca4d0245464a9 [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
8static inline pmd_t *pmd_off(pgd_t *pgd, unsigned long virt)
9{
10 return pmd_offset(pgd, virt);
11}
12
13static inline pmd_t *pmd_off_k(unsigned long virt)
14{
15 return pmd_off(pgd_offset_k(virt), virt);
16}
17
Russell Kingb29e9f52007-04-21 10:47:29 +010018struct mem_type {
19 unsigned int prot_pte;
20 unsigned int prot_l1;
21 unsigned int prot_sect;
22 unsigned int domain;
23};
24
25const struct mem_type *get_mem_type(unsigned int type);
26
Russell King7b0a1002009-10-24 14:11:59 +010027extern void __flush_dcache_page(struct address_space *mapping, struct page *page);
28
Russell King3ff15592006-11-30 13:53:54 +000029#endif
30
Russell King1b2e2b72006-08-21 17:06:38 +010031struct map_desc;
Russell Kingd111e8f2006-09-27 15:27:33 +010032struct meminfo;
33struct pglist_data;
Russell King1b2e2b72006-08-21 17:06:38 +010034
Russell King1b2e2b72006-08-21 17:06:38 +010035void __init create_mapping(struct map_desc *md);
Nicolas Pitre4b5f32c2008-10-06 13:24:40 -040036void __init bootmem_init(void);
Russell Kingd111e8f2006-09-27 15:27:33 +010037void reserve_node_zero(struct pglist_data *pgdat);