From nobody Sun Feb 8 22:45:30 2026 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) 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; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548811559201716.8264063149036; Tue, 29 Jan 2019 17:25:59 -0800 (PST) Received: from localhost ([127.0.0.1]:58319 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goedQ-0004yf-36 for importer@patchew.org; Tue, 29 Jan 2019 20:25:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35752) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goe41-0000CU-0I for qemu-devel@nongnu.org; Tue, 29 Jan 2019 19:49:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1goe40-0001U2-1c for qemu-devel@nongnu.org; Tue, 29 Jan 2019 19:49:12 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:36615) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1goe3y-00016w-Rt for qemu-devel@nongnu.org; Tue, 29 Jan 2019 19:49:10 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id BE97A2216B; Tue, 29 Jan 2019 19:48:26 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 29 Jan 2019 19:48:26 -0500 Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 4DB28E4559; Tue, 29 Jan 2019 19:48:26 -0500 (EST) 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=KkVB19/XOoA3XZvP3dgoznBiMceDqOUbY4qS2wrE5NA=; b=U//FX /V+9HQN1th1iRnnWply3S62x0xaUw+ouQUVF8NKMBPevK5uJ3YRe7ZJDRJYbpm/k t4PnMSlEescs4TXADYEhQndcPz8/Qrgtvpd38FO4hAKKMfv0vOCcz+mRy+YZw2ZB aHl/Fn5Om7S5uU7SzvBG+55hwhtRSqKwpII02w= 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=KkVB19/XOoA3XZvP3dgoznBiMceDq OUbY4qS2wrE5NA=; b=jLIve0ixs9F4CepnmTAeVc/KcHA3Kr/pDhLx2/dvcGJ2g 5PymgunL0fGnG7/IcVZOuvGCXEz9wFEFj0zVtM7g/xey9u6EbEHJeR2iiyl0nWs3 hv7grZcKk5mLUUg9EEnOikekk8L3b08zCfAsmwO7s51L6X43Xe4q+/RSTgjrDinl puVQuU3nSjuaXnyuFiHu+Hx7r2YkfCPpXxy5q8OV5uX5++S5yPSaVfRCCM3XYGYR lFmdPgJ2b3xUImgf86AIn5+m0/Hmk3D/jGzkmY1MWlQodlX/ID7TYa9IJAj6pf1T EFj5YJaTIVsVgS/NGdKJJQSF8YonVhm7hVBa8ZouQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrjeefgddvkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecufedt tdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojg hfsedttdertdertddtnecuhfhrohhmpedfgfhmihhlihhoucfirdcuvehothgrfdcuoegt ohhtrgessghrrggrphdrohhrgheqnecukfhppeduvdekrdehledrvddtrddvudeinecurf grrhgrmhepmhgrihhlfhhrohhmpegtohhtrgessghrrggrphdrohhrghenucevlhhushht vghrufhiiigvpeek X-ME-Proxy: From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Tue, 29 Jan 2019 19:47:48 -0500 Message-Id: <20190130004811.27372-51-cota@braap.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190130004811.27372-1-cota@braap.org> References: <20190130004811.27372-1-cota@braap.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.25 Subject: [Qemu-devel] [PATCH v6 50/73] mips: 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: Paolo Bonzini , Richard Henderson , Aleksandar Markovic , Aurelien Jarno , James Hogan Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Cc: Aurelien Jarno Cc: Aleksandar Markovic Cc: James Hogan Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/mips/cpu.c | 7 ++++--- target/mips/kvm.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index e217fb3e36..fdae8cf440 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -56,11 +56,12 @@ static bool mips_cpu_has_work(CPUState *cs) MIPSCPU *cpu =3D MIPS_CPU(cs); CPUMIPSState *env =3D &cpu->env; bool has_work =3D false; + uint32_t interrupt_request =3D cpu_interrupt_request(cs); =20 /* Prior to MIPS Release 6 it is implementation dependent if non-enabl= ed interrupts wake-up the CPU, however most of the implementations only check for interrupts that can be taken. */ - if ((cs->interrupt_request & CPU_INTERRUPT_HARD) && + if ((interrupt_request & CPU_INTERRUPT_HARD) && cpu_mips_hw_interrupts_pending(env)) { if (cpu_mips_hw_interrupts_enabled(env) || (env->insn_flags & ISA_MIPS32R6)) { @@ -72,7 +73,7 @@ static bool mips_cpu_has_work(CPUState *cs) if (env->CP0_Config3 & (1 << CP0C3_MT)) { /* The QEMU model will issue an _WAKE request whenever the CPUs should be woken up. */ - if (cs->interrupt_request & CPU_INTERRUPT_WAKE) { + if (interrupt_request & CPU_INTERRUPT_WAKE) { has_work =3D true; } =20 @@ -82,7 +83,7 @@ static bool mips_cpu_has_work(CPUState *cs) } /* MIPS Release 6 has the ability to halt the CPU. */ if (env->CP0_Config5 & (1 << CP0C5_VP)) { - if (cs->interrupt_request & CPU_INTERRUPT_WAKE) { + if (interrupt_request & CPU_INTERRUPT_WAKE) { has_work =3D true; } if (!mips_vp_active(env)) { diff --git a/target/mips/kvm.c b/target/mips/kvm.c index 0b177a7577..568c3d8f4a 100644 --- a/target/mips/kvm.c +++ b/target/mips/kvm.c @@ -135,7 +135,7 @@ void kvm_arch_pre_run(CPUState *cs, struct kvm_run *run) =20 qemu_mutex_lock_iothread(); =20 - if ((cs->interrupt_request & CPU_INTERRUPT_HARD) && + if ((cpu_interrupt_request(cs) & CPU_INTERRUPT_HARD) && cpu_mips_io_interrupts_pending(cpu)) { intr.cpu =3D -1; intr.irq =3D 2; --=20 2.17.1