FROMLIST: [PATCH v5 11/12] lib: vdso: Add support for CLOCK_BOOTTIME
[GitHub/LineageOS/G12/android_kernel_amlogic_linux-4.9.git] / arch / arm / include / asm / vdso_datapage.h
index 9be259442fca011464a1dc001a2f56b728d815ff..1adfb2daac3aff1a4b5c5f82079762460dc2d0a6 100644 (file)
 
 #include <asm/page.h>
 
+#ifndef _VDSO_WTM_CLOCK_SEC_T
+#define _VDSO_WTM_CLOCK_SEC_T
+typedef u32 vdso_wtm_clock_nsec_t;
+#endif
+
+#ifndef _VDSO_XTIME_CLOCK_SEC_T
+#define _VDSO_XTIME_CLOCK_SEC_T
+typedef u32 vdso_xtime_clock_sec_t;
+#endif
+
+#ifndef _VDSO_RAW_TIME_SEC_T
+#define _VDSO_RAW_TIME_SEC_T
+typedef u32 vdso_raw_time_sec_t;
+#endif
+
 /* Try to be cache-friendly on systems that don't implement the
  * generic timer: fit the unconditionally updated fields in the first
  * 32 bytes.
  */
 struct vdso_data {
-       u32 seq_count;          /* sequence count - odd during updates */
-       u16 tk_is_cntvct;       /* fall back to syscall if false */
+       u32 tb_seq_count;       /* sequence count - odd during updates */
+       u16 use_syscall;        /* fall back to syscall if true */
        u16 cs_shift;           /* clocksource shift */
        u32 xtime_coarse_sec;   /* coarse time */
        u32 xtime_coarse_nsec;
 
-       u32 wtm_clock_sec;      /* wall to monotonic offset */
-       u32 wtm_clock_nsec;
-       u32 xtime_clock_sec;    /* CLOCK_REALTIME - seconds */
-       u32 cs_mult;            /* clocksource multiplier */
+       /* wall to monotonic offset */
+       u32 wtm_clock_sec;
+       vdso_wtm_clock_nsec_t   wtm_clock_nsec;
+       /* CLOCK_REALTIME - seconds */
+       vdso_xtime_clock_sec_t  xtime_clock_sec;
+       u32 cs_mono_mult;       /* clocksource multiplier */
 
        u64 cs_cycle_last;      /* last cycle value */
        u64 cs_mask;            /* clocksource mask */
@@ -46,6 +63,13 @@ struct vdso_data {
        u64 xtime_clock_snsec;  /* CLOCK_REALTIME sub-ns base */
        u32 tz_minuteswest;     /* timezone info for gettimeofday(2) */
        u32 tz_dsttime;
+
+       u64 btm_nsec;           /* monotonic to boot time */
+       /* Raw clocksource multipler */
+       u32 cs_raw_mult;
+       /* Raw time */
+       vdso_raw_time_sec_t raw_time_sec;
+       u32 raw_time_nsec;
 };
 
 union vdso_data_store {