On Tue, Feb 20, 2024 at 04:06:19PM +0000, Peter Maydell wrote:
> Date: Tue, 20 Feb 2024 16:06:19 +0000
> From: Peter Maydell <peter.mayd...@linaro.org>
> Subject: [PATCH 07/10] hw/core/reset: Add qemu_{register,
>  unregister}_resettable()
> X-Mailer: git-send-email 2.34.1
> 
> 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.mayd...@linaro.org>
> ---
>  include/sysemu/reset.h | 37 ++++++++++++++++++++++++++++++++++---
>  hw/core/reset.c        | 31 +++++++++++++++++++++++++++++--
>  2 files changed, 63 insertions(+), 5 deletions(-)

Reviewed-by: Zhao Liu <zhao1....@intel.com> 

Reply via email to