Skip to content

Commit fb7fb84

Browse files
Qais YousefKAGA-KOKO
authored andcommitted
cpu/hotplug: Remove __freeze_secondary_cpus()
The refactored function is no longer required as the codepaths that call freeze_secondary_cpus() are all suspend/resume related now. Signed-off-by: Qais Yousef <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 5655585 commit fb7fb84

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

include/linux/cpu.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,7 @@ static inline void get_online_cpus(void) { cpus_read_lock(); }
144144
static inline void put_online_cpus(void) { cpus_read_unlock(); }
145145

146146
#ifdef CONFIG_PM_SLEEP_SMP
147-
int __freeze_secondary_cpus(int primary, bool suspend);
148-
static inline int freeze_secondary_cpus(int primary)
149-
{
150-
return __freeze_secondary_cpus(primary, true);
151-
}
152-
147+
extern int freeze_secondary_cpus(int primary);
153148
extern void thaw_secondary_cpus(void);
154149

155150
static inline int suspend_disable_secondary_cpus(void)

kernel/cpu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,7 +1327,7 @@ void bringup_nonboot_cpus(unsigned int setup_max_cpus)
13271327
#ifdef CONFIG_PM_SLEEP_SMP
13281328
static cpumask_var_t frozen_cpus;
13291329

1330-
int __freeze_secondary_cpus(int primary, bool suspend)
1330+
int freeze_secondary_cpus(int primary)
13311331
{
13321332
int cpu, error = 0;
13331333

@@ -1352,7 +1352,7 @@ int __freeze_secondary_cpus(int primary, bool suspend)
13521352
if (cpu == primary)
13531353
continue;
13541354

1355-
if (suspend && pm_wakeup_pending()) {
1355+
if (pm_wakeup_pending()) {
13561356
pr_info("Wakeup pending. Abort CPU freeze\n");
13571357
error = -EBUSY;
13581358
break;

0 commit comments

Comments
 (0)