Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3329011rwb; Mon, 16 Jan 2023 06:43:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXvWqwLw67d5dw2ZjMW6PBC5MNBT0MZbErrHF1hQcksOsFgPKZx9InzL46fAQHn5o0BVkdsz X-Received: by 2002:a17:90a:d3d1:b0:225:fa7a:cf04 with SMTP id d17-20020a17090ad3d100b00225fa7acf04mr73323435pjw.44.1673880222026; Mon, 16 Jan 2023 06:43:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673880222; cv=none; d=google.com; s=arc-20160816; b=nAH0pOldaZDcojsoaWZ82b02VK6WKmPn6fAToI0kGOtlfDhLjQ2/0ryzpCeozdc0Ae JwXn8qVs/mdTynnucYtyBLjaNk+gC5leqfg3SFuYt3XiBCNYFefKQlWgKnVnBMaCEkJN 1v3uKq5hUfTP1+5a/akPxop7xL1QrA1wIsBbJO54l2XgF3xbH20oRfCGPYyFqliaRjwU lLwY/r8R4nNxjMBfcPK5sGe9JU2WpfrdaeNBoLI0kjS6nPDpGMSjfTl46563rN2IS+nV 2Gp1aruUdSABxZjlD0Yae37nUjlkNc8Df1aDYameTw6vV1RrdYTJ9NrqIpMaMFAe3aYP VZug== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h9-20020a655189000000b0048205aae13esi28560618pgq.701.2023.01.16.06.43.35; Mon, 16 Jan 2023 06:43:42 -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 + 50 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 ); 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 ) id 1pHPt6-0003vG-ID; 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=20Mathieu-Daud=C3=A9?= , Hsin-Yi Wang , Mark-PK Tsai 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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); -- 2.38.2