]> git.proxmox.com Git - mirror_qemu.git/blobdiff - include/hw/riscv/riscv_hart.h
Use DECLARE_*CHECKER* macros
[mirror_qemu.git] / include / hw / riscv / riscv_hart.h
index 3b52b50571d26ef408eb34e0fd1aebe45917b69c..9be1fd80ed8bdd6827f7fad409927096627d3b10 100644 (file)
 
 #include "hw/sysbus.h"
 #include "target/riscv/cpu.h"
+#include "qom/object.h"
 
 #define TYPE_RISCV_HART_ARRAY "riscv.hart_array"
 
-#define RISCV_HART_ARRAY(obj) \
-    OBJECT_CHECK(RISCVHartArrayState, (obj), TYPE_RISCV_HART_ARRAY)
+typedef struct RISCVHartArrayState RISCVHartArrayState;
+DECLARE_INSTANCE_CHECKER(RISCVHartArrayState, RISCV_HART_ARRAY,
+                         TYPE_RISCV_HART_ARRAY)
 
-typedef struct RISCVHartArrayState {
+struct RISCVHartArrayState {
     /*< private >*/
     SysBusDevice parent_obj;
 
     /*< public >*/
     uint32_t num_harts;
+    uint32_t hartid_base;
     char *cpu_type;
     RISCVCPU *harts;
-} RISCVHartArrayState;
+};
 
 #endif