From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmdpF-0005Fv-F8 for qemu-devel@nongnu.org; Wed, 21 Sep 2016 05:28:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmdpA-0005Pg-6V for qemu-devel@nongnu.org; Wed, 21 Sep 2016 05:28:20 -0400 Date: Wed, 21 Sep 2016 16:39:52 +1000 From: David Gibson Message-ID: <20160921063952.GG20488@umbus> References: <1474266577-11704-1-git-send-email-nikunj@linux.vnet.ibm.com> <1474266577-11704-2-git-send-email-nikunj@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2e7L0d/MUbHEOUYO" Content-Disposition: inline In-Reply-To: <1474266577-11704-2-git-send-email-nikunj@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [PATCH v4 1/9] ppc/xics: account correct irq status List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nikunj A Dadhania Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, benh@kernel.crashing.org, clg@kaod.org --2e7L0d/MUbHEOUYO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 19, 2016 at 11:59:29AM +0530, Nikunj A Dadhania wrote: > Fix inconsistent irq status, because of this in the trace logs, for e.g. > LSI status was 0x7, i.e. XICS_STATUS_ASSERTED, XICS_STATUS_SENT and > XICS_STATUS_REJECTED all set, which did not make sense. So the REJECTED > would have been set in earlier interrupt cycle, and then asserted and > sent in this current one. >=20 > Signed-off-by: Nikunj A Dadhania It looks like this patch stands on its own, so I've applied it to ppc-for-2= =2E8. > --- > hw/intc/xics.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) >=20 > diff --git a/hw/intc/xics.c b/hw/intc/xics.c > index cd48f42..69162f0 100644 > --- a/hw/intc/xics.c > +++ b/hw/intc/xics.c > @@ -505,8 +505,11 @@ static void ics_reject(ICSState *ics, int nr) > ICSIRQState *irq =3D ics->irqs + nr - ics->offset; > =20 > trace_xics_ics_reject(nr, nr - ics->offset); > - irq->status |=3D XICS_STATUS_REJECTED; /* Irrelevant but harmless fo= r LSI */ > - irq->status &=3D ~XICS_STATUS_SENT; /* Irrelevant but harmless for M= SI */ > + if (irq->flags & XICS_FLAGS_IRQ_MSI) { > + irq->status |=3D XICS_STATUS_REJECTED; > + } else if (irq->flags & XICS_FLAGS_IRQ_LSI) { > + irq->status &=3D ~XICS_STATUS_SENT; > + } > } > =20 > static void ics_resend(ICSState *ics) --=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 --2e7L0d/MUbHEOUYO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX4is4AAoJEGw4ysog2bOS3DAP/1aPxF/fYbcxuqg5nutlVE4+ gBLhK5xIQ2IA/xev109rv6nGUntyY5gSVRK92OWByTKnYRXFqwCuTz3mzXbuVo+F 9nxJvnGB+jfFW/Vl8yUVIF3hQv6bDg/Rbh4e9BmOs6iFy51fyupelaPXFaTuVO7V heyiXCwDaF0Kvq24Hsd1hNAd/3o9AzTNxkhxHJ2gouLHq5k9NRNlrUp0mjzSjg7t AFl30ZRPQbqV8tHCFze4NUPsJ4DRV674cUj1pLCztW9gALqniPCnKcnF4Qjk9EbR dbie6Mtn0edhnRa0MUPu8bHegASUhcDA3jJF8kF1Uu93Z+xIrPvCCr7EUQpBAUrg KopkOo3C93dB1o8sgXC5fP6AOohnhmTRaUQR1WCHwLMM9y6ADdJEPsHVUbxZPn9i XGjL31BgBCB3T/h77tam16jkJb4IXiOopINMcgIu4sg227zc4T3JV1Dwzhm7GDK7 AdnuAbgWq9QEX7BVbMMD8BXegckDe8zem8SQx2v0ShqdDXLCxgKahyy6lfmtngcY 7cy0mW+m98eLVRbcN7agBgPA8DvbxaIPjArBHKczO6yLSCyfygOQ5HDprPKh67oO c0BFJ2zW4kiVwiKzsXOgD9HOzL0IrXSSoxabBy7BaiU2SSAZaA+qdddEBq2wufyJ 7X5Q3L7l6+z9NtaIagBx =Bzjl -----END PGP SIGNATURE----- --2e7L0d/MUbHEOUYO--