Commit 345599ab authored by Thiemo Seufer's avatar Thiemo Seufer Committed by Ralf Baechle

[MIPS] SB1: Fix CONFIG_SIBYTE_DMA_PAGEOPS build failure.

Fix type mismatch warnings for 64-bit kernel builds which trigger -Werror.
The problem affects only SB-1 kernels with CONFIG_SIBYTE_DMA_PAGEOPS
enabled.
Signed-off-by: default avatarThiemo Seufer <ths@networkno.de>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent af0c4f64
...@@ -216,7 +216,7 @@ void sb1_dma_init(void) ...@@ -216,7 +216,7 @@ void sb1_dma_init(void)
int i; int i;
for (i = 0; i < DM_NUM_CHANNELS; i++) { for (i = 0; i < DM_NUM_CHANNELS; i++) {
const u64 base_val = CPHYSADDR(&page_descr[i]) | const u64 base_val = CPHYSADDR((unsigned long)&page_descr[i]) |
V_DM_DSCR_BASE_RINGSZ(1); V_DM_DSCR_BASE_RINGSZ(1);
void *base_reg = IOADDR(A_DM_REGISTER(i, R_DM_DSCR_BASE)); void *base_reg = IOADDR(A_DM_REGISTER(i, R_DM_DSCR_BASE));
...@@ -228,11 +228,11 @@ void sb1_dma_init(void) ...@@ -228,11 +228,11 @@ void sb1_dma_init(void)
void clear_page(void *page) void clear_page(void *page)
{ {
u64 to_phys = CPHYSADDR(page); u64 to_phys = CPHYSADDR((unsigned long)page);
unsigned int cpu = smp_processor_id(); unsigned int cpu = smp_processor_id();
/* if the page is not in KSEG0, use old way */ /* if the page is not in KSEG0, use old way */
if ((long)KSEGX(page) != (long)CKSEG0) if ((long)KSEGX((unsigned long)page) != (long)CKSEG0)
return clear_page_cpu(page); return clear_page_cpu(page);
page_descr[cpu].dscr_a = to_phys | M_DM_DSCRA_ZERO_MEM | page_descr[cpu].dscr_a = to_phys | M_DM_DSCRA_ZERO_MEM |
...@@ -252,13 +252,13 @@ void clear_page(void *page) ...@@ -252,13 +252,13 @@ void clear_page(void *page)
void copy_page(void *to, void *from) void copy_page(void *to, void *from)
{ {
u64 from_phys = CPHYSADDR(from); u64 from_phys = CPHYSADDR((unsigned long)from);
u64 to_phys = CPHYSADDR(to); u64 to_phys = CPHYSADDR((unsigned long)to);
unsigned int cpu = smp_processor_id(); unsigned int cpu = smp_processor_id();
/* if any page is not in KSEG0, use old way */ /* if any page is not in KSEG0, use old way */
if ((long)KSEGX(to) != (long)CKSEG0 if ((long)KSEGX((unsigned long)to) != (long)CKSEG0
|| (long)KSEGX(from) != (long)CKSEG0) || (long)KSEGX((unsigned long)from) != (long)CKSEG0)
return copy_page_cpu(to, from); return copy_page_cpu(to, from);
page_descr[cpu].dscr_a = to_phys | M_DM_DSCRA_L2C_DEST | page_descr[cpu].dscr_a = to_phys | M_DM_DSCRA_L2C_DEST |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment