Re: [RFC, PATCH] HSI: cmt_speech: fix timestamp interface

From: Arnd Bergmann
Date: Fri Apr 10 2015 - 16:11:57 EST

On Friday 10 April 2015 15:36:10 Sebastian Reichel wrote:
> > - The layout is incompatible between 32-bit and 64-bit user
> > space, because of the size differences in 'struct timespec'.
> > This means that the driver can not work when used with 32-bit
> > user space on a 64-bit kernel.
> >
> > - As there are plans to change 32-bit user space to use
> > a 64-bit time_t type in the future, it will also be
> > incompatible with new 32-bit user space.
> >
> > As the driver is not yet widely used, now would be a good time
> > to change it to just use a 64-bit nanosecond value, which also
> > happens to be more efficient. In order to make the layout
> > non-ambiguous, we have to also add extra padding so the 64-bit
> > value is naturally aligned.
> >
> > The change requires the respective update to user space tools
> > using it. If that is for some reason not possible any more,
> > another solution would be to replace the timespec structure
> > with two __u32 values to avoid incompatibilities later.
> >
> > Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> I think updating to two __u32 values is the better solution here.
> While the driver is new in the mainline kernel it has been used
> for multiple years downstream in the Maemo/MeeGo/Mer communities
> and I would prefer to keep userspace compatibility.

Ok. You still need to update that userspace to the new ABI in order
to support compiling on 64-bit machines and on future arm32 with
64-bit time_t, but existing binaries will continue to run.

Can you (or someone on Cc) prepare a patch for this?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at