From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLNlQ-0003V3-L7 for qemu-devel@nongnu.org; Fri, 08 Jul 2016 00:51:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLNlO-0000JK-BV for qemu-devel@nongnu.org; Fri, 08 Jul 2016 00:51:43 -0400 Date: Fri, 8 Jul 2016 14:49:32 +1000 From: David Gibson Message-ID: <20160708044932.GG14675@voom.fritz.box> References: <1467914058-30551-1-git-send-email-nikunj@linux.vnet.ibm.com> <1467914058-30551-3-git-send-email-nikunj@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TALVG7vV++YnpwZG" Content-Disposition: inline In-Reply-To: <1467914058-30551-3-git-send-email-nikunj@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [PATCH v3 2/4] 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, clg@kaod.org, benh@kernel.crashing.org --TALVG7vV++YnpwZG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 07, 2016 at 11:24:16PM +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 doesn't do anything without the ics list change, but it's also harmless, so I've merged it to ppc-for-2.7. > --- > 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 6ad3057..8c22daf 100644 > --- a/include/hw/ppc/xics.h > +++ b/include/hw/ppc/xics.h > @@ -150,7 +150,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 --TALVG7vV++YnpwZG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXfzDcAAoJEGw4ysog2bOStC4P/AtwDMqWzd0GDIJ4+Pe1ZlVD kUOEcPjHD3S+0eA5a2yqUz3YuzX6L+pPD+/mowSMb71Nv8ZPZT6LkLf1HRidqE53 7X8Ci++2Ml2eU67xh4VaGaaKyRcxkLf6aqSUzEk6djwjaVvS5w9OCGh2eIv6nFGH 8S6yxQn+XMf8IQ8yL3BnI7pZHIQnhWrCgY2MHV+HIi+NqBnOJ9D9yC4qDbi87SYj nmrcC97aE3RIeXWDgKIiW64sSXJOXZyeTw1hGJ5TMdkCHWYM39tEJENqv2BFJDcL hXlVghNejVNvA/U9qU/s1pkikOhGmdFqEmu81F1DvPAH6n+WumTlo7e6+8A9eNH/ SCrOmGoQ24OiDbl7wGju328X/5OalcKe6n1ZXOP8zCh4rCR3Id1JUKx0/m1kHo2r WadIqr6aBSH7sglOCuVAHuKgFM656/Vdv1jmJsKVIYkLaqLRmUD4q1yY/OzKg/A+ jCftx+jnnB4ha4IyWcjifnguJxKglfI/G/ImckpRr9VWfmcKu/msNE/Dh1PxcOeg sHkzdAtb00eEy+ews0P8ppXWSZDHdFmjhqh48TJHmzhFJf56nmiUs9KyI+hRz08O 2YCbRT0GQEG1E3i0AVfrDrn+VPzXDudkECqp9U+UYCnh+42K4e4KcQ0Ay4ziDgN6 pk/kP/ob6Rzxrp5Hj5Pi =e0H/ -----END PGP SIGNATURE----- --TALVG7vV++YnpwZG--