diff mbox

[RFC,V7,19/19] target-arm/psci.c: wake up sleeping CPUs (MTTCG)

Message ID 87a8tzgfan.fsf@linaro.org
State New
Headers show

Commit Message

Alex Bennée Aug. 10, 2015, 6:38 p.m. UTC
Paolo Bonzini <pbonzini@redhat.com> writes:

> On 10/08/2015 17:27, fred.konrad@greensocs.com wrote:
>> From: Alex Bennée <alex.bennee@linaro.org>
>> 
>> Testing with Alexander's bare metal syncronisation tests fails in MTTCG
>> leaving one CPU spinning forever waiting for the second CPU to wake up.
>> We simply need to poke the halt_cond once we have processed the PSCI
>> power on call.
>> 
>> Tested-by: Alex Bennée <alex.bennee@linaro.org>
>> CC: Alexander Spyridakis <a.spyridakis@virtualopensystems.com>
>> ---
>>  target-arm/psci.c | 2 ++
>>  1 file changed, 2 insertions(+)
>> 
>> diff --git a/target-arm/psci.c b/target-arm/psci.c
>> index 20e4cb6..83e309c 100644
>> --- a/target-arm/psci.c
>> +++ b/target-arm/psci.c
>> @@ -211,6 +211,8 @@ void arm_handle_psci_call(ARMCPU *cpu)
>>          }
>>          target_cpu_class->set_pc(target_cpu_state, entry);
>>  
>> +        qemu_cond_signal(target_cpu_state->halt_cond);
>> +
>
> qemu_cpu_kick, not qemu_cond_signal.

I did a v2 in my branch and didn't realise Fred had picked it up into
his tree. I hadn't sent it up list because it didn't seem to be worth it
for non-MTTCG builds. I can send it if you want?

Fred,

Use the attached on your next rebase.
>
> Paolo
>
>>          ret = 0;
>>          break;
>>      case QEMU_PSCI_0_1_FN_CPU_OFF:
>>
diff mbox

Patch

From bb8aabadc0880a21bfe5821af172c047474841d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alex=20Benn=C3=A9e?= <alex.bennee@linaro.org>
Date: Tue, 7 Jul 2015 08:28:05 +0100
Subject: [PATCH] target-arm/psci.c: wake up sleeping CPUs (MTTCG)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Testing with Alexander's bare metal syncronisation tests fails in MTTCG
leaving one CPU spinning forever waiting for the second CPU to wake up.
We simply need to poke the halt_cond once we have processed the PSCI
power on call.

Tested-by: Alex Bennée <alex.bennee@linaro.org>
CC: Alexander Spyridakis <a.spyridakis@virtualopensystems.com>

---
v2
  - use qemu_cpu_kick()
---
 target-arm/psci.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target-arm/psci.c b/target-arm/psci.c
index 20e4cb6..4643743 100644
--- a/target-arm/psci.c
+++ b/target-arm/psci.c
@@ -211,6 +211,8 @@  void arm_handle_psci_call(ARMCPU *cpu)
         }
         target_cpu_class->set_pc(target_cpu_state, entry);
 
+        qemu_cpu_kick(target_cpu_state);
+
         ret = 0;
         break;
     case QEMU_PSCI_0_1_FN_CPU_OFF:
-- 
2.5.0