MIPS: Loongson64: Fix more __iomem attributes

Message ID 20230718134411.2871477-1-jiaxun.yang@flygoat.com
State New
Headers
Series MIPS: Loongson64: Fix more __iomem attributes |

Commit Message

Jiaxun Yang July 18, 2023, 1:44 p.m. UTC
  There are some __iomem type casting being missed in previous patch.
Fix them here.

Fixes: 5bd3990723bd ("MIPS: Loongson64: Prefix ipi register address pointers with __iomem")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202307020639.QCZOKp8B-lkp@intel.com/
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
 arch/mips/loongson64/smp.c | 168 ++++++++++++++++++-------------------
 1 file changed, 84 insertions(+), 84 deletions(-)
  

Comments

Philippe Mathieu-Daudé July 19, 2023, 11:39 a.m. UTC | #1
On 18/7/23 15:44, Jiaxun Yang wrote:
> There are some __iomem type casting being missed in previous patch.
> Fix them here.
> 
> Fixes: 5bd3990723bd ("MIPS: Loongson64: Prefix ipi register address pointers with __iomem")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202307020639.QCZOKp8B-lkp@intel.com/
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> ---
>   arch/mips/loongson64/smp.c | 168 ++++++++++++++++++-------------------
>   1 file changed, 84 insertions(+), 84 deletions(-)


>   static void ipi_mailbox_buf_init(void)
>   {
> -	ipi_mailbox_buf[0] = (void *)
> +	ipi_mailbox_buf[0] = (void __iomem *)
>   		(SMP_CORE_GROUP0_BASE + SMP_CORE0_OFFSET + BUF);
> -	ipi_mailbox_buf[1] = (void *)
> +	ipi_mailbox_buf[1] = (void __iomem *)
>   		(SMP_CORE_GROUP0_BASE + SMP_CORE1_OFFSET + BUF);
> -	ipi_mailbox_buf[2] = (void *)
> +	ipi_mailbox_buf[2] = (void __iomem *)
>   		(SMP_CORE_GROUP0_BASE + SMP_CORE2_OFFSET + BUF);
> -	ipi_mailbox_buf[3] = (void *)
> +	ipi_mailbox_buf[3] = (void __iomem *)
>   		(SMP_CORE_GROUP0_BASE + SMP_CORE3_OFFSET + BUF);
> -	ipi_mailbox_buf[4] = (void *)
> +	ipi_mailbox_buf[4] = (void __iomem *)
>   		(SMP_CORE_GROUP1_BASE + SMP_CORE0_OFFSET + BUF);
> -	ipi_mailbox_buf[5] = (void *)
> +	ipi_mailbox_buf[5] = (void __iomem *)
>   		(SMP_CORE_GROUP1_BASE + SMP_CORE1_OFFSET + BUF);
> -	ipi_mailbox_buf[6] = (void *)
> +	ipi_mailbox_buf[6] = (void __iomem *)
>   		(SMP_CORE_GROUP1_BASE + SMP_CORE2_OFFSET + BUF);
> -	ipi_mailbox_buf[7] = (void *)
> +	ipi_mailbox_buf[7] = (void __iomem *)
>   		(SMP_CORE_GROUP1_BASE + SMP_CORE3_OFFSET + BUF);
> -	ipi_mailbox_buf[8] = (void *)
> +	ipi_mailbox_buf[8] = (void __iomem *)
>   		(SMP_CORE_GROUP2_BASE + SMP_CORE0_OFFSET + BUF);
> -	ipi_mailbox_buf[9] = (void *)
> +	ipi_mailbox_buf[9] = (void __iomem *)
>   		(SMP_CORE_GROUP2_BASE + SMP_CORE1_OFFSET + BUF);
> -	ipi_mailbox_buf[10] = (void *)
> +	ipi_mailbox_buf[10] = (void __iomem *)
>   		(SMP_CORE_GROUP2_BASE + SMP_CORE2_OFFSET + BUF);
> -	ipi_mailbox_buf[11] = (void *)
> +	ipi_mailbox_buf[11] = (void __iomem *)
>   		(SMP_CORE_GROUP2_BASE + SMP_CORE3_OFFSET + BUF);
> -	ipi_mailbox_buf[12] = (void *)
> +	ipi_mailbox_buf[12] = (void __iomem *)
>   		(SMP_CORE_GROUP3_BASE + SMP_CORE0_OFFSET + BUF);
> -	ipi_mailbox_buf[13] = (void *)
> +	ipi_mailbox_buf[13] = (void __iomem *)
>   		(SMP_CORE_GROUP3_BASE + SMP_CORE1_OFFSET + BUF);
> -	ipi_mailbox_buf[14] = (void *)
> +	ipi_mailbox_buf[14] = (void __iomem *)
>   		(SMP_CORE_GROUP3_BASE + SMP_CORE2_OFFSET + BUF);
> -	ipi_mailbox_buf[15] = (void *)
> +	ipi_mailbox_buf[15] = (void __iomem *)
>   		(SMP_CORE_GROUP3_BASE + SMP_CORE3_OFFSET + BUF);
>   }

OK up to here,

> @@ -782,7 +782,7 @@ void play_dead(void)
>   
>   	if (prid_imp == PRID_IMP_LOONGSON_64G) {
>   		play_dead_at_ckseg1 =
> -			(void *)CKSEG1ADDR((unsigned long)loongson3_type3_play_dead);
> +			(void __iomem *)CKSEG1ADDR((unsigned long)loongson3_type3_play_dead);

but these changes look dubious.

>   		goto out;
>   	}
>   
> @@ -790,19 +790,19 @@ void play_dead(void)
>   	case PRID_REV_LOONGSON3A_R1:
>   	default:
>   		play_dead_at_ckseg1 =
> -			(void *)CKSEG1ADDR((unsigned long)loongson3_type1_play_dead);
> +			(void __iomem *)CKSEG1ADDR((unsigned long)loongson3_type1_play_dead);
>   		break;
>   	case PRID_REV_LOONGSON3B_R1:
>   	case PRID_REV_LOONGSON3B_R2:
>   		play_dead_at_ckseg1 =
> -			(void *)CKSEG1ADDR((unsigned long)loongson3_type2_play_dead);
> +			(void __iomem *)CKSEG1ADDR((unsigned long)loongson3_type2_play_dead);
>   		break;
>   	case PRID_REV_LOONGSON3A_R2_0:
>   	case PRID_REV_LOONGSON3A_R2_1:
>   	case PRID_REV_LOONGSON3A_R3_0:
>   	case PRID_REV_LOONGSON3A_R3_1:
>   		play_dead_at_ckseg1 =
> -			(void *)CKSEG1ADDR((unsigned long)loongson3_type3_play_dead);
> +			(void __iomem *)CKSEG1ADDR((unsigned long)loongson3_type3_play_dead);
>   		break;
>   	}
>
  
Jiaxun Yang July 22, 2023, 4:46 a.m. UTC | #2
在2023年7月19日七月 下午7:39,Philippe Mathieu-Daudé写道:
> On 18/7/23 15:44, Jiaxun Yang wrote:
>> There are some __iomem type casting being missed in previous patch.
>> Fix them here.
>> 
>> Fixes: 5bd3990723bd ("MIPS: Loongson64: Prefix ipi register address pointers with __iomem")
>> Reported-by: kernel test robot <lkp@intel.com>
>> Closes: https://lore.kernel.org/oe-kbuild-all/202307020639.QCZOKp8B-lkp@intel.com/
>> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
>> ---
>>   arch/mips/loongson64/smp.c | 168 ++++++++++++++++++-------------------
>>   1 file changed, 84 insertions(+), 84 deletions(-)
>
>
>>   static void ipi_mailbox_buf_init(void)
>>   {
>> -	ipi_mailbox_buf[0] = (void *)
>> +	ipi_mailbox_buf[0] = (void __iomem *)
>>   		(SMP_CORE_GROUP0_BASE + SMP_CORE0_OFFSET + BUF);
>> -	ipi_mailbox_buf[1] = (void *)
>> +	ipi_mailbox_buf[1] = (void __iomem *)
>>   		(SMP_CORE_GROUP0_BASE + SMP_CORE1_OFFSET + BUF);
>> -	ipi_mailbox_buf[2] = (void *)
>> +	ipi_mailbox_buf[2] = (void __iomem *)
>>   		(SMP_CORE_GROUP0_BASE + SMP_CORE2_OFFSET + BUF);
>> -	ipi_mailbox_buf[3] = (void *)
>> +	ipi_mailbox_buf[3] = (void __iomem *)
>>   		(SMP_CORE_GROUP0_BASE + SMP_CORE3_OFFSET + BUF);
>> -	ipi_mailbox_buf[4] = (void *)
>> +	ipi_mailbox_buf[4] = (void __iomem *)
>>   		(SMP_CORE_GROUP1_BASE + SMP_CORE0_OFFSET + BUF);
>> -	ipi_mailbox_buf[5] = (void *)
>> +	ipi_mailbox_buf[5] = (void __iomem *)
>>   		(SMP_CORE_GROUP1_BASE + SMP_CORE1_OFFSET + BUF);
>> -	ipi_mailbox_buf[6] = (void *)
>> +	ipi_mailbox_buf[6] = (void __iomem *)
>>   		(SMP_CORE_GROUP1_BASE + SMP_CORE2_OFFSET + BUF);
>> -	ipi_mailbox_buf[7] = (void *)
>> +	ipi_mailbox_buf[7] = (void __iomem *)
>>   		(SMP_CORE_GROUP1_BASE + SMP_CORE3_OFFSET + BUF);
>> -	ipi_mailbox_buf[8] = (void *)
>> +	ipi_mailbox_buf[8] = (void __iomem *)
>>   		(SMP_CORE_GROUP2_BASE + SMP_CORE0_OFFSET + BUF);
>> -	ipi_mailbox_buf[9] = (void *)
>> +	ipi_mailbox_buf[9] = (void __iomem *)
>>   		(SMP_CORE_GROUP2_BASE + SMP_CORE1_OFFSET + BUF);
>> -	ipi_mailbox_buf[10] = (void *)
>> +	ipi_mailbox_buf[10] = (void __iomem *)
>>   		(SMP_CORE_GROUP2_BASE + SMP_CORE2_OFFSET + BUF);
>> -	ipi_mailbox_buf[11] = (void *)
>> +	ipi_mailbox_buf[11] = (void __iomem *)
>>   		(SMP_CORE_GROUP2_BASE + SMP_CORE3_OFFSET + BUF);
>> -	ipi_mailbox_buf[12] = (void *)
>> +	ipi_mailbox_buf[12] = (void __iomem *)
>>   		(SMP_CORE_GROUP3_BASE + SMP_CORE0_OFFSET + BUF);
>> -	ipi_mailbox_buf[13] = (void *)
>> +	ipi_mailbox_buf[13] = (void __iomem *)
>>   		(SMP_CORE_GROUP3_BASE + SMP_CORE1_OFFSET + BUF);
>> -	ipi_mailbox_buf[14] = (void *)
>> +	ipi_mailbox_buf[14] = (void __iomem *)
>>   		(SMP_CORE_GROUP3_BASE + SMP_CORE2_OFFSET + BUF);
>> -	ipi_mailbox_buf[15] = (void *)
>> +	ipi_mailbox_buf[15] = (void __iomem *)
>>   		(SMP_CORE_GROUP3_BASE + SMP_CORE3_OFFSET + BUF);
>>   }
>
> OK up to here,
>
>> @@ -782,7 +782,7 @@ void play_dead(void)
>>   
>>   	if (prid_imp == PRID_IMP_LOONGSON_64G) {
>>   		play_dead_at_ckseg1 =
>> -			(void *)CKSEG1ADDR((unsigned long)loongson3_type3_play_dead);
>> +			(void __iomem *)CKSEG1ADDR((unsigned long)loongson3_type3_play_dead);
>
> but these changes look dubious.

Oops, will fix later.

Thanks

>
>>   		goto out;
>>   	}
>>   
>> @@ -790,19 +790,19 @@ void play_dead(void)
>>   	case PRID_REV_LOONGSON3A_R1:
>>   	default:
>>   		play_dead_at_ckseg1 =
>> -			(void *)CKSEG1ADDR((unsigned long)loongson3_type1_play_dead);
>> +			(void __iomem *)CKSEG1ADDR((unsigned long)loongson3_type1_play_dead);
>>   		break;
>>   	case PRID_REV_LOONGSON3B_R1:
>>   	case PRID_REV_LOONGSON3B_R2:
>>   		play_dead_at_ckseg1 =
>> -			(void *)CKSEG1ADDR((unsigned long)loongson3_type2_play_dead);
>> +			(void __iomem *)CKSEG1ADDR((unsigned long)loongson3_type2_play_dead);
>>   		break;
>>   	case PRID_REV_LOONGSON3A_R2_0:
>>   	case PRID_REV_LOONGSON3A_R2_1:
>>   	case PRID_REV_LOONGSON3A_R3_0:
>>   	case PRID_REV_LOONGSON3A_R3_1:
>>   		play_dead_at_ckseg1 =
>> -			(void *)CKSEG1ADDR((unsigned long)loongson3_type3_play_dead);
>> +			(void __iomem *)CKSEG1ADDR((unsigned long)loongson3_type3_play_dead);
>>   		break;
>>   	}
>>
  

Patch

diff --git a/arch/mips/loongson64/smp.c b/arch/mips/loongson64/smp.c
index cdecd7af11a6..b700ca887c35 100644
--- a/arch/mips/loongson64/smp.c
+++ b/arch/mips/loongson64/smp.c
@@ -187,181 +187,181 @@  static void csr_ipi_probe(void)
 
 static void ipi_set0_regs_init(void)
 {
-	ipi_set0_regs[0] = (void *)
+	ipi_set0_regs[0] = (void __iomem *)
 		(SMP_CORE_GROUP0_BASE + SMP_CORE0_OFFSET + SET0);
-	ipi_set0_regs[1] = (void *)
+	ipi_set0_regs[1] = (void __iomem *)
 		(SMP_CORE_GROUP0_BASE + SMP_CORE1_OFFSET + SET0);
-	ipi_set0_regs[2] = (void *)
+	ipi_set0_regs[2] = (void __iomem *)
 		(SMP_CORE_GROUP0_BASE + SMP_CORE2_OFFSET + SET0);
-	ipi_set0_regs[3] = (void *)
+	ipi_set0_regs[3] = (void __iomem *)
 		(SMP_CORE_GROUP0_BASE + SMP_CORE3_OFFSET + SET0);
-	ipi_set0_regs[4] = (void *)
+	ipi_set0_regs[4] = (void __iomem *)
 		(SMP_CORE_GROUP1_BASE + SMP_CORE0_OFFSET + SET0);
-	ipi_set0_regs[5] = (void *)
+	ipi_set0_regs[5] = (void __iomem *)
 		(SMP_CORE_GROUP1_BASE + SMP_CORE1_OFFSET + SET0);
-	ipi_set0_regs[6] = (void *)
+	ipi_set0_regs[6] = (void __iomem *)
 		(SMP_CORE_GROUP1_BASE + SMP_CORE2_OFFSET + SET0);
-	ipi_set0_regs[7] = (void *)
+	ipi_set0_regs[7] = (void __iomem *)
 		(SMP_CORE_GROUP1_BASE + SMP_CORE3_OFFSET + SET0);
-	ipi_set0_regs[8] = (void *)
+	ipi_set0_regs[8] = (void __iomem *)
 		(SMP_CORE_GROUP2_BASE + SMP_CORE0_OFFSET + SET0);
-	ipi_set0_regs[9] = (void *)
+	ipi_set0_regs[9] = (void __iomem *)
 		(SMP_CORE_GROUP2_BASE + SMP_CORE1_OFFSET + SET0);
-	ipi_set0_regs[10] = (void *)
+	ipi_set0_regs[10] = (void __iomem *)
 		(SMP_CORE_GROUP2_BASE + SMP_CORE2_OFFSET + SET0);
-	ipi_set0_regs[11] = (void *)
+	ipi_set0_regs[11] = (void __iomem *)
 		(SMP_CORE_GROUP2_BASE + SMP_CORE3_OFFSET + SET0);
-	ipi_set0_regs[12] = (void *)
+	ipi_set0_regs[12] = (void __iomem *)
 		(SMP_CORE_GROUP3_BASE + SMP_CORE0_OFFSET + SET0);
-	ipi_set0_regs[13] = (void *)
+	ipi_set0_regs[13] = (void __iomem *)
 		(SMP_CORE_GROUP3_BASE + SMP_CORE1_OFFSET + SET0);
-	ipi_set0_regs[14] = (void *)
+	ipi_set0_regs[14] = (void __iomem *)
 		(SMP_CORE_GROUP3_BASE + SMP_CORE2_OFFSET + SET0);
-	ipi_set0_regs[15] = (void *)
+	ipi_set0_regs[15] = (void __iomem *)
 		(SMP_CORE_GROUP3_BASE + SMP_CORE3_OFFSET + SET0);
 }
 
 static void ipi_clear0_regs_init(void)
 {
-	ipi_clear0_regs[0] = (void *)
+	ipi_clear0_regs[0] = (void __iomem *)
 		(SMP_CORE_GROUP0_BASE + SMP_CORE0_OFFSET + CLEAR0);
-	ipi_clear0_regs[1] = (void *)
+	ipi_clear0_regs[1] = (void __iomem *)
 		(SMP_CORE_GROUP0_BASE + SMP_CORE1_OFFSET + CLEAR0);
-	ipi_clear0_regs[2] = (void *)
+	ipi_clear0_regs[2] = (void __iomem *)
 		(SMP_CORE_GROUP0_BASE + SMP_CORE2_OFFSET + CLEAR0);
-	ipi_clear0_regs[3] = (void *)
+	ipi_clear0_regs[3] = (void __iomem *)
 		(SMP_CORE_GROUP0_BASE + SMP_CORE3_OFFSET + CLEAR0);
-	ipi_clear0_regs[4] = (void *)
+	ipi_clear0_regs[4] = (void __iomem *)
 		(SMP_CORE_GROUP1_BASE + SMP_CORE0_OFFSET + CLEAR0);
-	ipi_clear0_regs[5] = (void *)
+	ipi_clear0_regs[5] = (void __iomem *)
 		(SMP_CORE_GROUP1_BASE + SMP_CORE1_OFFSET + CLEAR0);
-	ipi_clear0_regs[6] = (void *)
+	ipi_clear0_regs[6] = (void __iomem *)
 		(SMP_CORE_GROUP1_BASE + SMP_CORE2_OFFSET + CLEAR0);
-	ipi_clear0_regs[7] = (void *)
+	ipi_clear0_regs[7] = (void __iomem *)
 		(SMP_CORE_GROUP1_BASE + SMP_CORE3_OFFSET + CLEAR0);
-	ipi_clear0_regs[8] = (void *)
+	ipi_clear0_regs[8] = (void __iomem *)
 		(SMP_CORE_GROUP2_BASE + SMP_CORE0_OFFSET + CLEAR0);
-	ipi_clear0_regs[9] = (void *)
+	ipi_clear0_regs[9] = (void __iomem *)
 		(SMP_CORE_GROUP2_BASE + SMP_CORE1_OFFSET + CLEAR0);
-	ipi_clear0_regs[10] = (void *)
+	ipi_clear0_regs[10] = (void __iomem *)
 		(SMP_CORE_GROUP2_BASE + SMP_CORE2_OFFSET + CLEAR0);
-	ipi_clear0_regs[11] = (void *)
+	ipi_clear0_regs[11] = (void __iomem *)
 		(SMP_CORE_GROUP2_BASE + SMP_CORE3_OFFSET + CLEAR0);
-	ipi_clear0_regs[12] = (void *)
+	ipi_clear0_regs[12] = (void __iomem *)
 		(SMP_CORE_GROUP3_BASE + SMP_CORE0_OFFSET + CLEAR0);
-	ipi_clear0_regs[13] = (void *)
+	ipi_clear0_regs[13] = (void __iomem *)
 		(SMP_CORE_GROUP3_BASE + SMP_CORE1_OFFSET + CLEAR0);
-	ipi_clear0_regs[14] = (void *)
+	ipi_clear0_regs[14] = (void __iomem *)
 		(SMP_CORE_GROUP3_BASE + SMP_CORE2_OFFSET + CLEAR0);
-	ipi_clear0_regs[15] = (void *)
+	ipi_clear0_regs[15] = (void __iomem *)
 		(SMP_CORE_GROUP3_BASE + SMP_CORE3_OFFSET + CLEAR0);
 }
 
 static void ipi_status0_regs_init(void)
 {
-	ipi_status0_regs[0] = (void *)
+	ipi_status0_regs[0] = (void __iomem *)
 		(SMP_CORE_GROUP0_BASE + SMP_CORE0_OFFSET + STATUS0);
-	ipi_status0_regs[1] = (void *)
+	ipi_status0_regs[1] = (void __iomem *)
 		(SMP_CORE_GROUP0_BASE + SMP_CORE1_OFFSET + STATUS0);
-	ipi_status0_regs[2] = (void *)
+	ipi_status0_regs[2] = (void __iomem *)
 		(SMP_CORE_GROUP0_BASE + SMP_CORE2_OFFSET + STATUS0);
-	ipi_status0_regs[3] = (void *)
+	ipi_status0_regs[3] = (void __iomem *)
 		(SMP_CORE_GROUP0_BASE + SMP_CORE3_OFFSET + STATUS0);
-	ipi_status0_regs[4] = (void *)
+	ipi_status0_regs[4] = (void __iomem *)
 		(SMP_CORE_GROUP1_BASE + SMP_CORE0_OFFSET + STATUS0);
-	ipi_status0_regs[5] = (void *)
+	ipi_status0_regs[5] = (void __iomem *)
 		(SMP_CORE_GROUP1_BASE + SMP_CORE1_OFFSET + STATUS0);
-	ipi_status0_regs[6] = (void *)
+	ipi_status0_regs[6] = (void __iomem *)
 		(SMP_CORE_GROUP1_BASE + SMP_CORE2_OFFSET + STATUS0);
-	ipi_status0_regs[7] = (void *)
+	ipi_status0_regs[7] = (void __iomem *)
 		(SMP_CORE_GROUP1_BASE + SMP_CORE3_OFFSET + STATUS0);
-	ipi_status0_regs[8] = (void *)
+	ipi_status0_regs[8] = (void __iomem *)
 		(SMP_CORE_GROUP2_BASE + SMP_CORE0_OFFSET + STATUS0);
-	ipi_status0_regs[9] = (void *)
+	ipi_status0_regs[9] = (void __iomem *)
 		(SMP_CORE_GROUP2_BASE + SMP_CORE1_OFFSET + STATUS0);
-	ipi_status0_regs[10] = (void *)
+	ipi_status0_regs[10] = (void __iomem *)
 		(SMP_CORE_GROUP2_BASE + SMP_CORE2_OFFSET + STATUS0);
-	ipi_status0_regs[11] = (void *)
+	ipi_status0_regs[11] = (void __iomem *)
 		(SMP_CORE_GROUP2_BASE + SMP_CORE3_OFFSET + STATUS0);
-	ipi_status0_regs[12] = (void *)
+	ipi_status0_regs[12] = (void __iomem *)
 		(SMP_CORE_GROUP3_BASE + SMP_CORE0_OFFSET + STATUS0);
-	ipi_status0_regs[13] = (void *)
+	ipi_status0_regs[13] = (void __iomem *)
 		(SMP_CORE_GROUP3_BASE + SMP_CORE1_OFFSET + STATUS0);
-	ipi_status0_regs[14] = (void *)
+	ipi_status0_regs[14] = (void __iomem *)
 		(SMP_CORE_GROUP3_BASE + SMP_CORE2_OFFSET + STATUS0);
-	ipi_status0_regs[15] = (void *)
+	ipi_status0_regs[15] = (void __iomem *)
 		(SMP_CORE_GROUP3_BASE + SMP_CORE3_OFFSET + STATUS0);
 }
 
 static void ipi_en0_regs_init(void)
 {
-	ipi_en0_regs[0] = (void *)
+	ipi_en0_regs[0] = (void __iomem *)
 		(SMP_CORE_GROUP0_BASE + SMP_CORE0_OFFSET + EN0);
-	ipi_en0_regs[1] = (void *)
+	ipi_en0_regs[1] = (void __iomem *)
 		(SMP_CORE_GROUP0_BASE + SMP_CORE1_OFFSET + EN0);
-	ipi_en0_regs[2] = (void *)
+	ipi_en0_regs[2] = (void __iomem *)
 		(SMP_CORE_GROUP0_BASE + SMP_CORE2_OFFSET + EN0);
-	ipi_en0_regs[3] = (void *)
+	ipi_en0_regs[3] = (void __iomem *)
 		(SMP_CORE_GROUP0_BASE + SMP_CORE3_OFFSET + EN0);
-	ipi_en0_regs[4] = (void *)
+	ipi_en0_regs[4] = (void __iomem *)
 		(SMP_CORE_GROUP1_BASE + SMP_CORE0_OFFSET + EN0);
-	ipi_en0_regs[5] = (void *)
+	ipi_en0_regs[5] = (void __iomem *)
 		(SMP_CORE_GROUP1_BASE + SMP_CORE1_OFFSET + EN0);
-	ipi_en0_regs[6] = (void *)
+	ipi_en0_regs[6] = (void __iomem *)
 		(SMP_CORE_GROUP1_BASE + SMP_CORE2_OFFSET + EN0);
-	ipi_en0_regs[7] = (void *)
+	ipi_en0_regs[7] = (void __iomem *)
 		(SMP_CORE_GROUP1_BASE + SMP_CORE3_OFFSET + EN0);
-	ipi_en0_regs[8] = (void *)
+	ipi_en0_regs[8] = (void __iomem *)
 		(SMP_CORE_GROUP2_BASE + SMP_CORE0_OFFSET + EN0);
-	ipi_en0_regs[9] = (void *)
+	ipi_en0_regs[9] = (void __iomem *)
 		(SMP_CORE_GROUP2_BASE + SMP_CORE1_OFFSET + EN0);
-	ipi_en0_regs[10] = (void *)
+	ipi_en0_regs[10] = (void __iomem *)
 		(SMP_CORE_GROUP2_BASE + SMP_CORE2_OFFSET + EN0);
-	ipi_en0_regs[11] = (void *)
+	ipi_en0_regs[11] = (void __iomem *)
 		(SMP_CORE_GROUP2_BASE + SMP_CORE3_OFFSET + EN0);
-	ipi_en0_regs[12] = (void *)
+	ipi_en0_regs[12] = (void __iomem *)
 		(SMP_CORE_GROUP3_BASE + SMP_CORE0_OFFSET + EN0);
-	ipi_en0_regs[13] = (void *)
+	ipi_en0_regs[13] = (void __iomem *)
 		(SMP_CORE_GROUP3_BASE + SMP_CORE1_OFFSET + EN0);
-	ipi_en0_regs[14] = (void *)
+	ipi_en0_regs[14] = (void __iomem *)
 		(SMP_CORE_GROUP3_BASE + SMP_CORE2_OFFSET + EN0);
-	ipi_en0_regs[15] = (void *)
+	ipi_en0_regs[15] = (void __iomem *)
 		(SMP_CORE_GROUP3_BASE + SMP_CORE3_OFFSET + EN0);
 }
 
 static void ipi_mailbox_buf_init(void)
 {
-	ipi_mailbox_buf[0] = (void *)
+	ipi_mailbox_buf[0] = (void __iomem *)
 		(SMP_CORE_GROUP0_BASE + SMP_CORE0_OFFSET + BUF);
-	ipi_mailbox_buf[1] = (void *)
+	ipi_mailbox_buf[1] = (void __iomem *)
 		(SMP_CORE_GROUP0_BASE + SMP_CORE1_OFFSET + BUF);
-	ipi_mailbox_buf[2] = (void *)
+	ipi_mailbox_buf[2] = (void __iomem *)
 		(SMP_CORE_GROUP0_BASE + SMP_CORE2_OFFSET + BUF);
-	ipi_mailbox_buf[3] = (void *)
+	ipi_mailbox_buf[3] = (void __iomem *)
 		(SMP_CORE_GROUP0_BASE + SMP_CORE3_OFFSET + BUF);
-	ipi_mailbox_buf[4] = (void *)
+	ipi_mailbox_buf[4] = (void __iomem *)
 		(SMP_CORE_GROUP1_BASE + SMP_CORE0_OFFSET + BUF);
-	ipi_mailbox_buf[5] = (void *)
+	ipi_mailbox_buf[5] = (void __iomem *)
 		(SMP_CORE_GROUP1_BASE + SMP_CORE1_OFFSET + BUF);
-	ipi_mailbox_buf[6] = (void *)
+	ipi_mailbox_buf[6] = (void __iomem *)
 		(SMP_CORE_GROUP1_BASE + SMP_CORE2_OFFSET + BUF);
-	ipi_mailbox_buf[7] = (void *)
+	ipi_mailbox_buf[7] = (void __iomem *)
 		(SMP_CORE_GROUP1_BASE + SMP_CORE3_OFFSET + BUF);
-	ipi_mailbox_buf[8] = (void *)
+	ipi_mailbox_buf[8] = (void __iomem *)
 		(SMP_CORE_GROUP2_BASE + SMP_CORE0_OFFSET + BUF);
-	ipi_mailbox_buf[9] = (void *)
+	ipi_mailbox_buf[9] = (void __iomem *)
 		(SMP_CORE_GROUP2_BASE + SMP_CORE1_OFFSET + BUF);
-	ipi_mailbox_buf[10] = (void *)
+	ipi_mailbox_buf[10] = (void __iomem *)
 		(SMP_CORE_GROUP2_BASE + SMP_CORE2_OFFSET + BUF);
-	ipi_mailbox_buf[11] = (void *)
+	ipi_mailbox_buf[11] = (void __iomem *)
 		(SMP_CORE_GROUP2_BASE + SMP_CORE3_OFFSET + BUF);
-	ipi_mailbox_buf[12] = (void *)
+	ipi_mailbox_buf[12] = (void __iomem *)
 		(SMP_CORE_GROUP3_BASE + SMP_CORE0_OFFSET + BUF);
-	ipi_mailbox_buf[13] = (void *)
+	ipi_mailbox_buf[13] = (void __iomem *)
 		(SMP_CORE_GROUP3_BASE + SMP_CORE1_OFFSET + BUF);
-	ipi_mailbox_buf[14] = (void *)
+	ipi_mailbox_buf[14] = (void __iomem *)
 		(SMP_CORE_GROUP3_BASE + SMP_CORE2_OFFSET + BUF);
-	ipi_mailbox_buf[15] = (void *)
+	ipi_mailbox_buf[15] = (void __iomem *)
 		(SMP_CORE_GROUP3_BASE + SMP_CORE3_OFFSET + BUF);
 }
 
@@ -782,7 +782,7 @@  void play_dead(void)
 
 	if (prid_imp == PRID_IMP_LOONGSON_64G) {
 		play_dead_at_ckseg1 =
-			(void *)CKSEG1ADDR((unsigned long)loongson3_type3_play_dead);
+			(void __iomem *)CKSEG1ADDR((unsigned long)loongson3_type3_play_dead);
 		goto out;
 	}
 
@@ -790,19 +790,19 @@  void play_dead(void)
 	case PRID_REV_LOONGSON3A_R1:
 	default:
 		play_dead_at_ckseg1 =
-			(void *)CKSEG1ADDR((unsigned long)loongson3_type1_play_dead);
+			(void __iomem *)CKSEG1ADDR((unsigned long)loongson3_type1_play_dead);
 		break;
 	case PRID_REV_LOONGSON3B_R1:
 	case PRID_REV_LOONGSON3B_R2:
 		play_dead_at_ckseg1 =
-			(void *)CKSEG1ADDR((unsigned long)loongson3_type2_play_dead);
+			(void __iomem *)CKSEG1ADDR((unsigned long)loongson3_type2_play_dead);
 		break;
 	case PRID_REV_LOONGSON3A_R2_0:
 	case PRID_REV_LOONGSON3A_R2_1:
 	case PRID_REV_LOONGSON3A_R3_0:
 	case PRID_REV_LOONGSON3A_R3_1:
 		play_dead_at_ckseg1 =
-			(void *)CKSEG1ADDR((unsigned long)loongson3_type3_play_dead);
+			(void __iomem *)CKSEG1ADDR((unsigned long)loongson3_type3_play_dead);
 		break;
 	}