[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 14/15] hw/sparc: Restrict SPARCCPU type to target/ code
From: |
Philippe Mathieu-Daudé |
Subject: |
[RFC PATCH 14/15] hw/sparc: Restrict SPARCCPU type to target/ code |
Date: |
Wed, 9 Feb 2022 22:54:45 +0100 |
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/hw/sparc/sparc64.h | 4 +---
target/sparc/cpu-qom.h | 2 --
target/sparc/cpu.h | 4 ++--
3 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/include/hw/sparc/sparc64.h b/include/hw/sparc/sparc64.h
index 4ced36fb5a..605ae4448c 100644
--- a/include/hw/sparc/sparc64.h
+++ b/include/hw/sparc/sparc64.h
@@ -1,11 +1,9 @@
#ifndef HW_SPARC_SPARC64_H
#define HW_SPARC_SPARC64_H
-#include "target/sparc/cpu-qom.h"
-
#define IVEC_MAX 0x40
-SPARCCPU *sparc64_cpu_devinit(const char *cpu_type, uint64_t prom_addr);
+ArchCPU *sparc64_cpu_devinit(const char *cpu_type, uint64_t prom_addr);
void sparc64_cpu_set_ivec_irq(void *opaque, int irq, int level);
diff --git a/target/sparc/cpu-qom.h b/target/sparc/cpu-qom.h
index d5f90cffd4..36ffffcadd 100644
--- a/target/sparc/cpu-qom.h
+++ b/target/sparc/cpu-qom.h
@@ -29,8 +29,6 @@
#define TYPE_SPARC_CPU "sparc-cpu"
#endif
-typedef struct ArchCPU SPARCCPU;
-
OBJECT_DECLARE_TYPE(ArchCPU, SPARCCPUClass,
SPARC_CPU)
diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h
index abb38db674..8452a62ea8 100644
--- a/target/sparc/cpu.h
+++ b/target/sparc/cpu.h
@@ -556,14 +556,14 @@ struct CPUArchState {
*
* A SPARC CPU.
*/
-struct ArchCPU {
+typedef struct ArchCPU {
/*< private >*/
CPUState parent_obj;
/*< public >*/
CPUNegativeOffsetState neg;
CPUSPARCState env;
-};
+} SPARCCPU;
#ifndef CONFIG_USER_ONLY
--
2.34.1
- Re: [PATCH 11/15] target: Use ArchCPU as interface to target CPU, (continued)
[RFC PATCH 12/15] hw/m68k: Restrict M68kCPU type to target/ code, Philippe Mathieu-Daudé, 2022/02/09
[RFC PATCH 13/15] hw/mips: Restrict MIPSCPU type to target/ code, Philippe Mathieu-Daudé, 2022/02/09
[RFC PATCH 14/15] hw/sparc: Restrict SPARCCPU type to target/ code,
Philippe Mathieu-Daudé <=
[RFC PATCH 15/15] hw/sh4: Restrict SuperHCPU type to target/ code, Philippe Mathieu-Daudé, 2022/02/09