aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2016-04-22 13:41:07 -0400
committerDavid S. Miller <davem@davemloft.net>2016-05-20 20:55:42 -0400
commit6b1cabe8992441afb542503781f11b9cce91e285 (patch)
treebcab1c55fa1ba86f09896f891663ad6cec062815
parent6e6e41879e07daccb967bc75a31f29689354d11b (diff)
sparc32: drop superfluous cast in calls to __nocache_pa()
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--arch/sparc/include/asm/pgalloc_32.h2
-rw-r--r--arch/sparc/mm/srmmu.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/sparc/include/asm/pgalloc_32.h b/arch/sparc/include/asm/pgalloc_32.h
index 21f6482b5ad5..0346c7e62452 100644
--- a/arch/sparc/include/asm/pgalloc_32.h
+++ b/arch/sparc/include/asm/pgalloc_32.h
@@ -29,7 +29,7 @@ static inline void free_pgd_fast(pgd_t *pgd)
29 29
30static inline void pgd_set(pgd_t * pgdp, pmd_t * pmdp) 30static inline void pgd_set(pgd_t * pgdp, pmd_t * pmdp)
31{ 31{
32 unsigned long pa = __nocache_pa((unsigned long)pmdp); 32 unsigned long pa = __nocache_pa(pmdp);
33 33
34 set_pte((pte_t *)pgdp, __pte((SRMMU_ET_PTD | (pa >> 4)))); 34 set_pte((pte_t *)pgdp, __pte((SRMMU_ET_PTD | (pa >> 4))));
35} 35}
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
index 3b1c047e7cf0..c7f2a5295b3a 100644
--- a/arch/sparc/mm/srmmu.c
+++ b/arch/sparc/mm/srmmu.c
@@ -119,7 +119,7 @@ void pmd_set(pmd_t *pmdp, pte_t *ptep)
119 unsigned long ptp; /* Physical address, shifted right by 4 */ 119 unsigned long ptp; /* Physical address, shifted right by 4 */
120 int i; 120 int i;
121 121
122 ptp = __nocache_pa((unsigned long) ptep) >> 4; 122 ptp = __nocache_pa(ptep) >> 4;
123 for (i = 0; i < PTRS_PER_PTE/SRMMU_REAL_PTRS_PER_PTE; i++) { 123 for (i = 0; i < PTRS_PER_PTE/SRMMU_REAL_PTRS_PER_PTE; i++) {
124 set_pte((pte_t *)&pmdp->pmdv[i], __pte(SRMMU_ET_PTD | ptp)); 124 set_pte((pte_t *)&pmdp->pmdv[i], __pte(SRMMU_ET_PTD | ptp));
125 ptp += (SRMMU_REAL_PTRS_PER_PTE * sizeof(pte_t) >> 4); 125 ptp += (SRMMU_REAL_PTRS_PER_PTE * sizeof(pte_t) >> 4);
@@ -916,7 +916,7 @@ void __init srmmu_paging_init(void)
916 916
917 /* ctx table has to be physically aligned to its size */ 917 /* ctx table has to be physically aligned to its size */
918 srmmu_context_table = __srmmu_get_nocache(num_contexts * sizeof(ctxd_t), num_contexts * sizeof(ctxd_t)); 918 srmmu_context_table = __srmmu_get_nocache(num_contexts * sizeof(ctxd_t), num_contexts * sizeof(ctxd_t));
919 srmmu_ctx_table_phys = (ctxd_t *)__nocache_pa((unsigned long)srmmu_context_table); 919 srmmu_ctx_table_phys = (ctxd_t *)__nocache_pa(srmmu_context_table);
920 920
921 for (i = 0; i < num_contexts; i++) 921 for (i = 0; i < num_contexts; i++)
922 srmmu_ctxd_set((ctxd_t *)__nocache_fix(&srmmu_context_table[i]), srmmu_swapper_pg_dir); 922 srmmu_ctxd_set((ctxd_t *)__nocache_fix(&srmmu_context_table[i]), srmmu_swapper_pg_dir);