From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA02FC433B4 for ; Tue, 4 May 2021 00:47:02 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 26294611C9 for ; Tue, 4 May 2021 00:47:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 26294611C9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:52286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldjDJ-0001Hg-3c for qemu-devel@archiver.kernel.org; Mon, 03 May 2021 20:47:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54060) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldjB8-0008GH-Vb; Mon, 03 May 2021 20:44:46 -0400 Received: from ozlabs.org ([203.11.71.1]:36029) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldjB5-00064B-RN; Mon, 03 May 2021 20:44:46 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 4FZ1M46v1Pz9sSs; Tue, 4 May 2021 10:44:32 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1620089072; bh=pPQqdd8ATVZAviZ98Yp0cs2ZpCxObXzSi/9SPu0uDho=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=i5gTSw7JY+FCIPUzlYn0wUksuUnndo76IfnmIWltYchYhbk5GUGpfCNSynrirE5JN YTMel/Pjoc5lQxBzBp23mjoM2hBGPtlhRUP8s3qDI85OPXtWTP1YOTSAvZOBXlV9jR ZkozFIYfpcnlfvh4o1bUzqeDI23+6ODuen3Rothc= Date: Tue, 4 May 2021 10:36:02 +1000 From: David Gibson To: Peter Maydell Subject: Re: [PATCH 2/3] hw/ppc/spapr_vio: Reset TCE table object with device_cold_reset() Message-ID: References: <20210503151849.8766-1-peter.maydell@linaro.org> <20210503151849.8766-3-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9kh7pS6FgneppnXx" Content-Disposition: inline In-Reply-To: <20210503151849.8766-3-peter.maydell@linaro.org> Received-SPF: pass client-ip=203.11.71.1; envelope-from=dgibson@ozlabs.org; helo=ozlabs.org X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?iso-8859-1?Q?C=E9dric?= Le Goater , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Greg Kurz Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --9kh7pS6FgneppnXx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > Signed-off-by: Peter Maydell 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(-) >=20 > 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); > } --=20 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 --9kh7pS6FgneppnXx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAmCQlvEACgkQbDjKyiDZ s5IXDhAAun4JBjfu7LXNy9iAcVPz8r8OkFiMrnx5jrQTuQt/BxTvKOvyg5USmNuo t30/zEs5DScDq72TU5JdsDpG7glvsJfUs02+lc1I6NUuELw7y4jUL5+3C/jKTWLj D+iiokLyXxFd6cAflCvqBoDXyv8KqsIW3W6u+95YT87tdD3jJK8SS2tQbl6zms9A sf0nw2BNy2dAfPJRvgPbzsroCydP7EwxtPDiyN7sm/QVa3EcbgAg4Q9VhyAqsc+R xvbiaA2516bqet3M9DX1Kq/hee7ktm0QdynbdSQFudgfBN8/czZPaA+Noo22+oYL F07KA41WqJjqFo8/saf4jCUZySYlNHQrqlyn0d7yBQs1kOLLTVtlYWc3YTVYp8r1 mUudyUyqohyrKCFMtUapErNmzW1NG8hllX/BtMoF5W2pygK3N40ptMTzH2rZ4+XW pcBFyLEfaPjuZvrD52TV8pffvg7ZkUj0VtZRtK50MP7FYiCZEROq8a2xf0x7xxHX K/FuHLf1IIrZbczjZMhf/1WzOIEPGcmJUhpXPrir/uCh8Mj8Av6LbOa+xQqgnq9H otH0xerIGkudHJ2TrAw8CAe0+MKVNoRtoLj9BSVewz6QX3mfWQT3uMOitNzCMLh6 viBDqs4Ilg5bWWGiPbgaQanJ+YjzGI/JNHVZS5lVzAB4yXMXot0= =sXUr -----END PGP SIGNATURE----- --9kh7pS6FgneppnXx--