From patchwork Thu Dec 13 05:04:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emilio Cota X-Patchwork-Id: 10728051 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EAE25112E for ; Thu, 13 Dec 2018 05:58:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA51E2B8A5 for ; Thu, 13 Dec 2018 05:58:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CAAD02B8BE; Thu, 13 Dec 2018 05:58:27 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 3A5E32B8A5 for ; Thu, 13 Dec 2018 05:58:27 +0000 (UTC) Received: from localhost ([::1]:50723 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXK0w-0004tQ-FL for patchwork-qemu-devel@patchwork.kernel.org; Thu, 13 Dec 2018 00:58:26 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56299) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXJD0-00083M-SW for qemu-devel@nongnu.org; Thu, 13 Dec 2018 00:06:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gXJCy-0002C6-E6 for qemu-devel@nongnu.org; Thu, 13 Dec 2018 00:06:50 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:52717) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gXJCy-0001aR-25; Thu, 13 Dec 2018 00:06:48 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id C049D22215; Thu, 13 Dec 2018 00:05:46 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 13 Dec 2018 00:05:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h= from:to:cc:subject:date:message-id:in-reply-to:references; s= mesmtp; bh=SmXrQZTzMV0aR1KHdMu5SUzsFwHI12fVLSIE3mCzz0c=; b=BGkXb GHWIONA2jkMa2Mhm8iZZOD1Gga7hr1g6yrZCpKHFxqTg2ba0BLKYAS8ZspuswHLt XVTrSaen6CK0rwNEWIVMG5XmGDtqx7BOM+ZEHGPOkyy9FyiFw/hcCubeuaOJR+iS wYjLa46h/sUSNM4z8fiBLknX4+0HHZPGg5r0pc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=SmXrQZTzMV0aR1KHdMu5SUzsFwHI1 2fVLSIE3mCzz0c=; b=nFTObrJl5NPkFL9MWK5q6ouvWN6dHEBeEaVg28/f05/he Jq5pLaM0UqixljZQ6tzlDA+ffjfftS7vChF05udPt/OUoKOpNBUz6jTyPLcgi8np WQI9dJesvGYdyrkhlW3rjyouxufMT3FCFT912tNiCTilFgnkYoR92xZXRWYok5AD edV/39W8Cm2BmbeccvsCLkUZLenkVXRJLOW1Vz4u1J9oZzZS+7gKwBL7tetfEzB3 fx4ryu3rnWMXMkWH2dRMPELdh84PDXZAgi2rwI4/HvRtB7NfQMFwi0yB1hmtuP6w mRYi1AwsfGesfDhqM8NP7wpHW3DRPXboMfyvGBXIw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtkedrudehuddgkedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkof gjfhestddtredtredttdenucfhrhhomhepfdfgmhhilhhiohcuifdrucevohhtrgdfuceo tghothgrsegsrhgrrghprdhorhhgqeenucfkphepuddvkedrheelrddvtddrvdduieenuc frrghrrghmpehmrghilhhfrhhomheptghothgrsegsrhgrrghprdhorhhgnecuvehluhhs thgvrhfuihiivgepke X-ME-Proxy: Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 6633D10086; Thu, 13 Dec 2018 00:05:46 -0500 (EST) From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Thu, 13 Dec 2018 00:04:24 -0500 Message-Id: <20181213050453.9677-45-cota@braap.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181213050453.9677-1-cota@braap.org> References: <20181213050453.9677-1-cota@braap.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.25 Subject: [Qemu-devel] [PATCH v5 44/73] ppc: convert to cpu_interrupt_request 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: Richard Henderson , Alexander Graf , qemu-ppc@nongnu.org, Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , David Gibson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Cc: David Gibson Cc: Alexander Graf Cc: qemu-ppc@nongnu.org Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Acked-by: David Gibson --- hw/ppc/ppc.c | 2 +- target/ppc/excp_helper.c | 2 +- target/ppc/kvm.c | 4 ++-- target/ppc/translate_init.inc.c | 14 +++++++------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c index d1a5a0b877..bc1cefa13f 100644 --- a/hw/ppc/ppc.c +++ b/hw/ppc/ppc.c @@ -91,7 +91,7 @@ void ppc_set_irq(PowerPCCPU *cpu, int n_IRQ, int level) LOG_IRQ("%s: %p n_IRQ %d level %d => pending %08" PRIx32 "req %08x\n", __func__, env, n_IRQ, level, - env->pending_interrupts, CPU(cpu)->interrupt_request); + env->pending_interrupts, cpu_interrupt_request(CPU(cpu))); if (locked) { qemu_mutex_unlock_iothread(); diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index 737c9c72be..75a434f46b 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@ -753,7 +753,7 @@ static void ppc_hw_interrupt(CPUPPCState *env) qemu_log_mask(CPU_LOG_INT, "%s: %p pending %08x req %08x me %d ee %d\n", __func__, env, env->pending_interrupts, - cs->interrupt_request, (int)msr_me, (int)msr_ee); + cpu_interrupt_request(cs), (int)msr_me, (int)msr_ee); #endif /* External reset */ if (env->pending_interrupts & (1 << PPC_INTERRUPT_RESET)) { diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index 557faa3637..cebb73bd98 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -1336,7 +1336,7 @@ void kvm_arch_pre_run(CPUState *cs, struct kvm_run *run) * interrupt, reset, etc) in PPC-specific env->irq_input_state. */ if (!cap_interrupt_level && run->ready_for_interrupt_injection && - (cs->interrupt_request & CPU_INTERRUPT_HARD) && + (cpu_interrupt_request(cs) & CPU_INTERRUPT_HARD) && (env->irq_input_state & (1<env; - if (!(cs->interrupt_request & CPU_INTERRUPT_HARD) && (msr_ee)) { + if (!(cpu_interrupt_request(cs) & CPU_INTERRUPT_HARD) && (msr_ee)) { cpu_halted_set(cs, 1); cs->exception_index = EXCP_HLT; } diff --git a/target/ppc/translate_init.inc.c b/target/ppc/translate_init.inc.c index 986bbd7eb4..757eb6df16 100644 --- a/target/ppc/translate_init.inc.c +++ b/target/ppc/translate_init.inc.c @@ -8463,7 +8463,7 @@ static bool cpu_has_work_POWER7(CPUState *cs) CPUPPCState *env = &cpu->env; if (cpu_halted(cs)) { - if (!(cs->interrupt_request & CPU_INTERRUPT_HARD)) { + if (!(cpu_interrupt_request(cs) & CPU_INTERRUPT_HARD)) { return false; } if ((env->pending_interrupts & (1u << PPC_INTERRUPT_EXT)) && @@ -8487,7 +8487,7 @@ static bool cpu_has_work_POWER7(CPUState *cs) } return false; } else { - return msr_ee && (cs->interrupt_request & CPU_INTERRUPT_HARD); + return msr_ee && (cpu_interrupt_request(cs) & CPU_INTERRUPT_HARD); } } @@ -8617,7 +8617,7 @@ static bool cpu_has_work_POWER8(CPUState *cs) CPUPPCState *env = &cpu->env; if (cpu_halted(cs)) { - if (!(cs->interrupt_request & CPU_INTERRUPT_HARD)) { + if (!(cpu_interrupt_request(cs) & CPU_INTERRUPT_HARD)) { return false; } if ((env->pending_interrupts & (1u << PPC_INTERRUPT_EXT)) && @@ -8649,7 +8649,7 @@ static bool cpu_has_work_POWER8(CPUState *cs) } return false; } else { - return msr_ee && (cs->interrupt_request & CPU_INTERRUPT_HARD); + return msr_ee && (cpu_interrupt_request(cs) & CPU_INTERRUPT_HARD); } } @@ -8809,7 +8809,7 @@ static bool cpu_has_work_POWER9(CPUState *cs) CPUPPCState *env = &cpu->env; if (cpu_halted(cs)) { - if (!(cs->interrupt_request & CPU_INTERRUPT_HARD)) { + if (!(cpu_interrupt_request(cs) & CPU_INTERRUPT_HARD)) { return false; } /* External Exception */ @@ -8842,7 +8842,7 @@ static bool cpu_has_work_POWER9(CPUState *cs) } return false; } else { - return msr_ee && (cs->interrupt_request & CPU_INTERRUPT_HARD); + return msr_ee && (cpu_interrupt_request(cs) & CPU_INTERRUPT_HARD); } } @@ -10253,7 +10253,7 @@ static bool ppc_cpu_has_work(CPUState *cs) PowerPCCPU *cpu = POWERPC_CPU(cs); CPUPPCState *env = &cpu->env; - return msr_ee && (cs->interrupt_request & CPU_INTERRUPT_HARD); + return msr_ee && (cpu_interrupt_request(cs) & CPU_INTERRUPT_HARD); } /* CPUClass::reset() */