On 08/07/2025 11.57, Philippe Mathieu-Daudé wrote:
Simplify a bit the big "s390x-internal.h" header by extracting
system-specific declarations to "s390x-system.h".
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
target/s390x/s390x-internal.h | 222 +---------------------------------
target/s390x/s390x-system.h | 215 ++++++++++++++++++++++++++++++++
2 files changed, 217 insertions(+), 220 deletions(-)
create mode 100644 target/s390x/s390x-system.h
diff --git a/target/s390x/s390x-internal.h b/target/s390x/s390x-internal.h
index 56cce2e7f50..dddd4460400 100644
--- a/target/s390x/s390x-internal.h
+++ b/target/s390x/s390x-internal.h
...
@@ -257,11 +120,7 @@ S390CPUModel *get_max_cpu_model(Error **errp);
void apply_cpu_model(const S390CPUModel *model, Error **errp);
ObjectClass *s390_cpu_class_by_name(const char *name);
-
-/* excp_helper.c */
Please don't remove the excp_helper.c comment here, otherwise the
s390_cpu_do_interrupt() below belongs to the wrong section here.
-void s390x_cpu_debug_excp_handler(CPUState *cs);
void s390_cpu_do_interrupt(CPUState *cpu);
-bool s390_cpu_exec_interrupt(CPUState *cpu, int int_req);
#ifdef CONFIG_USER_ONLY
void s390_cpu_record_sigsegv(CPUState *cs, vaddr address,
@@ -312,87 +171,14 @@ int s390_cpu_gdb_read_register(CPUState *cpu, GByteArray
*buf, int reg);
int s390_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg);
void s390_cpu_gdb_init(CPUState *cs);
-
-/* helper.c */
void s390_cpu_dump_state(CPUState *cpu, FILE *f, int flags);
s390_cpu_dump_state() should get a new comment in front of it:
/* cpu-dump.c */
-void do_restart_interrupt(CPUS390XState *env);
-#ifndef CONFIG_USER_ONLY
-void s390_cpu_recompute_watchpoints(CPUState *cs);
-void s390x_tod_timer(void *opaque);
-void s390x_cpu_timer(void *opaque);
-void s390_handle_wait(S390CPU *cpu);
-hwaddr s390_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
-hwaddr s390_cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr);
-#define S390_STORE_STATUS_DEF_ADDR offsetof(LowCore, floating_pt_save_area)
-int s390_store_status(S390CPU *cpu, hwaddr addr, bool store_arch);
-int s390_store_adtl_status(S390CPU *cpu, hwaddr addr, hwaddr len);
-LowCore *cpu_map_lowcore(CPUS390XState *env);
-void cpu_unmap_lowcore(LowCore *lowcore);
-#endif /* CONFIG_USER_ONLY */
...
diff --git a/target/s390x/s390x-system.h b/target/s390x/s390x-system.h
new file mode 100644
index 00000000000..9c7958742d3
--- /dev/null
+++ b/target/s390x/s390x-system.h
@@ -0,0 +1,215 @@
+/*
+ * s390x system internal definitions and helpers
+ *
+ * Copyright (c) 2009 Ulrich Hecht
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
Can you please add a proper SPDX license identifier to new files?
Thanks,
Thomas