From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOrxg-000623-5j for qemu-devel@nongnu.org; Mon, 10 Aug 2015 14:38:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZOrxc-0004jG-10 for qemu-devel@nongnu.org; Mon, 10 Aug 2015 14:38:16 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:35868) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOrxb-0004i1-QU for qemu-devel@nongnu.org; Mon, 10 Aug 2015 14:38:11 -0400 Received: by wicja10 with SMTP id ja10so47807493wic.1 for ; Mon, 10 Aug 2015 11:38:11 -0700 (PDT) References: <1439220437-23957-1-git-send-email-fred.konrad@greensocs.com> <1439220437-23957-20-git-send-email-fred.konrad@greensocs.com> <55C8D440.900@redhat.com> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <55C8D440.900@redhat.com> Date: Mon, 10 Aug 2015 19:38:08 +0100 Message-ID: <87a8tzgfan.fsf@linaro.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Subject: Re: [Qemu-devel] [RFC PATCH V7 19/19] target-arm/psci.c: wake up sleeping CPUs (MTTCG) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: mttcg@listserver.greensocs.com, mark.burton@greensocs.com, a.rigo@virtualopensystems.com, qemu-devel@nongnu.org, guillaume.delbergue@greensocs.com, fred.konrad@greensocs.com --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Paolo Bonzini writes: > On 10/08/2015 17:27, fred.konrad@greensocs.com wrote: >> From: Alex Bennée >> >> 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 >> CC: Alexander Spyridakis >> --- >> 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. --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-target-arm-psci.c-wake-up-sleeping-CPUs-MTTCG.patch Content-Transfer-Encoding: 8bit Content-Description: v2 of PSCI patch >>From bb8aabadc0880a21bfe5821af172c047474841d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= 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 CC: Alexander Spyridakis --- 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 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit > > Paolo > >> ret = 0; >> break; >> case QEMU_PSCI_0_1_FN_CPU_OFF: >> -- Alex Bennée --=-=-=--