mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Laurent Dufour" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Laurent Dufour <ldufour@linux.ibm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Zhang Rui <rui.zhang@intel.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: smp/core] cpu/hotplug: Remove dependancy against cpu_primary_thread_mask
Date: Fri, 28 Jul 2023 07:57:55 -0000	[thread overview]
Message-ID: <169053107559.28540.11243157708630222054.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20230705145143.40545-2-ldufour@linux.ibm.com>

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 <ldufour@linux.ibm.com>
AuthorDate:    Wed, 05 Jul 2023 16:51:34 +02:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
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 <ldufour@linux.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Zhang Rui <rui.zhang@intel.com>
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

  reply	other threads:[~2023-07-28  7:58 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-05 14:51 [PATCH v4 00/10] Introduce SMT level and add PowerPC support Laurent Dufour
2023-07-05 14:51 ` [PATCH v4 01/10] cpu/hotplug: remove dependancy against cpu_primary_thread_mask Laurent Dufour
2023-07-28  7:57   ` tip-bot2 for Laurent Dufour [this message]
2023-07-05 14:51 ` [PATCH v4 02/10] cpu/SMT: Move SMT prototypes into cpu_smt.h Laurent Dufour
2023-07-28  7:57   ` [tip: smp/core] " tip-bot2 for Michael Ellerman
2023-07-05 14:51 ` [PATCH v4 03/10] cpu/SMT: Move smt/control simple exit cases earlier Laurent Dufour
2023-07-28  7:57   ` [tip: smp/core] " tip-bot2 for Michael Ellerman
2023-07-05 14:51 ` [PATCH v4 04/10] cpu/SMT: Store the current/max number of threads Laurent Dufour
2023-07-28  7:57   ` [tip: smp/core] " tip-bot2 for Michael Ellerman
2023-07-05 14:51 ` [PATCH v4 05/10] cpu/SMT: Remove topology_smt_supported() Laurent Dufour
2023-07-28  7:57   ` [tip: smp/core] " tip-bot2 for Laurent Dufour
2023-07-05 14:51 ` [PATCH v4 06/10] cpu/SMT: Create topology_smt_thread_allowed() Laurent Dufour
2023-07-28  7:57   ` [tip: smp/core] " tip-bot2 for Michael Ellerman
2023-07-05 14:51 ` [PATCH v4 07/10] cpu/SMT: Allow enabling partial SMT states via sysfs Laurent Dufour
2023-07-28  7:57   ` [tip: smp/core] " tip-bot2 for Michael Ellerman
2024-04-08 14:13   ` [PATCH v4 07/10] " Michal Suchánek
2023-07-05 14:51 ` [PATCH v4 08/10] powerpc/pseries: Initialise CPU hotplug callbacks earlier Laurent Dufour
2023-08-14 10:51   ` Srikar Dronamraju
2023-07-05 14:51 ` [PATCH v4 09/10] powerpc: Add HOTPLUG_SMT support Laurent Dufour
2023-08-14 10:52   ` Srikar Dronamraju
2023-07-05 14:51 ` [PATCH v4 10/10] powerpc/pseries: Honour current SMT state when DLPAR onlining CPUs Laurent Dufour
2023-08-14 10:53   ` Srikar Dronamraju
2023-07-09 15:25 ` [PATCH v4 00/10] Introduce SMT level and add PowerPC support Zhang, Rui
2023-07-10  9:08   ` Laurent Dufour
2023-07-28  7:40   ` Thomas Gleixner
2023-07-28 14:23     ` Zhang, Rui
2023-07-28 14:51       ` Thomas Gleixner
2023-07-28  7:58 ` Thomas Gleixner
2023-07-31 11:55   ` Laurent Dufour
2023-08-10  6:23   ` Michael Ellerman
2023-08-10  8:51     ` Laurent Dufour

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=169053107559.28540.11243157708630222054.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=ldufour@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®