diff options
Diffstat (limited to 'include/hw')
-rw-r--r-- | include/hw/core/cpu.h | 4 | ||||
-rw-r--r-- | include/hw/qdev-core.h | 15 | ||||
-rw-r--r-- | include/hw/qdev-properties.h | 3 |
3 files changed, 15 insertions, 7 deletions
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 77c6f05299..73e9a869a4 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -1135,6 +1135,10 @@ void cpu_exec_unrealizefn(CPUState *cpu); */ bool target_words_bigendian(void); +void cpu_class_set_parent_reset(CPUClass *cc, + void (*child_reset)(CPUState *cpu), + void (**parent_reset)(CPUState *cpu)); + #ifdef NEED_CPU_H #ifdef CONFIG_SOFTMMU diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 1518495b1e..5da94f872a 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -100,7 +100,12 @@ typedef struct DeviceClass { DECLARE_BITMAP(categories, DEVICE_CATEGORY_MAX); const char *fw_name; const char *desc; - Property *props; + + /* + * The underscore at the end ensures a compile-time error if someone + * assigns to dc->props instead of using device_class_set_props. + */ + Property *props_; /* * Can this device be instantiated with -device / device_add? @@ -258,8 +263,8 @@ struct PropertyInfo { const char *description; const QEnumLookup *enum_table; int (*print)(DeviceState *dev, Property *prop, char *dest, size_t len); - void (*set_default_value)(Object *obj, const Property *prop); - void (*create)(Object *obj, Property *prop, Error **errp); + void (*set_default_value)(ObjectProperty *op, const Property *prop); + void (*create)(ObjectClass *oc, Property *prop, Error **errp); ObjectPropertyAccessor *get; ObjectPropertyAccessor *set; ObjectPropertyRelease *release; @@ -433,6 +438,8 @@ void qdev_machine_init(void); */ void device_reset(DeviceState *dev); +void device_class_set_props(DeviceClass *dc, Property *props); + void device_class_set_parent_reset(DeviceClass *dc, DeviceReset dev_reset, DeviceReset *parent_reset); @@ -457,8 +464,6 @@ extern bool qdev_hot_removed; char *qdev_get_dev_path(DeviceState *dev); -GSList *qdev_build_hotpluggable_device_list(Object *peripheral); - void qbus_set_hotplug_handler(BusState *bus, Object *handler, Error **errp); void qbus_set_bus_hotplug_handler(BusState *bus, Error **errp); diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h index a90a9cec80..906e697c58 100644 --- a/include/hw/qdev-properties.h +++ b/include/hw/qdev-properties.h @@ -253,13 +253,12 @@ void error_set_from_qdev_prop_error(Error **errp, int ret, DeviceState *dev, * qdev_property_add_static: * @dev: Device to add the property to. * @prop: The qdev property definition. - * @errp: location to store error information. * * Add a static QOM property to @dev for qdev property @prop. * On error, store error in @errp. Static properties access data in a struct. * The type of the QOM property is derived from prop->info. */ -void qdev_property_add_static(DeviceState *dev, Property *prop, Error **errp); +void qdev_property_add_static(DeviceState *dev, Property *prop); void qdev_alias_all_properties(DeviceState *target, Object *source); |