From: David Gibson <david@gibson.dropbear.id.au>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Cédric Le Goater" <clg@kaod.org>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
"Greg Kurz" <groug@kaod.org>
Subject: Re: [PATCH 2/3] hw/ppc/spapr_vio: Reset TCE table object with device_cold_reset()
Date: Tue, 4 May 2021 10:36:02 +1000 [thread overview]
Message-ID: <YJCW8i9ePqDORgRS@yekko> (raw)
In-Reply-To: <20210503151849.8766-3-peter.maydell@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 1459 bytes --]
On Mon, May 03, 2021 at 04:18:48PM +0100, Peter Maydell wrote:
> The spapr_vio_quiesce_one() function resets the TCE table object
> (TYPE_SPAPR_TCE_TABLE) via device_legacy_reset(). We know that
> objects of that type do not have a qbus of their own, so the new
> device_cold_reset() function (which resets both the device and its
> child buses) is equivalent here to device_legacy_reset() and we can
> just switch to the new API.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Applied to ppc-for-6.1.
Actually, I strongly suspect we could just change rtas_quiesce() to
cold reset the entire VIO bus, but we can look at that as a followup
after checking bit more closely.
> ---
> hw/ppc/spapr_vio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c
> index ef06e0362c8..b59452bcd62 100644
> --- a/hw/ppc/spapr_vio.c
> +++ b/hw/ppc/spapr_vio.c
> @@ -310,7 +310,7 @@ int spapr_vio_send_crq(SpaprVioDevice *dev, uint8_t *crq)
> static void spapr_vio_quiesce_one(SpaprVioDevice *dev)
> {
> if (dev->tcet) {
> - device_legacy_reset(DEVICE(dev->tcet));
> + device_cold_reset(DEVICE(dev->tcet));
> }
> free_crq(dev);
> }
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-05-04 0:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-03 15:18 [PATCH 0/3] ppc: Convert (mostly) from device_legacy_reset() to device_cold_reset() Peter Maydell
2021-05-03 15:18 ` [PATCH 1/3] hw/intc/spapr_xive: Use device_cold_reset() instead of device_legacy_reset() Peter Maydell
2021-05-04 0:32 ` David Gibson
2021-05-03 15:18 ` [PATCH 2/3] hw/ppc/spapr_vio: Reset TCE table object with device_cold_reset() Peter Maydell
2021-05-04 0:36 ` David Gibson [this message]
2021-05-03 15:18 ` [PATCH 3/3] hw/ppc/pnv_psi: Use device_cold_reset() instead of device_legacy_reset() Peter Maydell
2021-05-04 0:37 ` David Gibson
2021-05-03 16:55 ` [PATCH 0/3] ppc: Convert (mostly) from device_legacy_reset() to device_cold_reset() Philippe Mathieu-Daudé
2021-05-03 17:15 ` 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=YJCW8i9ePqDORgRS@yekko \
--to=david@gibson.dropbear.id.au \
--cc=clg@kaod.org \
--cc=groug@kaod.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).