aboutsummaryrefslogtreecommitdiff
path: root/include/hw/ppc/xics.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/ppc/xics.h')
-rw-r--r--include/hw/ppc/xics.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h
index e5f48faba0..bcb584b90d 100644
--- a/include/hw/ppc/xics.h
+++ b/include/hw/ppc/xics.h
@@ -50,15 +50,13 @@ typedef struct ICSIRQState ICSIRQState;
typedef struct XICSFabric XICSFabric;
#define TYPE_ICP "icp"
-#define ICP(obj) OBJECT_CHECK(ICPState, (obj), TYPE_ICP)
+DECLARE_OBJ_CHECKERS(ICPState, ICPStateClass,
+ ICP, TYPE_ICP)
#define TYPE_PNV_ICP "pnv-icp"
-#define PNV_ICP(obj) OBJECT_CHECK(PnvICPState, (obj), TYPE_PNV_ICP)
+DECLARE_INSTANCE_CHECKER(PnvICPState, PNV_ICP,
+ TYPE_PNV_ICP)
-#define ICP_CLASS(klass) \
- OBJECT_CLASS_CHECK(ICPStateClass, (klass), TYPE_ICP)
-#define ICP_GET_CLASS(obj) \
- OBJECT_GET_CLASS(ICPStateClass, (obj), TYPE_ICP)
struct ICPStateClass {
DeviceClass parent_class;
@@ -91,12 +89,9 @@ struct PnvICPState {
};
#define TYPE_ICS "ics"
-#define ICS(obj) OBJECT_CHECK(ICSState, (obj), TYPE_ICS)
+DECLARE_OBJ_CHECKERS(ICSState, ICSStateClass,
+ ICS, TYPE_ICS)
-#define ICS_CLASS(klass) \
- OBJECT_CLASS_CHECK(ICSStateClass, (klass), TYPE_ICS)
-#define ICS_GET_CLASS(obj) \
- OBJECT_GET_CLASS(ICSStateClass, (obj), TYPE_ICS)
struct ICSStateClass {
DeviceClass parent_class;
@@ -147,10 +142,8 @@ struct ICSIRQState {
#define XICS_FABRIC(obj) \
INTERFACE_CHECK(XICSFabric, (obj), TYPE_XICS_FABRIC)
typedef struct XICSFabricClass XICSFabricClass;
-#define XICS_FABRIC_CLASS(klass) \
- OBJECT_CLASS_CHECK(XICSFabricClass, (klass), TYPE_XICS_FABRIC)
-#define XICS_FABRIC_GET_CLASS(obj) \
- OBJECT_GET_CLASS(XICSFabricClass, (obj), TYPE_XICS_FABRIC)
+DECLARE_CLASS_CHECKERS(XICSFabricClass, XICS_FABRIC,
+ TYPE_XICS_FABRIC)
struct XICSFabricClass {
InterfaceClass parent;