lkml.org 
[lkml]   [2018]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] [RESEND] [media] omap3isp: support 64-bit version of omap3isp_stat_data
On Thu, May 3, 2018 at 8:56 AM, Sakari Ailus <sakari.ailus@iki.fi> wrote:
> On Wed, Apr 25, 2018 at 11:30:10PM +0200, Arnd Bergmann wrote:
>> @@ -165,7 +167,14 @@ struct omap3isp_h3a_aewb_config {
>> * @config_counter: Number of the configuration associated with the data.
>> */
>> struct omap3isp_stat_data {
>> +#ifdef __KERNEL__
>> + struct {
>> + __s64 tv_sec;
>> + __s64 tv_usec;
>
> Any particular reason for __s64 here instead of e.g. long or __s32? Kernel
> appears to use long in the timespec64 definition.

The user space 'timeval' definition is 16 bytes wide, with the layout
designed to be compatible between 32-bit and 64-bit, so it has to be like
this to match what user spaces sees with the old header files and a new
libc.

We don't yet know what the exact definition of timeval will be in all
libc implementations, but if they have a 32-bit tv_user field, it needs
padding next to it so the lower 32 bits are in the same place as they
would be using that 64-bit field I used.

Arnd

\
 
 \ /
  Last update: 2018-05-04 00:08    [W:2.483 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site