|
@@ -564,9 +564,9 @@ static void ics_reset_irq(ICSIRQState *irq)
|
|
irq->saved_priority = 0xff;
|
|
irq->saved_priority = 0xff;
|
|
}
|
|
}
|
|
|
|
|
|
-static void ics_reset(DeviceState *dev)
|
|
|
|
|
|
+static void ics_reset_hold(Object *obj)
|
|
{
|
|
{
|
|
- ICSState *ics = ICS(dev);
|
|
|
|
|
|
+ ICSState *ics = ICS(obj);
|
|
g_autofree uint8_t *flags = g_malloc(ics->nr_irqs);
|
|
g_autofree uint8_t *flags = g_malloc(ics->nr_irqs);
|
|
int i;
|
|
int i;
|
|
|
|
|
|
@@ -584,7 +584,7 @@ static void ics_reset(DeviceState *dev)
|
|
if (kvm_irqchip_in_kernel()) {
|
|
if (kvm_irqchip_in_kernel()) {
|
|
Error *local_err = NULL;
|
|
Error *local_err = NULL;
|
|
|
|
|
|
- ics_set_kvm_state(ICS(dev), &local_err);
|
|
|
|
|
|
+ ics_set_kvm_state(ics, &local_err);
|
|
if (local_err) {
|
|
if (local_err) {
|
|
error_report_err(local_err);
|
|
error_report_err(local_err);
|
|
}
|
|
}
|
|
@@ -688,16 +688,17 @@ static Property ics_properties[] = {
|
|
static void ics_class_init(ObjectClass *klass, void *data)
|
|
static void ics_class_init(ObjectClass *klass, void *data)
|
|
{
|
|
{
|
|
DeviceClass *dc = DEVICE_CLASS(klass);
|
|
DeviceClass *dc = DEVICE_CLASS(klass);
|
|
|
|
+ ResettableClass *rc = RESETTABLE_CLASS(klass);
|
|
|
|
|
|
dc->realize = ics_realize;
|
|
dc->realize = ics_realize;
|
|
device_class_set_props(dc, ics_properties);
|
|
device_class_set_props(dc, ics_properties);
|
|
- dc->reset = ics_reset;
|
|
|
|
dc->vmsd = &vmstate_ics;
|
|
dc->vmsd = &vmstate_ics;
|
|
/*
|
|
/*
|
|
* Reason: part of XICS interrupt controller, needs to be wired up,
|
|
* Reason: part of XICS interrupt controller, needs to be wired up,
|
|
* e.g. by spapr_irq_init().
|
|
* e.g. by spapr_irq_init().
|
|
*/
|
|
*/
|
|
dc->user_creatable = false;
|
|
dc->user_creatable = false;
|
|
|
|
+ rc->phases.hold = ics_reset_hold;
|
|
}
|
|
}
|
|
|
|
|
|
static const TypeInfo ics_info = {
|
|
static const TypeInfo ics_info = {
|