Re: [RFC PATCH v3 08/12] lib: vdso: allow arches to provide vdso data pointer

2020-01-16 Thread Andy Lutomirski
On Thu, Jan 16, 2020 at 2:35 AM Thomas Gleixner wrote: > > static __maybe_unused int > __cvdso_data_clock_gettime(clockid_t clock, struct __kernel_timespec *ts, >const struct vdso_data *vd) > { > . > } > > static __maybe_unused int > __cvdso_clock_gettime(cl

Re: [RFC PATCH v3 08/12] lib: vdso: allow arches to provide vdso data pointer

2020-01-16 Thread Thomas Gleixner
Christophe Leroy writes: > Le 15/01/2020 à 07:15, Christophe Leroy a écrit : > From your point of view, what should I do: > A/ __arch_get_vdso_data() handled entirely at arch level and arches > handing over the vdso data pointer to generic C VDSO functions all the > time (as in my v2 series) ?

Re: [RFC PATCH v3 08/12] lib: vdso: allow arches to provide vdso data pointer

2020-01-16 Thread Christophe Leroy
Thomas, Andy, Le 15/01/2020 à 07:15, Christophe Leroy a écrit : Le 15/01/2020 à 00:06, Thomas Gleixner a écrit : Christophe Leroy writes:   static __maybe_unused int +#ifdef VDSO_GETS_VD_PTR_FROM_ARCH +__cvdso_clock_gettime_common(const struct vdso_data *vd, clockid_t clock, +

Re: [RFC PATCH v3 08/12] lib: vdso: allow arches to provide vdso data pointer

2020-01-14 Thread Christophe Leroy
Le 15/01/2020 à 00:06, Thomas Gleixner a écrit : Christophe Leroy writes: static __maybe_unused int +#ifdef VDSO_GETS_VD_PTR_FROM_ARCH +__cvdso_clock_gettime_common(const struct vdso_data *vd, clockid_t clock, + struct __kernel_timespec *ts) +{ +#else __cvdso_clock

Re: [RFC PATCH v3 08/12] lib: vdso: allow arches to provide vdso data pointer

2020-01-14 Thread Thomas Gleixner
Christophe Leroy writes: > > static __maybe_unused int > +#ifdef VDSO_GETS_VD_PTR_FROM_ARCH > +__cvdso_clock_gettime_common(const struct vdso_data *vd, clockid_t clock, > + struct __kernel_timespec *ts) > +{ > +#else > __cvdso_clock_gettime_common(clockid_t clock, struct __ke

[RFC PATCH v3 08/12] lib: vdso: allow arches to provide vdso data pointer

2020-01-13 Thread Christophe Leroy
On powerpc, __arch_get_vdso_data() clobbers the link register, requiring the caller to save it. As the parent function already has to set a stack frame and saves the link register before calling the C vdso function, retriving the vdso data pointer there is lighter. Give arches the opportunity to