diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-12-21 15:44:34 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-12-21 15:44:34 +0900 |
commit | 4b4f887fb2780e39383c1f202b72f5a2780b2d4c (patch) | |
tree | e790d89c2612d2464ac00063dac677653f4ac9cb /arch/sh/include/asm/pgalloc_pmd.h | |
parent | 6424db52e24e8cdf89917fa3c10395116440160e (diff) | |
parent | 76e7461a21dfe13565b2a323b53c8cc963541126 (diff) |
Merge branch 'master' into sh/hw-breakpoints
Diffstat (limited to 'arch/sh/include/asm/pgalloc_pmd.h')
-rw-r--r-- | arch/sh/include/asm/pgalloc_pmd.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/arch/sh/include/asm/pgalloc_pmd.h b/arch/sh/include/asm/pgalloc_pmd.h new file mode 100644 index 00000000000..20f75cc4eb0 --- /dev/null +++ b/arch/sh/include/asm/pgalloc_pmd.h @@ -0,0 +1,41 @@ +#ifndef __ASM_SH_PGALLOC_PMD_H +#define __ASM_SH_PGALLOC_PMD_H + +static inline pgd_t *pgd_alloc(struct mm_struct *mm) +{ + pgd_t *pgd; + int i; + + pgd = kzalloc(sizeof(*pgd) * PTRS_PER_PGD, GFP_KERNEL | __GFP_REPEAT); + + for (i = USER_PTRS_PER_PGD; i < PTRS_PER_PGD; i++) + pgd[i] = swapper_pg_dir[i]; + + return pgd; +} + +static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) +{ + kfree(pgd); +} + +static inline void __check_pgt_cache(void) +{ +} + +static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) +{ + set_pud(pud, __pud((unsigned long)pmd)); +} + +static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) +{ + return quicklist_alloc(QUICK_PT, GFP_KERNEL | __GFP_REPEAT, NULL); +} + +static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) +{ + quicklist_free(QUICK_PT, NULL, pmd); +} + +#endif /* __ASM_SH_PGALLOC_PMD_H */ |