Message ID | 20230116135044.14998-17-johan+linaro@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1203277wrn; Mon, 16 Jan 2023 05:55:40 -0800 (PST) X-Google-Smtp-Source: AMrXdXufOstITmRvGV7uDh+cIMZlJdnnNebWf9CxtvQKNGcqbp+PNOtjtjzMnLQvxrkX5Pa+EKIr X-Received: by 2002:a17:906:1150:b0:86c:cbfd:936 with SMTP id i16-20020a170906115000b0086ccbfd0936mr8648020eja.11.1673877340532; Mon, 16 Jan 2023 05:55:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673877340; cv=none; d=google.com; s=arc-20160816; b=GVN/U0KGTO5lwMOVCST34Rito73dBARUHbJsJ9hwNsVS43D1t4BUrOAFEhiWljOH7b fWhlO0bmuGwKaxGJ9MlJSqOBaiy32kqrnkW+0x3odawR96jsNj/k6pHv9MJdoLzEya5k npaJkB+mVTyEpPxCooVad0aJIeWHQouTEq0Phpdg+nrDFMexDmNFkV3cfEixDSZv4NgR OwUbnfBT4r5iiPUOVMk/7mLYHsLQBNLqPPueB8O3nzFX93FaKwjfLaeWtPR0TeJrxA2l KcCtkhtUCswxVuOCiMiNpddNLTjP8m0sc19ecbmz24ns1DSdkVSJMtu7ZBxOx6Nl8vZd GgnA== 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=hBlYYTl5Nt5k5NntC7d3zuDMdkqKT93OZIE05iENP04=; b=N3gfq97KFXs+cDvv5il994KgZaKaDcM+xZiMuu9OfuQqq7VNmceBGc7GMrVGZJ1Fro m4OSHkavg8C+yaO9HqhAuKlSOT4hVi5h6kRs3eN4FDjXVyZ+3fqOde7izOOo1AshuXpN RwrWSSBS7syp/7etD8K0SNDNIMumbMfqGH2YfoMfJWLQStbRteyFbnlxlfSgKIIJDa3m zKalSnj/UX4oCWPfv6kw2ZA4zbrZq1hO1g32mrCU7dD7WSJISyAmE/6wbAttzLlEWhcC cRTTMBsjCIVW8oGnCKvbrjZ5w+vUfIYAq/vvUU7I2AdxaW7E9p3ORIEWm5J3639hRnre SaaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Jwhs2U9u; 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 dn22-20020a17090794d600b00871a15adeb2si199177ejc.222.2023.01.16.05.55.16; Mon, 16 Jan 2023 05:55:40 -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=Jwhs2U9u; 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 S231592AbjAPNvk (ORCPT <rfc822;stefanalexe802@gmail.com> + 99 others); Mon, 16 Jan 2023 08:51:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231552AbjAPNus (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 16 Jan 2023 08:50:48 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5AB421A16; Mon, 16 Jan 2023 05:50:45 -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 ams.source.kernel.org (Postfix) with ESMTPS id 4DDF2B80F9B; Mon, 16 Jan 2023 13:50:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A8FDC4333D; 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=AWpbuIZwiPqdwBLRoH8sut1cJ+/Deb137lb+8oUm3Ks=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jwhs2U9uyOfPPhn4mjG1861rCP+K6XOfo1RUlUcH3y2A77woSmEaWDtOv3+EJYkIN RUeP+9H8Mom5Axly0fy4klS4ygtYraUWMDptUArzXGhUAcc4t61M6lL2PEshKXehIq i6W+y5NBS2Wdm2NmQcfu/8z64+jvUc0VVMPvApvCDo0Rn+UTm66LzlEI3mhdfQQE0v AVQGhx/RlOojZ/bu99HfGgMiJIu8+MpYnCNpyrLic6Nddt6cMT7rHGJAmC9sY5dC4c +J3wftkLLB0mXW1Z6pnXV+HM9JFJchFBIKQlM/LtHkW5bwggiHntdixQJla8Hg+fTP HwRhKTmpNllMw== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from <johan+linaro@kernel.org>) id 1pHPt6-0003vS-U5; Mon, 16 Jan 2023 14:51:00 +0100 From: Johan Hovold <johan+linaro@kernel.org> To: Marc Zyngier <maz@kernel.org>, Thomas Gleixner <tglx@linutronix.de> 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 <johan+linaro@kernel.org>, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Hsin-Yi Wang <hsinyi@chromium.org>, Mark-PK Tsai <mark-pk.tsai@mediatek.com> Subject: [PATCH v4 16/19] irqchip/gic-v3-mbi: Use irq_domain_create_hierarchy() Date: Mon, 16 Jan 2023 14:50:41 +0100 Message-Id: <20230116135044.14998-17-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: <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?1755187606214633969?= X-GMAIL-MSGID: =?utf-8?q?1755187606214633969?= |
Series |
irqdomain: fix mapping race and clean up locking
|
|
Commit Message
Johan Hovold
Jan. 16, 2023, 1:50 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. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Hsin-Yi Wang <hsinyi@chromium.org> Tested-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> Signed-off-by: Johan Hovold <johan+linaro@kernel.org> --- drivers/irqchip/irq-gic-v3-mbi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/irqchip/irq-gic-v3-mbi.c b/drivers/irqchip/irq-gic-v3-mbi.c index e1efdec9e9ac..dbb8b1efda44 100644 --- a/drivers/irqchip/irq-gic-v3-mbi.c +++ b/drivers/irqchip/irq-gic-v3-mbi.c @@ -233,13 +233,12 @@ static int mbi_allocate_domains(struct irq_domain *parent) struct irq_domain *nexus_domain, *pci_domain, *plat_domain; int err; - nexus_domain = irq_domain_create_tree(parent->fwnode, - &mbi_domain_ops, NULL); + nexus_domain = irq_domain_create_hierarchy(parent, 0, 0, parent->fwnode, + &mbi_domain_ops, NULL); if (!nexus_domain) return -ENOMEM; irq_domain_update_bus_token(nexus_domain, DOMAIN_BUS_NEXUS); - nexus_domain->parent = parent; err = mbi_allocate_pci_domain(nexus_domain, &pci_domain);