From mboxrd@z Thu Jan 1 00:00:00 1970 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 25CBBC4332F for ; Fri, 9 Dec 2022 14:07:35 +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=bR7qgrPiUANCP9ggPb+w8TqZ6ZAzEBCJQ9URZ2fXDYU=; b=jY7/mXdqCm+hRY gajIZFOJWBSk8vP8fa4zumfeZNwK81Kas/fjDVhMhfvC7zQNkTQGLpg9bcNphYSzMhEYaoPyczW/j ODxhQSCDWTcXUwtpCjlIvg90no9JpHLZUsmqZGDXJyFtdNfW7z2/D2gbFbIEnAoy3wPXNou08poX2 kR8KT3OR/SVSHQPFQa2/eKTgk7i7b7eGUcRSn2e0HHPrUsvgitOjyiqiXwuP7QcIbaC+2qkRpB1CW hdOt5MOmsP9X1/J4TttP/v4f/DK2KIVR7CbweUokWDE8UTK1IAMDRe3mMSxY1wfc6GWOU3iDIjN4k GGHe3OeDrfYRDPcmfTmQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3e1K-008Ehb-UU; Fri, 09 Dec 2022 14:06:35 +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 1p3e06-008Dea-TF for linux-arm-kernel@lists.infradead.org; Fri, 09 Dec 2022 14:05:20 +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 EC3B76229B; Fri, 9 Dec 2022 14:05:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 39586C43336; Fri, 9 Dec 2022 14:05:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670594714; bh=UP2+AxwTenj8IrLgN7iAfjLcXLHT12juB5rPhe2Zwxc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BpiDKarNH9X0K6qACc5wCbNpoj3PrvLBH3ImpbDVxAxxji2VVF4P849xUehHurjyX t/kNzu4eYQt+hcnRpVw/dzMaltG99Z277c3qMosBOIHyxJNhppT/gnExeOPO5PKg6Y YSddxp4S+zfGSnuYnWT7LUyRzLcEjju4Mjr7PjLEKYM2/TQAPqUysd+44AuqKUe/oV N6eGq6TqROl5p/7FDNCrvnWWbp3qa2e2ExaNC2Ptb5qd3EAMJvwBVtRuJ9sGi86DBs hIFXZ5zNcVYmc9br2fVUYWoHw3M8SOI1VvlAbHPk3cFYRer2PeolbfSauun3/Ci2x5 StOGXJZ8dldiQ== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1p3e0J-0000S4-Hq; Fri, 09 Dec 2022 15:05:31 +0100 From: Johan Hovold To: Marc Zyngier Cc: Thomas Gleixner , 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 Subject: [PATCH v3 15/19] irqchip/gic-v3-its: Use irq_domain_create_hierarchy() Date: Fri, 9 Dec 2022 15:01:46 +0100 Message-Id: <20221209140150.1453-16-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221209140150.1453-1-johan+linaro@kernel.org> References: <20221209140150.1453-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-20221209_060519_019987_155995EB X-CRM114-Status: GOOD ( 13.52 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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. Note that the domain host_data was first set to the struct its_node during allocation only to immediately be overwritten with the struct msi_domain_info. Signed-off-by: Johan Hovold --- drivers/irqchip/irq-gic-v3-its.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index 973ede0197e3..5634d29b644d 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -4909,18 +4909,19 @@ static int its_init_domain(struct fwnode_handle *handle, struct its_node *its) if (!info) return -ENOMEM; - inner_domain = irq_domain_create_tree(handle, &its_domain_ops, its); + info->ops = &its_msi_domain_ops; + info->data = its; + + inner_domain = irq_domain_create_hierarchy(its_parent, + its->msi_domain_flags, 0, + handle, &its_domain_ops, + info); if (!inner_domain) { kfree(info); return -ENOMEM; } - inner_domain->parent = its_parent; irq_domain_update_bus_token(inner_domain, DOMAIN_BUS_NEXUS); - inner_domain->flags |= its->msi_domain_flags; - info->ops = &its_msi_domain_ops; - info->data = its; - inner_domain->host_data = info; return 0; } -- 2.37.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel