linux-stable/arch/arm64
Vincenzo Frascino b0f6ac8c81 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:46:21 -07:00
..
boot arm64: dts: rockchip: Disable DCMDs on RK3399's eMMC controller. 2019-05-22 07:37:35 +02:00
configs arm64: defconfig: Enable TI's AM6 SoC platform 2018-08-29 11:51:26 -07:00
crypto crypto: arm64/aes-neonbs - don't access already-freed walk.iv 2019-05-22 07:37:37 +02:00
include arm64: vdso: Fix clock_getres() for CLOCK_REALTIME 2019-05-31 06:46:21 -07:00
kernel arm64: vdso: Fix clock_getres() for CLOCK_REALTIME 2019-05-31 06:46:21 -07:00
kvm KVM: arm64: Reset the PMU in preemptible context 2019-05-04 09:20:13 +02:00
lib arm64: lse: remove -fcall-used-x0 flag 2018-11-13 11:08:54 -08:00
mm arm64: errata: Add workaround for Cortex-A76 erratum #1463225 2019-05-31 06:46:03 -07:00
net bpf, arm64: remove prefetch insn in xadd mapping 2019-05-22 07:37:38 +02:00
xen arm64: mm: Add additional parameter to uaccess_ttbr0_disable 2018-01-17 13:57:49 +01:00
Kconfig arm64: errata: Add workaround for Cortex-A76 erratum #1463225 2019-05-31 06:46:03 -07:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Kconfig.platforms ARM: SoC: late updates 2018-08-25 14:12:36 -07:00
Makefile arm64: relocatable: fix inconsistencies in linker script and options 2019-01-13 09:51:08 +01:00