diff options
author | Sven Schnelle <svens@linux.ibm.com> | 2020-08-04 17:01:22 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-08-06 10:57:30 +0200 |
commit | d60d7de3e16d7cea998bad17d87366a359625894 (patch) | |
tree | a9c7d08722342ea8b4f6588bd5cce710d7ae219a /include/vdso/datapage.h | |
parent | 19d0070a2792181f79df01277fe00b83b9f7eda7 (diff) |
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
Diffstat (limited to 'include/vdso/datapage.h')
-rw-r--r-- | include/vdso/datapage.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h index ee810cae4e1e..73eb622e7663 100644 --- a/include/vdso/datapage.h +++ b/include/vdso/datapage.h @@ -19,6 +19,12 @@ #include <vdso/time32.h> #include <vdso/time64.h> +#ifdef CONFIG_ARCH_HAS_VDSO_DATA +#include <asm/vdso/data.h> +#else +struct arch_vdso_data {}; +#endif + #define VDSO_BASES (CLOCK_TAI + 1) #define VDSO_HRES (BIT(CLOCK_REALTIME) | \ BIT(CLOCK_MONOTONIC) | \ @@ -64,6 +70,8 @@ struct vdso_timestamp { * @tz_dsttime: type of DST correction * @hrtimer_res: hrtimer resolution * @__unused: unused + * @arch_data: architecture specific data (optional, defaults + * to an empty struct) * * vdso_data will be accessed by 64 bit and compat code at the same time * so we should be careful before modifying this structure. @@ -97,6 +105,8 @@ struct vdso_data { s32 tz_dsttime; u32 hrtimer_res; u32 __unused; + + struct arch_vdso_data arch_data; }; /* |