Message ID | 20230116135044.14998-13-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 s9csp1203341wrn; Mon, 16 Jan 2023 05:55:50 -0800 (PST) X-Google-Smtp-Source: AMrXdXs/aeyyI7QHcGwYyC30SazU9MWgkFg7Ov4KMz4Sz9kYd6Q0g5LJdqMgQ4U6B1IGH6/Y190P X-Received: by 2002:a17:906:944a:b0:7c1:23f2:5b51 with SMTP id z10-20020a170906944a00b007c123f25b51mr11262410ejx.60.1673877350636; Mon, 16 Jan 2023 05:55:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673877350; cv=none; d=google.com; s=arc-20160816; b=e2CPeWmJkBo1CbZsMZ5BHhS2shI/d6NIrk3pr8ff6X53w31xw+/SulCmhvGETH6HlR aw8tOjcThdb2YeFH7UZycYhJE0RN3eFT9A2PNqC4DHS5hD8G1oPhw9uBM1tOQxH82Noh oSsm+PQGN1ipo945vd4jeEOLuQOY/VjXKDFnmnJJ++dTqqn6M9ymdDbtW7ugf5dAOdqv vODC7O+fsSdi3wOv6oyHlBSQHREAT44wQShSAF/Yfwmuop3u5OvmN+hU95rooKfS3pZg sOja9SmwaDTcgxy3EoIm6COllVetmx3E/87xbDqdnagI/OtN5KfhNZShCWIRBpf5amgR K6vg== 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=sieMFWFq/Se918JBZ5c7BiZBor/2TycoG4dfxt5ArqQ=; b=RspE2ZBfrXFbfXv1mTI/GvSHQM3k9meIhLiaElwZ3BgPInVEm6sXsHzKBZQf3GPSfN Md0pR4nJEO8d6RiK54jiwX9pSDFDpE/wanO8aC8ZvaVlkSK3RC2glRCrrQKoLG2XLlMz ejvoq4GLSRzwLfUJFWHCYnzEorDWUCgzTbv82pXrr/gCNKjV+F4c2kZzzjkpCa1q32fa 8r4ofTtbSKZWBfIDPfq5I9lzQ/F9x+e1+K42KBIj5R/QiIcqt5UWdMg4Bu0tX0NbR5Eu VDhKZ6jZb/ChYgsUxecDlQxX/G1kXhLDaPOwSDPNJH+lJPFQN48Miiu2RL9lC4tdI8dR XSUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="I/MJ4XiE"; 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 vj10-20020a170907d48a00b00870d2ca6b6asi2637830ejc.100.2023.01.16.05.55.26; Mon, 16 Jan 2023 05:55:50 -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="I/MJ4XiE"; 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 S229701AbjAPNwZ (ORCPT <rfc822;stefanalexe802@gmail.com> + 99 others); Mon, 16 Jan 2023 08:52:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231458AbjAPNuo (ORCPT <rfc822;linux-kernel@vger.kernel.org>); 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 5263E2197E; 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 1A52260FDB; Mon, 16 Jan 2023 13:50:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21CF4C43330; 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=ggk54ncazk/OvpoVopO401NRPXtbra5OsVaBMxjoHtE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I/MJ4XiEWMNX1n/mFVQna8r9fFJUYXORoumXe4znvqaceuikdzQw77rAnz2v9g8/h OpAH0kyZaZwdf/Q6OBpC8hBpkKEUoyEFj47at1nmrT2LZlA4t3su1m/VcoK3xpyRlu rXfZiBdiU7jtv50ODGMmXKZenXWb2apkKf9U/N05j6VjdALzedKp7oZlnvu+Whi3w0 DyiqnBtAsHkOmcihxbOsIoe9iZKg9jAXMHvvQ7rhHkhzsuieNBV1HkrlTcMRbgpmXM 5OBru3m2h1spMeop4NRWTuh83tHuN21ZH+MVD2vs/hgfiH/S7t6/duY1K5BeMWd0vW SXz0KzsulH7Hw== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from <johan+linaro@kernel.org>) id 1pHPt6-0003vG-ID; 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 12/19] x86/apic: Use irq_domain_create_hierarchy() Date: Mon, 16 Jan 2023 14:50:37 +0100 Message-Id: <20230116135044.14998-13-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?1755187616812861212?= X-GMAIL-MSGID: =?utf-8?q?1755187616812861212?= |
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> --- arch/x86/platform/uv/uv_irq.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/x86/platform/uv/uv_irq.c b/arch/x86/platform/uv/uv_irq.c index 1a536a187d74..ee21d6a36a80 100644 --- a/arch/x86/platform/uv/uv_irq.c +++ b/arch/x86/platform/uv/uv_irq.c @@ -166,10 +166,9 @@ static struct irq_domain *uv_get_irq_domain(void) if (!fn) goto out; - uv_domain = irq_domain_create_tree(fn, &uv_domain_ops, NULL); - if (uv_domain) - uv_domain->parent = x86_vector_domain; - else + uv_domain = irq_domain_create_hierarchy(x86_vector_domain, 0, 0, fn, + &uv_domain_ops, NULL); + if (!uv_domain) irq_domain_free_fwnode(fn); out: mutex_unlock(&uv_lock);