Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

lib/vdso: Allow to add architecture-specific vdso data

The initial assumption that all VDSO related data can be completely generic
does not hold. S390 needs architecture specific storage to access the clock
steering information.

Add struct arch_vdso_data to the vdso data struct. For architectures which
do not need extra data this defaults to an empty struct. Architectures
which require it, enable CONFIG_ARCH_HAS_VDSO_DATA and provide their
specific struct in asm/vdso/data.h.

Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200804150124.41692-2-svens@linux.ibm.com

authored by

Sven Schnelle and committed by
Thomas Gleixner
d60d7de3 19d0070a

+13
+3
arch/Kconfig
··· 975 975 entries at 4000, 5000 and 6000 locations. This option turns on syscall 976 976 related optimizations for a given architecture. 977 977 978 + config ARCH_HAS_VDSO_DATA 979 + bool 980 + 978 981 source "kernel/gcov/Kconfig" 979 982 980 983 source "scripts/gcc-plugins/Kconfig"
+10
include/vdso/datapage.h
··· 19 19 #include <vdso/time32.h> 20 20 #include <vdso/time64.h> 21 21 22 + #ifdef CONFIG_ARCH_HAS_VDSO_DATA 23 + #include <asm/vdso/data.h> 24 + #else 25 + struct arch_vdso_data {}; 26 + #endif 27 + 22 28 #define VDSO_BASES (CLOCK_TAI + 1) 23 29 #define VDSO_HRES (BIT(CLOCK_REALTIME) | \ 24 30 BIT(CLOCK_MONOTONIC) | \ ··· 70 64 * @tz_dsttime: type of DST correction 71 65 * @hrtimer_res: hrtimer resolution 72 66 * @__unused: unused 67 + * @arch_data: architecture specific data (optional, defaults 68 + * to an empty struct) 73 69 * 74 70 * vdso_data will be accessed by 64 bit and compat code at the same time 75 71 * so we should be careful before modifying this structure. ··· 105 97 s32 tz_dsttime; 106 98 u32 hrtimer_res; 107 99 u32 __unused; 100 + 101 + struct arch_vdso_data arch_data; 108 102 }; 109 103 110 104 /*