qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

hw/s390x: why watchdog device diag288 is resetted twice?


From: Philippe Mathieu-Daudé
Subject: hw/s390x: why watchdog device diag288 is resetted twice?
Date: Thu, 26 Sep 2019 08:22:00 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0

Hi,

hw/watchdog/wdt_diag288.c use 2 different resets:

1/ registered handler:

    qemu_register_reset(diag288_reset, diag288);

2/ DeviceClass reset:

    dc->reset = wdt_diag288_reset;

diag288_reset() simply calls wdt_diag288_reset():

static void wdt_diag288_reset(DeviceState *dev)
{
    DIAG288State *diag288 = DIAG288(dev);

    diag288->enabled = false;
    timer_del(diag288->timer);
}

static void diag288_reset(void *opaque)
{
    DeviceState *diag288 = opaque;

    wdt_diag288_reset(diag288);
}

Why do we need this distinction?
Is this some special corner case?
Isn't this device connected to the QOM bus?

Thanks,

Phil.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]