lkml.org 
[lkml]   [2017]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 05/12] arm: vdso: do calculations outside reader loops
On Mon, Oct 30, 2017 at 01:27:22PM -0700, Mark Salyzyn wrote:
> Thanks for the review, am taking all the points into consideration.
>
> On 10/30/2017 07:15 AM, Mark Rutland wrote:
> > > +
> > > + typeof(((struct vdso_data *)vd)->xtime_clock_sec) sec;
> > Why do we need to do this typeof() magic?
> >
> > Can't we settle on a consistent type across arches, or have a typedef in
> > a header?
>
> Would you accept 'because I do not want to standardize the sizes yet'?

Well, a typedef would solve that issue. e.g. each arch can have:

typedef u64 vdso_xtime_sec_t;

... or

typedef u32 vdso_xtime_sec_t;

... in headers for native/compat, and the above can be:

vdso_xtime_sec_t sec

... with the same type in the relevant struct.

That way the type can differ per arch. If we want to do something more
complicated later, we can always rework the code.

Thanks,
Mark.

\
 
 \ /
  Last update: 2017-10-31 11:37    [W:0.042 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site