ftrace: disable tracing on acpi idle calls

The acpi idle waits calls local_irq_save and then uses mwait to go into
idle. The tracer gets reenabled at local_irq_save but does not detect that
the idle allows for wake ups.

This patch adds code to disable the tracing when acpi puts the CPU to idle.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by

Steven Rostedt and committed by
Ingo Molnar
dcf30997 1986b0cb

+6
+6
drivers/acpi/processor_idle.c
··· 272 /* Common C-state entry for C2, C3, .. */ 273 static void acpi_cstate_enter(struct acpi_processor_cx *cstate) 274 { 275 if (cstate->entry_method == ACPI_CSTATE_FFH) { 276 /* Call into architectural FFH based C-state */ 277 acpi_processor_ffh_cstate_enter(cstate); ··· 286 gets asserted in time to freeze execution properly. */ 287 unused = inl(acpi_gbl_FADT.xpm_timer_block.address); 288 } 289 } 290 #endif /* !CONFIG_CPU_IDLE */ 291 ··· 1421 */ 1422 static inline void acpi_idle_do_entry(struct acpi_processor_cx *cx) 1423 { 1424 if (cx->entry_method == ACPI_CSTATE_FFH) { 1425 /* Call into architectural FFH based C-state */ 1426 acpi_processor_ffh_cstate_enter(cx); ··· 1437 gets asserted in time to freeze execution properly. */ 1438 unused = inl(acpi_gbl_FADT.xpm_timer_block.address); 1439 } 1440 } 1441 1442 /**
··· 272 /* Common C-state entry for C2, C3, .. */ 273 static void acpi_cstate_enter(struct acpi_processor_cx *cstate) 274 { 275 + /* Don't trace irqs off for idle */ 276 + stop_critical_timings(); 277 if (cstate->entry_method == ACPI_CSTATE_FFH) { 278 /* Call into architectural FFH based C-state */ 279 acpi_processor_ffh_cstate_enter(cstate); ··· 284 gets asserted in time to freeze execution properly. */ 285 unused = inl(acpi_gbl_FADT.xpm_timer_block.address); 286 } 287 + start_critical_timings(); 288 } 289 #endif /* !CONFIG_CPU_IDLE */ 290 ··· 1418 */ 1419 static inline void acpi_idle_do_entry(struct acpi_processor_cx *cx) 1420 { 1421 + /* Don't trace irqs off for idle */ 1422 + stop_critical_timings(); 1423 if (cx->entry_method == ACPI_CSTATE_FFH) { 1424 /* Call into architectural FFH based C-state */ 1425 acpi_processor_ffh_cstate_enter(cx); ··· 1432 gets asserted in time to freeze execution properly. */ 1433 unused = inl(acpi_gbl_FADT.xpm_timer_block.address); 1434 } 1435 + start_critical_timings(); 1436 } 1437 1438 /**