X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-ia64%2Fpgalloc.h;h=d80b29d99e17198f32fa297079a28bb0cbdd0188;hb=a2f44b27303a5353859d77a3e96a1d3f33f56ab7;hp=b2d9ee3145543974ce0ff5fde976a10311bbc83c;hpb=cace1c4618b6c6442b7dc973e935e7f3268e4aa7;p=linux-2.6.git diff --git a/include/asm-ia64/pgalloc.h b/include/asm-ia64/pgalloc.h index b2d9ee314..d80b29d99 100644 --- a/include/asm-ia64/pgalloc.h +++ b/include/asm-ia64/pgalloc.h @@ -17,7 +17,6 @@ * Copyright (C) 2000, Goutham Rao */ -#include #include #include @@ -65,7 +64,7 @@ static inline void *pgtable_quicklist_alloc(void) static inline void pgtable_quicklist_free(void *pgtable_entry) { #ifdef CONFIG_NUMA - unsigned long nid = page_to_nid(virt_to_page(pgtable_entry)); + int nid = page_to_nid(virt_to_page(pgtable_entry)); if (unlikely(nid != numa_node_id())) { free_page((unsigned long)pgtable_entry); @@ -90,6 +89,25 @@ static inline void pgd_free(pgd_t * pgd) pgtable_quicklist_free(pgd); } +#ifdef CONFIG_PGTABLE_4 +static inline void +pgd_populate(struct mm_struct *mm, pgd_t * pgd_entry, pud_t * pud) +{ + pgd_val(*pgd_entry) = __pa(pud); +} + +static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr) +{ + return pgtable_quicklist_alloc(); +} + +static inline void pud_free(pud_t * pud) +{ + pgtable_quicklist_free(pud); +} +#define __pud_free_tlb(tlb, pud) pud_free(pud) +#endif /* CONFIG_PGTABLE_4 */ + static inline void pud_populate(struct mm_struct *mm, pud_t * pud_entry, pmd_t * pmd) { @@ -111,7 +129,11 @@ static inline void pmd_free(pmd_t * pmd) static inline void pmd_populate(struct mm_struct *mm, pmd_t * pmd_entry, struct page *pte) { +#ifndef CONFIG_XEN pmd_val(*pmd_entry) = page_to_phys(pte); +#else + pmd_val(*pmd_entry) = page_to_pseudophys(pte); +#endif } static inline void