From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37368) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abR2P-0002rj-Lk for qemu-devel@nongnu.org; Thu, 03 Mar 2016 06:03:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1abR2J-0001sf-NU for qemu-devel@nongnu.org; Thu, 03 Mar 2016 06:03:21 -0500 Date: Thu, 3 Mar 2016 17:39:30 +1100 From: David Gibson Message-ID: <20160303063930.GO1620@voom.redhat.com> References: <1456823441-46757-1-git-send-email-aik@ozlabs.ru> <1456823441-46757-15-git-send-email-aik@ozlabs.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1bhFRg6vL9BT9osV" Content-Disposition: inline In-Reply-To: <1456823441-46757-15-git-send-email-aik@ozlabs.ru> Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH qemu v13 14/16] spapr_pci: Add and export DMA resetting helper List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: Alex Williamson , qemu-ppc@nongnu.org, qemu-devel@nongnu.org --1bhFRg6vL9BT9osV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 01, 2016 at 08:10:39PM +1100, Alexey Kardashevskiy wrote: > This will be later used by the "ibm,reset-pe-dma-window" RTAS handler > which resets the DMA configuration to the defaults. >=20 > Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson > --- > hw/ppc/spapr_pci.c | 11 ++++++++--- > include/hw/pci-host/spapr.h | 2 ++ > 2 files changed, 10 insertions(+), 3 deletions(-) >=20 > diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c > index b0cd148..4c6e687 100644 > --- a/hw/ppc/spapr_pci.c > +++ b/hw/ppc/spapr_pci.c > @@ -1441,10 +1441,8 @@ static int spapr_phb_children_reset(Object *child,= void *opaque) > return 0; > } > =20 > -static void spapr_phb_reset(DeviceState *qdev) > +void spapr_phb_dma_reset(sPAPRPHBState *sphb) > { > - sPAPRPHBState *sphb =3D SPAPR_PCI_HOST_BRIDGE(qdev); > - > spapr_phb_dma_window_disable(sphb, sphb->dma_liobn); > =20 > /* Register default 32bit DMA window */ > @@ -1452,6 +1450,13 @@ static void spapr_phb_reset(DeviceState *qdev) > SPAPR_TCE_PAGE_SHIFT, > sphb->dma_win_addr, > sphb->dma_win_size); > +} > + > +static void spapr_phb_reset(DeviceState *qdev) > +{ > + sPAPRPHBState *sphb =3D SPAPR_PCI_HOST_BRIDGE(qdev); > + > + spapr_phb_dma_reset(sphb); > =20 > /* Reset the IOMMU state */ > object_child_foreach(OBJECT(qdev), spapr_phb_children_reset, NULL); > diff --git a/include/hw/pci-host/spapr.h b/include/hw/pci-host/spapr.h > index 03ee006..7848366 100644 > --- a/include/hw/pci-host/spapr.h > +++ b/include/hw/pci-host/spapr.h > @@ -147,4 +147,6 @@ static inline void spapr_phb_vfio_reset(DeviceState *= qdev) > } > #endif > =20 > +void spapr_phb_dma_reset(sPAPRPHBState *sphb); > + > #endif /* __HW_SPAPR_PCI_H__ */ --=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 --1bhFRg6vL9BT9osV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJW19wiAAoJEGw4ysog2bOSBFQQANXopkK+blIfzY34PJnFMJL+ vBN8ObFqtpajIEODd0DTvP2HHpw9xyBqiprm6cSfHfZ3XijQwZaJzErt1xhUfBUT RyHFMZCz6q6tUa05MtGtSWFQlJNdhEHgoFCm5PUqo5M1dnlW9xUFezE1F1Xu13ng amqeZY1EI6tsUANnk4EMi/i2+xTbr6P8RWmE8Is6WBb0C8tVTGfXVMVpFEPwB7oe 7NjFVgHaXLm3hY706df1+DZghpmtN+IsZW37x4v8VnD1OEC6fuVTUwQgAtlm875R gvuYxsoSRNMMCXrEyjgTuPJdHcog1/UG2CmfDAoJDgB43IcoRzViBXcl1IZDu4x6 V6aP3RYjeM1BSfT/qCo1HXVBx8FNjcOWE8Y0JPoF6MEv2OpwKS9Tlf5trGFhEjrS JgX+vI3q+DgiDs4eDpbVl9GUo3Pd/ZLsoy5reGO9qPGQB+ZvXfKI3NaRfWyzGlVC HKYPx+CLekGuajrFP+We2csWQsf0NNrjL6q/XmU5eKNwBXilGorrbUUnyqyfYTiT 1Dzl9P3aotsrXnblzQxVgcjJ8wNpaX2Jzs+8ZXTaXd6PiWy6VHJF0qVyhnc1+0Nw YqY5u3kj/KU8ksDkb5/fRXvIqAYQFPc0Ge9IaLAjd7Fmb/YZJDOEBb0H+vtAahps Dk4B6zmdIjPEv5edDxnh =s+lL -----END PGP SIGNATURE----- --1bhFRg6vL9BT9osV--