ACPI / cpuidle: Drop unnecessary calls from ->enter callback routines
[linux-drm-fsl-dcu.git] / drivers / acpi / processor_idle.c
index 87b704e41877daa488eec962f545f32cf0d079fe..ceeff3d473f1eaa4f413ca5ad3f7837be9401571 100644 (file)
@@ -681,15 +681,13 @@ static int acpi_idle_bm_check(void)
 }
 
 /**
- * acpi_idle_do_entry - a helper function that does C2 and C3 type entry
+ * acpi_idle_do_entry - enter idle state using the appropriate method
  * @cx: cstate data
  *
  * Caller disables interrupt before call and enables interrupt after return.
  */
-static inline void acpi_idle_do_entry(struct acpi_processor_cx *cx)
+static void acpi_idle_do_entry(struct acpi_processor_cx *cx)
 {
-       /* Don't trace irqs off for idle */
-       stop_critical_timings();
        if (cx->entry_method == ACPI_CSTATE_FFH) {
                /* Call into architectural FFH based C-state */
                acpi_processor_ffh_cstate_enter(cx);
@@ -703,7 +701,6 @@ static inline void acpi_idle_do_entry(struct acpi_processor_cx *cx)
                   gets asserted in time to freeze execution properly. */
                inl(acpi_gbl_FADT.xpm_timer_block.address);
        }
-       start_critical_timings();
 }
 
 /**
@@ -794,12 +791,8 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
        if (cx->type == ACPI_STATE_C3)
                ACPI_FLUSH_CPU_CACHE();
 
-       /* Tell the scheduler that we are going deep-idle: */
-       sched_clock_idle_sleep_event();
        acpi_idle_do_entry(cx);
 
-       sched_clock_idle_wakeup_event(0);
-
        lapic_timer_state_broadcast(pr, cx, 0);
        return index;
 }
@@ -845,8 +838,6 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
 
        acpi_unlazy_tlb(smp_processor_id());
 
-       /* Tell the scheduler that we are going deep-idle: */
-       sched_clock_idle_sleep_event();
        /*
         * Must be done before busmaster disable as we might need to
         * access HPET !
@@ -884,8 +875,6 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
                raw_spin_unlock(&c3_lock);
        }
 
-       sched_clock_idle_wakeup_event(0);
-
        lapic_timer_state_broadcast(pr, cx, 0);
        return index;
 }