From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53175) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8K5t-0001Ts-ID for qemu-devel@nongnu.org; Thu, 02 Jun 2016 00:18:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8K5r-0007bZ-5l for qemu-devel@nongnu.org; Thu, 02 Jun 2016 00:18:52 -0400 Date: Thu, 2 Jun 2016 14:19:59 +1000 From: David Gibson Message-ID: <20160602041959.GC22347@voom.fritz.box> References: <1464771463-37214-1-git-send-email-aik@ozlabs.ru> <201606010902.u518x15j023604@mx0a-001b2d01.pphosted.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8NvZYKFJsRX2Djef" Content-Disposition: inline In-Reply-To: <201606010902.u518x15j023604@mx0a-001b2d01.pphosted.com> Subject: Re: [Qemu-devel] [PATCH qemu v17 08/12] spapr_pci: Add and export DMA resetting helper List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, Alexander Graf , Alex Williamson --8NvZYKFJsRX2Djef Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 01, 2016 at 06:57:39PM +1000, 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 Should be safe even without the rest of the series, so I've merged to ppc-for-2.7. > --- > hw/ppc/spapr_pci.c | 10 ++++++++-- > include/hw/pci-host/spapr.h | 2 ++ > 2 files changed, 10 insertions(+), 2 deletions(-) >=20 > diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c > index 4a7be4d..68de523 100644 > --- a/hw/ppc/spapr_pci.c > +++ b/hw/ppc/spapr_pci.c > @@ -1485,9 +1485,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); > sPAPRTCETable *tcet =3D spapr_tce_find_by_liobn(sphb->dma_liobn); > =20 > if (tcet && tcet->nb_table) { > @@ -1497,6 +1496,13 @@ static void spapr_phb_reset(DeviceState *qdev) > /* Register default 32bit DMA window */ > spapr_tce_table_enable(tcet, SPAPR_TCE_PAGE_SHIFT, sphb->dma_win_add= r, > sphb->dma_win_size >> SPAPR_TCE_PAGE_SHIFT); > +} > + > +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 --8NvZYKFJsRX2Djef Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXT7PvAAoJEGw4ysog2bOSoqAQAI/LWK5QXXLtEk058pEALNrN eeDt/B7/xekme6IZqsJ9XQkkvxlcwM+M5QPJT8fVJQwPM5YhZXYnIWhIHGA32gjv eJiQe5ecucqQAHL5B/sOUKWhkoV0nQuQ3EZenG7QEZZsRmcd4vKdEh4S8gR+rDqQ zjRMDR2EwFVeaKEfWbx8qi//Eiw2+GMgvbbD9/RX/5bMPlrWrP9pSbeRFlPWv9QZ 9dC2WzICAtuGnPN82VAXaynWJayPtGKTwzskpaUez97OPPwzPCTDOeK18MI7rDgT Avzl/As4VzO3XtbI8pWW2DnaWfmdcgy/EQhPQQhqVVXoPqQm2ZNoPJLkACchaQGu hCkHFaC2b4i/+xEmXYpMJ4fAy/gp/ZgUh60ycTAUutYCVp8Ko1ZcFaJdHwIeQce9 bPYnvPP5g7wCXMPpZJF3/csxlU66wNmgK2A8Pw94yVt5TQXAMFoZflUTdCGtckNJ ca4QoF2WAm/JF8Fu9GSSLjd4Ul9x7QKLECF/YlH7Pv3t1q0N77OTux+vuQdo0arQ xwL0/Kf1xkVtdpWUogzKAFXbGjFmoTrUUWL3qjgGPujvTWCQncZvfIc8I6eiYlYd pZOSGNTRHselbCq4N6U/LmE/iWSBYJLbrbQ0QvNVlM2TG+W4QsfpU8K9Mkn/ruJN U2YPD6Gi/HYXtmojDqvT =qcng -----END PGP SIGNATURE----- --8NvZYKFJsRX2Djef--