From nobody Wed Nov 5 20:15:30 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1537202965427945.6213946017931; Mon, 17 Sep 2018 09:49:25 -0700 (PDT) Received: from localhost ([::1]:36534 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1wiC-0004hZ-9w for importer@patchew.org; Mon, 17 Sep 2018 12:49:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41127) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1wQo-0006Qr-SE for qemu-devel@nongnu.org; Mon, 17 Sep 2018 12:31:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g1wQl-0002Ae-JI for qemu-devel@nongnu.org; Mon, 17 Sep 2018 12:31:26 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:35653) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g1wQl-0001qL-99 for qemu-devel@nongnu.org; Mon, 17 Sep 2018 12:31:23 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id D1F92559; Mon, 17 Sep 2018 12:31:10 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 17 Sep 2018 12:31:11 -0400 Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 32661E4626; Mon, 17 Sep 2018 12:31:10 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h=cc :date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=mesmtp; bh=U55KPyctr2mt+v Z3lYdfZNe58eKAjn0rRrHIADtku2k=; b=00aLZuqCEk7ByIBukxy580VFQTkJVg WQqbLmPrwfuBRnt1D/dTq9egU1SXXU2inTsndmelQBagdXECwbqkOtvn+X/g6qga jnV0u8gYB/KATVE5uX042WQEniWuqmftR0ncgO7ZqIwKEnC/5Km8zDVVbKSh7ec3 RSgbtBAPChR3w= 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-sender:x-me-sender:x-sasl-enc; s= fm3; bh=U55KPyctr2mt+vZ3lYdfZNe58eKAjn0rRrHIADtku2k=; b=b1D9mKKX 1DvZ9i9ULcaXmQb+AAelXsF9uyKs3YmR5W6A3O7eArztooVYuxffsdYD83HyUXtD A+Q2m71oIy1wADecIWIzCyd1u/neGRJWp0f2Y1pKlgfbwj2nWBAB/ok8jZ/h/pGK lm13DIo7B7tvSD/bmK1g/ucF829DBdmf6k/ZkSRsuzysPACwZd+qPdqkVY4JjadN dVZqbB7gC6RESx/bxgbQbHMSC6cw+vCBo6OHQG6oxHZXZd3d94WrZM4u+W8AjVKJ FLoULLqVcXucCygLdF85PUhcNHKDI1pIhzOiXcGSfg6gbv0drRjzZC8C5t5a9I+M PuM06f7JIQBbBA== X-ME-Proxy: X-ME-Sender: From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Mon, 17 Sep 2018 12:30:52 -0400 Message-Id: <20180917163103.6113-25-cota@braap.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180917163103.6113-1-cota@braap.org> References: <20180917163103.6113-1-cota@braap.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 64.147.123.25 Subject: [Qemu-devel] [PATCH 24/35] target/sh4: access cpu->interrupt_request with atomics 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 , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Paolo Bonzini Cc: Aurelien Jarno Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- target/sh4/cpu.c | 2 +- target/sh4/helper.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c index b9f393b7c7..892a023c5c 100644 --- a/target/sh4/cpu.c +++ b/target/sh4/cpu.c @@ -45,7 +45,7 @@ static void superh_cpu_synchronize_from_tb(CPUState *cs, = TranslationBlock *tb) =20 static bool superh_cpu_has_work(CPUState *cs) { - return cs->interrupt_request & CPU_INTERRUPT_HARD; + return atomic_read(&cs->interrupt_request) & CPU_INTERRUPT_HARD; } =20 /* CPUClass::reset() */ diff --git a/target/sh4/helper.c b/target/sh4/helper.c index 2ff0cf4060..c699b8c0a1 100644 --- a/target/sh4/helper.c +++ b/target/sh4/helper.c @@ -83,7 +83,7 @@ void superh_cpu_do_interrupt(CPUState *cs) { SuperHCPU *cpu =3D SUPERH_CPU(cs); CPUSH4State *env =3D &cpu->env; - int do_irq =3D cs->interrupt_request & CPU_INTERRUPT_HARD; + int do_irq =3D atomic_read(&cs->interrupt_request) & CPU_INTERRUPT_HAR= D; int do_exp, irq_vector =3D cs->exception_index; =20 /* prioritize exceptions over interrupts */ --=20 2.17.1