1
0
Fork 0
alistair23-linux/arch/powerpc
Vincenzo Frascino 78d375ace0 powerpc: Fix vDSO clock_getres()
[ Upstream commit 5522634562 ]

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;
and hrtimer_resolution depends on the enablement of the high
resolution timers that can happen either at compile or at run time.

Fix the powerpc vdso implementation of clock_getres keeping a copy of
hrtimer_resolution in vdso data and using that directly.

Fixes: a7f290dad3 ("[PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernel")
Cc: stable@vger.kernel.org
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
[chleroy: changed CLOCK_REALTIME_RES to CLOCK_HRTIMER_RES]
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/a55eca3a5e85233838c2349783bcb5164dae1d09.1575273217.git.christophe.leroy@c-s.fr
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-17 19:56:47 +01:00
..
boot kbuild: remove ar-option and KBUILD_ARFLAGS 2019-10-01 09:20:33 +09:00
configs powerpc/configs: Enable secure guest support in pseries and ppc64 defconfigs 2019-08-30 09:56:30 +10:00
crypto treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
include powerpc: Fix vDSO clock_getres() 2019-12-17 19:56:47 +01:00
kernel powerpc: Fix vDSO clock_getres() 2019-12-17 19:56:47 +01:00
kvm KVM: PPC: Book3S HV: XIVE: Set kvm->arch.xive when VPs are allocated 2019-12-13 08:42:59 +01:00
lib powerpc/memcpy: Fix stack corruption for smaller sizes 2019-09-12 09:27:00 +10:00
math-emu treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
mm libnvdimm fixes v5.4-rc1 2019-09-29 10:33:41 -07:00
net powerpc/bpf: Fix tail call implementation 2019-11-02 00:32:26 +01:00
oprofile treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 333 2019-06-05 17:37:06 +02:00
perf powerpc/perf: fix imc allocation failure handling 2019-08-20 21:22:20 +10:00
platforms powerpc/perf: Disable trace_imc pmu 2019-12-17 19:56:24 +01:00
purgatory treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
sysdev powerpc/xive: Skip ioremap() of ESB pages for LSI interrupts 2019-12-17 19:56:42 +01:00
tools treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
xmon powerpc: Avoid clang warnings around setjmp and longjmp 2019-12-17 19:56:47 +01:00
Kbuild treewide: Add SPDX license identifier - Kbuild 2019-05-30 11:32:33 -07:00
Kconfig powerpc updates for 5.4 2019-09-20 11:48:06 -07:00
Kconfig.debug powerpc/xmon: add read-only mode 2019-05-03 02:54:57 +10:00
Makefile powerpc updates for 5.4 2019-09-20 11:48:06 -07:00
Makefile.postlink kbuild: add $(BASH) to run scripts with bash-extension 2019-09-04 22:54:13 +09:00