Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1paAhs-00058f-3U for mharc-qemu-riscv@gnu.org; Thu, 09 Mar 2023 02:28:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1paAhq-00052W-1d; Thu, 09 Mar 2023 02:28:54 -0500 Received: from out30-130.freemail.mail.aliyun.com ([115.124.30.130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1paAho-0001p0-AI; Thu, 09 Mar 2023 02:28:53 -0500 X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R451e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=ay29a033018046051; MF=zhiwei_liu@linux.alibaba.com; NM=1; PH=DS; RN=7; SR=0; TI=SMTPD_---0VdSZ72m_1678346922; Received: from 30.221.99.193(mailfrom:zhiwei_liu@linux.alibaba.com fp:SMTPD_---0VdSZ72m_1678346922) by smtp.aliyun-inc.com; Thu, 09 Mar 2023 15:28:42 +0800 Message-ID: <1f95f6b0-b986-b1ef-5e45-d2f56c997bb9@linux.alibaba.com> Date: Thu, 9 Mar 2023 15:28:42 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH for-8.1 02/17] target/riscv/cpu.c: remove set_vext_version() Content-Language: en-US To: Daniel Henrique Barboza , qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, alistair.francis@wdc.com, bmeng@tinylab.org, liweiwei@iscas.ac.cn, palmer@rivosinc.com References: <20230308201925.258223-1-dbarboza@ventanamicro.com> <20230308201925.258223-3-dbarboza@ventanamicro.com> From: LIU Zhiwei In-Reply-To: <20230308201925.258223-3-dbarboza@ventanamicro.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=115.124.30.130; envelope-from=zhiwei_liu@linux.alibaba.com; helo=out30-130.freemail.mail.aliyun.com X-Spam_score_int: -98 X-Spam_score: -9.9 X-Spam_bar: --------- X-Spam_report: (-9.9 / 5.0 requ) BAYES_00=-1.9, ENV_AND_HDR_SPF_MATCH=-0.5, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001, USER_IN_DEF_SPF_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-riscv@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Mar 2023 07:28:54 -0000 On 2023/3/9 4:19, Daniel Henrique Barboza wrote: > This setter is doing nothing else but setting env->vext_ver. Assign the > value directly. IMHO, No better than the older implementation. Zhiwei > > Signed-off-by: Daniel Henrique Barboza > --- > target/riscv/cpu.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c > index 5060a98b6d..0baed79ec2 100644 > --- a/target/riscv/cpu.c > +++ b/target/riscv/cpu.c > @@ -245,11 +245,6 @@ static void set_priv_version(CPURISCVState *env, int priv_ver) > env->priv_ver = priv_ver; > } > > -static void set_vext_version(CPURISCVState *env, int vext_ver) > -{ > - env->vext_ver = vext_ver; > -} > - > #ifndef CONFIG_USER_ONLY > static uint8_t satp_mode_from_str(const char *satp_mode_str) > { > @@ -839,7 +834,7 @@ static void riscv_cpu_validate_v(CPURISCVState *env, RISCVCPUConfig *cfg, > qemu_log("vector version is not specified, " > "use the default value v1.0\n"); > } > - set_vext_version(env, vext_version); > + env->vext_ver = vext_version; > } > > /*