Commit 3869e929 authored by Len Brown's avatar Len Brown

Merge branch 'hpet' into release

parents 2d405707 f461ddea
...@@ -953,6 +953,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, ...@@ -953,6 +953,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
*/ */
acpi_state_timer_broadcast(pr, cx, 1); acpi_state_timer_broadcast(pr, cx, 1);
kt1 = ktime_get_real();
/* /*
* disable bus master * disable bus master
* bm_check implies we need ARB_DIS * bm_check implies we need ARB_DIS
...@@ -974,10 +975,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, ...@@ -974,10 +975,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
ACPI_FLUSH_CPU_CACHE(); ACPI_FLUSH_CPU_CACHE();
} }
kt1 = ktime_get_real();
acpi_idle_do_entry(cx); acpi_idle_do_entry(cx);
kt2 = ktime_get_real();
idle_time = ktime_to_us(ktime_sub(kt2, kt1));
/* Re-enable bus master arbitration */ /* Re-enable bus master arbitration */
if (pr->flags.bm_check && pr->flags.bm_control) { if (pr->flags.bm_check && pr->flags.bm_control) {
...@@ -986,6 +984,8 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, ...@@ -986,6 +984,8 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
c3_cpu_count--; c3_cpu_count--;
spin_unlock(&c3_lock); spin_unlock(&c3_lock);
} }
kt2 = ktime_get_real();
idle_time = ktime_to_us(ktime_sub(kt2, kt1));
sleep_ticks = us_to_pm_timer_ticks(idle_time); sleep_ticks = us_to_pm_timer_ticks(idle_time);
/* Tell the scheduler how much we idled: */ /* Tell the scheduler how much we idled: */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment