aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-avr32/pgalloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-avr32/pgalloc.h')
-rw-r--r--include/asm-avr32/pgalloc.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/include/asm-avr32/pgalloc.h b/include/asm-avr32/pgalloc.h
index 51fc1f6e4b17..5b768fc2388e 100644
--- a/include/asm-avr32/pgalloc.h
+++ b/include/asm-avr32/pgalloc.h
@@ -8,25 +8,27 @@
8#ifndef __ASM_AVR32_PGALLOC_H 8#ifndef __ASM_AVR32_PGALLOC_H
9#define __ASM_AVR32_PGALLOC_H 9#define __ASM_AVR32_PGALLOC_H
10 10
11#include <asm/processor.h>
12#include <linux/threads.h>
13#include <linux/slab.h>
14#include <linux/mm.h> 11#include <linux/mm.h>
12#include <linux/sched.h>
13#include <linux/slab.h>
15 14
16#define pmd_populate_kernel(mm, pmd, pte) \ 15static inline void pmd_populate_kernel(struct mm_struct *mm,
17 set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(pte))) 16 pmd_t *pmd, pte_t *pte)
17{
18 set_pmd(pmd, __pmd((unsigned long)pte));
19}
18 20
19static __inline__ void pmd_populate(struct mm_struct *mm, pmd_t *pmd, 21static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd,
20 pgtable_t pte) 22 pgtable_t pte)
21{ 23{
22 set_pmd(pmd, __pmd(_PAGE_TABLE + page_to_phys(pte))); 24 set_pmd(pmd, __pmd((unsigned long)page_address(pte)));
23} 25}
24#define pmd_pgtable(pmd) pmd_page(pmd) 26#define pmd_pgtable(pmd) pmd_page(pmd)
25 27
26/* 28/*
27 * Allocate and free page tables 29 * Allocate and free page tables
28 */ 30 */
29static __inline__ pgd_t *pgd_alloc(struct mm_struct *mm) 31static inline pgd_t *pgd_alloc(struct mm_struct *mm)
30{ 32{
31 return kcalloc(USER_PTRS_PER_PGD, sizeof(pgd_t), GFP_KERNEL); 33 return kcalloc(USER_PTRS_PER_PGD, sizeof(pgd_t), GFP_KERNEL);
32} 34}