]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ARM: 7653/2: do not scale loops_per_jiffy when using a constant delay clock
authorNicolas Pitre <nicolas.pitre@linaro.org>
Mon, 18 Feb 2013 15:36:13 +0000 (16:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Mar 2013 18:26:09 +0000 (11:26 -0700)
commit13cfc75733aa5167b8a4578c41c49b4ea697d05c
tree7c22a45efefe9bcb5f303d6d19c0b7ea6e905c3c
parent69ac92ed67085663753c03a64cc88401b4696c61
ARM: 7653/2: do not scale loops_per_jiffy when using a constant delay clock

commit 70264367a243a68b1d5636ffb570183449803cbe upstream.

When udelay() is implemented using an architected timer, it is wrong
to scale loops_per_jiffy when changing the CPU clock frequency since
the timer clock remains constant.

The lpj should probably become an implementation detail relevant to
the CPU loop based delay routine only and more confined to it. In the
mean time this is the minimal fix needed to have expected delays with
the timer based implementation when cpufreq is also in use.

Reported-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Tested-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Liviu Dudau <Liviu.Dudau@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/include/asm/delay.h
arch/arm/kernel/smp.c
arch/arm/lib/delay.c