File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ extern ssize_t arch_cpu_release(const char *, size_t);
89
89
#ifdef CONFIG_SMP
90
90
extern bool cpuhp_tasks_frozen ;
91
91
int cpu_up (unsigned int cpu );
92
+ int add_cpu (unsigned int cpu );
92
93
void notify_cpu_starting (unsigned int cpu );
93
94
extern void cpu_maps_update_begin (void );
94
95
extern void cpu_maps_update_done (void );
@@ -118,6 +119,7 @@ extern void cpu_hotplug_disable(void);
118
119
extern void cpu_hotplug_enable (void );
119
120
void clear_tasks_mm_cpumask (int cpu );
120
121
int cpu_down (unsigned int cpu );
122
+ int remove_cpu (unsigned int cpu );
121
123
122
124
#else /* CONFIG_HOTPLUG_CPU */
123
125
Original file line number Diff line number Diff line change @@ -1057,6 +1057,18 @@ int cpu_down(unsigned int cpu)
1057
1057
}
1058
1058
EXPORT_SYMBOL (cpu_down );
1059
1059
1060
+ int remove_cpu (unsigned int cpu )
1061
+ {
1062
+ int ret ;
1063
+
1064
+ lock_device_hotplug ();
1065
+ ret = device_offline (get_cpu_device (cpu ));
1066
+ unlock_device_hotplug ();
1067
+
1068
+ return ret ;
1069
+ }
1070
+ EXPORT_SYMBOL_GPL (remove_cpu );
1071
+
1060
1072
#else
1061
1073
#define takedown_cpu NULL
1062
1074
#endif /*CONFIG_HOTPLUG_CPU*/
@@ -1209,6 +1221,18 @@ int cpu_up(unsigned int cpu)
1209
1221
}
1210
1222
EXPORT_SYMBOL_GPL (cpu_up );
1211
1223
1224
+ int add_cpu (unsigned int cpu )
1225
+ {
1226
+ int ret ;
1227
+
1228
+ lock_device_hotplug ();
1229
+ ret = device_online (get_cpu_device (cpu ));
1230
+ unlock_device_hotplug ();
1231
+
1232
+ return ret ;
1233
+ }
1234
+ EXPORT_SYMBOL_GPL (add_cpu );
1235
+
1212
1236
#ifdef CONFIG_PM_SLEEP_SMP
1213
1237
static cpumask_var_t frozen_cpus ;
1214
1238
You can’t perform that action at this time.
0 commit comments