target/riscv: move debug.h to tcg subdir
riscv_trigger_* APIs are TCG only. Wrap the usages we have of them in cpu.c with CONFIG_TCG. After that we can move the header to the tcg subdir. This will be enough to get this out of the way for the --disable-tcg build. Signed-off-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <20260703180538.3346781-9-daniel.barboza@oss.qualcomm.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
committed by
Alistair Francis
parent
6bf66f0b5a
commit
8eaa5b73ab
@@ -39,7 +39,7 @@
|
||||
#include "kvm/kvm_riscv.h"
|
||||
#include "tcg/tcg-cpu.h"
|
||||
#if !defined(CONFIG_USER_ONLY)
|
||||
#include "target/riscv/debug.h"
|
||||
#include "target/riscv/tcg/debug.h"
|
||||
#endif
|
||||
|
||||
/* RISC-V CPU definitions */
|
||||
@@ -856,9 +856,11 @@ static void riscv_cpu_reset_hold(Object *obj, ResetType type)
|
||||
env->vill = true;
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
#ifdef CONFIG_TCG
|
||||
if (cpu->cfg.debug) {
|
||||
riscv_trigger_reset_hold(env);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (cpu->cfg.ext_smrnmi) {
|
||||
env->rnmip = 0;
|
||||
@@ -1016,7 +1018,7 @@ static void riscv_cpu_realize(DeviceState *dev, Error **errp)
|
||||
|
||||
riscv_cpu_register_gdb_regs_for_features(cs);
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY)
|
||||
if (cpu->cfg.debug) {
|
||||
riscv_trigger_realize(&cpu->env);
|
||||
}
|
||||
@@ -1031,7 +1033,7 @@ static void riscv_cpu_realize(DeviceState *dev, Error **errp)
|
||||
static void riscv_cpu_unrealize(DeviceState *dev)
|
||||
{
|
||||
RISCVCPUClass *mcc = RISCV_CPU_GET_CLASS(dev);
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY)
|
||||
RISCVCPU *cpu = RISCV_CPU(dev);
|
||||
|
||||
if (cpu->cfg.debug) {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "system/tcg.h"
|
||||
#include "migration/cpu.h"
|
||||
#include "exec/icount.h"
|
||||
#include "target/riscv/debug.h"
|
||||
#include "target/riscv/tcg/debug.h"
|
||||
#include "hw/riscv/machines-qom.h"
|
||||
|
||||
static bool pmp_needed(void *opaque)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "semihosting/common-semi.h"
|
||||
#include "exec/icount.h"
|
||||
#include "cpu_bits.h"
|
||||
#include "target/riscv/debug.h"
|
||||
#include "target/riscv/tcg/debug.h"
|
||||
#include "pmp.h"
|
||||
#include "qemu/plugin.h"
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "tcg/insn-start-words.h"
|
||||
#include "internals.h"
|
||||
#if !defined(CONFIG_USER_ONLY)
|
||||
#include "target/riscv/debug.h"
|
||||
#include "target/riscv/tcg/debug.h"
|
||||
#endif
|
||||
|
||||
/* CSR function table public API */
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "qapi/error.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "cpu.h"
|
||||
#include "target/riscv/debug.h"
|
||||
#include "target/riscv/tcg/debug.h"
|
||||
#include "trace.h"
|
||||
#include "exec/helper-proto.h"
|
||||
#include "exec/watchpoint.h"
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "hw/core/boards.h"
|
||||
#include "system/tcg.h"
|
||||
#include "exec/icount.h"
|
||||
#include "target/riscv/debug.h"
|
||||
#include "target/riscv/tcg/debug.h"
|
||||
#endif
|
||||
|
||||
/* Hash that stores user set extensions */
|
||||
|
||||
Reference in New Issue
Block a user