Message ID | 20221209140150.1453-15-johan+linaro@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp794623wrr; Fri, 9 Dec 2022 06:06:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf6ioVkBk0vIm5tlWZV4GDss9jOJ9RnPL8TsTqyAMFiDih/Q/9885ucYR2QzpsAh9J9YqsjB X-Received: by 2002:a17:90a:6506:b0:214:222:6ed3 with SMTP id i6-20020a17090a650600b0021402226ed3mr6313307pjj.43.1670594809654; Fri, 09 Dec 2022 06:06:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670594809; cv=none; d=google.com; s=arc-20160816; b=X+OqSUYP5P6jFz7u2DiXu/HPOKprG3E6oX2RslxnHpMfVoHWBTPp3RHE4CuaJFONdT nF2CuNCGR876PstDreSOX/n5ZsgaYGWnUlqhciJQMSRVlAxsjeSG8bx/OmfKQ7BXH4tu cuw7/8m0HGQmo+EfogYmr2jN3CLOs8nEpV4yFZ23wOh0QCIxN5ufpgMqlP2TATpDP3pF F8gzjGfzdZi0TRGI8adbHzu5EjfI0fGzab+tS13hCAkHaoLNRBIOV5loK0xiw3/RkGIn XAq/izDlxYLNW18tfLCabd4CRJMAHWBFYqn8ALd0n/w0++rgi4FbzPE5rFt6W8Macb9M Ke9w== 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=kcEXQ8fWmo5QKc8dQsC1MbPmOVMpdGM/QMWk6N5iHf0=; b=Lb7+ZJStUz5EOEnJ/IyQBrBzRX/0hS76NJnt8oQOUydiYfy5e9PAtHDguHZP9NirG1 0+dL2rI9Vn4B4oXeEmK7O1PtjEa6ZqPazeCTlIma5Oka4IK/4NjFww+7Gjq8QfwIpd8w tLAG/nPQ0eG6LaXsKf/SjEUZoHpGcTPiHiOYg5k6Ozb2J/qAgwvZzgAREI/ThVSftghu 5roOaJfmJs+bouBCcYA15JyLKzaTeJcuzTjFJ+E/tuHU6kUSM4V4A7zadpT+0xMIqrWZ htL+i4yInSfLDmzoKQ4e3viocayi9SRT2Cll/4ZEtXLKcEBE2qFP0D6RmIPNM6ICPpUm B8CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BFDsvV4J; 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 28-20020a17090a001c00b0020a95eb3d4fsi1638939pja.128.2022.12.09.06.06.30; Fri, 09 Dec 2022 06:06:49 -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=BFDsvV4J; 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 S230111AbiLIOFv (ORCPT <rfc822;sophiezhao968@gmail.com> + 99 others); Fri, 9 Dec 2022 09:05:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229517AbiLIOFT (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 9 Dec 2022 09:05:19 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 076FD76828; Fri, 9 Dec 2022 06:05:16 -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 EFDE062273; Fri, 9 Dec 2022 14:05:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3025DC43335; 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=ZKlz/YPbyRCy6KkXCyyH1Wjmy+f6XTvrp78tKhH71kY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BFDsvV4JYL8Ufghpt0gvE1GAPsID7hham9gDxCAssbxD3BSmwFSu70uNDmc8A4KbX aR01ktHPCbycG/+w58ceoDDD6kKLgN+CAmJb6XoZq+ycC3q3lWubq6iOc8RnaQ1SoR 8u8SOsRcqTQsETEw4p5j9ZayGV+LmsgThr04Bg9SGvIiQLcIptkFZADYUP/y2TSNC8 lX6F+EbVLGujT6fVX0X1+AU79BqwnKVSUZDwMfYsp7C0IiaSsTnCvquFznxpOvu/gg UbAHQlvJfFLzabTGFGPE3Bs36RCjY7BMhTsU/v3Q6DGW5J2ePx7pd0dGr4AVipCNyu tff9fLn0RHH4A== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from <johan+linaro@kernel.org>) id 1p3e0J-0000S1-Ee; Fri, 09 Dec 2022 15:05:31 +0100 From: Johan Hovold <johan+linaro@kernel.org> To: Marc Zyngier <maz@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de>, 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 <johan+linaro@kernel.org> Subject: [PATCH v3 14/19] irqchip/gic-v2m: Use irq_domain_create_hierarchy() Date: Fri, 9 Dec 2022 15:01:45 +0100 Message-Id: <20221209140150.1453-15-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 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751745623129574965?= X-GMAIL-MSGID: =?utf-8?q?1751745623129574965?= |
Series |
irqdomain: fix mapping race and clean up locking
|
|
Commit Message
Johan Hovold
Dec. 9, 2022, 2:01 p.m. UTC
Use the irq_domain_create_hierarchy() helper to create the hierarchical
domain, which both serves as documentation and avoids poking at
irqdomain internals.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
drivers/irqchip/irq-gic-v2m.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Comments
On 9/12/22 15:01, Johan Hovold wrote: > Use the irq_domain_create_hierarchy() helper to create the hierarchical > domain, which both serves as documentation and avoids poking at > irqdomain internals. > > Signed-off-by: Johan Hovold <johan+linaro@kernel.org> > --- > drivers/irqchip/irq-gic-v2m.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
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);