diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/processor_idle.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index eed3b458ebac..07c7d216c89d 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -953,6 +953,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, | |||
953 | */ | 953 | */ |
954 | acpi_state_timer_broadcast(pr, cx, 1); | 954 | acpi_state_timer_broadcast(pr, cx, 1); |
955 | 955 | ||
956 | kt1 = ktime_get_real(); | ||
956 | /* | 957 | /* |
957 | * disable bus master | 958 | * disable bus master |
958 | * bm_check implies we need ARB_DIS | 959 | * bm_check implies we need ARB_DIS |
@@ -974,10 +975,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, | |||
974 | ACPI_FLUSH_CPU_CACHE(); | 975 | ACPI_FLUSH_CPU_CACHE(); |
975 | } | 976 | } |
976 | 977 | ||
977 | kt1 = ktime_get_real(); | ||
978 | acpi_idle_do_entry(cx); | 978 | acpi_idle_do_entry(cx); |
979 | kt2 = ktime_get_real(); | ||
980 | idle_time = ktime_to_us(ktime_sub(kt2, kt1)); | ||
981 | 979 | ||
982 | /* Re-enable bus master arbitration */ | 980 | /* Re-enable bus master arbitration */ |
983 | if (pr->flags.bm_check && pr->flags.bm_control) { | 981 | if (pr->flags.bm_check && pr->flags.bm_control) { |
@@ -986,6 +984,8 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, | |||
986 | c3_cpu_count--; | 984 | c3_cpu_count--; |
987 | spin_unlock(&c3_lock); | 985 | spin_unlock(&c3_lock); |
988 | } | 986 | } |
987 | kt2 = ktime_get_real(); | ||
988 | idle_time = ktime_to_us(ktime_sub(kt2, kt1)); | ||
989 | 989 | ||
990 | sleep_ticks = us_to_pm_timer_ticks(idle_time); | 990 | sleep_ticks = us_to_pm_timer_ticks(idle_time); |
991 | /* Tell the scheduler how much we idled: */ | 991 | /* Tell the scheduler how much we idled: */ |