linux_dsm_epyc7002/arch/arm64
Sonny Rao 0b46b8a718 clocksource: arch_timer: Fix code to use physical timers when requested
This is a bug fix for using physical arch timers when
the arch_timer_use_virtual boolean is false.  It restores the
arch_counter_get_cntpct() function after removal in

0d651e4e "clocksource: arch_timer: use virtual counters"

We need this on certain ARMv7 systems which are architected like this:

* The firmware doesn't know and doesn't care about hypervisor mode and
  we don't want to add the complexity of hypervisor there.

* The firmware isn't involved in SMP bringup or resume.

* The ARCH timer come up with an uninitialized offset between the
  virtual and physical counters.  Each core gets a different random
  offset.

* The device boots in "Secure SVC" mode.

* Nothing has touched the reset value of CNTHCTL.PL1PCEN or
  CNTHCTL.PL1PCTEN (both default to 1 at reset)

One example of such as system is RK3288 where it is much simpler to
use the physical counter since there's nobody managing the offset and
each time a core goes down and comes back up it will get reinitialized
to some other random value.

Fixes: 0d651e4e65 ("clocksource: arch_timer: use virtual counters")
Cc: stable@vger.kernel.org
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2014-12-04 23:30:26 -08:00
..
boot Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-10-18 09:31:37 -07:00
configs ARM64: SoC changes for 3.18 2014-10-08 17:40:02 -04:00
crypto arm64/crypto: remove redundant update of data 2014-08-26 11:42:22 +01:00
include clocksource: arch_timer: Fix code to use physical timers when requested 2014-12-04 23:30:26 -08:00
kernel Merge git://git.infradead.org/users/eparis/audit 2014-10-19 16:25:56 -07:00
kvm Second batch of changes for KVM/{arm,arm64} for 3.18 2014-10-18 14:32:31 -07:00
lib arm64: lib: Implement optimized string length routines 2014-05-23 15:17:12 +01:00
mm arm64: mm: enable RCU fast_gup 2014-10-09 22:26:01 -04:00
net net: bpf: arm64: fix module memory leak when JIT image build fails 2014-09-12 16:33:14 +01:00
xen arm: xen: implement multicall hypercall support. 2014-04-24 13:09:46 +01:00
Kconfig xen: features and fixes for 3.18-rc0 2014-10-11 20:29:01 -04:00
Kconfig.debug arm64: Add CONFIG_DEBUG_SET_MODULE_RONX support 2014-09-08 14:39:18 +01:00
Makefile Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2014-10-14 09:22:26 +02:00