Merge commit 'v2.6.29-rc1' into perfcounters/core
[pandora-kernel.git] / drivers / acpi / processor_idle.c
index 66a9d81..7acb23f 100644 (file)
@@ -271,8 +271,11 @@ static atomic_t c3_cpu_count;
 /* Common C-state entry for C2, C3, .. */
 static void acpi_cstate_enter(struct acpi_processor_cx *cstate)
 {
+       u64 perf_flags;
+
        /* Don't trace irqs off for idle */
        stop_critical_timings();
+       perf_flags = hw_perf_save_disable();
        if (cstate->entry_method == ACPI_CSTATE_FFH) {
                /* Call into architectural FFH based C-state */
                acpi_processor_ffh_cstate_enter(cstate);
@@ -285,6 +288,7 @@ static void acpi_cstate_enter(struct acpi_processor_cx *cstate)
                   gets asserted in time to freeze execution properly. */
                unused = inl(acpi_gbl_FADT.xpm_timer_block.address);
        }
+       hw_perf_restore(perf_flags);
        start_critical_timings();
 }
 #endif /* !CONFIG_CPU_IDLE */
@@ -1426,8 +1430,11 @@ static inline void acpi_idle_update_bm_rld(struct acpi_processor *pr,
  */
 static inline void acpi_idle_do_entry(struct acpi_processor_cx *cx)
 {
+       u64 pctrl;
+
        /* Don't trace irqs off for idle */
        stop_critical_timings();
+       pctrl = hw_perf_save_disable();
        if (cx->entry_method == ACPI_CSTATE_FFH) {
                /* Call into architectural FFH based C-state */
                acpi_processor_ffh_cstate_enter(cx);
@@ -1442,6 +1449,7 @@ static inline void acpi_idle_do_entry(struct acpi_processor_cx *cx)
                   gets asserted in time to freeze execution properly. */
                unused = inl(acpi_gbl_FADT.xpm_timer_block.address);
        }
+       hw_perf_restore(pctrl);
        start_critical_timings();
 }