For now, we keep the global cpu_get_note_size symbol defined.

Signed-off-by: Pierrick Bouvier <[email protected]>
---
 target/loongarch/arch_dump.c | 8 +++++++-
 target/loongarch/cpu.c       | 1 +
 target/loongarch/internals.h | 2 ++
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/target/loongarch/arch_dump.c b/target/loongarch/arch_dump.c
index 5a0e1742242..e27bd0f6497 100644
--- a/target/loongarch/arch_dump.c
+++ b/target/loongarch/arch_dump.c
@@ -152,7 +152,8 @@ int loongarch_get_dump_info(const CPUState *cs, 
ArchDumpInfo *info,
     return 0;
 }
 
-ssize_t cpu_get_note_size(int class, int machine, int nr_cpus)
+ssize_t loongarch_get_note_size(const CPUState *cs, int class,
+                                int machine, int nr_cpus)
 {
     size_t note_size = 0;
 
@@ -162,3 +163,8 @@ ssize_t cpu_get_note_size(int class, int machine, int 
nr_cpus)
 
     return note_size * nr_cpus;
 }
+
+ssize_t cpu_get_note_size(int class, int machine, int nr_cpus)
+{
+    return loongarch_get_note_size(first_cpu, class, machine, nr_cpus);
+}
diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
index 65772f30947..5e182922b7d 100644
--- a/target/loongarch/cpu.c
+++ b/target/loongarch/cpu.c
@@ -842,6 +842,7 @@ static const struct SysemuCPUOps loongarch_sysemu_ops = {
     .has_work = loongarch_cpu_has_work,
     .write_elf64_note = loongarch_cpu_write_elf64_note,
     .get_dump_info = loongarch_get_dump_info,
+    .get_note_size = loongarch_get_note_size,
     .get_phys_addr_debug = loongarch_cpu_get_phys_addr_debug,
 };
 
diff --git a/target/loongarch/internals.h b/target/loongarch/internals.h
index d4bf30b293e..8625529c328 100644
--- a/target/loongarch/internals.h
+++ b/target/loongarch/internals.h
@@ -55,5 +55,7 @@ int loongarch_cpu_write_elf64_note(WriteCoreDumpFunction f, 
CPUState *cpu,
 
 int loongarch_get_dump_info(const CPUState *cs, ArchDumpInfo *info,
                             const struct GuestPhysBlockList 
*guest_phys_blocks);
+ssize_t loongarch_get_note_size(const CPUState *cs, int class,
+                                int machine, int nr_cpus);
 
 #endif
-- 
2.43.0


Reply via email to