The refactored function is no longer required as the codepaths that call freeze_secondary_cpus() are all suspend/resume related now.
Unified · Split
| @@ -144,12 +144,7 @@ static inline void get_online_cpus(void) { cpus_read_lock(); } · 143 unmodified lines | ||
| 144 | 144 | static inline void put_online_cpus(void) { cpus_read_unlock(); } |
| 145 | 145 | |
| 146 | 146 | #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); | |
| 153 | 148 | extern void thaw_secondary_cpus(void); |
| 154 | 149 | |
| 155 | 150 | static inline int suspend_disable_secondary_cpus(void) |
| @@ -1327,7 +1327,7 @@ void bringup_nonboot_cpus(unsigned int setup_max_cpus) · 1326 unmodified lines | ||
| 1327 | 1327 | #ifdef CONFIG_PM_SLEEP_SMP |
| 1328 | 1328 | static cpumask_var_t frozen_cpus; |
| 1329 | 1329 | |
| 1330 | −int __freeze_secondary_cpus(int primary, bool suspend) | |
| 1330 | +int freeze_secondary_cpus(int primary) | |
| 1331 | 1331 | { |
| 1332 | 1332 | int cpu, error = 0; |
| 1333 | 1333 | |
| @@ -1352,7 +1352,7 @@ int __freeze_secondary_cpus(int primary, bool suspend) · 18 unmodified lines | ||
| 1352 | 1352 | if (cpu == primary) |
| 1353 | 1353 | continue; |
| 1354 | 1354 | |
| 1355 | − if (suspend && pm_wakeup_pending()) { | |
| 1355 | + if (pm_wakeup_pending()) { | |
| 1356 | 1356 | pr_info("Wakeup pending. Abort CPU freeze\n"); |
| 1357 | 1357 | error = -EBUSY; |
| 1358 | 1358 | break; |