2 * linux/include/asm-arm/proc-armo/pgalloc.h
4 * Copyright (C) 2001 Russell King
6 * Page table allocation/freeing primitives for 26-bit ARM processors.
9 /* unfortunately, this includes linux/mm.h and the rest of the universe. */
10 #include <linux/slab.h>
12 extern kmem_cache_t *pte_cache;
15 * Allocate one PTE table.
17 * Note that we keep the processor copy of the PTE entries separate
18 * from the Linux copy. The processor copies are offset by -PTRS_PER_PTE
19 * words from the Linux copy.
21 static inline pte_t *pte_alloc_one(struct mm_struct *mm, unsigned long address)
23 return kmem_cache_alloc(pte_cache, GFP_KERNEL);
29 static inline void pte_free_slow(pte_t *pte)
32 kmem_cache_free(pte_cache, pte);
36 * Populate the pmdp entry with a pointer to the pte. This pmd is part
37 * of the mm address space.
39 * If 'mm' is the init tasks mm, then we are doing a vmalloc, and we
40 * need to set stuff up correctly for it.
42 #define pmd_populate(mm,pmdp,pte) \
44 set_pmd(pmdp, __mk_pmd(pte, _PAGE_TABLE)); \