Hi Alistair, > On Thu, Jan 2, 2020 at 4:28 AM Arnd Bergmann wrote: > > > > On Thu, Jan 2, 2020 at 1:08 PM Lukasz Majewski > > wrote: > > > > On Mon, Dec 30, 2019 at 10:22 PM Alistair Francis > > > > wrote: > > > > > On Mon, Dec 30, 2019 at 12:11 PM Arnd Bergmann > > > > > wrote: > > > > I don't think it's > > > > fundamentally different from the other system calls that he has > > > > converted already to work with time64 callers. > > > > > > I'm not aware of any RV32 specifics, but it seems to me that it > > > would be appropriate to use the 64 bit version of struct > > > __itimerspec64 in glibc - as for example in the conversion patch > > > from [1]. > > > > What I mean is that rv32 otherwise does not convert between time32 > > and time64 interfaces because it always uses the time64 version, > > so unlike the others, there is probably no helper to convert between > > the timeval formats either. > > I have some patches prepared that will convert a 64-bit time_t to > 32-bit for the required syscalls. It's generic for 32-bit archs, but > will only apply when __TIMESIZE == 64. > > I'll send an RFC out with the RV32 patches soon and then send patches > when the 2.32 merge window opens up. Great. Thanks :-) > > > Alistair > > > > > > As it was already mentioned - those calls set the time to be > > > decremented and do not operate on "absolute" time values. > > > Hence, I think that it would be good enough (for now?) to use 32 > > > bit API wrapped into 64 bit internal glibc values and just return > > > errors when somebody wants to set timer relative expiration time > > > to overflow time_t on 32 bit archs (arm,rv32). > > > > Yes, that's the idea. The kernel already limits the range to 64-bit > > nanoseconds because of its timer implementation, so truncating it > > to 32-bit seconds does not change the behavior either. > > > > > Arnd, am I correct that the struct itimerval to > > > __kernel_old_itimerval conversion patch can be found here [2]? > > > > Yes, that's right. This patch only changes the in-kernel > > implementation as a step to removing the timeval definition from > > the kernel's uapi headers, it does not change the behavior at all. > > > > Arnd Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de