From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59260) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buxD0-0001TE-Fe for qemu-devel@nongnu.org; Fri, 14 Oct 2016 03:47:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buxCw-0002ir-8s for qemu-devel@nongnu.org; Fri, 14 Oct 2016 03:47:13 -0400 Received: from 2.mo1.mail-out.ovh.net ([178.32.119.250]:36438) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buxCw-0002iV-3n for qemu-devel@nongnu.org; Fri, 14 Oct 2016 03:47:10 -0400 Received: from player726.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo1.mail-out.ovh.net (Postfix) with ESMTP id 8F86A1465C for ; Fri, 14 Oct 2016 09:47:08 +0200 (CEST) References: <1475479496-16158-1-git-send-email-clg@kaod.org> <1475479496-16158-20-git-send-email-clg@kaod.org> <20161014063652.GU28562@umbus> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= Message-ID: <2ae92350-80c6-d430-7ea0-6bfb6b8cf936@kaod.org> Date: Fri, 14 Oct 2016 09:47:05 +0200 MIME-Version: 1.0 In-Reply-To: <20161014063652.GU28562@umbus> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v4 19/20] ppc/pnv: Add Naples chip support for LPC interrupts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: qemu-ppc@nongnu.org, Benjamin Herrenschmidt , qemu-devel@nongnu.org On 10/14/2016 08:36 AM, David Gibson wrote: > On Mon, Oct 03, 2016 at 09:24:55AM +0200, C=E9dric Le Goater wrote: >> From: Benjamin Herrenschmidt >> >> It adds the Naples chip which supports proper LPC interrupts via the >> LPC controller rather than via an external CPLD. >> >> Signed-off-by: Benjamin Herrenschmidt >> [clg: - updated for qemu-2.7 >> - ported on latest PowerNV patchset (v3) ] >> Signed-off-by: C=E9dric Le Goater >> --- >> hw/ppc/pnv.c | 18 +++++++++++++++++- >> hw/ppc/pnv_lpc.c | 47 +++++++++++++++++++++++++++++++++++++++= ++++++-- >> include/hw/ppc/pnv_lpc.h | 7 +++++++ >> 3 files changed, 69 insertions(+), 3 deletions(-) >> >> diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c >> index e805e97d4d87..5b70ccf66fac 100644 >> --- a/hw/ppc/pnv.c >> +++ b/hw/ppc/pnv.c >> @@ -340,7 +340,17 @@ static void pnv_lpc_isa_irq_handler_cpld(void *op= aque, int n, int level) >> =20 >> static void pnv_lpc_isa_irq_handler(void *opaque, int n, int level) >> { >> - /* XXX TODO */ >> + PnvLpcController *lpc =3D opaque; >> + >> + if (n >=3D ISA_NUM_IRQS) { >> + return; >> + } >=20 > How could n >=3D ISA_NUM_IRQS arise? Would it have to mean a bug > elsewhere in your code? If so this should be an assert(). It cannot. I should remove it. Thanks, C.=20