qdev: Ensure devices are fully realized when calling DeviceReset handler
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | hw/sd/omap_mmc: Do not reset SDCard until being fully realizedhw/ hw/ hw/ +1 more | +15 | 2 replies | |
| 2/2 | qdev: Ensure devices are fully realized when calling DeviceReset handlerhw/ | +3 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] qdev: Ensure devices are fully realized when calling DeviceReset handler
In the process of clarifying QOM/QDev design, we want to enforce the QDev state machine, in particular RESET can only happens *after* REALIZE.
Besides CPUs (which are still particular), the only case I noticed is in a non-QDev type (OMAP MMC) accessing a QDev one (SD/MMC card).
The first patch first handle the OMAP MMC case doing minor surgery (passing a 'realized' state to omap_mmc_reset(), the function doing reset out of normal QDev RESET tree propagation).
The second patch add an assertion in QDev core code, in order to avoid further devices being added out of (QDev) order.
Please review,
Phil.
Philippe Mathieu-Daudé (2):
hw/sd/omap_mmc: Do not reset SDCard until being fully realized
qdev: Ensure devices are fully realized when calling DeviceReset
handler
include/hw/arm/omap.h | 2 +- hw/arm/omap1.c | 2 +- hw/arm/omap2.c | 2 +- hw/core/qdev.c | 3 +++ hw/sd/omap_mmc.c | 21 ++++++++++++--------- 5 files changed, 18 insertions(+), 12 deletions(-)
Signature · 1 line
2.41.0