2 * linux/arch/unicore32/mm/mm.h
4 * Code specific to PKUnity SoC and UniCore ISA
6 * Copyright (C) 2001-2010 GUAN Xue-tao
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
12 #include <asm/hwdef-copro.h>
14 /* the upper-most page table pointer */
15 extern pmd_t *top_pmd;
16 extern int sysctl_overcommit_memory;
18 #define TOP_PTE(x) pte_offset_kernel(top_pmd, x)
20 static inline pmd_t *pmd_off(pgd_t *pgd, unsigned long virt)
22 return pmd_offset((pud_t *)pgd, virt);
25 static inline pmd_t *pmd_off_k(unsigned long virt)
27 return pmd_off(pgd_offset_k(virt), virt);
31 unsigned int prot_pte;
33 unsigned int prot_sect;
36 const struct mem_type *get_mem_type(unsigned int type);
38 extern void __flush_dcache_page(struct address_space *, struct page *);
39 extern void hook_fault_code(int nr, int (*fn)
40 (unsigned long, unsigned int, struct pt_regs *),
41 int sig, int code, const char *name);
43 void __init bootmem_init(void);
44 void uc32_mm_memblock_reserve(void);