Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3331497rwb; Mon, 16 Jan 2023 06:45:33 -0800 (PST) X-Google-Smtp-Source: AMrXdXtkLKOYZtREbnFN8Gs+UWLwAzjb9CWlvbs2r0JRHRxtil0c36LvWvb17c85GL498NB6nswU X-Received: by 2002:a62:6047:0:b0:58b:c01a:3173 with SMTP id u68-20020a626047000000b0058bc01a3173mr11744288pfb.33.1673880332706; Mon, 16 Jan 2023 06:45:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673880332; cv=none; d=google.com; s=arc-20160816; b=XOWULlscl62CyDbhAMiddy7n3ZzdnCYLUyoTUzAo7J415ruCkMXAUfj8/XRfpxMKB3 inRFXtQojx18ETcbpP0D22NLN0IunJEW61DLIc+h86eOrwCe8rCjJ+4L6A6xec7KZBnX M+Vj87Qs4RLM8gFVjsJhyuuHgltCmVLZwKuwILGGTzLrciib6DiGipcz7of3D/7RAr5f Lb2Tx7XZy9L2+3M9ULgh9GRUDTqPU4sixKBbIr/jieXoJ+MXQdS7WUGyK/wQQPPqqeBJ p2dN6QBn9KxBMHRWH9K5naHSJq3EDd47rnDQiKNQFhLulb5qQSQFge5YYF8oyPHYLBAf kq7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sXcXjDqzhuYvHM0A0o2DEKqSp4AJPZTfx618RTtvqD0=; b=N9rOau0lmmqNqRM/Y5IuBAzX5N2wl13JcTO/dKjt14kNgS51FbZETa/XsTSoDwbGVQ lnG6tpx6/EEBibx94Z+TrUHgyisA4xDUoHV83Y40Mf5Te8pLPEe/0ktZD77lh+k+bUs7 XklJCGsTsIfBhlNsAViml5WynmI8tkDR9AgI04JPWep7pyUYOXlBkd6Vgo8oyC5mIsIh pAr+sspo0t9WPO5RbLDahQzyfVhUw6dSNurVyl/tMJUsX0ilDKOMR7UY3/6l02WTi/m1 yVL39sRHVJZZAqpJsE7+DlDgwPtDTrHg/6EU48QzuCyEzvh32+ttFz+MI7vb3bXOtEQF 2GRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aoQxzveX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bv3-20020a056a00414300b0058bb72dea62si11365407pfb.331.2023.01.16.06.45.26; Mon, 16 Jan 2023 06:45:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aoQxzveX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230126AbjAPNwN (ORCPT + 50 others); Mon, 16 Jan 2023 08:52:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231423AbjAPNup (ORCPT ); Mon, 16 Jan 2023 08:50:45 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAB1821A10; Mon, 16 Jan 2023 05:50:43 -0800 (PST) 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 6792B60FE4; Mon, 16 Jan 2023 13:50:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F5B1C4332F; Mon, 16 Jan 2023 13:50:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673877041; bh=exIBPyxduIGuUodwt8BZURfkCW3s1wM57ISgdqjT39c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aoQxzveXsm/ZO3tWIHkVG6yOughBTRwFZ4w3sRrr96uAlPlyx7SpR+ZXxXvUOIxHe 7L+qV1iQ2dWU5TH+hcV0tr/8GdtdxBw1Yo6BhAGOIYb/rabVdgtv2aNcMQxzRMTAM0 bbh5rNPE6lCooDhEBQm1NBiGH+qdPEc0AUV5ozjh0aWxeoF20+u9Zc0ZVRKm8nZ691 Ur3XCOM7hzmHdXcraj9O9AX3/ue/9EV4mCGojI6818WYTnt+styKgBm64nnxWgtFC/ daDIz13zqgMzXCIQ1JJHqcysoLXCUbkWc2So86SiCW+EQqY9WdTwv7ljPGLhZkBUCm QmyPMOiGsYLJA== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1pHPt6-0003vI-LQ; Mon, 16 Jan 2023 14:51:00 +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=20Mathieu-Daud=C3=A9?= , Hsin-Yi Wang , Mark-PK Tsai Subject: [PATCH v4 13/19] irqchip/alpine-msi: Use irq_domain_add_hierarchy() Date: Mon, 16 Jan 2023 14:50:38 +0100 Message-Id: <20230116135044.14998-14-johan+linaro@kernel.org> X-Mailer: git-send-email 2.38.2 In-Reply-To: <20230116135044.14998-1-johan+linaro@kernel.org> References: <20230116135044.14998-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the irq_domain_add_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-alpine-msi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/irqchip/irq-alpine-msi.c b/drivers/irqchip/irq-alpine-msi.c index 5ddb8e578ac6..604459372fdd 100644 --- a/drivers/irqchip/irq-alpine-msi.c +++ b/drivers/irqchip/irq-alpine-msi.c @@ -204,16 +204,14 @@ static int alpine_msix_init_domains(struct alpine_msix_data *priv, return -ENXIO; } - middle_domain = irq_domain_add_tree(NULL, - &alpine_msix_middle_domain_ops, - priv); + middle_domain = irq_domain_add_hierarchy(gic_domain, 0, 0, NULL, + &alpine_msix_middle_domain_ops, + priv); if (!middle_domain) { pr_err("Failed to create the MSIX middle domain\n"); return -ENOMEM; } - middle_domain->parent = gic_domain; - msi_domain = pci_msi_create_irq_domain(of_node_to_fwnode(node), &alpine_msix_domain_info, middle_domain); -- 2.38.2