ARM: riscpc: replace gettimeoffset() with clocksource
authorRussell King <rmk+kernel@armlinux.org.uk>
Wed, 14 Nov 2018 19:13:02 +0000 (19:13 +0000)
committerRussell King <rmk+kernel@armlinux.org.uk>
Thu, 9 May 2019 15:26:29 +0000 (16:26 +0100)
commita44c1d700c848e221d80aab1029d36a60d21a0f4
treeecf033d8da47d219f6e0730dd7b8105c7af7caea
parente93c9c99a629c61837d5a7fc2120cd2b6c70dbdd
ARM: riscpc: replace gettimeoffset() with clocksource

Replace the old gettimeoffset() interface (which became buggy in
several ways) with a clocksource that atomically reads the count
and status from the timer, and corrects the count as appropriate
ensuring proper resolution of time without time warping backwards.

We keep the original periodic timer non-clock event implementation
to provide the kernel with a regular source of interrupts, which
are required to keep the clocksource properly updated.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
arch/arm/Kconfig
arch/arm/mach-rpc/time.c