linux-brain/arch/powerpc
Vincenzo Frascino cf9e11a310 powerpc: Fix vDSO clock_getres()
[ Upstream commit 552263456215ada7ee8700ce022d12b0cffe4802 ]

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 20:39:57 +01:00
..
boot powerpc/44x/bamboo: Fix PCI range 2019-12-05 15:37:42 +01:00
configs powerpc/configs: Update for CONFIG_SND changes 2017-09-20 13:30:09 +10:00
crypto crypto: hash - annotate algorithms taking optional key 2018-02-16 20:23:00 +01:00
include powerpc: Fix vDSO clock_getres() 2019-12-17 20:39:57 +01:00
kernel powerpc: Fix vDSO clock_getres() 2019-12-17 20:39:57 +01:00
kvm KVM: PPC: Book3S HV: Flush link stack on guest exit to host kernel 2019-12-01 09:14:36 +01:00
lib powerpc/fsl: Add infrastructure to fixup branch predictor flush 2019-04-03 06:25:13 +02:00
math-emu License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mm powerpc/mm: Make NULL pointer deferences explicit on bad page faults. 2019-12-05 15:37:42 +01:00
net bpf: get rid of pure_initcall dependency to enable jits 2019-08-25 10:50:02 +02:00
oprofile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
perf powerpc/perf: Fix unit_sel/cache_sel checks 2019-12-05 15:37:41 +01:00
platforms powerpc/pseries/dlpar: Fix a missing check in dlpar_parse_cc_property() 2019-12-05 15:38:04 +01:00
purgatory License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sysdev powerpc/xive: Skip ioremap() of ESB pages for LSI interrupts 2019-12-17 20:39:42 +01:00
tools License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xmon powerpc: Avoid clang warnings around setjmp and longjmp 2019-12-17 20:39:57 +01:00
Kconfig powerpc/fsl: Add barrier_nospec implementation for NXP PowerPC Book3E 2019-04-03 06:25:13 +02:00
Kconfig.debug License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile powerpc: remove old GCC version checks 2019-05-16 19:42:29 +02:00
Makefile.postlink License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00