[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 03/10] xen/arm: Implement CPU_OFF PSCI call (physical interface)

On 23/04/18 18:12, Mirela Simonovic wrote:
On Mon, Apr 23, 2018 at 1:21 PM, Julien Grall <julien.grall@xxxxxxx> wrote:
On 20/04/18 13:25, Mirela Simonovic wrote:
+    if ( errno )
+        panic("PSCI cpu off failed for CPU%d err=%d\n",
+              errno);
   void call_psci_system_off(void)
       if ( psci_ver > PSCI_VERSION(0, 1) )
diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c
index b2116f0d2d..1ca3d63261 100644
--- a/xen/arch/arm/smpboot.c
+++ b/xen/arch/arm/smpboot.c
@@ -395,6 +395,9 @@ void stop_cpu(void)
       /* Make sure the write happens before we sleep forever */
+    if ( system_state == SYS_STATE_suspend )

I don't think this should be call only on suspend/resume. System shutdown
could also benefit of PSCI CPU off. This is also paving the way to more use
case of turning off a CPU.

Ok, but then we do need to check for PSCI version here.

Or inside call_psci_off to match the other psci_* functions. However, you still need to check the PSCI version in the suspend code to deny any suspend/resume functionally on platform without PSCI CPU off support.

Julien Grall

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.