From patchwork Fri Jul 28 07:57:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 127424 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp284502vqg; Fri, 28 Jul 2023 01:35:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlG1+abTH5RY3j4YbFDH0Kk6XdujKFQK+gZ82Y2n700EoP5thi9lL2eG/tEyuLc/M2/Zz/LB X-Received: by 2002:a17:906:77ce:b0:973:d076:67ab with SMTP id m14-20020a17090677ce00b00973d07667abmr1558833ejn.42.1690533307163; Fri, 28 Jul 2023 01:35:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690533307; cv=none; d=google.com; s=arc-20160816; b=SWRx0Z1bru5hKApiM1Fo8IbnbAemtKh50Wk8Wg2gMg7G1yzM9hqVubLggPaGmQnvCh d4O2u+tNoeHbkA8SVT1LQoKgqwGQsbX+MVzRgVX6PKDpGZHK3bro4A14jc1Y6gpIKs8O PNNTo4whoa2HAj4EAJuvH7859UZ+t+lTgb+oe44w3xACCzAlR5Emik6HdWP5iHg2DoHT rbLEcZSk+o4Ur5U0adUNcBlnPJQQMBanMssQVHqqXm62qAFvkHiBSDPHp51CrQ98HoJe UsfYgjPuavg0jf3C2LSb3ZgdOIWNui1fVM2FrPyW39ZrG/g3I+cRL4WfE+AUDbzX739L W+QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=ZkJmbLByvVLLbdC4tk/TA0S14VRcxaBYW/wOJ5jRGtg=; fh=mS7Li3JaXTb3RGuWWKd8sVXSVnQDBnfutYp/j9mQDo0=; b=y/l8MsjtF2acJZIE+JCfrvrfEcit/DT3VxnQ2iKKWEAgakZkJ1OQ5JcPET6p6NzN/y zytPPt/A5pJ06Jx6K7cEUspokeoxypxWHHcVG7YtSYdCs/OBhKndjU54MVUQdAGHvPEh n81l+SxS1oydzrpXdlFLZN7jE70m5ZEd0sDsygqh744ArUPAnH91wHIZJZ+fGFtN5kvo xJOcZePFZpk3w5u6RxtgPU0mW5XDzQez/HayRUoWNKD5qnz2y40ZgxsBVBPuHrESgwxn o2NYOjkq/OT/sJUvLF7cklZVu3NvtSY7nnQdHUgkVKsfA4U1R30r5Z9JyXi0cfsgXNas ejSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ohqTXWgP; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=IfwLtX19; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i9-20020a17090685c900b009886c3287e0si2316813ejy.536.2023.07.28.01.34.43; Fri, 28 Jul 2023 01:35:07 -0700 (PDT) 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=@linutronix.de header.s=2020 header.b=ohqTXWgP; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=IfwLtX19; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234664AbjG1H6g (ORCPT + 99 others); Fri, 28 Jul 2023 03:58:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234557AbjG1H6A (ORCPT ); Fri, 28 Jul 2023 03:58:00 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96C463598; Fri, 28 Jul 2023 00:57:58 -0700 (PDT) Date: Fri, 28 Jul 2023 07:57:55 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1690531076; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZkJmbLByvVLLbdC4tk/TA0S14VRcxaBYW/wOJ5jRGtg=; b=ohqTXWgPMsAgCzfdbrWAqv6qFru6K7gte+hLZG+lwGOMeaikQaxFL0DZTzGMkmqjASSyEK /5ovfShF8kxyShTAYQUSgC5/ceup9A8w8m9Q0CX3VlgWf/pnyQ4rSmxGK47x52r970ZkXu DaredsqRCQ8n2dQXclsdyh06tAzYzDSEZW6EeiKuIdiqaAQkw/1YmZNy9JSkCDxgxtCJH8 dpDf8+JpQHmn2XcDiynUYGuxTQbGCL+05y3QkdsTDt83xZMkIvIt/9rsK82F6FwYzucM0E 65NVH5QgqEOmQal3i1FxL0mTnV0qk2akhYaTa3cc15Werix60H1jjZW9qLHcnQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1690531076; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZkJmbLByvVLLbdC4tk/TA0S14VRcxaBYW/wOJ5jRGtg=; b=IfwLtX191mJLFH5Os9LZK7V92Xd3ve24a+XZq+F0Ks/DdpNt17jPD+nvTa+l/Sgs4ZE4dp UfxY+ffwy6fy+HDA== From: "tip-bot2 for Laurent Dufour" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: smp/core] cpu/hotplug: Remove dependancy against cpu_primary_thread_mask Cc: Laurent Dufour , Thomas Gleixner , Zhang Rui , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230705145143.40545-2-ldufour@linux.ibm.com> References: <20230705145143.40545-2-ldufour@linux.ibm.com> MIME-Version: 1.0 Message-ID: <169053107559.28540.11243157708630222054.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772652653165271176 X-GMAIL-MSGID: 1772652653165271176 The following commit has been merged into the smp/core branch of tip: Commit-ID: 7a4dcb4a5de1214c4a59448a759e2e264c2c4473 Gitweb: https://git.kernel.org/tip/7a4dcb4a5de1214c4a59448a759e2e264c2c4473 Author: Laurent Dufour AuthorDate: Wed, 05 Jul 2023 16:51:34 +02:00 Committer: Thomas Gleixner CommitterDate: Fri, 28 Jul 2023 09:53:36 +02:00 cpu/hotplug: Remove dependancy against cpu_primary_thread_mask The commit 18415f33e2ac ("cpu/hotplug: Allow "parallel" bringup up to CPUHP_BP_KICK_AP_STATE") introduce a dependancy against a global variable cpu_primary_thread_mask exported by the X86 code. This variable is only used when CONFIG_HOTPLUG_PARALLEL is set. Since cpuhp_get_primary_thread_mask() and cpuhp_smt_aware() are only used when CONFIG_HOTPLUG_PARALLEL is set, don't define them when it is not set. No functional change. Signed-off-by: Laurent Dufour Signed-off-by: Thomas Gleixner Tested-by: Zhang Rui Link: https://lore.kernel.org/r/20230705145143.40545-2-ldufour@linux.ibm.com --- kernel/cpu.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/kernel/cpu.c b/kernel/cpu.c index 88a7ede..03309f2 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -650,22 +650,8 @@ bool cpu_smt_possible(void) } EXPORT_SYMBOL_GPL(cpu_smt_possible); -static inline bool cpuhp_smt_aware(void) -{ - return topology_smt_supported(); -} - -static inline const struct cpumask *cpuhp_get_primary_thread_mask(void) -{ - return cpu_primary_thread_mask; -} #else static inline bool cpu_smt_allowed(unsigned int cpu) { return true; } -static inline bool cpuhp_smt_aware(void) { return false; } -static inline const struct cpumask *cpuhp_get_primary_thread_mask(void) -{ - return cpu_present_mask; -} #endif static inline enum cpuhp_state @@ -1793,6 +1779,16 @@ static int __init parallel_bringup_parse_param(char *arg) } early_param("cpuhp.parallel", parallel_bringup_parse_param); +static inline bool cpuhp_smt_aware(void) +{ + return topology_smt_supported(); +} + +static inline const struct cpumask *cpuhp_get_primary_thread_mask(void) +{ + return cpu_primary_thread_mask; +} + /* * On architectures which have enabled parallel bringup this invokes all BP * prepare states for each of the to be onlined APs first. The last state