[SERIAL] serial_cs: Add quirk for brainboxes 2-port RS232 card
[linux-2.6/verdex.git] / include / asm-sh / pgalloc.h
blobe841465ab4d24214955704852dde0b99a3da35e8
1 #ifndef __ASM_SH_PGALLOC_H
2 #define __ASM_SH_PGALLOC_H
4 #define pmd_populate_kernel(mm, pmd, pte) \
5 set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(pte)))
7 static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd,
8 struct page *pte)
10 set_pmd(pmd, __pmd(_PAGE_TABLE + page_to_phys(pte)));
14 * Allocate and free page tables.
16 static inline pgd_t *pgd_alloc(struct mm_struct *mm)
18 return (pgd_t *)__get_free_page(GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO);
21 static inline void pgd_free(pgd_t *pgd)
23 free_page((unsigned long)pgd);
26 static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
27 unsigned long address)
29 return (pte_t *)__get_free_page(GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO);
32 static inline struct page *pte_alloc_one(struct mm_struct *mm,
33 unsigned long address)
35 return alloc_page(GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO);
38 static inline void pte_free_kernel(pte_t *pte)
40 free_page((unsigned long)pte);
43 static inline void pte_free(struct page *pte)
45 __free_page(pte);
48 #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte))
51 * allocating and freeing a pmd is trivial: the 1-entry pmd is
52 * inside the pgd, so has no extra memory associated with it.
55 #define pmd_free(x) do { } while (0)
56 #define __pmd_free_tlb(tlb,x) do { } while (0)
57 #define check_pgt_cache() do { } while (0)
59 #endif /* __ASM_SH_PGALLOC_H */