@@ -190,6 +190,8 @@ static int cpuhp_invoke_callback(unsigned int cpu, enum cpuhp_state state,
190
190
191
191
trace_cpuhp_enter (cpu , st -> target , state , cb );
192
192
ret = cb (cpu );
193
+ if (!ret && bringup )
194
+ pr_warn ("%s(%d): %ps returned %d\n" , __func__ , cpu , cb , ret );
193
195
trace_cpuhp_exit (cpu , st -> state , state , ret );
194
196
return ret ;
195
197
}
@@ -200,6 +202,8 @@ static int cpuhp_invoke_callback(unsigned int cpu, enum cpuhp_state state,
200
202
WARN_ON_ONCE (lastp && * lastp );
201
203
trace_cpuhp_multi_enter (cpu , st -> target , state , cbm , node );
202
204
ret = cbm (cpu , node );
205
+ if (!ret && bringup )
206
+ pr_warn ("%s(%d): %ps returned %d\n" , __func__ , cpu , cbm , ret );
203
207
trace_cpuhp_exit (cpu , st -> state , state , ret );
204
208
return ret ;
205
209
}
@@ -212,6 +216,8 @@ static int cpuhp_invoke_callback(unsigned int cpu, enum cpuhp_state state,
212
216
213
217
trace_cpuhp_multi_enter (cpu , st -> target , state , cbm , node );
214
218
ret = cbm (cpu , node );
219
+ if (!ret && bringup )
220
+ pr_warn ("%s(%d): %ps returned %d\n" , __func__ , cpu , cbm , ret );
215
221
trace_cpuhp_exit (cpu , st -> state , state , ret );
216
222
if (ret ) {
217
223
if (!lastp )
@@ -237,6 +243,8 @@ static int cpuhp_invoke_callback(unsigned int cpu, enum cpuhp_state state,
237
243
238
244
trace_cpuhp_multi_enter (cpu , st -> target , state , cbm , node );
239
245
ret = cbm (cpu , node );
246
+ if (!ret && bringup )
247
+ pr_warn ("%s(%d): %ps returned %d\n" , __func__ , cpu , cbm , ret );
240
248
trace_cpuhp_exit (cpu , st -> state , state , ret );
241
249
/*
242
250
* Rollback must not fail,
@@ -1341,6 +1349,7 @@ static int _cpu_up(unsigned int cpu, int tasks_frozen, enum cpuhp_state target)
1341
1349
cpus_write_lock ();
1342
1350
1343
1351
if (!cpu_present (cpu )) {
1352
+ pr_warn ("%s(%d): returned %d due to !cpu_present(cpu).\n" , __func__ , cpu , - EINVAL );
1344
1353
ret = - EINVAL ;
1345
1354
goto out ;
1346
1355
}
@@ -1357,6 +1366,7 @@ static int _cpu_up(unsigned int cpu, int tasks_frozen, enum cpuhp_state target)
1357
1366
idle = idle_thread_get (cpu );
1358
1367
if (IS_ERR (idle )) {
1359
1368
ret = PTR_ERR (idle );
1369
+ pr_warn ("%s(%d): returned %d due to IS_ERR(idle_thread_get(cpu)).\n" , __func__ , cpu , ret );
1360
1370
goto out ;
1361
1371
}
1362
1372
}
@@ -1402,6 +1412,7 @@ static int cpu_up(unsigned int cpu, enum cpuhp_state target)
1402
1412
#if defined(CONFIG_IA64 )
1403
1413
pr_err ("please check additional_cpus= boot parameter\n" );
1404
1414
#endif
1415
+ pr_warn ("%s(%d): returned %d due to !cpu_possible(cpu).\n" , __func__ , cpu , - EINVAL );
1405
1416
return - EINVAL ;
1406
1417
}
1407
1418
@@ -1412,10 +1423,12 @@ static int cpu_up(unsigned int cpu, enum cpuhp_state target)
1412
1423
cpu_maps_update_begin ();
1413
1424
1414
1425
if (cpu_hotplug_disabled ) {
1426
+ pr_warn ("%s(%d): returned %d due to cpu_hotplug_disabled.\n" , __func__ , cpu , - EBUSY );
1415
1427
err = - EBUSY ;
1416
1428
goto out ;
1417
1429
}
1418
1430
if (!cpu_smt_allowed (cpu )) {
1431
+ pr_warn ("%s(%d): returned %d due to !cpu_smt_allowed(cpu).\n" , __func__ , cpu , - EPERM );
1419
1432
err = - EPERM ;
1420
1433
goto out ;
1421
1434
}
0 commit comments