]> git.baikalelectronics.ru Git - kernel.git/commit
nds32: Fix vDSO clock_getres()
authorVincenzo Frascino <vincenzo.frascino@arm.com>
Mon, 1 Apr 2019 11:51:51 +0000 (12:51 +0100)
committerGreentime Hu <greentime@andestech.com>
Thu, 16 May 2019 07:07:08 +0000 (15:07 +0800)
commit94c8e1e898f0c66c4391a0eea64ce365ae2f7c3f
tree165b6a5c5fa21f59a9d89724ae24573d16f106f7
parentd7d29fd97c2c08bee6101ffca2e994fca73465cd
nds32: 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 nds32 vdso implementation of clock_getres keeping a copy of
hrtimer_resolution in vdso data and using that directly.

Cc: Greentime Hu <green.hu@gmail.com>
Cc: Vincent Chen <deanbo422@gmail.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Greentime Hu <greentime@andestech.com>
arch/nds32/include/asm/vdso_datapage.h
arch/nds32/kernel/vdso.c
arch/nds32/kernel/vdso/gettimeofday.c