2 * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com)
3 * Derived from include/asm-i386/pgalloc.h and include/asm-i386/pgtable.h
4 * Licensed under the GPL
11 #include "asm/fixmap.h"
13 #define pmd_populate_kernel(mm, pmd, pte) \
14 set_pmd(pmd, __pmd(_PAGE_TABLE + (unsigned long) __pa(pte)))
16 static inline void pmd_populate(struct mm_struct
*mm
, pmd_t
*pmd
,
19 set_pmd(pmd
, __pmd(_PAGE_TABLE
+ page_to_phys(pte
)));
22 extern pgd_t
*pgd_alloc(struct mm_struct
*);
23 extern void pgd_free(pgd_t
*pgd
);
25 extern pte_t
*pte_alloc_one_kernel(struct mm_struct
*, unsigned long);
26 extern struct page
*pte_alloc_one(struct mm_struct
*, unsigned long);
28 static inline void pte_free_kernel(pte_t
*pte
)
30 free_page((unsigned long) pte
);
33 static inline void pte_free(struct page
*pte
)
38 #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte))
41 * allocating and freeing a pmd is trivial: the 1-entry pmd is
42 * inside the pgd, so has no extra memory associated with it.
45 #define pmd_alloc_one(mm, addr) ({ BUG(); ((pmd_t *)2); })
46 #define pmd_free(x) do { } while (0)
47 #define __pmd_free_tlb(tlb,x) do { } while (0)
48 #define pgd_populate(mm, pmd, pte) BUG()
50 #define check_pgt_cache() do { } while (0)
55 * Overrides for Emacs so that we follow Linus's tabbing style.
56 * Emacs will notice this stuff at the end of the file and automatically
57 * adjust the settings for this buffer only. This must remain at the end
59 * ---------------------------------------------------------------------------
61 * c-file-style: "linux"