1
0
Fork 0
alistair23-linux/arch/powerpc/kernel/vdso64
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
..
.gitignore [POWERPC] Update .gitignore for new vdso generated files 2007-10-08 08:38:12 -05:00
Makefile powerpc/vdso: Drop unnecessary cc-ldoption 2019-05-01 10:49:58 +10:00
cacheflush.S powerpc: Allow 64bit VDSO __kernel_sync_dicache to work across ranges >4GB 2019-12-17 19:56:41 +01:00
datapage.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
getcpu.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
gettimeofday.S powerpc: Fix vDSO clock_getres() 2019-12-17 19:56:47 +01:00
note.S [PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernel 2005-11-11 22:25:39 +11:00
sigtramp.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
vdso64.lds.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vdso64_wrapper.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00