aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/pgalloc_32.h
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2012-07-26 07:02:14 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-26 19:46:15 -0400
commitf71a2aacc63e3185e27ee45e8ebc2bebad9bec28 (patch)
tree3a76b0a10dc0747c1064e1b4218d08e74f7c20d1 /arch/sparc/include/asm/pgalloc_32.h
parent605ae96240a165baaceeff0eeec35e41d68dc978 (diff)
sparc32: use void * in nocache get/free
This allowed to us to kill a lot of casts, with no loss of readability in any places Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm/pgalloc_32.h')
-rw-r--r--arch/sparc/include/asm/pgalloc_32.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/sparc/include/asm/pgalloc_32.h b/arch/sparc/include/asm/pgalloc_32.h
index e5b169b46d21..bf20809f6665 100644
--- a/arch/sparc/include/asm/pgalloc_32.h
+++ b/arch/sparc/include/asm/pgalloc_32.h
@@ -18,8 +18,8 @@ extern struct pgtable_cache_struct {
18 unsigned long pgd_cache_sz; 18 unsigned long pgd_cache_sz;
19} pgt_quicklists; 19} pgt_quicklists;
20 20
21unsigned long srmmu_get_nocache(int size, int align); 21void *srmmu_get_nocache(int size, int align);
22void srmmu_free_nocache(unsigned long vaddr, int size); 22void srmmu_free_nocache(void *addr, int size);
23 23
24#define pgd_quicklist (pgt_quicklists.pgd_cache) 24#define pgd_quicklist (pgt_quicklists.pgd_cache)
25#define pmd_quicklist ((unsigned long *)0) 25#define pmd_quicklist ((unsigned long *)0)
@@ -32,7 +32,7 @@ void srmmu_free_nocache(unsigned long vaddr, int size);
32pgd_t *get_pgd_fast(void); 32pgd_t *get_pgd_fast(void);
33static inline void free_pgd_fast(pgd_t *pgd) 33static inline void free_pgd_fast(pgd_t *pgd)
34{ 34{
35 srmmu_free_nocache((unsigned long)pgd, SRMMU_PGD_TABLE_SIZE); 35 srmmu_free_nocache(pgd, SRMMU_PGD_TABLE_SIZE);
36} 36}
37 37
38#define pgd_free(mm, pgd) free_pgd_fast(pgd) 38#define pgd_free(mm, pgd) free_pgd_fast(pgd)
@@ -50,13 +50,13 @@ static inline void pgd_set(pgd_t * pgdp, pmd_t * pmdp)
50static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, 50static inline pmd_t *pmd_alloc_one(struct mm_struct *mm,
51 unsigned long address) 51 unsigned long address)
52{ 52{
53 return (pmd_t *)srmmu_get_nocache(SRMMU_PMD_TABLE_SIZE, 53 return srmmu_get_nocache(SRMMU_PMD_TABLE_SIZE,
54 SRMMU_PMD_TABLE_SIZE); 54 SRMMU_PMD_TABLE_SIZE);
55} 55}
56 56
57static inline void free_pmd_fast(pmd_t * pmd) 57static inline void free_pmd_fast(pmd_t * pmd)
58{ 58{
59 srmmu_free_nocache((unsigned long)pmd, SRMMU_PMD_TABLE_SIZE); 59 srmmu_free_nocache(pmd, SRMMU_PMD_TABLE_SIZE);
60} 60}
61 61
62#define pmd_free(mm, pmd) free_pmd_fast(pmd) 62#define pmd_free(mm, pmd) free_pmd_fast(pmd)
@@ -73,13 +73,13 @@ pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address);
73static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, 73static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
74 unsigned long address) 74 unsigned long address)
75{ 75{
76 return (pte_t *)srmmu_get_nocache(PTE_SIZE, PTE_SIZE); 76 return srmmu_get_nocache(PTE_SIZE, PTE_SIZE);
77} 77}
78 78
79 79
80static inline void free_pte_fast(pte_t *pte) 80static inline void free_pte_fast(pte_t *pte)
81{ 81{
82 srmmu_free_nocache((unsigned long)pte, PTE_SIZE); 82 srmmu_free_nocache(pte, PTE_SIZE);
83} 83}
84 84
85#define pte_free_kernel(mm, pte) free_pte_fast(pte) 85#define pte_free_kernel(mm, pte) free_pte_fast(pte)