From: Zhao Liu <zhao1.liu@intel.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org,
"Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Halil Pasic" <pasic@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@linux.ibm.com>,
"Eric Farman" <farman@linux.ibm.com>,
"Peter Xu" <peterx@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH 3/5] adb: Switch bus reset to 3-phase-reset
Date: Wed, 31 Jan 2024 11:53:59 +0800 [thread overview]
Message-ID: <ZbnEVzTOHqsKjqvk@intel.com> (raw)
In-Reply-To: <20240119163512.3810301-4-peter.maydell@linaro.org>
On Fri, Jan 19, 2024 at 04:35:10PM +0000, Peter Maydell wrote:
> Date: Fri, 19 Jan 2024 16:35:10 +0000
> From: Peter Maydell <peter.maydell@linaro.org>
> Subject: [PATCH 3/5] adb: Switch bus reset to 3-phase-reset
> X-Mailer: git-send-email 2.34.1
>
> Switch the ADB bus from using BusClass::reset to the Resettable
> interface.
>
> This has no behavioural change, because the BusClass code to support
> subclasses that use the legacy BusClass::reset will call that method
> in the hold phase of 3-phase reset.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> hw/input/adb.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
>
> diff --git a/hw/input/adb.c b/hw/input/adb.c
> index 0f3c73d6d00..98f39b4281a 100644
> --- a/hw/input/adb.c
> +++ b/hw/input/adb.c
> @@ -231,9 +231,9 @@ static const VMStateDescription vmstate_adb_bus = {
> }
> };
>
> -static void adb_bus_reset(BusState *qbus)
> +static void adb_bus_reset_hold(Object *obj)
> {
> - ADBBusState *adb_bus = ADB_BUS(qbus);
> + ADBBusState *adb_bus = ADB_BUS(obj);
>
> adb_bus->autopoll_enabled = false;
> adb_bus->autopoll_mask = 0xffff;
> @@ -262,10 +262,11 @@ static void adb_bus_unrealize(BusState *qbus)
> static void adb_bus_class_init(ObjectClass *klass, void *data)
> {
> BusClass *k = BUS_CLASS(klass);
> + ResettableClass *rc = RESETTABLE_CLASS(klass);
>
> k->realize = adb_bus_realize;
> k->unrealize = adb_bus_unrealize;
> - k->reset = adb_bus_reset;
> + rc->phases.hold = adb_bus_reset_hold;
> }
>
> static const TypeInfo adb_bus_type_info = {
> --
> 2.34.1
>
>
next prev parent reply other threads:[~2024-01-31 3:40 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-19 16:35 [PATCH 0/5] buses: switch to 3-phase-reset Peter Maydell
2024-01-19 16:35 ` [PATCH 1/5] pci: Switch bus reset " Peter Maydell
2024-01-31 3:52 ` Zhao Liu
2024-01-19 16:35 ` [PATCH 2/5] vmbus: " Peter Maydell
2024-01-22 14:30 ` Maciej S. Szmigiero
2024-01-31 3:53 ` Zhao Liu
2024-01-19 16:35 ` [PATCH 3/5] adb: " Peter Maydell
2024-01-29 21:42 ` Mark Cave-Ayland
2024-01-31 3:53 ` Zhao Liu [this message]
2024-01-19 16:35 ` [PATCH 4/5] hw/s390x/css-bridge: switch virtual-css bus " Peter Maydell
2024-01-22 9:18 ` Halil Pasic
2024-01-22 21:49 ` Eric Farman
2024-01-31 3:54 ` Zhao Liu
2024-01-19 16:35 ` [PATCH 5/5] hw/core: Remove transitional infrastructure from BusClass Peter Maydell
2024-01-31 3:58 ` Zhao Liu
2024-02-01 13:31 ` Peter Maydell
2024-01-21 11:37 ` [PATCH 0/5] buses: switch to 3-phase-reset Michael S. Tsirkin
2024-01-22 2:06 ` Peter Xu
2024-01-22 14:19 ` Cédric Le Goater
2024-01-31 17:36 ` Cédric Le Goater
2024-02-01 13:20 ` 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=ZbnEVzTOHqsKjqvk@intel.com \
--to=zhao1.liu@intel.com \
--cc=borntraeger@linux.ibm.com \
--cc=farman@linux.ibm.com \
--cc=maciej.szmigiero@oracle.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=mst@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=peter.maydell@linaro.org \
--cc=peterx@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.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.