diff options
Diffstat (limited to 'arch/sparc/include/asm/pgalloc_32.h')
| -rw-r--r-- | arch/sparc/include/asm/pgalloc_32.h | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/arch/sparc/include/asm/pgalloc_32.h b/arch/sparc/include/asm/pgalloc_32.h index e5b169b46d21..9b1c36de0f18 100644 --- a/arch/sparc/include/asm/pgalloc_32.h +++ b/arch/sparc/include/asm/pgalloc_32.h | |||
| @@ -11,28 +11,15 @@ | |||
| 11 | 11 | ||
| 12 | struct page; | 12 | struct page; |
| 13 | 13 | ||
| 14 | extern struct pgtable_cache_struct { | 14 | void *srmmu_get_nocache(int size, int align); |
| 15 | unsigned long *pgd_cache; | 15 | void srmmu_free_nocache(void *addr, int size); |
| 16 | unsigned long *pte_cache; | ||
| 17 | unsigned long pgtable_cache_sz; | ||
| 18 | unsigned long pgd_cache_sz; | ||
| 19 | } pgt_quicklists; | ||
| 20 | |||
| 21 | unsigned long srmmu_get_nocache(int size, int align); | ||
| 22 | void srmmu_free_nocache(unsigned long vaddr, int size); | ||
| 23 | |||
| 24 | #define pgd_quicklist (pgt_quicklists.pgd_cache) | ||
| 25 | #define pmd_quicklist ((unsigned long *)0) | ||
| 26 | #define pte_quicklist (pgt_quicklists.pte_cache) | ||
| 27 | #define pgtable_cache_size (pgt_quicklists.pgtable_cache_sz) | ||
| 28 | #define pgd_cache_size (pgt_quicklists.pgd_cache_sz) | ||
| 29 | 16 | ||
| 30 | #define check_pgt_cache() do { } while (0) | 17 | #define check_pgt_cache() do { } while (0) |
| 31 | 18 | ||
| 32 | pgd_t *get_pgd_fast(void); | 19 | pgd_t *get_pgd_fast(void); |
| 33 | static inline void free_pgd_fast(pgd_t *pgd) | 20 | static inline void free_pgd_fast(pgd_t *pgd) |
| 34 | { | 21 | { |
| 35 | srmmu_free_nocache((unsigned long)pgd, SRMMU_PGD_TABLE_SIZE); | 22 | srmmu_free_nocache(pgd, SRMMU_PGD_TABLE_SIZE); |
| 36 | } | 23 | } |
| 37 | 24 | ||
| 38 | #define pgd_free(mm, pgd) free_pgd_fast(pgd) | 25 | #define pgd_free(mm, pgd) free_pgd_fast(pgd) |
| @@ -50,13 +37,13 @@ static inline void pgd_set(pgd_t * pgdp, pmd_t * pmdp) | |||
| 50 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, | 37 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, |
| 51 | unsigned long address) | 38 | unsigned long address) |
| 52 | { | 39 | { |
| 53 | return (pmd_t *)srmmu_get_nocache(SRMMU_PMD_TABLE_SIZE, | 40 | return srmmu_get_nocache(SRMMU_PMD_TABLE_SIZE, |
| 54 | SRMMU_PMD_TABLE_SIZE); | 41 | SRMMU_PMD_TABLE_SIZE); |
| 55 | } | 42 | } |
| 56 | 43 | ||
| 57 | static inline void free_pmd_fast(pmd_t * pmd) | 44 | static inline void free_pmd_fast(pmd_t * pmd) |
| 58 | { | 45 | { |
| 59 | srmmu_free_nocache((unsigned long)pmd, SRMMU_PMD_TABLE_SIZE); | 46 | srmmu_free_nocache(pmd, SRMMU_PMD_TABLE_SIZE); |
| 60 | } | 47 | } |
| 61 | 48 | ||
| 62 | #define pmd_free(mm, pmd) free_pmd_fast(pmd) | 49 | #define pmd_free(mm, pmd) free_pmd_fast(pmd) |
| @@ -73,13 +60,13 @@ pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address); | |||
| 73 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, | 60 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, |
| 74 | unsigned long address) | 61 | unsigned long address) |
| 75 | { | 62 | { |
| 76 | return (pte_t *)srmmu_get_nocache(PTE_SIZE, PTE_SIZE); | 63 | return srmmu_get_nocache(PTE_SIZE, PTE_SIZE); |
| 77 | } | 64 | } |
| 78 | 65 | ||
| 79 | 66 | ||
| 80 | static inline void free_pte_fast(pte_t *pte) | 67 | static inline void free_pte_fast(pte_t *pte) |
| 81 | { | 68 | { |
| 82 | srmmu_free_nocache((unsigned long)pte, PTE_SIZE); | 69 | srmmu_free_nocache(pte, PTE_SIZE); |
| 83 | } | 70 | } |
| 84 | 71 | ||
| 85 | #define pte_free_kernel(mm, pte) free_pte_fast(pte) | 72 | #define pte_free_kernel(mm, pte) free_pte_fast(pte) |
