diff options
author | Bibo Mao <maobibo@loongson.cn> | 2025-04-23 16:04:17 +0800 |
---|---|---|
committer | Song Gao <gaosong@loongson.cn> | 2025-04-24 10:09:38 +0800 |
commit | 0d4c2e408d418ec5c412ec9f58e7b8f3aecc6948 (patch) | |
tree | 347b9d43da3dd1cf440d1684cd05dd937ed25592 | |
parent | ad5233ba5c7dcc92ee79d015f2168fb7e0279118 (diff) | |
download | qemu-0d4c2e408d418ec5c412ec9f58e7b8f3aecc6948.zip qemu-0d4c2e408d418ec5c412ec9f58e7b8f3aecc6948.tar.gz qemu-0d4c2e408d418ec5c412ec9f58e7b8f3aecc6948.tar.bz2 |
target/loongarch: Move definition of TCG specified function to tcg directory
Function loongarch_cpu_tlb_fill() only works in TCG mode, move its
definition from header file internals.h to file tcg/tcg_loongarch.h
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20250423080417.3739809-10-maobibo@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
-rw-r--r-- | target/loongarch/cpu.c | 1 | ||||
-rw-r--r-- | target/loongarch/internals.h | 5 | ||||
-rw-r--r-- | target/loongarch/tcg/tcg_loongarch.h | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index ea1665e..bf3d592 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -32,6 +32,7 @@ #include "exec/cpu_ldst.h" #include "tcg/tcg.h" #endif +#include "tcg/tcg_loongarch.h" const char * const regnames[32] = { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", diff --git a/target/loongarch/internals.h b/target/loongarch/internals.h index 3a079fe..a7384b0 100644 --- a/target/loongarch/internals.h +++ b/target/loongarch/internals.h @@ -61,11 +61,6 @@ void get_dir_base_width(CPULoongArchState *env, uint64_t *dir_base, uint64_t *dir_width, target_ulong level); hwaddr loongarch_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); -#ifdef CONFIG_TCG -bool loongarch_cpu_tlb_fill(CPUState *cs, vaddr address, int size, - MMUAccessType access_type, int mmu_idx, - bool probe, uintptr_t retaddr); -#endif #endif /* !CONFIG_USER_ONLY */ uint64_t read_fcc(CPULoongArchState *env); diff --git a/target/loongarch/tcg/tcg_loongarch.h b/target/loongarch/tcg/tcg_loongarch.h index b29427d..fd4e116 100644 --- a/target/loongarch/tcg/tcg_loongarch.h +++ b/target/loongarch/tcg/tcg_loongarch.h @@ -10,6 +10,10 @@ void loongarch_csr_translate_init(void); +bool loongarch_cpu_tlb_fill(CPUState *cs, vaddr address, int size, + MMUAccessType access_type, int mmu_idx, + bool probe, uintptr_t retaddr); + int loongarch_get_addr_from_tlb(CPULoongArchState *env, hwaddr *physical, int *prot, target_ulong address, MMUAccessType access_type, int mmu_idx); |