]> git.baikalelectronics.ru Git - kernel.git/commit
riscv/vdso: Add support for time namespaces
authorTong Tiangen <tongtiangen@huawei.com>
Wed, 1 Sep 2021 03:20:25 +0000 (03:20 +0000)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Mon, 4 Oct 2021 21:16:43 +0000 (14:16 -0700)
commitf6ee34e277b6e1ca6dbbc5462c728e8bac8573e3
tree179c27dc6f2ba11b2b19710dc347e1dd33d3c3a4
parent40233da707481c13525db80a98c95de78761f96c
riscv/vdso: Add support for time namespaces

Implement generic vdso time namespace support which also enables time
namespaces for riscv. This is quite similar to what arm64 does.

selftest/timens test result:
  1..10
  ok 1 Passed for CLOCK_BOOTTIME (syscall)
  ok 2 Passed for CLOCK_BOOTTIME (vdso)
  ok 3 # SKIP CLOCK_BOOTTIME_ALARM isn't supported
  ok 4 # SKIP CLOCK_BOOTTIME_ALARM isn't supported
  ok 5 Passed for CLOCK_MONOTONIC (syscall)
  ok 6 Passed for CLOCK_MONOTONIC (vdso)
  ok 7 Passed for CLOCK_MONOTONIC_COARSE (syscall)
  ok 8 Passed for CLOCK_MONOTONIC_COARSE (vdso)
  ok 9 Passed for CLOCK_MONOTONIC_RAW (syscall)
  ok 10 Passed for CLOCK_MONOTONIC_RAW (vdso)
  # Totals: pass:8 fail:0 xfail:0 xpass:0 skip:2 error:0

Signed-off-by: Tong Tiangen <tongtiangen@huawei.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/Kconfig
arch/riscv/include/asm/page.h
arch/riscv/include/asm/vdso.h
arch/riscv/include/asm/vdso/gettimeofday.h
arch/riscv/kernel/vdso.c
arch/riscv/kernel/vdso/vdso.lds.S