Skip to content

Commit dcf3099

Browse files
rostedtIngo Molnar
authored andcommitted
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 <[email protected]> Cc: Peter Zijlstra <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
1 parent 1986b0c commit dcf3099

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/acpi/processor_idle.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,8 @@ static atomic_t c3_cpu_count;
272272
/* Common C-state entry for C2, C3, .. */
273273
static void acpi_cstate_enter(struct acpi_processor_cx *cstate)
274274
{
275+
/* Don't trace irqs off for idle */
276+
stop_critical_timings();
275277
if (cstate->entry_method == ACPI_CSTATE_FFH) {
276278
/* Call into architectural FFH based C-state */
277279
acpi_processor_ffh_cstate_enter(cstate);
@@ -284,6 +286,7 @@ static void acpi_cstate_enter(struct acpi_processor_cx *cstate)
284286
gets asserted in time to freeze execution properly. */
285287
unused = inl(acpi_gbl_FADT.xpm_timer_block.address);
286288
}
289+
start_critical_timings();
287290
}
288291
#endif /* !CONFIG_CPU_IDLE */
289292

@@ -1418,6 +1421,8 @@ static inline void acpi_idle_update_bm_rld(struct acpi_processor *pr,
14181421
*/
14191422
static inline void acpi_idle_do_entry(struct acpi_processor_cx *cx)
14201423
{
1424+
/* Don't trace irqs off for idle */
1425+
stop_critical_timings();
14211426
if (cx->entry_method == ACPI_CSTATE_FFH) {
14221427
/* Call into architectural FFH based C-state */
14231428
acpi_processor_ffh_cstate_enter(cx);
@@ -1432,6 +1437,7 @@ static inline void acpi_idle_do_entry(struct acpi_processor_cx *cx)
14321437
gets asserted in time to freeze execution properly. */
14331438
unused = inl(acpi_gbl_FADT.xpm_timer_block.address);
14341439
}
1440+
start_critical_timings();
14351441
}
14361442

14371443
/**

0 commit comments

Comments
 (0)