Commit cbe2f5a6e84eebb98ab42fc5e58c3cd5b7767349
1 parent
a0a70c735e
Exists in
master
and in
7 other branches
tracing: allow tracing of suspend/resume & hibernation code again
Impact: widen function-tracing to suspend+resume (and hibernation) sequences Now that the ftrace kernel thread is gone, we can allow tracing during suspend/resume again. So revert these two commits: f42ac38c5 "ftrace: disable tracing for suspend to ram" 41108eb10 "ftrace: disable tracing for hibernation" This should be tested very carefully, as it could interact with altneratives instruction patching, etc. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Showing 2 changed files with 4 additions and 14 deletions Side-by-side Diff
kernel/power/disk.c
... | ... | @@ -22,7 +22,6 @@ |
22 | 22 | #include <linux/console.h> |
23 | 23 | #include <linux/cpu.h> |
24 | 24 | #include <linux/freezer.h> |
25 | -#include <linux/ftrace.h> | |
26 | 25 | |
27 | 26 | #include "power.h" |
28 | 27 | |
... | ... | @@ -257,7 +256,7 @@ |
257 | 256 | |
258 | 257 | int hibernation_snapshot(int platform_mode) |
259 | 258 | { |
260 | - int error, ftrace_save; | |
259 | + int error; | |
261 | 260 | |
262 | 261 | /* Free memory before shutting down devices. */ |
263 | 262 | error = swsusp_shrink_memory(); |
... | ... | @@ -269,7 +268,6 @@ |
269 | 268 | goto Close; |
270 | 269 | |
271 | 270 | suspend_console(); |
272 | - ftrace_save = __ftrace_enabled_save(); | |
273 | 271 | error = device_suspend(PMSG_FREEZE); |
274 | 272 | if (error) |
275 | 273 | goto Recover_platform; |
... | ... | @@ -299,7 +297,6 @@ |
299 | 297 | Resume_devices: |
300 | 298 | device_resume(in_suspend ? |
301 | 299 | (error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE); |
302 | - __ftrace_enabled_restore(ftrace_save); | |
303 | 300 | resume_console(); |
304 | 301 | Close: |
305 | 302 | platform_end(platform_mode); |
306 | 303 | |
... | ... | @@ -370,11 +367,10 @@ |
370 | 367 | |
371 | 368 | int hibernation_restore(int platform_mode) |
372 | 369 | { |
373 | - int error, ftrace_save; | |
370 | + int error; | |
374 | 371 | |
375 | 372 | pm_prepare_console(); |
376 | 373 | suspend_console(); |
377 | - ftrace_save = __ftrace_enabled_save(); | |
378 | 374 | error = device_suspend(PMSG_QUIESCE); |
379 | 375 | if (error) |
380 | 376 | goto Finish; |
... | ... | @@ -389,7 +385,6 @@ |
389 | 385 | platform_restore_cleanup(platform_mode); |
390 | 386 | device_resume(PMSG_RECOVER); |
391 | 387 | Finish: |
392 | - __ftrace_enabled_restore(ftrace_save); | |
393 | 388 | resume_console(); |
394 | 389 | pm_restore_console(); |
395 | 390 | return error; |
... | ... | @@ -402,7 +397,7 @@ |
402 | 397 | |
403 | 398 | int hibernation_platform_enter(void) |
404 | 399 | { |
405 | - int error, ftrace_save; | |
400 | + int error; | |
406 | 401 | |
407 | 402 | if (!hibernation_ops) |
408 | 403 | return -ENOSYS; |
... | ... | @@ -417,7 +412,6 @@ |
417 | 412 | goto Close; |
418 | 413 | |
419 | 414 | suspend_console(); |
420 | - ftrace_save = __ftrace_enabled_save(); | |
421 | 415 | error = device_suspend(PMSG_HIBERNATE); |
422 | 416 | if (error) { |
423 | 417 | if (hibernation_ops->recover) |
... | ... | @@ -452,7 +446,6 @@ |
452 | 446 | hibernation_ops->finish(); |
453 | 447 | Resume_devices: |
454 | 448 | device_resume(PMSG_RESTORE); |
455 | - __ftrace_enabled_restore(ftrace_save); | |
456 | 449 | resume_console(); |
457 | 450 | Close: |
458 | 451 | hibernation_ops->end(); |
kernel/power/main.c
... | ... | @@ -22,7 +22,6 @@ |
22 | 22 | #include <linux/freezer.h> |
23 | 23 | #include <linux/vmstat.h> |
24 | 24 | #include <linux/syscalls.h> |
25 | -#include <linux/ftrace.h> | |
26 | 25 | |
27 | 26 | #include "power.h" |
28 | 27 | |
... | ... | @@ -317,7 +316,7 @@ |
317 | 316 | */ |
318 | 317 | int suspend_devices_and_enter(suspend_state_t state) |
319 | 318 | { |
320 | - int error, ftrace_save; | |
319 | + int error; | |
321 | 320 | |
322 | 321 | if (!suspend_ops) |
323 | 322 | return -ENOSYS; |
... | ... | @@ -328,7 +327,6 @@ |
328 | 327 | goto Close; |
329 | 328 | } |
330 | 329 | suspend_console(); |
331 | - ftrace_save = __ftrace_enabled_save(); | |
332 | 330 | suspend_test_start(); |
333 | 331 | error = device_suspend(PMSG_SUSPEND); |
334 | 332 | if (error) { |
... | ... | @@ -360,7 +358,6 @@ |
360 | 358 | suspend_test_start(); |
361 | 359 | device_resume(PMSG_RESUME); |
362 | 360 | suspend_test_finish("resume devices"); |
363 | - __ftrace_enabled_restore(ftrace_save); | |
364 | 361 | resume_console(); |
365 | 362 | Close: |
366 | 363 | if (suspend_ops->end) |