Message ID | 20181129170530.37789-5-vincenzo.frascino@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Unify vDSOs across more architectures | expand |
On Thu, 29 Nov 2018, Vincenzo Frascino wrote: > Depending on the clocksource selected there can be supported a > different resolution hence we require a mask to be applied to the > time calculation. > > This patch exposes the mask in the datapage for Raw and NTP adjusted > clock. > > Cc: Arnd Bergmann <arnd@arndb.de> > Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com> > --- > include/vdso/datapage.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h > index d50a108afaed..0a7bdccf5773 100644 > --- a/include/vdso/datapage.h > +++ b/include/vdso/datapage.h > @@ -34,6 +34,8 @@ struct vdso_data { > __u64 wtm_clock_nsec; > __u64 btm_nsec; /* Monotonic to boot time */ > __u64 tai_sec; /* International Atomic Time */ > + __u64 cs_mono_mask; /* NTP-adjusted clocksource mask */ > + __u64 cs_raw_mask; /* Raw clocksource mask */ And why would they be different? The core timekeeper has them duplicated purely for access pattern optimization and simplicity. Thanks, tglx
On 29/11/2018 22:41, Thomas Gleixner wrote: > On Thu, 29 Nov 2018, Vincenzo Frascino wrote: > >> Depending on the clocksource selected there can be supported a >> different resolution hence we require a mask to be applied to the >> time calculation. >> >> This patch exposes the mask in the datapage for Raw and NTP adjusted >> clock. >> >> Cc: Arnd Bergmann <arnd@arndb.de> >> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com> >> --- >> include/vdso/datapage.h | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h >> index d50a108afaed..0a7bdccf5773 100644 >> --- a/include/vdso/datapage.h >> +++ b/include/vdso/datapage.h >> @@ -34,6 +34,8 @@ struct vdso_data { >> __u64 wtm_clock_nsec; >> __u64 btm_nsec; /* Monotonic to boot time */ >> __u64 tai_sec; /* International Atomic Time */ >> + __u64 cs_mono_mask; /* NTP-adjusted clocksource mask */ >> + __u64 cs_raw_mask; /* Raw clocksource mask */ > > And why would they be different? The core timekeeper has them duplicated > purely for access pattern optimization and simplicity. > As you pointed out I followed the pattern of core timekeeper, but looking at it after your comment, it seems obvious that one is enough. > Thanks, > > tglx >
diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h index d50a108afaed..0a7bdccf5773 100644 --- a/include/vdso/datapage.h +++ b/include/vdso/datapage.h @@ -34,6 +34,8 @@ struct vdso_data { __u64 wtm_clock_nsec; __u64 btm_nsec; /* Monotonic to boot time */ __u64 tai_sec; /* International Atomic Time */ + __u64 cs_mono_mask; /* NTP-adjusted clocksource mask */ + __u64 cs_raw_mask; /* Raw clocksource mask */ __u32 tb_seq_count; /* Timebase sequence counter */ __u32 cs_mono_mult; /* NTP-adjusted clocksource multiplier */ __u32 cs_shift; /* Clocksource shift (mono = raw) */
Depending on the clocksource selected there can be supported a different resolution hence we require a mask to be applied to the time calculation. This patch exposes the mask in the datapage for Raw and NTP adjusted clock. Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com> --- include/vdso/datapage.h | 2 ++ 1 file changed, 2 insertions(+)