Message ID | 20221209140150.1453-14-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 q4csp795099wrr; Fri, 9 Dec 2022 06:07:34 -0800 (PST) X-Google-Smtp-Source: AA0mqf76xZMEapHKQstGULtDeFkhBopSN9raa42gSfFhPiJloaEe1XgzydF8zVaVHrZpB4+Wi4ld X-Received: by 2002:a17:90a:b382:b0:21a:3fc:e10d with SMTP id e2-20020a17090ab38200b0021a03fce10dmr5737788pjr.6.1670594854044; Fri, 09 Dec 2022 06:07:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670594854; cv=none; d=google.com; s=arc-20160816; b=X9668pZVa0eWxzxzLFi/WNgqLgCWZHM4yH7VtBXUFOpAQf0+z7C4dul0niknQceMQ4 odMVvXb3oE2UhXxsNqHBRb3sD6CrZ9BnRK+USE8H+GY8XUAdi8gm1iGxBVxCeHk8qQfd VM0wv0LdCSBovst1aYhLi97BbighD7U0sMXvMUlsnw+p+BarNXwB7xN4gQpsFSNpNTu1 a0wvrX8r1ISEuca0Lg7WvCYMpYVmb+T8SjPnHoLGAthKfHXErGXq8SXI5PRvzoADc977 zCwqUEi/6DHlDHxHktTobhCUe475+NIFwE6ybV1Ko7IGNH9ehDHoq/IIuTQetQiqQpL7 Xf0A== 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=VI7n3F8eClzrikLhAyXzOCzZi37Qm+6qhrk4FWjzz2k=; b=QRZHkI5ZzG1did19dCxV30sO5AW5vFZVUBBa5kikVetQpWyhJPWjp1dRxSossaEO56 z5IYK0bRNLvCCHbZMCjRrIKA4uH8vXRw/T0zXmMGaiDpfYFuLdn39tIJaIhNnYr+o9An ypVQMq+QYVHyF453LeDhF7ErEWaMSFGVky/exEf8Zxu7HvQQrEURhB2w3ciOg39XI+Gl HG8AJdjj/soUTWyyE2A+4zoyAnswi9FYtt5WX4P6LNUcGS339n2ueMJFWhktrMl/Jbpm WLLJsxaFdHQV201tIYlw5IQglJvCL0r3v5rKAvLVLLkP+Ph8yAfJYXaj//VawM/nAunk LFEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="LQH/23aQ"; 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 a21-20020a63e855000000b00476759b8788si1603844pgk.861.2022.12.09.06.07.20; Fri, 09 Dec 2022 06:07:34 -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="LQH/23aQ"; 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 S229847AbiLIOGR (ORCPT <rfc822;sophiezhao968@gmail.com> + 99 others); Fri, 9 Dec 2022 09:06:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229949AbiLIOFV (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 9 Dec 2022 09:05:21 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73EDB7683F; Fri, 9 Dec 2022 06:05:17 -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 603476227D; Fri, 9 Dec 2022 14:05:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20BDEC433D2; 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=9AtJSfDyD2LZYkx9jto+1enajKmHrHjk2oxsdGhfsTI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LQH/23aQv5CuTQY+WSVZhYoXYYPKe6yGP1JpGCGS4WwGIs95UD34/oFrns8IfdXbb kjRAvMWLf3p5JqVYlg10HwURYxs7WqpDpqDM5cK2SGKIrxzHrv1v+C6g0N340RjwSw 2eLqhphBx0Pww1X072puzRf/Ag9/cpnverpYZS444l2SEsNGj70hDSF3MgQhNYF83k r0aIP18jRdwkwi+9SRwUDPoeEbCscYT2eW0fWFVqLej9t5pHUkPUzqiQHl0KsIe9kR gEdFN0uxhpNhLBIrhQKvvGmOTyOH6TSY9b5gRuxSNk538JAR6veJDICDg0zoLfCPoM oN3icrx9blW0g== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from <johan+linaro@kernel.org>) id 1p3e0J-0000Ry-Bh; 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 13/19] irqchip/alpine-msi: Use irq_domain_add_hierarchy() Date: Fri, 9 Dec 2022 15:01:44 +0100 Message-Id: <20221209140150.1453-14-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?1751745669721835276?= X-GMAIL-MSGID: =?utf-8?q?1751745669721835276?= |
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_add_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-alpine-msi.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
Comments
On 9/12/22 15:01, Johan Hovold wrote: > Use the irq_domain_add_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-alpine-msi.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
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);