[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 23/31] target/riscv: Restrict has_work() handler to sysemu
From: |
Alistair Francis |
Subject: |
Re: [PATCH v5 23/31] target/riscv: Restrict has_work() handler to sysemu and TCG |
Date: |
Fri, 24 Sep 2021 16:41:56 +1000 |
On Tue, Sep 21, 2021 at 8:09 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Restrict has_work() to TCG sysemu.
>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
> target/riscv/cpu.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
> index 13575c14085..abb555a8bdb 100644
> --- a/target/riscv/cpu.c
> +++ b/target/riscv/cpu.c
> @@ -335,9 +335,9 @@ static void riscv_cpu_synchronize_from_tb(CPUState *cs,
> env->pc = tb->pc;
> }
>
> +#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY)
> static bool riscv_cpu_has_work(CPUState *cs)
> {
> -#ifndef CONFIG_USER_ONLY
> RISCVCPU *cpu = RISCV_CPU(cs);
> CPURISCVState *env = &cpu->env;
> /*
> @@ -345,10 +345,8 @@ static bool riscv_cpu_has_work(CPUState *cs)
> * mode and delegation registers, but respect individual enables
> */
> return (env->mip & env->mie) != 0;
> -#else
> - return true;
> -#endif
> }
> +#endif /* CONFIG_TCG && !CONFIG_USER_ONLY */
>
> void restore_state_to_opc(CPURISCVState *env, TranslationBlock *tb,
> target_ulong *data)
> @@ -647,6 +645,7 @@ static const struct TCGCPUOps riscv_tcg_ops = {
> .tlb_fill = riscv_cpu_tlb_fill,
>
> #ifndef CONFIG_USER_ONLY
> + .has_work = riscv_cpu_has_work,
> .cpu_exec_interrupt = riscv_cpu_exec_interrupt,
> .do_interrupt = riscv_cpu_do_interrupt,
> .do_transaction_failed = riscv_cpu_do_transaction_failed,
> @@ -666,7 +665,6 @@ static void riscv_cpu_class_init(ObjectClass *c, void
> *data)
> device_class_set_parent_reset(dc, riscv_cpu_reset, &mcc->parent_reset);
>
> cc->class_by_name = riscv_cpu_class_by_name;
> - cc->has_work = riscv_cpu_has_work;
> cc->dump_state = riscv_cpu_dump_state;
> cc->set_pc = riscv_cpu_set_pc;
> cc->gdb_read_register = riscv_cpu_gdb_read_register;
> --
> 2.31.1
>
>
- [PATCH v5 13/31] target/hexagon: Remove unused has_work() handler, (continued)
- [PATCH v5 13/31] target/hexagon: Remove unused has_work() handler, Philippe Mathieu-Daudé, 2021/09/20
- [PATCH v5 14/31] target/hppa: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/20
- [PATCH v5 15/31] target/i386: Restrict has_work() handler to sysemu and TCG, Philippe Mathieu-Daudé, 2021/09/20
- [PATCH v5 16/31] target/m68k: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/20
- [PATCH v5 17/31] target/microblaze: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/20
- [PATCH v5 18/31] target/mips: Restrict has_work() handler to sysemu and TCG, Philippe Mathieu-Daudé, 2021/09/20
- [PATCH v5 19/31] target/nios2: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/20
- [PATCH v5 20/31] target/openrisc: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/20
- [PATCH v5 21/31] target/ppc: Introduce PowerPCCPUClass::has_work(), Philippe Mathieu-Daudé, 2021/09/20
- [PATCH v5 23/31] target/riscv: Restrict has_work() handler to sysemu and TCG, Philippe Mathieu-Daudé, 2021/09/20
- Re: [PATCH v5 23/31] target/riscv: Restrict has_work() handler to sysemu and TCG,
Alistair Francis <=
- [PATCH v5 22/31] target/ppc: Restrict has_work() handlers to sysemu and TCG, Philippe Mathieu-Daudé, 2021/09/20
- [PATCH v5 24/31] target/rx: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/20
- [PATCH v5 25/31] target/s390x: Restrict has_work() handler to sysemu and TCG, Philippe Mathieu-Daudé, 2021/09/20
- [PATCH v5 26/31] target/sh4: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/20
- [PATCH v5 27/31] target/sparc: Remove pointless use of CONFIG_TCG definition, Philippe Mathieu-Daudé, 2021/09/20
- [PATCH v5 28/31] target/sparc: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/20
- [PATCH v5 30/31] target/xtensa: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/20
- [PATCH v5 29/31] target/tricore: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/20
- [PATCH v5 31/31] accel: Add missing AccelOpsClass::has_work() and drop SysemuCPUOps one, Philippe Mathieu-Daudé, 2021/09/20