From nobody Sun Nov 9 16:22:02 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1551157406223977.0491280424036; Mon, 25 Feb 2019 21:03:26 -0800 (PST) Received: from localhost ([127.0.0.1]:48889 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyUtn-0003lL-4m for importer@patchew.org; Tue, 26 Feb 2019 00:03:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyUka-0004lA-5S for qemu-devel@nongnu.org; Mon, 25 Feb 2019 23:53:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gyUkQ-0001Lz-Ob for qemu-devel@nongnu.org; Mon, 25 Feb 2019 23:53:46 -0500 Received: from ozlabs.org ([2401:3900:2:1::2]:35487) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gyUkL-0000gF-MC; Mon, 25 Feb 2019 23:53:39 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 447mfF6lgQz9sBL; Tue, 26 Feb 2019 15:53:09 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1551156789; bh=kpwQb/4O+ZL2AUASS2HG+3snNhO6+jF1Ws4iESRmm9A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OQne+bvXyzQG9/Dejzgy+rErdOAimKxJFPZ/ep5R+3tlhiFGDeThISWgMekHhHtJ9 MUGKSCNeMt/uLhPNjpgAsgW9FZJdk6vPyZFPuvtiAjECQAa97SuFlz54uplmfpBZBU IaCmU6WAp/2EwltBZksN0LIdBcG8LzrCYA+A8S2M= From: David Gibson To: peter.maydell@linaro.org Date: Tue, 26 Feb 2019 15:52:19 +1100 Message-Id: <20190226045304.25618-6-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190226045304.25618-1-david@gibson.dropbear.id.au> References: <20190226045304.25618-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 05/50] target/ppc: Rename "in_pm_state" to "resume_as_sreset" 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: lvivier@redhat.com, gkurz@kaod.org, qemu-devel@nongnu.org, qemu-ppc@nongnu.org, clg@kaod.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Benjamin Herrenschmidt To better reflect what this does, as it's specific to some of the P7/P8/P9 PM states, not generic. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: David Gibson Message-Id: <20190215161648.9600-6-clg@kaod.org> Signed-off-by: David Gibson --- hw/ppc/ppc.c | 2 +- target/ppc/cpu.h | 6 +++--- target/ppc/excp_helper.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c index cffdc3914a..12439dbe5d 100644 --- a/hw/ppc/ppc.c +++ b/hw/ppc/ppc.c @@ -776,7 +776,7 @@ static inline void cpu_ppc_hdecr_excp(PowerPCCPU *cpu) * interrupts in a PM state. Not only they don't cause a * wakeup but they also get effectively discarded. */ - if (!env->in_pm_state) { + if (!env->resume_as_sreset) { ppc_set_irq(cpu, PPC_INTERRUPT_HDECR, 1); } } diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 5b1899bfc9..d2364564a0 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -1117,10 +1117,10 @@ struct CPUPPCState { =20 /* * On P7/P8/P9, set when in PM state, we need to handle resume in - * a special way (such as routing some resume causes to 0x100), so - * flag this here. + * a special way (such as routing some resume causes to 0x100, ie, + * sreset), so flag this here. */ - bool in_pm_state; + bool resume_as_sreset; #endif =20 /* Those resources are used only during code translation */ diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index 489a54f51b..7536620a41 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@ -69,7 +69,7 @@ static int powerpc_reset_wakeup(CPUState *cs, CPUPPCState= *env, int excp, target_ulong *msr) { /* We no longer are in a PM state */ - env->in_pm_state =3D false; + env->resume_as_sreset =3D false; =20 /* Pretend to be returning from doze always as we don't lose state */ *msr |=3D (0x1ull << (63 - 47)); @@ -141,7 +141,7 @@ static inline void powerpc_excp(PowerPCCPU *cpu, int ex= cp_model, int excp) * check for special resume at 0x100 from doze/nap/sleep/winkle on * P7/P8/P9 */ - if (env->in_pm_state) { + if (env->resume_as_sreset) { excp =3D powerpc_reset_wakeup(cs, env, excp, &msr); } =20 @@ -787,7 +787,7 @@ static void ppc_hw_interrupt(CPUPPCState *env) * clear when coming out of some power management states (in order * for them to become a 0x100). */ - async_deliver =3D (msr_ee !=3D 0) || env->in_pm_state; + async_deliver =3D (msr_ee !=3D 0) || env->resume_as_sreset; =20 /* Hypervisor decrementer exception */ if (env->pending_interrupts & (1 << PPC_INTERRUPT_HDECR)) { @@ -970,7 +970,7 @@ void helper_pminsn(CPUPPCState *env, powerpc_pm_insn_t = insn) env->pending_interrupts &=3D ~(1 << PPC_INTERRUPT_HDECR); =20 /* Condition for waking up at 0x100 */ - env->in_pm_state =3D (insn !=3D PPC_PM_STOP) || + env->resume_as_sreset =3D (insn !=3D PPC_PM_STOP) || (env->spr[SPR_PSSCR] & PSSCR_EC); } #endif /* defined(TARGET_PPC64) */ --=20 2.20.1