From nobody Tue Feb 10 14:49:18 2026 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1511444686182572.6356653275384; Thu, 23 Nov 2017 05:44:46 -0800 (PST) Received: from localhost ([::1]:44430 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHrnq-0004s0-Ao for importer@patchew.org; Thu, 23 Nov 2017 08:44:30 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38066) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHrbE-0000w0-ET for qemu-devel@nongnu.org; Thu, 23 Nov 2017 08:31:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHrbB-0000f7-9Y for qemu-devel@nongnu.org; Thu, 23 Nov 2017 08:31:28 -0500 Received: from 18.mo3.mail-out.ovh.net ([87.98.172.162]:38006) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eHrbB-0000dd-3v for qemu-devel@nongnu.org; Thu, 23 Nov 2017 08:31:25 -0500 Received: from player797.ha.ovh.net (gw6.ovh.net [213.251.189.206]) by mo3.mail-out.ovh.net (Postfix) with ESMTP id EF36D171BED for ; Thu, 23 Nov 2017 14:31:23 +0100 (CET) Received: from zorba.kaod.org.com (LFbn-1-2231-173.w90-76.abo.wanadoo.fr [90.76.52.173]) (Authenticated sender: clg@kaod.org) by player797.ha.ovh.net (Postfix) with ESMTPSA id BE8102E0096; Thu, 23 Nov 2017 14:31:18 +0100 (CET) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson , Benjamin Herrenschmidt Date: Thu, 23 Nov 2017 14:29:35 +0100 Message-Id: <20171123132955.1261-6-clg@kaod.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171123132955.1261-1-clg@kaod.org> References: <20171123132955.1261-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 14819939002675006291 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedttddrledtgdefhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 87.98.172.162 Subject: [Qemu-devel] [PATCH 05/25] spapr: introduce a spapr_irq_set() helper X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_6 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" It will make synchronisation easier with the XIVE interrupt mode when available. The 'irq' parameter refers to the global IRQ number space. Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: David Gibson --- hw/ppc/spapr.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 7ae84d40bdb4..79f38a9ff4e1 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3594,6 +3594,11 @@ static int ics_find_free_block(ICSState *ics, int nu= m, int alignnum) return -1; } =20 +static void spapr_irq_set(sPAPRMachineState *spapr, int irq, bool lsi) +{ + ics_set_irq_type(spapr->ics, irq - spapr->ics->offset, lsi); +} + int spapr_irq_alloc(sPAPRMachineState *spapr, int irq_hint, bool lsi, Error **errp) { @@ -3618,7 +3623,7 @@ int spapr_irq_alloc(sPAPRMachineState *spapr, int irq= _hint, bool lsi, irq +=3D ics->offset; } =20 - ics_set_irq_type(ics, irq - ics->offset, lsi); + spapr_irq_set(spapr, irq, lsi); trace_spapr_irq_alloc(irq); =20 return irq; @@ -3657,10 +3662,10 @@ int spapr_irq_alloc_block(sPAPRMachineState *spapr,= int num, bool lsi, return -1; } =20 + first +=3D ics->offset; for (i =3D first; i < first + num; ++i) { - ics_set_irq_type(ics, i, lsi); + spapr_irq_set(spapr, i, lsi); } - first +=3D ics->offset; =20 trace_spapr_irq_alloc_block(first, num, lsi, align); =20 --=20 2.13.6