diff options
author | Ajay Nandakumar <anandakumarm@nvidia.com> | 2013-11-10 02:06:12 +0530 |
---|---|---|
committer | Bharat Nihalani <bnihalani@nvidia.com> | 2013-11-11 21:24:42 -0800 |
commit | 60df2b1853f0df4251318ad1d3b741e0f9984e55 (patch) | |
tree | 4434e927a81dda40377b3603950a4728a815d6d9 /arch/arm/kernel | |
parent | a0dd95470f120ee9f1c0bd8b6b98dcd8260e1c9b (diff) |
Revert "ARM: arch_timer: use full 64-bit counter for sched_clock"
This reverts commit 023796b9be3a77481cd5ee0b64a13a55bb0d5df4.
With reverting this change we are moving back to the
32 bit counter instead of the 56 bit counter.
The change is reverted because the multiplier in this
case is 80 times the original counter due to which although
the sched clock is monotonic the time read by clients
are further ahead of the actual time.
This Change will be restored once we start taking the upstream
patches.
Bug 1399318
Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>
Change-Id: I5aebc5fe2a1096d5fa2acee7edcd7e03f3c7c565
Reviewed-on: http://git-master/r/328642
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/arch_timer.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/arch/arm/kernel/arch_timer.c b/arch/arm/kernel/arch_timer.c index 59dcdced6e30..f5de8afa1d12 100644 --- a/arch/arm/kernel/arch_timer.c +++ b/arch/arm/kernel/arch_timer.c @@ -22,11 +22,9 @@ static unsigned long arch_timer_read_counter_long(void) return arch_timer_read_counter(); } -static u32 sched_clock_mult __read_mostly; - -static unsigned long long notrace arch_timer_sched_clock(void) +static u32 arch_timer_read_counter_u32(void) { - return arch_timer_read_counter() * sched_clock_mult; + return arch_timer_read_counter(); } static struct delay_timer arch_delay_timer; @@ -41,18 +39,12 @@ static void __init arch_timer_delay_timer_register(void) int __init arch_timer_arch_init(void) { - u32 arch_timer_rate = arch_timer_get_rate(); - - if (arch_timer_rate == 0) + if (arch_timer_get_rate() == 0) return -ENXIO; arch_timer_delay_timer_register(); - /* Cache the sched_clock multiplier to save a divide in the hot path. */ - sched_clock_mult = NSEC_PER_SEC / arch_timer_rate; - sched_clock_func = arch_timer_sched_clock; - pr_info("sched_clock: ARM arch timer >56 bits at %ukHz, resolution %uns\n", - arch_timer_rate / 1000, sched_clock_mult); - + setup_sched_clock(arch_timer_read_counter_u32, + 32, arch_timer_get_rate()); return 0; } |