| 437054b1 | 15-Aug-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
vdso: Add struct __kernel_old_timeval forward declaration to gettime.h
The prototype of __vdso_gettimeofday() uses this struct. However gettime.h's own includes do not provide a definition for it.
vdso: Add struct __kernel_old_timeval forward declaration to gettime.h
The prototype of __vdso_gettimeofday() uses this struct. However gettime.h's own includes do not provide a definition for it.
Add a forward declaration, similar to other used structs.
Fixes: 42874e4eb35b ("arch: vdso: consolidate gettime prototypes") Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250815-vdso-sparc64-generic-2-v2-1-b5ff80672347@linutronix.de
show more ...
|
| cd3557a7 | 01-Jul-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
vdso/gettimeofday: Add support for auxiliary clocks
Expose the auxiliary clocks through the vDSO.
Architectures not using the generic vDSO time framework, namely SPARC64, are not supported.
Signed
vdso/gettimeofday: Add support for auxiliary clocks
Expose the auxiliary clocks through the vDSO.
Architectures not using the generic vDSO time framework, namely SPARC64, are not supported.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250701-vdso-auxclock-v1-12-df7d9f87b9b8@linutronix.de
show more ...
|
| 380b84e1 | 01-Jul-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
vdso/vsyscall: Update auxiliary clock data in the datapage
Expose the auxiliary clock data so it can be read from the vDSO.
Architectures not using the generic vDSO time framework, namely SPARC64,
vdso/vsyscall: Update auxiliary clock data in the datapage
Expose the auxiliary clock data so it can be read from the vDSO.
Architectures not using the generic vDSO time framework, namely SPARC64, are not supported.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250701-vdso-auxclock-v1-11-df7d9f87b9b8@linutronix.de
show more ...
|
| 9b7fc3f1 | 01-Jul-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
vdso: Introduce aux_clock_resolution_ns()
Move the constant resolution to a shared header, so the vDSO can use it and return it without going through a syscall.
Signed-off-by: Thomas Weißschuh <tho
vdso: Introduce aux_clock_resolution_ns()
Move the constant resolution to a shared header, so the vDSO can use it and return it without going through a syscall.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250701-vdso-auxclock-v1-10-df7d9f87b9b8@linutronix.de
show more ...
|
| 886653e3 | 03-Mar-2025 |
Anna-Maria Behnsen <anna-maria@linutronix.de> |
vdso: Rework struct vdso_time_data and introduce struct vdso_clock
To support multiple PTP clocks, the VDSO data structure needs to be reworked. All clock specific data will end up in struct vdso_cl
vdso: Rework struct vdso_time_data and introduce struct vdso_clock
To support multiple PTP clocks, the VDSO data structure needs to be reworked. All clock specific data will end up in struct vdso_clock and in struct vdso_time_data there will be an array of VDSO clocks.
Now that all preparatory changes are in place:
Split the clock related struct members into a separate struct vdso_clock. Make sure all users are aware, that vdso_time_data is no longer initialized as an array and vdso_clock is now the array inside vdso_data. Remove the vdso_clock define, which mapped it to vdso_time_data for the transition.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de> Signed-off-by: Nam Cao <namcao@linutronix.de> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250303-vdso-clock-v1-19-c1b5c69a166f@linutronix.de
show more ...
|
| 97a5a90c | 03-Mar-2025 |
Anna-Maria Behnsen <anna-maria@linutronix.de> |
vdso: Move architecture related data before basetime data
Architecture related vdso data is required in the fast path when reading CLOCK_MONOTONIC or CLOCK_REALTIME. At the moment, this information
vdso: Move architecture related data before basetime data
Architecture related vdso data is required in the fast path when reading CLOCK_MONOTONIC or CLOCK_REALTIME. At the moment, this information is located at the end of the vdso_time_data structure, which is a suboptimal cache layout.
Move the architecture specific VDSO data right before the basetime information, which is always required. This change does not have an impact on architectures with CONFIG_ARCH_HAS_VDSO_DATA=n. Architectures, which have it enabled, gain a better cache layout.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de> Signed-off-by: Nam Cao <namcao@linutronix.de> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250303-vdso-clock-v1-18-c1b5c69a166f@linutronix.de
show more ...
|
| e15bf9e3 | 03-Mar-2025 |
Anna-Maria Behnsen <anna-maria@linutronix.de> |
vdso/helpers: Prepare introduction of struct vdso_clock
To support multiple PTP clocks, the VDSO data structure needs to be reworked. All clock specific data will end up in struct vdso_clock and in
vdso/helpers: Prepare introduction of struct vdso_clock
To support multiple PTP clocks, the VDSO data structure needs to be reworked. All clock specific data will end up in struct vdso_clock and in struct vdso_time_data there will be an array of VDSO clocks. For now, vdso_clock is simply a define which maps vdso_clock to vdso_time_data.
Prepare all functions which need the pointer to the vdso_clock array to work well after the structures get reworked. Replace the struct vdso_time_data pointer with a struct vdso_clock pointer where applicable.
No functional change.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de> Signed-off-by: Nam Cao <namcao@linutronix.de> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250303-vdso-clock-v1-5-c1b5c69a166f@linutronix.de
show more ...
|
| a05f14de | 03-Mar-2025 |
Anna-Maria Behnsen <anna-maria@linutronix.de> |
vdso/datapage: Define vdso_clock to prepare for multiple PTP clocks
Multiple PTP clocks, which are independent of timekeeping, are required for systems, which utilize PTP for synchronizing e.g. auto
vdso/datapage: Define vdso_clock to prepare for multiple PTP clocks
Multiple PTP clocks, which are independent of timekeeping, are required for systems, which utilize PTP for synchronizing e.g. automation systems independent of clock TAI.
PTP clocks are slow to access, but applications require fast access to the relevant time similar to the regular timekeeping relevant clocks.
To prepare for that the VDSO data representation must be reworked. For transition to the new structure of the vdso, add a define which maps vdso_clock to vdso_data. This will be removed when all users are updated step by step.
No functional change.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de> Signed-off-by: Nam Cao <namcao@linutronix.de> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250303-vdso-clock-v1-4-c1b5c69a166f@linutronix.de
show more ...
|
| fa8152ca | 03-Mar-2025 |
Anna-Maria Behnsen <anna-maria@linutronix.de> |
vdso: Make vdso_time_data cacheline aligned
vdso_time_data is not cacheline aligned at the moment. When instantiating an array, the start of the second array member is not cache line aligned.
This
vdso: Make vdso_time_data cacheline aligned
vdso_time_data is not cacheline aligned at the moment. When instantiating an array, the start of the second array member is not cache line aligned.
This increases the number of the required cache lines which needs to be read when handling e.g. CLOCK_MONOTONIC_RAW, because the data spawns an extra cache line if the previous data does not end at a cache line boundary.
Therefore make struct vdso_time_data cacheline aligned.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de> Signed-off-by: Nam Cao <namcao@linutronix.de> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250303-vdso-clock-v1-3-c1b5c69a166f@linutronix.de
show more ...
|
| 365841e1 | 04-Feb-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
vdso: Add generic architecture-specific data storage
Some architectures need to expose architecture-specific data to the vDSO.
Enable the generic vDSO storage mechanism to both store and map this d
vdso: Add generic architecture-specific data storage
Some architectures need to expose architecture-specific data to the vDSO.
Enable the generic vDSO storage mechanism to both store and map this data. Some architectures require more than a single page, like LoongArch, so prepare for that usecase, too.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250204-vdso-store-rng-v3-7-13a4669dfc8c@linutronix.de
show more ...
|
| 51d6ca37 | 04-Feb-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
vdso: Add generic random data storage
Extend the generic vDSO data storage with a page for the random state data. The random state data is stored in a dedicated page, as the existing storage page is
vdso: Add generic random data storage
Extend the generic vDSO data storage with a page for the random state data. The random state data is stored in a dedicated page, as the existing storage page is only meant for time-related, time-namespace-aware data. This simplifies to access logic to not need to handle time namespaces anymore and also frees up more space in the time-related page.
In case further generic vDSO data store is required it can be added to the random state page.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250204-vdso-store-rng-v3-6-13a4669dfc8c@linutronix.de
show more ...
|
| df7fcbef | 04-Feb-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
vdso: Add generic time data storage
Historically each architecture defined their own way to store the vDSO data page. Add a generic mechanism to provide storage for that page.
Furthermore this gene
vdso: Add generic time data storage
Historically each architecture defined their own way to store the vDSO data page. Add a generic mechanism to provide storage for that page.
Furthermore this generic storage will be extended to also provide uniform storage for *non*-time-related data, like the random state or architecture-specific data. These will have their own pages and data structures, so rename 'vdso_data' into 'vdso_time_data' to make that split clear from the name.
Also introduce a new consistent naming scheme for the symbols related to the vDSO, which makes it clear if the symbol is accessible from userspace or kernel space and the type of data behind the symbol.
The generic fault handler contains an optimization to prefault the vvar page when the timens page is accessed. This was lifted from s390 and x86.
Co-developed-by: Nam Cao <namcao@linutronix.de> Signed-off-by: Nam Cao <namcao@linutronix.de> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250204-vdso-store-rng-v3-5-13a4669dfc8c@linutronix.de
show more ...
|