From patchwork Mon Jan 16 13:50:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 44160 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1202813wrn; Mon, 16 Jan 2023 05:54:16 -0800 (PST) X-Google-Smtp-Source: AMrXdXt9TPPRXjjb9n2rqrDyOfZdiRuToyJIZRpvYAnvUMjSeHt3JE5V8vVdBSBs+zx15KPM+EJN X-Received: by 2002:a05:6402:5408:b0:482:f518:792d with SMTP id ev8-20020a056402540800b00482f518792dmr72601092edb.28.1673877256808; Mon, 16 Jan 2023 05:54:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673877256; cv=none; d=google.com; s=arc-20160816; b=WgiKwWXCmlZKzN1YtNESKHEq9g4pWag7mmJFAlo9M0MT2teLjKUQS75hu0Ty/gCo4t MI8kZ4NOLZK2+e3KVhu0V4WuLrvXuNeCDc1/19RagTumnkjM1l5iF0o6pJdCXFfO+eVp 7v0AuPD3Z9FgVKFS4Pkkl9tUQ1pf9fQ82AAsP3H7L35flvDJDERc+5K0UlRRcOeDfiGu yW2GRi/vhybrmvCZmhB8cmkzYCSYeZ+PHzWHSLATmo+E8UABGjjuSfufRfUmbYNxGQZr b3J4dUOlDR+m+qfXe14yUtsE46N/IrK5q2uoVJmfW8EtQMxVJ3+k7fJl6tSBDoUt3o4W iFGw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cx26-20020a05640222ba00b0048c7e8f3dcasi27711790edb.483.2023.01.16.05.53.53; Mon, 16 Jan 2023 05:54:16 -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 + 99 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_Mathieu-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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755187518859384868?= X-GMAIL-MSGID: =?utf-8?q?1755187518859384868?= 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);