aboutsummaryrefslogtreecommitdiffstats
path: root/arch/nds32/kernel/vdso/gettimeofday.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-05-17 10:17:29 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-05-17 10:17:29 -0700
commit4489da7183099f569a7d3dd819c975073c04bc72 (patch)
tree79d4c1f337467108ed6cdbe95179ba7494040197 /arch/nds32/kernel/vdso/gettimeofday.c
parentMerge tag 's390-5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux (diff)
parentnds32: Fix vDSO clock_getres() (diff)
downloadlinux-dev-4489da7183099f569a7d3dd819c975073c04bc72.tar.xz
linux-dev-4489da7183099f569a7d3dd819c975073c04bc72.zip
Merge tag 'nds32-for-linus-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/greentime/linux
Pull nds32 updates from Greentime Hu: - Clean up codes and Makefile - Fix a vDSO bug - Remove useless functions/header files - Update git repo path in MAINTAINERS * tag 'nds32-for-linus-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/greentime/linux: nds32: Fix vDSO clock_getres() MAINTAINERS: update nds32 git repo path nds32: don't export low-level cache flushing routines arch: nds32: Kconfig: pedantic formatting nds32: fix semicolon code style issue nds32: vdso: drop unnecessary cc-ldoption nds32: remove unused generic-y += cmpxchg-local.h nds32: Use the correct style for SPDX License Identifier nds32: remove __virt_to_bus and __bus_to_virt nds32: vdso: fix and clean-up Makefile nds32: add vmlinux.lds and vdso.so to .gitignore nds32: ex-exit: Remove unneeded need_resched() loop nds32/io: Remove useless definition of mmiowb() nds32: Removed unused thread flag TIF_USEDFPU
Diffstat (limited to 'arch/nds32/kernel/vdso/gettimeofday.c')
-rw-r--r--arch/nds32/kernel/vdso/gettimeofday.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/nds32/kernel/vdso/gettimeofday.c b/arch/nds32/kernel/vdso/gettimeofday.c
index 038721af40e3..b02581891c33 100644
--- a/arch/nds32/kernel/vdso/gettimeofday.c
+++ b/arch/nds32/kernel/vdso/gettimeofday.c
@@ -208,6 +208,8 @@ static notrace int clock_getres_fallback(clockid_t _clk_id,
notrace int __vdso_clock_getres(clockid_t clk_id, struct timespec *res)
{
+ struct vdso_data *vdata = __get_datapage();
+
if (res == NULL)
return 0;
switch (clk_id) {
@@ -215,7 +217,7 @@ notrace int __vdso_clock_getres(clockid_t clk_id, struct timespec *res)
case CLOCK_MONOTONIC:
case CLOCK_MONOTONIC_RAW:
res->tv_sec = 0;
- res->tv_nsec = CLOCK_REALTIME_RES;
+ res->tv_nsec = vdata->hrtimer_res;
break;
case CLOCK_REALTIME_COARSE:
case CLOCK_MONOTONIC_COARSE: