On Sun, Dec 15, 2019 at 06:12:57PM +0100, gregkh@xxxxxxxxxxxxxxxxxxx wrote:
The patch below does not apply to the 5.4-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <stable@xxxxxxxxxxxxxxx>. thanks, greg k-h ------------------ original commit in Linus's tree ------------------ From 552263456215ada7ee8700ce022d12b0cffe4802 Mon Sep 17 00:00:00 2001 From: Vincenzo Frascino <vincenzo.frascino@xxxxxxx> Date: Mon, 2 Dec 2019 07:57:29 +0000 Subject: [PATCH] powerpc: Fix vDSO clock_getres() 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: a7f290dad32e ("[PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernel") Cc: stable@xxxxxxxxxxxxxxx Signed-off-by: Vincenzo Frascino <vincenzo.frascino@xxxxxxx> Reviewed-by: Christophe Leroy <christophe.leroy@xxxxxx> Acked-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx> [chleroy: changed CLOCK_REALTIME_RES to CLOCK_HRTIMER_RES] Signed-off-by: Christophe Leroy <christophe.leroy@xxxxxx> Signed-off-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx> Link: https://lore.kernel.org/r/a55eca3a5e85233838c2349783bcb5164dae1d09.1575273217.git.christophe.leroy@xxxxxx
Adjusted for context changes due to missing 176ed98c8a76 ("y2038: vdso: powerpc: avoid timespec references") and queued for all branches. -- Thanks, Sasha