From patchwork Fri Jun 3 20:40:18 2016 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: 9154021 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ED7A46082E for ; Fri, 3 Jun 2016 20:49:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF0C4281F9 for ; Fri, 3 Jun 2016 20:49:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D3E9E28333; Fri, 3 Jun 2016 20:49:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 427ED281F9 for ; Fri, 3 Jun 2016 20:49:53 +0000 (UTC) Received: from localhost ([::1]:57670 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8w2S-0000QF-CP for patchwork-qemu-devel@patchwork.kernel.org; Fri, 03 Jun 2016 16:49:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8vtd-0008WM-9n for qemu-devel@nongnu.org; Fri, 03 Jun 2016 16:40:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8vtY-0000Vf-0P for qemu-devel@nongnu.org; Fri, 03 Jun 2016 16:40:44 -0400 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]:36986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8vtX-0000V9-MO for qemu-devel@nongnu.org; Fri, 03 Jun 2016 16:40:39 -0400 Received: by mail-wm0-x231.google.com with SMTP id z87so9736868wmh.0 for ; Fri, 03 Jun 2016 13:40:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qXKj/clrwXBo6SpZfVP2UsbmzEpfWg2+6b5EArtV5nc=; b=C/VLna4AfXLjXAeqh+SJj7dKfpAXcbDyExH50nBugN64XsuRlnKdtEOVV07QEKWU81 TSfciFhBUwoCG+GowEdfKji+JQS01VLvpfoVo9fef09Cq0PBlL5tzIxJkcBar29lm0c3 JmZPJCc9fkNDW0O4avwAXKRk02I10Ex5PDpGQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qXKj/clrwXBo6SpZfVP2UsbmzEpfWg2+6b5EArtV5nc=; b=EvrtVup3nObJW3gWv4nuYP2kgZ+Vhw3JJRxBgWZe6usBWfB6Y5S06juESshppv6Ezu B8uo/cuEXfYTfKvCF0lplwgJCH4Nop7cF8KwpyIDmN7rQMW69GvnrlT5zSPNFNlCJ/Ek 3vhSJuUaM5dNpQbqpFkPcvE72cOLZhE3n4KR48Z6dGGpXosKktNBzL7Gzh2lh1DDtPB7 MLNN8KeNKytfx3ASy84GEgD8U0oLYmEYcEy0RmVbRR1pdPRpnwcQo1M6tiQgjCfj8fY6 YMQlJVYbq3JmFjHWrhXsr2JFx3ryrOBy6jdlO8AAVJwn4mNW0RkqC38Xfry5MlkTDtNQ H4dQ== X-Gm-Message-State: ALyK8tIKzIL3/yZo9VOswgEkUn8IuAqUPGNb6V3Gjv0TmyvZsdteX2Su5qXn52URginLkJtW X-Received: by 10.194.234.71 with SMTP id uc7mr5763471wjc.80.1464986439058; Fri, 03 Jun 2016 13:40:39 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id b207sm1255545wmb.0.2016.06.03.13.40.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Jun 2016 13:40:35 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id E8F333E2F23; Fri, 3 Jun 2016 21:40:39 +0100 (BST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: mttcg@listserver.greensocs.com, qemu-devel@nongnu.org, fred.konrad@greensocs.com, a.rigo@virtualopensystems.com, serge.fdrv@gmail.com, cota@braap.org, bobby.prani@gmail.com Date: Fri, 3 Jun 2016 21:40:18 +0100 Message-Id: <1464986428-6739-10-git-send-email-alex.bennee@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1464986428-6739-1-git-send-email-alex.bennee@linaro.org> References: <1464986428-6739-1-git-send-email-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::231 Subject: [Qemu-devel] [RFC v3 09/19] target-arm/arm-powerctl: wake up sleeping CPUs X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Alexander Spyridakis , claudio.fontana@huawei.com, mark.burton@greensocs.com, "open list:ARM" , jan.kiszka@siemens.com, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , rth@twiddle.net Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 kick the vCPU once we have processed the PSCI power on call. As the power control API is for system emulation only as is the qemu_kick_cpu function we also ensure we only build arm-powerctl for SoftMMU builds. Tested-by: Alex Bennée CC: Alexander Spyridakis Message-Id: <1439220437-23957-20-git-send-email-fred.konrad@greensocs.com> Signed-off-by: Alex Bennée Signed-off-by: Paolo Bonzini --- v3 - re-base caught arm_powerctl re-factor - include cpu.h header for kick definition - fix Makefile.objs to only build for softmmu --- target-arm/Makefile.objs | 2 +- target-arm/arm-powerctl.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/target-arm/Makefile.objs b/target-arm/Makefile.objs index f206411..847fb52 100644 --- a/target-arm/Makefile.objs +++ b/target-arm/Makefile.objs @@ -9,4 +9,4 @@ obj-y += neon_helper.o iwmmxt_helper.o obj-y += gdbstub.o obj-$(TARGET_AARCH64) += cpu64.o translate-a64.o helper-a64.o gdbstub64.o obj-y += crypto_helper.o -obj-y += arm-powerctl.o +obj-$(CONFIG_SOFTMMU) += arm-powerctl.o diff --git a/target-arm/arm-powerctl.c b/target-arm/arm-powerctl.c index d452230..4baa051 100644 --- a/target-arm/arm-powerctl.c +++ b/target-arm/arm-powerctl.c @@ -166,6 +166,8 @@ int arm_set_cpu_on(uint64_t cpuid, uint64_t entry, uint64_t context_id, /* Start the new CPU at the requested address */ cpu_set_pc(target_cpu_state, entry); + qemu_cpu_kick(target_cpu_state); + /* We are good to go */ return QEMU_ARM_POWERCTL_RET_SUCCESS; }