Go to the documentation of this file.
11 #ifndef _ASM_MICROBLAZE_PGALLOC_H
12 #define _ASM_MICROBLAZE_PGALLOC_H
16 #include <linux/kernel.h>
18 #include <asm/setup.h>
21 #include <asm/cache.h>
22 #include <asm/pgtable.h>
32 extern struct pgtable_cache_struct {
34 unsigned long *pte_cache;
35 unsigned long pgtable_cache_sz;
38 #define pgd_quicklist (quicklists.pgd_cache)
39 #define pmd_quicklist ((unsigned long *)0)
40 #define pte_quicklist (quicklists.pte_cache)
41 #define pgtable_cache_size (quicklists.pgtable_cache_sz)
43 extern unsigned long *zero_cache;
49 #define zero_quicklist (zero_cache)
50 #define zero_cache_sz (zero_sz)
51 #define zero_cache_calls (zeropage_calls)
52 #define zero_cache_hits (zeropage_hits)
53 #define zero_cache_total (zerototal)
59 extern unsigned long get_zero_page_fast(
void);
79 pgd_quicklist = (
unsigned long *)(*ret);
87 extern inline void free_pgd_fast(
pgd_t *pgd)
89 *(
unsigned long **)pgd = pgd_quicklist;
90 pgd_quicklist = (
unsigned long *) pgd;
99 #define pgd_free(mm, pgd) free_pgd_fast(pgd)
100 #define pgd_alloc(mm) get_pgd_fast()
102 #define pmd_pgtable(pmd) pmd_page(pmd)
108 #define pmd_alloc_one_fast(mm, address) ({ BUG(); ((pmd_t *)1); })
109 #define pmd_alloc_one(mm, address) ({ BUG(); ((pmd_t *)2); })
116 struct page *ptepage;
118 #ifdef CONFIG_HIGHPTE
126 clear_highpage(ptepage);
131 unsigned long address)
137 pte_quicklist = (
unsigned long *)(*ret);
139 pgtable_cache_size--;
144 extern inline void pte_free_fast(
pte_t *
pte)
146 *(
unsigned long **)pte = pte_quicklist;
147 pte_quicklist = (
unsigned long *) pte;
148 pgtable_cache_size++;
156 extern inline void pte_free_slow(
struct page *ptepage)
166 #define __pte_free_tlb(tlb, pte, addr) pte_free((tlb)->mm, (pte))
168 #define pmd_populate(mm, pmd, pte) \
169 (pmd_val(*(pmd)) = (unsigned long)page_address(pte))
171 #define pmd_populate_kernel(mm, pmd, pte) \
172 (pmd_val(*(pmd)) = (unsigned long) (pte))
178 #define pmd_alloc_one(mm, address) ({ BUG(); ((pmd_t *)2); })
179 #define pmd_free(mm, x) do { } while (0)
180 #define __pmd_free_tlb(tlb, x, addr) pmd_free((tlb)->mm, x)
181 #define pgd_populate(mm, pmd, pte) BUG()
183 extern int do_check_pgt_cache(
int,
int);
187 #define check_pgt_cache() do { } while (0)