qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 20/28] target/riscv: Move has_work() from CPUClass to SysemuC


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 20/28] target/riscv: Move has_work() from CPUClass to SysemuCPUOps
Date: Fri, 24 Jan 2025 18:41:48 +0100
User-agent: Mozilla Thunderbird

On 24/1/25 18:17, Richard Henderson wrote:
On 1/21/25 06:23, Philippe Mathieu-Daudé wrote:
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
  target/riscv/cpu.h       | 9 +++++----
  target/riscv/internals.h | 3 ---
  target/riscv/cpu.c       | 8 +++-----
  3 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h
index 97713681cbe..32e8e064f36 100644
--- a/target/riscv/cpu.h
+++ b/target/riscv/cpu.h
@@ -552,10 +552,6 @@ int riscv_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg);
  int riscv_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg);
  int riscv_cpu_hviprio_index2irq(int index, int *out_irq, int *out_rdzero);
  uint8_t riscv_cpu_default_priority(int irq);
-uint64_t riscv_cpu_all_pending(CPURISCVState *env);
-int riscv_cpu_mirq_pending(CPURISCVState *env);
-int riscv_cpu_sirq_pending(CPURISCVState *env);
-int riscv_cpu_vsirq_pending(CPURISCVState *env);
  bool riscv_cpu_fp_enabled(CPURISCVState *env);
  target_ulong riscv_cpu_get_geilen(CPURISCVState *env);
  void riscv_cpu_set_geilen(CPURISCVState *env, target_ulong geilen);
@@ -576,6 +572,11 @@ int riscv_cpu_max_xlen(RISCVCPUClass *mcc);
  bool riscv_cpu_option_set(const char *optname);
  #ifndef CONFIG_USER_ONLY
+bool riscv_cpu_has_work(CPUState *cs);
+uint64_t riscv_cpu_all_pending(CPURISCVState *env);
+int riscv_cpu_mirq_pending(CPURISCVState *env);
+int riscv_cpu_sirq_pending(CPURISCVState *env);
+int riscv_cpu_vsirq_pending(CPURISCVState *env);
  void riscv_cpu_do_interrupt(CPUState *cpu);
  void riscv_isa_write_fdt(RISCVCPU *cpu, void *fdt, char *nodename);
  void riscv_cpu_do_transaction_failed(CPUState *cs, hwaddr physaddr,
diff --git a/target/riscv/internals.h b/target/riscv/internals.h
index 67291933f84..86def39aec2 100644
--- a/target/riscv/internals.h
+++ b/target/riscv/internals.h
@@ -142,9 +142,6 @@ static inline float16 check_nanbox_h(CPURISCVState *env, uint64_t f)
      }
  }
-/* Our implementation of CPUClass::has_work */
-bool riscv_cpu_has_work(CPUState *cs);
-

Why move the declaration from internals.h to cpu.h?

I can't see a compelling reason, so I'll keep it there but add
!CONFIG_USER_ONLY guard.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]