qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 07/10] hw/core/reset: Add qemu_{register, unregister}_resetta


From: Richard Henderson
Subject: Re: [PATCH 07/10] hw/core/reset: Add qemu_{register, unregister}_resettable()
Date: Tue, 20 Feb 2024 09:59:25 -1000
User-agent: Mozilla Thunderbird

On 2/20/24 06:06, Peter Maydell wrote:
Implement new functions qemu_register_resettable() and
qemu_unregister_resettable().  These are intended to be
three-phase-reset aware equivalents of the old qemu_register_reset()
and qemu_unregister_reset().  Instead of passing in a function
pointer and opaque, you register any QOM object that implements the
Resettable interface.

The implementation is simple: we have a single global instance of a
ResettableContainer, which we reset in qemu_devices_reset(), and
the Resettable objects passed to qemu_register_resettable() are
added to it.

Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
---
  include/sysemu/reset.h | 37 ++++++++++++++++++++++++++++++++++---
  hw/core/reset.c        | 31 +++++++++++++++++++++++++++++--
  2 files changed, 63 insertions(+), 5 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

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