diff options
Diffstat (limited to 'include/vdso')
-rw-r--r-- | include/vdso/datapage.h | 8 | ||||
-rw-r--r-- | include/vdso/helpers.h | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h index 73eb622e76..c71ddb6d46 100644 --- a/include/vdso/datapage.h +++ b/include/vdso/datapage.h @@ -121,6 +121,14 @@ struct vdso_data { extern struct vdso_data _vdso_data[CS_BASES] __attribute__((visibility("hidden"))); extern struct vdso_data _timens_data[CS_BASES] __attribute__((visibility("hidden"))); +/** + * union vdso_data_store - Generic vDSO data page + */ +union vdso_data_store { + struct vdso_data data[CS_BASES]; + u8 page[1U << CONFIG_PAGE_SHIFT]; +}; + /* * The generic vDSO implementation requires that gettimeofday.h * provides: diff --git a/include/vdso/helpers.h b/include/vdso/helpers.h index 9a2af9fca4..7350114943 100644 --- a/include/vdso/helpers.h +++ b/include/vdso/helpers.h @@ -30,9 +30,9 @@ static __always_inline u32 vdso_read_retry(const struct vdso_data *vd, static __always_inline void vdso_write_begin(struct vdso_data *vd) { /* - * WRITE_ONCE it is required otherwise the compiler can validly tear + * WRITE_ONCE() is required otherwise the compiler can validly tear * updates to vd[x].seq and it is possible that the value seen by the - * reader it is inconsistent. + * reader is inconsistent. */ WRITE_ONCE(vd[CS_HRES_COARSE].seq, vd[CS_HRES_COARSE].seq + 1); WRITE_ONCE(vd[CS_RAW].seq, vd[CS_RAW].seq + 1); @@ -43,9 +43,9 @@ static __always_inline void vdso_write_end(struct vdso_data *vd) { smp_wmb(); /* - * WRITE_ONCE it is required otherwise the compiler can validly tear + * WRITE_ONCE() is required otherwise the compiler can validly tear * updates to vd[x].seq and it is possible that the value seen by the - * reader it is inconsistent. + * reader is inconsistent. */ WRITE_ONCE(vd[CS_HRES_COARSE].seq, vd[CS_HRES_COARSE].seq + 1); WRITE_ONCE(vd[CS_RAW].seq, vd[CS_RAW].seq + 1); |