From patchwork Mon Jan 16 13:50:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 44162 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1202817wrn; Mon, 16 Jan 2023 05:54:17 -0800 (PST) X-Google-Smtp-Source: AMrXdXunObYxJ6v62JHQoIBP20sRX/f1z0IFnpL5L0fkCKl3o9isA3Gqs7ycgKyTwr6CiWURH9q7 X-Received: by 2002:a17:907:3e26:b0:7ad:c8d7:4fd9 with SMTP id hp38-20020a1709073e2600b007adc8d74fd9mr105070719ejc.36.1673877257181; Mon, 16 Jan 2023 05:54:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673877257; cv=none; d=google.com; s=arc-20160816; b=aAv0KcNKm9uX8pNlQWjFiVVz0RR0k/sDreHQDre/V1ICCMB+kD80trFBL8e+n26T1Z RgOQfurUEfvcJHqGzvkUSZfr5E4mfATDDGn6v+t9SjO1GFClICiD++5r7TzmSrRLCA3z rD7nE83sC4q/LGnmC+mHjpHkqJbi9fIXKBho4MSJfvMEMHZVgYpQz7uZIKUL9WYLocAH cfdAi4sYFotUDhM47UY0+g+WwxHqH0QgYbIRzYrD6xwdO0B+JSx3BEuxlXG/tkWuaztc iz4jc0gEbNN4+tGzjViJLUSw0ZyctsvRyKQOCOxKux4gmJSUpiPQKGegNaHHy1yf5tr9 tWFw== 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=L6yhiZ6LlUbPuFVSIXmDs2SsJmBCeaJlsD2pIr23l74=; b=lOP72KBmP0MpseynRv3q/s/numh/96c10McRHWld7L+OtiaOX+3vnvW/hKP2BCnvvr 86ktqqR/3mq5qFQSlKujHBV/u9x+vjVvX7drB17cFn7x2V5++mkItH+U9n8Hy96r1uCL JE8Wo8y6IECVMg7N0+M4mVmH2cc3f1CYqrV/3XuuntfU31OQ77KKGhqa6s/7AKNSjsPl MEBOe2hLdSxjeJisNF3LjVxsu1CmwqpyNqZgsShvMh6j221Q3R5tSpw0zqe3brqRtoPQ 2febMuycrD4S6IfrNtnt9toTTFPUDkL3YNHmkCxXbQcZDhUqN0+KzHd9l6AW0f6mqwy/ 2OpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Zc9+3pnm; 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 gb42-20020a170907962a00b00871b82c1f2asi1143686ejc.23.2023.01.16.05.53.53; Mon, 16 Jan 2023 05:54:17 -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=Zc9+3pnm; 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 S231521AbjAPNvd (ORCPT + 99 others); Mon, 16 Jan 2023 08:51:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231534AbjAPNuo (ORCPT ); Mon, 16 Jan 2023 08:50:44 -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 7708321963; 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 1E37D60FDE; Mon, 16 Jan 2023 13:50:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47EE2C4339B; 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=xzaP0POiJTvdAArF5s+sRyCE4tI36PeyUYdNU4owoyY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Zc9+3pnmtbZ6o82DpGuYgW1tMjj2PtHMP9Upu1/umGP0gbfj8u/zRXpbpei3VP4k3 yh66TqL50QoPk7mXgdeNbBCpC13H6fm1Ls7zqggb3rogCRORryH9ZxK2eK3jLw4+GS nCroqQSwrzlbhN+4ZXOmYg61FG/wVxc0HOrPq5HR7Ty1JcuzJF+5atkBtuTnqx09Bj F1OtSt8LptZorWDyyh5Kw/BWMdQ5RifsiBQNdIytp6M67brGBBhO3jIXVhlFAjHi6q 0WnR5b2/IO2kGUl8OwiQXkItmlXHLJU4kpyoqqAG7zt3dMxFYAuM9geuRWMy/TgGoO TNC7j7/KEE6qA== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1pHPt6-0003vL-OK; 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 14/19] irqchip/gic-v2m: Use irq_domain_create_hierarchy() Date: Mon, 16 Jan 2023 14:50:39 +0100 Message-Id: <20230116135044.14998-15-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?1755187518353707018?= X-GMAIL-MSGID: =?utf-8?q?1755187518353707018?= 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-gic-v2m.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-gic-v2m.c b/drivers/irqchip/irq-gic-v2m.c index f4d7eeb13951..f1e75b35a52a 100644 --- a/drivers/irqchip/irq-gic-v2m.c +++ b/drivers/irqchip/irq-gic-v2m.c @@ -287,15 +287,14 @@ static __init int gicv2m_allocate_domains(struct irq_domain *parent) if (!v2m) return 0; - inner_domain = irq_domain_create_tree(v2m->fwnode, - &gicv2m_domain_ops, v2m); + inner_domain = irq_domain_create_hierarchy(parent, 0, 0, v2m->fwnode, + &gicv2m_domain_ops, v2m); if (!inner_domain) { pr_err("Failed to create GICv2m domain\n"); return -ENOMEM; } irq_domain_update_bus_token(inner_domain, DOMAIN_BUS_NEXUS); - inner_domain->parent = parent; pci_domain = pci_msi_create_irq_domain(v2m->fwnode, &gicv2m_msi_domain_info, inner_domain);