From nobody Tue Feb 10 23:14:35 2026 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; dkim=fail; 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; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1530155160960786.6483968024821; Wed, 27 Jun 2018 20:06:00 -0700 (PDT) Received: from localhost ([::1]:34247 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYNFs-0006Jz-S2 for importer@patchew.org; Wed, 27 Jun 2018 23:05:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39872) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYNDh-0004uh-UT for qemu-devel@nongnu.org; Wed, 27 Jun 2018 23:03:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYNDg-0007eQ-Tl for qemu-devel@nongnu.org; Wed, 27 Jun 2018 23:03:41 -0400 Received: from mail-pl0-x242.google.com ([2607:f8b0:400e:c01::242]:40768) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fYNDg-0007eC-O1 for qemu-devel@nongnu.org; Wed, 27 Jun 2018 23:03:40 -0400 Received: by mail-pl0-x242.google.com with SMTP id t6-v6so2010179plo.7 for ; Wed, 27 Jun 2018 20:03:40 -0700 (PDT) Received: from cloudburst.twiddle.net (97-126-112-211.tukw.qwest.net. [97.126.112.211]) by smtp.gmail.com with ESMTPSA id y15-v6sm8030489pfm.136.2018.06.27.20.03.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Jun 2018 20:03:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=aJQOgLhmdjBLyZG1/Zx4n3oTLHrsOdzZdDsXgKO1Fbs=; b=Qc1QHJBtiIAfPJ1ApE6hveDp9rhMdhl1MedtecbTxilS1nfyRlJr/k6f8WSpV/2OeN U+4zHrxE+BDZa6HD4qpSj7hG+lUcQuAEnH6Xp339i/789BNZRCfojwuslBWkiyeRalu7 i3SKq0uVDJAsqpdh/IrbnSA/Xid6o/ZumSZz0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=aJQOgLhmdjBLyZG1/Zx4n3oTLHrsOdzZdDsXgKO1Fbs=; b=G3ZbDhMpxyyedY/2RMXxD0KhEF9GfoHtKLOgDWGLBvInjXcMf9dKJ+lDCQ1+nsPRNk eFx6ouRqWJAn/xdOQ0pd7AzKHBtBTBIxzq83NCyoL8G/3dhDpPuoympSTebq5ZJPFn/c zaobl0axvosixOuM4olSTRlSYONs662lPlXYTlnmyRylp1q+6xmxqe1Nvcv2ZFD+RAHd HxVSfyWJe8d1f7UZUdQn3R4TfWBzElDPC6SW2Y3Xzd9GYC+u1xdkbypLRuH3Di+OUiyz FCk3ueGr+QX2EWcKjD8cgRvxXsx0o5e8iWlsDOuJWYmiUl0yo17n9bO+c8L/RXCdy/JN zDwQ== X-Gm-Message-State: APt69E0BxqCpcHD5Vws5GgYcquBkHzZGZwwwsThL5GZuHLowIZkXYvqI Zp3XfL/4YQJRkNhigygtYcm1uEMGOig= X-Google-Smtp-Source: ADUXVKJSVA808vf2iTXyPK13yW4YGP4GaPIcOduXAEiTgrpSIPrjoS89Kf7Z7fpr+TtsdRAQfVQJzg== X-Received: by 2002:a17:902:7b95:: with SMTP id w21-v6mr8703843pll.150.1530155019461; Wed, 27 Jun 2018 20:03:39 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 27 Jun 2018 20:03:12 -0700 Message-Id: <20180628030330.15615-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180628030330.15615-1-richard.henderson@linaro.org> References: <20180628030330.15615-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::242 Subject: [Qemu-devel] [PATCH v3 05/23] target/openrisc: Use exit_tb instead of CPU_INTERRUPT_EXITTB 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: shorne@gmail.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" No need to use the interrupt mechanisms when we can simply exit the tb directly. Reviewed-by: Stafford Horne Signed-off-by: Richard Henderson --- target/openrisc/interrupt_helper.c | 3 +-- target/openrisc/translate.c | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/target/openrisc/interrupt_helper.c b/target/openrisc/interrupt= _helper.c index 56620e0571..b865738f8b 100644 --- a/target/openrisc/interrupt_helper.c +++ b/target/openrisc/interrupt_helper.c @@ -26,7 +26,6 @@ void HELPER(rfe)(CPUOpenRISCState *env) { OpenRISCCPU *cpu =3D openrisc_env_get_cpu(env); - CPUState *cs =3D CPU(cpu); #ifndef CONFIG_USER_ONLY int need_flush_tlb =3D (cpu->env.sr & (SR_SM | SR_IME | SR_DME)) ^ (cpu->env.esr & (SR_SM | SR_IME | SR_DME)); @@ -53,8 +52,8 @@ void HELPER(rfe)(CPUOpenRISCState *env) } =20 if (need_flush_tlb) { + CPUState *cs =3D CPU(cpu); tlb_flush(cs); } #endif - cs->interrupt_request |=3D CPU_INTERRUPT_EXITTB; } diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c index f5af515979..43bdf378eb 100644 --- a/target/openrisc/translate.c +++ b/target/openrisc/translate.c @@ -37,6 +37,7 @@ #include "exec/log.h" =20 /* is_jmp field values */ +#define DISAS_EXIT DISAS_TARGET_0 /* force exit to main loop */ #define DISAS_UPDATE DISAS_TARGET_1 /* cpu state was modified dynamically= */ =20 typedef struct DisasContext { @@ -1133,7 +1134,7 @@ static bool trans_l_rfe(DisasContext *dc, arg_l_rfe *= a, uint32_t insn) gen_illegal_exception(dc); } else { gen_helper_rfe(cpu_env); - dc->base.is_jmp =3D DISAS_UPDATE; + dc->base.is_jmp =3D DISAS_EXIT; } #endif return true; @@ -1353,8 +1354,7 @@ static void openrisc_tr_tb_stop(DisasContextBase *dcb= ase, CPUState *cs) case DISAS_NORETURN: break; case DISAS_UPDATE: - /* indicate that the hash table must be used - to find the next TB */ + case DISAS_EXIT: tcg_gen_exit_tb(NULL, 0); break; default: --=20 2.17.1