qemu-devel
[Top][All Lists]
Advanced

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

[RFC PATCH 15/15] hw/sh4: Restrict SuperHCPU type to target/ code


From: Philippe Mathieu-Daudé
Subject: [RFC PATCH 15/15] hw/sh4: Restrict SuperHCPU type to target/ code
Date: Wed, 9 Feb 2022 22:54:46 +0100

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 include/hw/sh4/sh.h  | 3 +--
 target/sh4/cpu-qom.h | 2 --
 target/sh4/cpu.h     | 4 ++--
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/include/hw/sh4/sh.h b/include/hw/sh4/sh.h
index ec716cdd45..a4245399d5 100644
--- a/include/hw/sh4/sh.h
+++ b/include/hw/sh4/sh.h
@@ -28,7 +28,6 @@
 #define QEMU_HW_SH_H
 
 #include "hw/sh4/sh_intc.h"
-#include "target/sh4/cpu-qom.h"
 
 #define A7ADDR(x) ((x) & 0x1fffffff)
 #define P4ADDR(x) ((x) | 0xe0000000)
@@ -36,7 +35,7 @@
 /* sh7750.c */
 struct SH7750State;
 
-struct SH7750State *sh7750_init(SuperHCPU *cpu, MemoryRegion *sysmem);
+struct SH7750State *sh7750_init(ArchCPU *cpu, MemoryRegion *sysmem);
 
 typedef struct {
     /* The callback will be triggered if any of the designated lines change */
diff --git a/target/sh4/cpu-qom.h b/target/sh4/cpu-qom.h
index 64be55a924..d186ad40fa 100644
--- a/target/sh4/cpu-qom.h
+++ b/target/sh4/cpu-qom.h
@@ -29,8 +29,6 @@
 #define TYPE_SH7751R_CPU SUPERH_CPU_TYPE_NAME("sh7751r")
 #define TYPE_SH7785_CPU  SUPERH_CPU_TYPE_NAME("sh7785")
 
-typedef struct ArchCPU SuperHCPU;
-
 OBJECT_DECLARE_TYPE(ArchCPU, SuperHCPUClass,
                     SUPERH_CPU)
 
diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h
index c72a30edfd..8e49163fb3 100644
--- a/target/sh4/cpu.h
+++ b/target/sh4/cpu.h
@@ -195,14 +195,14 @@ typedef struct CPUArchState {
  *
  * A SuperH CPU.
  */
-struct ArchCPU {
+typedef struct ArchCPU {
     /*< private >*/
     CPUState parent_obj;
     /*< public >*/
 
     CPUNegativeOffsetState neg;
     CPUSH4State env;
-};
+} SuperHCPU;
 
 
 void superh_cpu_dump_state(CPUState *cpu, FILE *f, int flags);
-- 
2.34.1




reply via email to

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