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 E095FC61DA4 for ; Thu, 9 Feb 2023 13:37:28 +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=tXLVRdj2vYHf3To5XFV9WiYn+G+1kvyYtqV1Owl13Ak=; b=zc7oWPAeNrH3W/ G3qc/Nmw48zQvN8xgogXow9IxM8Oq4Hnz6GXZzPDtWrcwwyFouLcDFegm2K+R0zsK/Dc+Vq4q1Am0 3wdtcuWdYaRd48tGrRmLXUPP2nlPOSJX4HYdzwoVZ1GVz3MsvUVzbzLUvMr211bGcw8MmtEkOQoW+ pp614fyHSKiQtsBQ5tXDf6RFntfF2NUU0CQMwIyMbKEPrU1ZMOMrRV4q3c+lxKT8pNOR3dE5Qv/fq rngnM2eBxX0PK5fhfkG1D2BPVKE7dOR6+LM1H7TRUZF9YIN2FtkmIN36sRcxmBtUDs6lBfbI4+FXE IviiMz8N295uUtyYt2+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQ762-001jce-8g; Thu, 09 Feb 2023 13:36:18 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQ70u-001gen-8i for linux-arm-kernel@bombadil.infradead.org; Thu, 09 Feb 2023 13:31:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=KPMTVtpiOOGkS0V4jpVWs5c+tP/7RFHyRduRqBDQ3iw=; b=pwG6IQzZuvx6L1+OFqOqSN3QHr 9GjKBUy9T4jz+KzwmM3Ro/XQLLNiKkdiNM+HfSf9dlW0DWgoMy9m87jqM0/1c5Qs3WQf7CXA1iAmW uHXxkgmc9xGeKDF+slCX+5m6hvjU4giWpfWthNQUGu3c8Dz05pClxgonZsmRKvoxYlUBOkAVExTEg ceB+qMhGk4gZ5O6aSEnZLkwlkUQnmjGemQi/18Nk15cSdMFVSEmXy+iJUkZnwQpnaSoYFRem/wMyw fiRU4xiPU0vkaTcmhTzDxVrihAwhPEwjbTDV0kEjeX+mCQnXx8kRh++wzfPbspGrLNCce3Dh0LD43 bJck/PWw==; Received: from dfw.source.kernel.org ([139.178.84.217]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pQ70A-007vn7-0x for linux-arm-kernel@lists.infradead.org; Thu, 09 Feb 2023 13:30:18 +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 173E361ACF; Thu, 9 Feb 2023 13:30:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7CC39C433EF; 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=w4UY5RVGpUGFn7eO+zB8iof9Dgni/IxlD6NiUpdYG9U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cEYfbj+Onx4biZQxdwtTCxE5hSFa192gAA3UP3qdyMJeI8rSMM7w2rIZaz55nng33 sqLZBzNwkk5IvaUOYyHNH2YW0nwT/7AeuZlpuSCXwT2OGFWq5jv7a8Dt19v0JEGlLm fkxzYXZ4HhTZ6J2jPAAz7hIxJlPv/Uj/ReFcQ29qhOx7vDh4ORX62pwSNNqApWAcdN kF/6u/euxvRTKDNMW6VZEFYC5DMooswYZEmg+Aq2f1oKZm6I/o1SgvwL/fj4joBc6W 6UM/l2lM9RZvcj6I7uNfXBkxyUiNxE5oms3S53Z7bU9n2o4bTHZYAhr+pgeu3RbCOn dVrc4WjIl0IcQ== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1pQ71H-0001LU-DP; 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 , Hsin-Yi Wang , Mark-PK Tsai Subject: [PATCH v5 15/19] irqchip/gic-v3-its: Use irq_domain_create_hierarchy() Date: Thu, 9 Feb 2023 14:23:19 +0100 Message-Id: <20230209132323.4599-16-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_133015_373248_2629D6E1 X-CRM114-Status: GOOD ( 13.43 ) 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. Tested-by: Hsin-Yi Wang Tested-by: Mark-PK Tsai 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.39.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel