From patchwork Thu Feb 9 13:23:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13134604 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DFC7DC61DA4 for ; Thu, 9 Feb 2023 13:34:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+gE+gvJ798EM2oxCgoKmk4GpTlQvc+fRLRCBGab7QFE=; b=Bd9QmEWQGcSwPk iqAK1+/SKQTY9kCSaoHwpUe3/6xGJLnh1/tC8X86UuDO2UmQhC2xj0NFq9/dG/EpP1QaZUOxgtgj7 +G4poqdSt3IWS825/IMNav8F5mmbJ/AHgH2WLLf9/49JVK/7T1j5qia42KtHXPf/v6MaScq10/Ne4 mYa6HX2I/pughkYNB1oLYB/Xrzxiyh8sGaeu9KeBifZQDuGT/0FWtkZnM+ALvAajt1dIVXB4zZso8 fSsUfzJudfcZvvWSxUeW3OMH8Ibe/4pKKq93GA94Nq6AkbCj7qYBJeDAQPeZiXCw5jqn6okMBphYv H+CrAam+N8URY0+9WXzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQ737-001hvN-HV; Thu, 09 Feb 2023 13:33:17 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQ70i-001gUM-PB for linux-arm-kernel@lists.infradead.org; Thu, 09 Feb 2023 13:30:54 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 37A0B61AE4; Thu, 9 Feb 2023 13:30:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB0D0C43234; Thu, 9 Feb 2023 13:30:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675949443; bh=xReQQbRP8f3ZcgElG5HL2OX/F0HPnUSW+WJ1I2BgRtE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TpFoR87h4CVzdcgL6j8nfk4026l69oWKrVtkrpvIeqrZjLp9OWcf3VFYh5hp5SmCS +sZpIY55fJc4MDomzGwRj8GEbDdhQ6zAU+YGpbXiNCXfRci4pkncf7GYrzr28MyumC oDNGbTj78k0MRJQEXKikjKowEvQ+HCS88FcxdKa7+KJF8IV4h8RuVjWUTXr3m/9agS 6zS3tMt1GcOVs/vmfRJjj7nlk/rCyDQ+80rE0GzN0+YQT6jvRgMBt9+Ni541c4oauH e90S7lza9Ol4zhgFuYxE2TVY9sroziB9bu+seZ2YhwnvALGuybqzfUJeZX4vP22EvJ wdSPEA9SiHQ4Q== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1pQ71H-0001La-JB; Thu, 09 Feb 2023 14:31:23 +0100 From: Johan Hovold To: Marc Zyngier , Thomas Gleixner Cc: x86@kernel.org, platform-driver-x86@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Hsin-Yi Wang , Mark-PK Tsai Subject: [PATCH v5 17/19] irqchip/loongson-pch-msi: Use irq_domain_create_hierarchy() Date: Thu, 9 Feb 2023 14:23:21 +0100 Message-Id: <20230209132323.4599-18-johan+linaro@kernel.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230209132323.4599-1-johan+linaro@kernel.org> References: <20230209132323.4599-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230209_053048_898330_163EF28E X-CRM114-Status: GOOD ( 12.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use the irq_domain_create_hierarchy() helper to create the hierarchical domain, which both serves as documentation and avoids poking at irqdomain internals. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Hsin-Yi Wang Tested-by: Mark-PK Tsai Signed-off-by: Johan Hovold --- drivers/irqchip/irq-loongson-pch-msi.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/irqchip/irq-loongson-pch-msi.c b/drivers/irqchip/irq-loongson-pch-msi.c index a72ede90ffc6..6e1e1f011bb2 100644 --- a/drivers/irqchip/irq-loongson-pch-msi.c +++ b/drivers/irqchip/irq-loongson-pch-msi.c @@ -163,16 +163,15 @@ static int pch_msi_init_domains(struct pch_msi_data *priv, { struct irq_domain *middle_domain, *msi_domain; - middle_domain = irq_domain_create_linear(domain_handle, - priv->num_irqs, - &pch_msi_middle_domain_ops, - priv); + middle_domain = irq_domain_create_hierarchy(parent, 0, priv->num_irqs, + domain_handle, + &pch_msi_middle_domain_ops, + priv); if (!middle_domain) { pr_err("Failed to create the MSI middle domain\n"); return -ENOMEM; } - middle_domain->parent = parent; irq_domain_update_bus_token(middle_domain, DOMAIN_BUS_NEXUS); msi_domain = pci_msi_create_irq_domain(domain_handle,