All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Damien Hedde" <damien.hedde@greensocs.com>,
	"Luc Michel" <luc@lmichel.fr>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Greg Kurz" <groug@kaod.org>,
	"Edgar Iglesias" <edgari@xilinx.com>,
	"Daniel P. Berrange" <berrange@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"David Gibson" <david@gibson.dropbear.id.au>
Subject: Re: [PATCH v8 08/11] hw/core: deprecate old reset functions and introduce new ones
Date: Wed, 28 Apr 2021 15:29:40 +0200	[thread overview]
Message-ID: <87sg3ailkr.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <CAFEAcA9u1ftq94B1HQhAb0=909VfvcU1d5FVUwkbJ9orexBt=Q@mail.gmail.com> (Peter Maydell's message of "Wed, 28 Apr 2021 13:51:17 +0100")

Peter Maydell <peter.maydell@linaro.org> writes:

> On Wed, 28 Apr 2021 at 06:03, Markus Armbruster <armbru@redhat.com> wrote:
>> For what it's worth, Damien further explained the two helpers in
>> docs/devel/reset.rst:
>>
>>     For Devices and Buses, the following helper functions exist:
>>
>>     - ``device_cold_reset()``
>>     - ``bus_cold_reset()``
>>
>>     These are simple wrappers around resettable_reset() function; they only cast the
>>     Device or Bus into an Object and pass the cold reset type. When possible
>>     prefer to use these functions instead of ``resettable_reset()``.
>>
>> I figure what's missing is guidance on how to transition code from
>> legacy reset to multi-phase reset.  Ideally with a working example
>> people can study.  Damien, can you help us out?
>
> These are two separate things:
>  1) callsites which want to reset some other device, and currently
>     mostly use eg device_legacy_reset() -- the transition to be done
>     is to move them to use device_cold_reset(). Similarly, callsites
>     which currently reset a bus with qbus_reset_all() and should move
>     to bus_cold_reset().
>  2) devices which implement reset and currently do so with a
>     single reset method -- the transition to be done is to have
>     them implement however many phases of 3-phase reset they need
>
> (1) is easier than (2) because there are many fewer callsites
> trying to manually reset devices or buses than there are
> devices that implement reset.

My ignorance on "these are two separate things" is further evidence that
working examples are needed.  Damien?  Peter?  Pretty-please?



  reply	other threads:[~2021-04-28 13:31 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-23 13:28 [PATCH v8 00/11] Multi-phase reset mechanism Damien Hedde
2020-01-23 13:28 ` [PATCH v8 01/11] add device_legacy_reset function to prepare for reset api change Damien Hedde
2020-01-24 10:37   ` Philippe Mathieu-Daudé
2020-01-23 13:28 ` [PATCH v8 02/11] hw/core/qdev: add trace events to help with resettable transition Damien Hedde
2020-01-23 13:28 ` [PATCH v8 03/11] hw/core: create Resettable QOM interface Damien Hedde
2020-01-23 13:28 ` [PATCH v8 04/11] hw/core: add Resettable support to BusClass and DeviceClass Damien Hedde
2020-01-23 13:28 ` [PATCH v8 05/11] hw/core/resettable: add support for changing parent Damien Hedde
2020-01-23 13:28 ` [PATCH v8 06/11] hw/core/qdev: handle parent bus change regarding resettable Damien Hedde
2020-01-23 13:28 ` [PATCH v8 07/11] hw/core/qdev: update hotplug reset " Damien Hedde
2020-01-23 13:28 ` [PATCH v8 08/11] hw/core: deprecate old reset functions and introduce new ones Damien Hedde
2021-04-27 12:21   ` Philippe Mathieu-Daudé
2021-04-27 21:27     ` Eduardo Habkost
2021-04-28  5:03       ` Markus Armbruster
2021-04-28 12:51         ` Peter Maydell
2021-04-28 13:29           ` Markus Armbruster [this message]
2021-04-28 14:54             ` Peter Maydell
2020-01-23 13:28 ` [PATCH v8 09/11] docs/devel/reset.rst: add doc about Resettable interface Damien Hedde
2020-01-23 13:28 ` [PATCH v8 10/11] vl: replace deprecated qbus_reset_all registration Damien Hedde
2020-01-23 13:28 ` [PATCH v8 11/11] hw/s390x/ipl: replace deprecated qdev_reset_all registration Damien Hedde
2020-01-24 10:05 ` [PATCH v8 00/11] Multi-phase reset mechanism Peter Maydell
2020-01-24 10:17   ` Philippe Mathieu-Daudé
2020-01-24 10:18     ` Peter Maydell
2020-01-27 15:20       ` Damien Hedde
2020-01-24 10:23     ` Damien Hedde
2020-01-30 14:29 ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sg3ailkr.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=damien.hedde@greensocs.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=edgari@xilinx.com \
    --cc=ehabkost@redhat.com \
    --cc=groug@kaod.org \
    --cc=luc@lmichel.fr \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.