From nobody Sun Nov 2 16:26:24 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; 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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1527430560420802.7545175144012; Sun, 27 May 2018 07:16:00 -0700 (PDT) Received: from localhost ([::1]:52204 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMwSd-0001K2-5P for importer@patchew.org; Sun, 27 May 2018 10:15:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57673) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMwQP-0008PS-Ko for qemu-devel@nongnu.org; Sun, 27 May 2018 10:13:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fMwQO-0004Mq-MQ for qemu-devel@nongnu.org; Sun, 27 May 2018 10:13:33 -0400 Received: from mail-pl0-x243.google.com ([2607:f8b0:400e:c01::243]:33576) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fMwQO-0004Mm-GJ for qemu-devel@nongnu.org; Sun, 27 May 2018 10:13:32 -0400 Received: by mail-pl0-x243.google.com with SMTP id n10-v6so5737119plp.0 for ; Sun, 27 May 2018 07:13:32 -0700 (PDT) Received: from cloudburst.twiddle.net (50-233-235-3-static.hfc.comcastbusiness.net. [50.233.235.3]) by smtp.gmail.com with ESMTPSA id b89-v6sm66680075pfd.85.2018.05.27.07.13.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 27 May 2018 07:13:30 -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=v5a5CtWLlrTHKhlg23p0wCWnGJn/uksZC6j3BEgsUGQ=; b=AFTgsBhxoSXJawc9yjQbS53jNugjQrm8QXKRlPvwZLqQKSOt3xxnIfBL0LgpPMrTHV CFpaUdFfhJELdSA/PkgbPqlOMf+X1F1Im8hu0xEOk4YThUVwof//hSLZvvSJ91IFXBpB 60/VCOuDvFBf+5VIKPJ58wA27050GnJRIcDuI= 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=v5a5CtWLlrTHKhlg23p0wCWnGJn/uksZC6j3BEgsUGQ=; b=ctV13gwN8TAXRfl0MwWefJJczcp1uw/+zw1zPTsQ8GOOkiH0mr21pPZF+M7I+iQG6d Gqhz9VFNtZEaJjtROJImYnpiU3DCBcVLy8l9OVkqpxD9XKEzrb/5Low01RCNuPakpcO/ S7jcBVzcQO9/3EUDyeTr5CkbiEaBkFl1yflkGbhTRxcYSLVwng0sOegxD54tH1MNXEZz vxVD58PhZkkX4CkLXfFIzTfOgYreVWDbTKNPHQkYGel8FppY3Uoz74LjixHlf7Xo3TFx +5I7Yab/yEZo3J2nR5b116Oj3OWbgtXwaXkTRlbV8d7VZfD+ye9aN4fQz6hkGgYOejxe Zm/Q== X-Gm-Message-State: ALKqPweLUNefPCjEVg2xfKtOAkM46BwFr71vq+Uh/daNhASbnUaTNxLG w8S1k0k+IP808O0TE5e085nVz5Rl/ZM= X-Google-Smtp-Source: AB8JxZr5ukSxPRtHQVrUs1QMbq6rG9w20Hsceb71gzCIxTc2UltZc7MujClZZunQLQRr8KlkiRc5dQ== X-Received: by 2002:a17:902:8303:: with SMTP id bd3-v6mr9918822plb.290.1527430411334; Sun, 27 May 2018 07:13:31 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 27 May 2018 09:13:06 -0500 Message-Id: <20180527141324.11937-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180527141324.11937-1-richard.henderson@linaro.org> References: <20180527141324.11937-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::243 Subject: [Qemu-devel] [PATCH 02/20] 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: Stafford Horne 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. Signed-off-by: Richard Henderson Reviewed-by: Stafford Horne --- 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 f4f2f37e28..dae673afa4 100644 --- a/target/openrisc/translate.c +++ b/target/openrisc/translate.c @@ -41,6 +41,7 @@ ## __VA_ARGS__) =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 { @@ -1233,7 +1234,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; @@ -1467,8 +1468,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(0); break; default: --=20 2.17.0