From patchwork Mon Oct 31 14:13:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 80189 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp150919qge; Mon, 31 Oct 2016 07:39:11 -0700 (PDT) X-Received: by 10.200.51.251 with SMTP id d56mr11667066qtb.89.1477924751134; Mon, 31 Oct 2016 07:39:11 -0700 (PDT) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id w23si17733753qka.222.2016.10.31.07.39.11 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 31 Oct 2016 07:39:11 -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; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:36041 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1Djy-0005mO-IH for patch@linaro.org; Mon, 31 Oct 2016 10:39:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1DLb-0000JW-L7 for qemu-devel@nongnu.org; Mon, 31 Oct 2016 10:14:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1DLX-0002wN-Gn for qemu-devel@nongnu.org; Mon, 31 Oct 2016 10:13:59 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:33499) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c1DLX-0002vp-97 for qemu-devel@nongnu.org; Mon, 31 Oct 2016 10:13:55 -0400 Received: by mail-wm0-x242.google.com with SMTP id m83so18600448wmc.0 for ; Mon, 31 Oct 2016 07:13:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uDarvimkTo9gJVpS9ghs9rvJBoDZHrrA6qNTfE8a4PE=; b=oH25RroZXtF5irgJ1JqezCKGxD1wj5HfOx4NX1eguPPf63rlcFeSpU70kgFg8rPw/c 1DtgzG3bews10bHPndNyR8szEE8UAIBp7XMYFktar9rI5ZTr02kfV7tkQjhBpocoZxC1 u/RYhSwBZ2pa4O9GewhZbqsEpXFhU9/FmsvpUtTI+BawB0VHQej7iJpf8vwjHzLZT/mF 9Qj96KcfsimIpE0PGhzZMwiqIXtrm7wJWj9LLNue+syWUFH93Dc6WmJFbRaZDqj0n81F jEmdw6qhY9BsDliqZ/Qje54h+xqAoBlgteR62SFwLqMXlz7mGbbDOqpPeblJNi0eYLL7 J9yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=uDarvimkTo9gJVpS9ghs9rvJBoDZHrrA6qNTfE8a4PE=; b=NZr6HYK1mPCy+Cx7bFGRc+MmI2kUbrx83O1Uq8CbvijmEYiHjJUz3D55av/BMQD+1P rdSchRlPsNZB1UQ4M+9A/fTjjKgWZCgMnVkzoT5+SyY1KeMxtVWYLByEv575yJcn0F+r RxG1OcZWE5OSLutSgEl3uLsj3EC1wK7M9Y5jqN94A6tI8Y7isJENpyt9rUFhg+BU9qB8 SJsFh8k5APTmbyxnc965TgvjQqidN+5VMICBOWyjzByG/Hu9Eh3KxOF7HKtWai9grvDL GQRIZgxAOXHxZPKoDEtwmrHws9a8Ay7WRODFWtyHxMLgDwgDs+2om/MXEVVbQsh4H8BM UhxQ== X-Gm-Message-State: ABUngveNGWI35a2kbTsuDwCX34Nef80iUIf+ERLQObEkOKFsYLEq5+QkjpK7vgUFXz8EOQ== X-Received: by 10.28.229.132 with SMTP id c126mr11434001wmh.110.1477923234033; Mon, 31 Oct 2016 07:13:54 -0700 (PDT) Received: from donizetti.lan (dynamic-adsl-78-12-246-178.clienti.tiscali.it. [78.12.246.178]) by smtp.gmail.com with ESMTPSA id p13sm25052133wmd.20.2016.10.31.07.13.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 31 Oct 2016 07:13:53 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 31 Oct 2016 15:13:30 +0100 Message-Id: <1477923215-30323-10-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477923215-30323-1-git-send-email-pbonzini@redhat.com> References: <1477923215-30323-1-git-send-email-pbonzini@redhat.com> 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::242 Subject: [Qemu-devel] [PULL 09/14] 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: Alexander Spyridakis , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 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 Message-Id: <20161027151030.20863-11-alex.bennee@linaro.org> Signed-off-by: Paolo Bonzini --- target-arm/Makefile.objs | 2 +- target-arm/arm-powerctl.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) -- 2.7.4 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 6519d52..fbb7a15 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; }