Skip to content

[PW_SID:995511] vdso: Various cleanups - #837

Closed
linux-riscv-bot wants to merge 11 commits into
workflow__riscv__fixesfrom
pw995511
Closed

[PW_SID:995511] vdso: Various cleanups#837
linux-riscv-bot wants to merge 11 commits into
workflow__riscv__fixesfrom
pw995511

Conversation

@linux-riscv-bot

Copy link
Copy Markdown

PR for series 995511 applied to workflow__riscv__fixes

Name: vdso: Various cleanups
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=995511
Version: 1

t-8ch and others added 11 commits August 26, 2025 08:24
When the generic vDSO does not provide time functions, as for example on
riscv32, then the time data store is not necessary.

Avoid allocating these time data pages when not used.

Fixes: df7fcbe ("vdso: Add generic time data storage")
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The cntvct_ok variable has not had any external user since commit
c7a1810 ("lib/vdso: Avoid highres update if clocksource is not
VDSO capable").

It also only has one user in vdso.c, once during init, so rather than
having the caller of patch_vdso() initialize cntvct_ok, just call
cntvct_functional() directly and avoid the global variable entirely.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The ENABLE_COMAPT_VDSO symbol is only used by arm64 and only for the
time-related functionality. There should be no new users, so it doesn't
need to be in the generic vDSO code.

Move the logic into arm64 architecture-specific code and replace the
explicit define by the standard '#ifdef __aarch64__'.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
All calls of these functions are already gated behind CONFIG_TIME_NS. The
compiler will already optimize them away if time namespaces are disabled.

Drop the unnecessary stubs.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The generic vDSO can be used without the time-related functionality.
In that case the generic update_vsyscall() from kernel/time/vsyscall.c
should not be built.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
On riscv32 the generic vDSO infrastructure is used but without its
time-related functionality. The kconfig logic to implement this
treats HAVE_GENERIC_VDSO as a synonym for GENERIC_GETTIMEOFDAY.
This works today due to some underlying issues in how the generic vDSO
library works. Some future cleanups will break this logic.

Restructure the kconfig logic, so HAVE_GENERIC_VDSO refers to the generic
library in general and GENERIC_GETTIMEOFDAY refers to its time-related
functionality.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
This configuration is never used.

Remove it.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
This configuration is never used.

Remove it.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
All users of the generic vDSO library also use the generic vDSO datastore.

Remove the now unnecessary kconfig symbol.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
All architectures implementing time-related functionality in the vDSO are
using the generic vDSO library which handles time namespaces properly.

Remove the now unnecessary kconfig symbol.

Enables the use of time namespaces on architectures, which use the
generic vDSO but did not enable GENERIC_VDSO_TIME_NS, namely MIPS and arm.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
All architectures which want to implement getrandom() in the vDSO need to
use the generic vDSO library.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[01/11] vdso/datastore: Gate time data behind CONFIG_GENERIC_GETTIMEOFDAY"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 102.77 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[01/11] vdso/datastore: Gate time data behind CONFIG_GENERIC_GETTIMEOFDAY"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1106.58 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[01/11] vdso/datastore: Gate time data behind CONFIG_GENERIC_GETTIMEOFDAY"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1565.53 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[01/11] vdso/datastore: Gate time data behind CONFIG_GENERIC_GETTIMEOFDAY"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 21.02 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[01/11] vdso/datastore: Gate time data behind CONFIG_GENERIC_GETTIMEOFDAY"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.97 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[01/11] vdso/datastore: Gate time data behind CONFIG_GENERIC_GETTIMEOFDAY"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.77 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[01/11] vdso/datastore: Gate time data behind CONFIG_GENERIC_GETTIMEOFDAY"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 74.70 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[01/11] vdso/datastore: Gate time data behind CONFIG_GENERIC_GETTIMEOFDAY"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[01/11] vdso/datastore: Gate time data behind CONFIG_GENERIC_GETTIMEOFDAY"
kdoc
Desc: Detects for kdoc errors
Duration: 0.86 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[01/11] vdso/datastore: Gate time data behind CONFIG_GENERIC_GETTIMEOFDAY"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[01/11] vdso/datastore: Gate time data behind CONFIG_GENERIC_GETTIMEOFDAY"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.28 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[01/11] vdso/datastore: Gate time data behind CONFIG_GENERIC_GETTIMEOFDAY"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.31 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[02/11] ARM: VDSO: remove cntvct_ok global variable"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 102.62 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[02/11] ARM: VDSO: remove cntvct_ok global variable"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1021.51 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[02/11] ARM: VDSO: remove cntvct_ok global variable"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1318.30 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[02/11] ARM: VDSO: remove cntvct_ok global variable"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.66 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[02/11] ARM: VDSO: remove cntvct_ok global variable"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 22.24 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[02/11] ARM: VDSO: remove cntvct_ok global variable"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.94 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[02/11] ARM: VDSO: remove cntvct_ok global variable"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 74.89 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 9: "[09/11] vdso: Drop kconfig GENERIC_VDSO_DATA_STORE"
kdoc
Desc: Detects for kdoc errors
Duration: 0.88 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 9: "[09/11] vdso: Drop kconfig GENERIC_VDSO_DATA_STORE"
module-param
Desc: Detect module_param changes
Duration: 0.32 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 9: "[09/11] vdso: Drop kconfig GENERIC_VDSO_DATA_STORE"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 9: "[09/11] vdso: Drop kconfig GENERIC_VDSO_DATA_STORE"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.31 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 10: "[10/11] vdso: Drop kconfig GENERIC_VDSO_TIME_NS"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 103.36 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 10: "[10/11] vdso: Drop kconfig GENERIC_VDSO_TIME_NS"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1057.56 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 10: "[10/11] vdso: Drop kconfig GENERIC_VDSO_TIME_NS"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1362.95 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 10: "[10/11] vdso: Drop kconfig GENERIC_VDSO_TIME_NS"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.95 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 10: "[10/11] vdso: Drop kconfig GENERIC_VDSO_TIME_NS"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 22.14 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 10: "[10/11] vdso: Drop kconfig GENERIC_VDSO_TIME_NS"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 2.19 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 10: "[10/11] vdso: Drop kconfig GENERIC_VDSO_TIME_NS"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 74.15 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 10: "[10/11] vdso: Drop kconfig GENERIC_VDSO_TIME_NS"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 10: "[10/11] vdso: Drop kconfig GENERIC_VDSO_TIME_NS"
kdoc
Desc: Detects for kdoc errors
Duration: 0.88 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 10: "[10/11] vdso: Drop kconfig GENERIC_VDSO_TIME_NS"
module-param
Desc: Detect module_param changes
Duration: 0.28 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 10: "[10/11] vdso: Drop kconfig GENERIC_VDSO_TIME_NS"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.21 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 10: "[10/11] vdso: Drop kconfig GENERIC_VDSO_TIME_NS"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.29 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 11: "[11/11] vdso: Gate VDSO_GETRANDOM behind HAVE_GENERIC_VDSO"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 103.52 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 11: "[11/11] vdso: Gate VDSO_GETRANDOM behind HAVE_GENERIC_VDSO"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1031.18 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 11: "[11/11] vdso: Gate VDSO_GETRANDOM behind HAVE_GENERIC_VDSO"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1329.14 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 11: "[11/11] vdso: Gate VDSO_GETRANDOM behind HAVE_GENERIC_VDSO"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.89 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 11: "[11/11] vdso: Gate VDSO_GETRANDOM behind HAVE_GENERIC_VDSO"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.87 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 11: "[11/11] vdso: Gate VDSO_GETRANDOM behind HAVE_GENERIC_VDSO"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.65 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 11: "[11/11] vdso: Gate VDSO_GETRANDOM behind HAVE_GENERIC_VDSO"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 74.42 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 11: "[11/11] vdso: Gate VDSO_GETRANDOM behind HAVE_GENERIC_VDSO"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 11: "[11/11] vdso: Gate VDSO_GETRANDOM behind HAVE_GENERIC_VDSO"
kdoc
Desc: Detects for kdoc errors
Duration: 0.86 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 11: "[11/11] vdso: Gate VDSO_GETRANDOM behind HAVE_GENERIC_VDSO"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 11: "[11/11] vdso: Gate VDSO_GETRANDOM behind HAVE_GENERIC_VDSO"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 11: "[11/11] vdso: Gate VDSO_GETRANDOM behind HAVE_GENERIC_VDSO"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.32 seconds
Result: PASS

@linux-riscv-bot
linux-riscv-bot deleted the pw995511 branch September 3, 2025 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants