From patchwork Mon Aug 10 18:38:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 52268 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by patches.linaro.org (Postfix) with ESMTPS id BD35D22919 for ; Mon, 10 Aug 2015 18:38:46 +0000 (UTC) Received: by wijp15 with SMTP id p15sf41563983wij.3 for ; Mon, 10 Aug 2015 11:38:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:references:from:to:in-reply-to:date :message-id:mime-version:content-type:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=5WFGFiZ/OkhOwh8j/7Nc5amPg9rQ9o8u92RnjUBZ74o=; b=FTZCKFeBQ+w4WXdVhGwHVlmO9y55EN2mCFY+zlLpcBlcJRZHNCA5bGDmWzNWipDEjl 13EEz7lMCsAOoOOlgR5eAuNGHYLIMZ4z63Bz9B+6PxUdgi3o2fIeYanyO7ZZu4mNfIr5 yd9bRPzZtyoS8oM8cnO6/+Up3ILPB0HgkjuSFscfr9YaSc13y+GBOa49cDu2zU4nI2tB dlFL6ZBWHJIRrz5lJxLW6+Aw5FF43ddsMpy5zb8cbyLM3oLoDYguEf6x6l9J05aY3N+q h/6qudgALypEk3zDj+KKGMZLBJ3wg2RgA5WhsJRr47AqLmLVLcWx3IWbvPmI96Mkkcbw nfyA== X-Gm-Message-State: ALoCoQnqCc9TgD2uTTZxY+TxF/WaMjuxPxJzX54tVBGuJ/Pb08ibMRsVNgdJBo32rgyHiAMeRWBy X-Received: by 10.112.139.65 with SMTP id qw1mr6744416lbb.24.1439231925613; Mon, 10 Aug 2015 11:38:45 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.133 with SMTP id v5ls753252lae.63.gmail; Mon, 10 Aug 2015 11:38:45 -0700 (PDT) X-Received: by 10.152.22.133 with SMTP id d5mr14896073laf.112.1439231925452; Mon, 10 Aug 2015 11:38:45 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id a4si14580901lak.156.2015.08.10.11.38.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Aug 2015 11:38:45 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by lbbsx3 with SMTP id sx3so16504677lbb.0 for ; Mon, 10 Aug 2015 11:38:45 -0700 (PDT) X-Received: by 10.112.166.106 with SMTP id zf10mr21157042lbb.36.1439231925309; Mon, 10 Aug 2015 11:38:45 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp2086157lba; Mon, 10 Aug 2015 11:38:44 -0700 (PDT) X-Received: by 10.55.17.168 with SMTP id 40mr39059212qkr.83.1439231924064; Mon, 10 Aug 2015 11:38:44 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 98si14986887qgf.114.2015.08.10.11.38.43 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 10 Aug 2015 11:38:44 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:59790 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOry7-0006Ma-9G for patch@linaro.org; Mon, 10 Aug 2015 14:38:43 -0400 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) X-Received: by 10.180.102.74 with SMTP id fm10mr27954380wib.25.1439231891180; Mon, 10 Aug 2015 11:38:11 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id cd16sm794116wib.19.2015.08.10.11.38.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Aug 2015 11:38:10 -0700 (PDT) Received: from zen.linaro.local (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTPS id 1653F3E05BC; Mon, 10 Aug 2015 19:38:09 +0100 (BST) 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?= To: Paolo Bonzini 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 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.212.172 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 Subject: Re: [Qemu-devel] [RFC PATCH V7 19/19] target-arm/psci.c: wake up sleeping CPUs (MTTCG) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: alex.bennee@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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. > > Paolo > >> ret = 0; >> break; >> case QEMU_PSCI_0_1_FN_CPU_OFF: >> >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