|
| From: | LIU Zhiwei |
| Subject: | Re: [PATCH 2/6] target/riscv: Use env_archcpu() in [check_]nanbox() |
| Date: | Wed, 11 Oct 2023 11:25:20 +0800 |
| User-agent: | Mozilla Thunderbird |
On 2023/10/11 1:04, Richard Henderson wrote:
On 10/9/23 05:42, LIU Zhiwei wrote:On 2023/10/9 19:02, Philippe Mathieu-Daudé wrote:When CPUArchState* is available (here CPURISCVState*), we can use the fast env_archcpu() macro to get ArchCPU* (here RISCVCPU*). The QOM cast RISCV_CPU() macro will be slower when building with --enable-qom-cast-debug. Inspired-by: Richard W.M. Jones <rjones@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>By the way, does the community has the plan to support heterogeneous architecture cpus in one soc?Yes.
Hi Richard, It's a good news. Thanks.
If so, maybe we have to do this qom cast somewhere.No, I don't think so. Or at least not in these places.
Yes. Perhaps, we should remove all RISCV_CPU macros using after the qom objects realized.
Do you think we should remove the RISCV_CPU using in riscv_cpu_exec_interrupt? Although it is not so hot. I think there is no reason to use it there. Except this, there are many other places in hw/ and target/riscv using the RISCV_CPU macro.
If we know whether we should remove the RISCV_CPU macro use in these places, we can do it in another patch.
Thanks, Zhiwei
r~
| [Prev in Thread] | Current Thread | [Next in Thread] |