mm.h 676 字节
Newer Older
R
Russell King 已提交
1 2
#ifdef CONFIG_MMU

N
Nicolas Pitre 已提交
3
/* the upper-most page table pointer */
4 5 6 7 8 9
extern pmd_t *top_pmd;

#define TOP_PTE(x)	pte_offset_kernel(top_pmd, x)

static inline pmd_t *pmd_off(pgd_t *pgd, unsigned long virt)
{
R
Russell King 已提交
10
	return pmd_offset(pud_offset(pgd, virt), virt);
11 12 13 14 15 16 17
}

static inline pmd_t *pmd_off_k(unsigned long virt)
{
	return pmd_off(pgd_offset_k(virt), virt);
}

18
struct mem_type {
19
	pteval_t prot_pte;
20 21 22 23 24 25 26
	unsigned int prot_l1;
	unsigned int prot_sect;
	unsigned int domain;
};

const struct mem_type *get_mem_type(unsigned int type);

27 28
extern void __flush_dcache_page(struct address_space *mapping, struct page *page);

R
Russell King 已提交
29 30
#endif

31
void __init bootmem_init(void);
R
Russell King 已提交
32
void arm_mm_memblock_reserve(void);