From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40325) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmdpF-0005Fr-BU 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-0005Pb-5l for qemu-devel@nongnu.org; Wed, 21 Sep 2016 05:28:20 -0400 Date: Wed, 21 Sep 2016 17:50:22 +1000 From: David Gibson Message-ID: <20160921075022.GC1809@umbus.fritz.box> References: <1474266577-11704-1-git-send-email-nikunj@linux.vnet.ibm.com> <1474266577-11704-5-git-send-email-nikunj@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dkEUBIird37B8yKS" Content-Disposition: inline In-Reply-To: <1474266577-11704-5-git-send-email-nikunj@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [PATCH v4 4/9] ppc/xics: An ICS with offset 0 is assumed to be uninitialized 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 --dkEUBIird37B8yKS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 19, 2016 at 11:59:32AM +0530, Nikunj A Dadhania wrote: > From: Benjamin Herrenschmidt >=20 > This will make life easier for dealing with dynamically configured > ICSes such as PHB3 >=20 > Signed-off-by: Benjamin Herrenschmidt > Reviewed-by: David Gibson > Signed-off-by: Nikunj A Dadhania This seems reasonable on its own, so I've applied it to ppc-for-2.8. > --- > include/hw/ppc/xics.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h > index 1ea40bd..e49a2da 100644 > --- a/include/hw/ppc/xics.h > +++ b/include/hw/ppc/xics.h > @@ -151,7 +151,7 @@ struct ICSState { > =20 > static inline bool ics_valid_irq(ICSState *ics, uint32_t nr) > { > - return (nr >=3D ics->offset) > + return (ics->offset !=3D 0) && (nr >=3D ics->offset) > && (nr < (ics->offset + ics->nr_irqs)); > } > =20 --=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 --dkEUBIird37B8yKS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX4ju+AAoJEGw4ysog2bOS44gP/jCLR047yFhibvf/N7uOjW2G 2Nh5FOBiMNSAuBe1hPo1jto3MnVeKX20xhS5cM275lUHZfQutMf+JPOkfTAtEwIG NVy8WYcDrsiXbRdCtUjPERitu8S6fbjy4uG3+Twn2Mu1Q9kGuaEYdTNfv4EP4r72 3GkA5LzW5nKoxhuQUrywVL1WlIvrAW3c51iHxaC52QvafwrySyX9ceoNlyykkueR Sd70Pzoq08+1ynfBcql4YlxqqQD+OwBvtJJ6bt3uytqNO1RXqcCF+zKkcby8Vi+d ehqBGCl23+XbOZHDwhYLLNGCqMjcNiho5QGD0O5QIcy3c+hvf8qesjhWxaX9FQA6 NMLncGIitWvsraVQNactmNZt6fg6t202ddsq7lOF7SWNX8vD26soBvL/8g8Gr+wf pThpc5b3OHOS/yercZU7Zrdws4pMye+Lqg6TItMRZrSDUWg6LsgB7ntQaMLpbhFy YpMDrd4OdLefjCMg3pFRAMw8kRh0inx6LpDsOYl/OzkjmrMDMyGAkpjDIzF6NQ+G eTZBH0LCFoAWraUIfdIA7aiFgg5NuQq0BcTQBgP552qad3C3l3ToAPLS9yTKjEg8 URMuI2wg+sf5ND9IhuhrBIle5v6suwo1EvuDWVAjivpktfKjRsYfaDYeqtvD6F/3 jAdYyWCt4baJOV1cmFgG =XDk0 -----END PGP SIGNATURE----- --dkEUBIird37B8yKS--