Skip to contentSkip to conversation

arm/layerscape: Fix non-boot cpus cannot correctly fall in spin table

PATCH New Dongsheng Wang 2 participants 5 messages Jun 18, 2015 – Aug 4, 2015 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm/layerscape: Fix non-boot cpus cannot correctly fall in spin table

From: Wang Dongsheng <[email protected]>

Bootrom will put cpus into WFE state when boot cpu release cpus, so target cpu cannot correctly go to spin state.

Add 'sev' to wakeup non-boot cpu that hold on bootrom space, let target cpu can fall into u-boot spin table.

arch/arm/cpu/armv7/ls102xa/cpu.c +8 -0
index 75f0d8c..1f82893 100644
@@ -344,5 +344,13 @@ void smp_kick_all_cpus(void)
 	struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
 
 	out_be32(&gur->brrl, 0x2);
+
+	/*
+	 * LS1 STANDBYWFE is not captured outside the ARM module in the soc.
+	 * So add a delay to wait bootrom execute WFE.
+	 */
+	udelay(1);
+
+	asm volatile("sev");
 }
 #endif
Signature · 1 line
2.1.0.27.g96db324
#1 lore raw

PATCH 1/1 arm/layerscape: Fix non-boot cpus cannot correctly fall in spin table

Hi Alison & Jason,

Could you ACK this patch?

Regards,
-Dongsheng

Quoted 39 lines

-----Original Message-----
From: Dongsheng Wang [mailto:dongsheng.wang at freescale.com]
Sent: Thursday, June 18, 2015 6:33 PM
To: Sun York-R58495
Cc: Jin Zhengxiong-R64188; Wang Huan-B18965; Zhao Chenhui-B35336; Zhang Zhuoyu- B46552; u-boot at lists.denx.de; Wang Dongsheng-B40534
Subject: [PATCH] arm/layerscape: Fix non-boot cpus cannot correctly fall in spin table

From: Wang Dongsheng <[email protected]>

Bootrom will put cpus into WFE state when boot cpu release cpus, so target cpu cannot correctly go to spin state.

Add 'sev' to wakeup non-boot cpu that hold on bootrom space, let target cpu can fall into u-boot spin table.

arch/arm/cpu/armv7/ls102xa/cpu.c +8 -1
index 75f0d8c..1f82893 100644
@@ -344,5 +344,13 @@ void smp_kick_all_cpus(void)
 	struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
 
 	out_be32(&gur->brrl, 0x2);
+
+	/*
+	 * LS1 STANDBYWFE is not captured outside the ARM module in the soc.
+	 * So add a delay to wait bootrom execute WFE.
+	 */
+	udelay(1);
+
+	asm volatile("sev");
 }
 #endif
--

2.1.0.27.g96db324

#2 lore raw

PATCH 1/1 arm/layerscape: Fix non-boot cpus cannot correctly fall in spin table

Quoted 25 lines · On 07/14/2015 12:09 AM, Wang Dongsheng-B40534 wrote:

Hi Alison & Jason,

Could you ACK this patch?

Regards,
-Dongsheng

Quoted 18 lines

-----Original Message-----
From: Dongsheng Wang [mailto:dongsheng.wang at freescale.com]
Sent: Thursday, June 18, 2015 6:33 PM
To: Sun York-R58495
Cc: Jin Zhengxiong-R64188; Wang Huan-B18965; Zhao Chenhui-B35336; Zhang Zhuoyu- B46552; u-boot at lists.denx.de; Wang Dongsheng-B40534
Subject: [PATCH] arm/layerscape: Fix non-boot cpus cannot correctly fall in spin table

From: Wang Dongsheng <[email protected]>

Bootrom will put cpus into WFE state when boot cpu release cpus, so target cpu cannot correctly go to spin state.

Add 'sev' to wakeup non-boot cpu that hold on bootrom space, let target cpu can fall into u-boot spin table.

Dongsheng,

Do we still use spin table if we have PSCI?

York

#3 lore raw

PATCH 1/1 arm/layerscape: Fix non-boot cpus cannot correctly fall in spin table

Quoted 33 lines

-----Original Message-----
From: Sun York-R58495
Sent: Thursday, July 16, 2015 2:06 AM
To: Wang Dongsheng-B40534
Cc: Jin Zhengxiong-R64188; Wang Huan-B18965; Zhao Chenhui-B35336; Zhang Zhuoyu- B46552; u-boot at lists.denx.de
Subject: Re: [PATCH] arm/layerscape: Fix non-boot cpus cannot correctly fall in spin table

Quoted 21 lines · On 07/14/2015 12:09 AM, Wang Dongsheng-B40534 wrote:

Hi Alison & Jason,

Could you ACK this patch?

Regards,
-Dongsheng

Quoted 14 lines

-----Original Message-----
From: Dongsheng Wang [mailto:dongsheng.wang at freescale.com]
Sent: Thursday, June 18, 2015 6:33 PM
To: Sun York-R58495
Cc: Jin Zhengxiong-R64188; Wang Huan-B18965; Zhao Chenhui-B35336; Zhang Zhuoyu- B46552; u-boot at lists.denx.de; Wang Dongsheng-B40534
Subject: [PATCH] arm/layerscape: Fix non-boot cpus cannot correctly fall in spin table

From: Wang Dongsheng <[email protected]>

Bootrom will put cpus into WFE state when boot cpu release cpus, so target cpu cannot correctly go to spin state.

Quoted 9 lines
Quoted 4 lines
Quoted 4 lines

Add 'sev' to wakeup non-boot cpu that hold on bootrom space, let target cpu can fall into u-boot spin table.

Dongsheng,

Do we still use spin table if we have PSCI?

For ARMv7 we would like to use PSCI, just compatible with spin table.

Regards,
-Dongsheng

#4 lore raw

PATCH 1/1 arm/layerscape: Fix non-boot cpus cannot correctly fall in spin table

In reply to Dongsheng Wang
Quoted 10 lines · Dongsheng Wang

From: Wang Dongsheng <[email protected]>

Bootrom will put cpus into WFE state when boot cpu release cpus, so target cpu cannot correctly go to spin state.

Add 'sev' to wakeup non-boot cpu that hold on bootrom space, let target cpu can fall into u-boot spin table.

Applied to u-boot-fsl-qoriq master after fixing subject. Thanks.

York