Files
linux/arch/arm64/include/asm
Vincenzo Frascino 9f641ee2b7 arm64: vdso: Fix clock_getres() for CLOCK_REALTIME
[ Upstream commit 81fb8736dd ]

clock_getres() in the vDSO library has to preserve the same behaviour
of posix_get_hrtimer_res().

In particular, posix_get_hrtimer_res() does:

    sec = 0;
    ns = hrtimer_resolution;

where 'hrtimer_resolution' depends on whether or not high resolution
timers are enabled, which is a runtime decision.

The vDSO incorrectly returns the constant CLOCK_REALTIME_RES. Fix this
by exposing 'hrtimer_resolution' in the vDSO datapage and returning that
instead.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
[will: Use WRITE_ONCE(), move adr off COARSE path, renumber labels, use 'w' reg]
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-05-31 06:48:23 -07:00
..
2014-04-18 11:40:33 +02:00
2015-10-28 19:09:17 +00:00
2012-09-17 13:42:21 +01:00
2018-09-15 09:43:07 +02:00
2016-09-09 11:41:13 +01:00
2014-11-05 09:03:25 +01:00
2012-09-17 13:42:04 +01:00
2016-03-04 18:19:17 +00:00
2016-09-08 11:04:13 +01:00
2016-06-27 16:31:25 +01:00
2012-09-17 13:41:56 +01:00
2014-11-28 10:24:59 +00:00
2015-10-12 17:46:36 +01:00
2014-07-10 11:06:00 +01:00
2016-08-25 18:00:29 +01:00
2012-09-17 13:42:09 +01:00
2016-09-09 11:42:27 +01:00