All of lore.kernel.org
 help / color / mirror / Atom feed
From: chensong <chensong@kylinos.cn>
To: "florian.bezdeka@siemens.com" <florian.bezdeka@siemens.com>,
	"chensong@tj.kylinos.cn" <chensong@tj.kylinos.cn>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [PATCH] y2038: introduce new time representations at the boundary
Date: Thu, 4 Mar 2021 13:58:39 +0800	[thread overview]
Message-ID: <6040770F.4000405@kylinos.cn> (raw)
In-Reply-To: <ffa6da75a807470d49e15292e205f1c35c1993e6.camel@siemens.com>



On 2021年03月02日 21:43, florian.bezdeka--- via Xenomai wrote:
> On Tue, 2021-03-02 at 21:10 +0800, chensong wrote:
>> Florian $ Philippe,
>>
>> As the discussion in the mails 2021-02-21, we are going to replace
>> __user_old_timespec with __kernel_old_timespec to keep aligned with
>> upstream.
>
> Please note the y2038 related patches from Philippe located in the
> wip/dovetail branch of the Xenomai repository. That work has already
> been done.
>

Thanks, i was working on the xenomai-rpm, now i move to [1] branch 
wip/dovetail, is it correct?

[1]https://source.denx.de/Xenomai/xenomai.git
>>
>> This patch introduced their definitions, if you both agree, i will start
>> replacing __user_old_timespec and __user_old_timeval afterward.
>>
>> BR
>>
>> Song
>>
>> On 2021年03月02日 21:05, chensong wrote:
>>> Since timespec and timeval will be removed because of
>>> y2038 problem, we need to introduce new time representations at
>>> the kernel-user boundary and we also need to keep aligned with
>>> upstream at the same time.
>>>
>>> Therefore, we introduce:
>>> 1)__kernel_old_timeval
>>> 2)__kernel_old_timespec
>>> from upstream, their tv_sec are defined as long and as a result their width
>>> is able to adapt different arch automatically.
>>>
>>> Signed-off-by: chensong <chensong@tj.kylinos.cn>
>>> ---
>>>    include/cobalt/uapi/kernel/types.h | 15 +++++++++++++++
>>>    1 file changed, 15 insertions(+)
>>>
>>> diff --git a/include/cobalt/uapi/kernel/types.h b/include/cobalt/uapi/kernel/types.h
>>> index 2c931c2..8931d82 100644
>>> --- a/include/cobalt/uapi/kernel/types.h
>>> +++ b/include/cobalt/uapi/kernel/types.h
>>> @@ -20,6 +20,7 @@
>>>
>>>    #include <linux/types.h>
>>>    #include <cobalt/uapi/kernel/limits.h>
>>> +#include <asm-generic/xenomai/wrappers.h>
>>>
>>>    typedef __u64 xnticks_t;
>>>
>>> @@ -78,6 +79,20 @@ struct __user_old_timeval {
>>>    	long  tv_usec;
>>>    };
>>>
>>> +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,17,0)
>>> +struct __kernel_old_timeval {
>>> +	__kernel_long_t tv_sec;
>>> +	__kernel_long_t tv_usec;
>>> +};
>>> +#endif
>>> +
>>> +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,5,0)
>>> +struct __kernel_old_timespec {
>>> +	__kernel_old_time_t	tv_sec;		/* seconds */
>>> +	long			tv_nsec;	/* nanoseconds */
>>> +};
>>> +#endif
>>> +
>>>    /* Lifted from include/uapi/linux/timex.h. */
>>>    struct __user_old_timex {
>>>    	unsigned int modes;	/* mode selector */
>>>
>>
>>
>


  reply	other threads:[~2021-03-04  5:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-02 13:05 [PATCH] y2038: introduce new time representations at the boundary chensong
2021-03-02 13:10 ` chensong
2021-03-02 13:43   ` florian.bezdeka
2021-03-04  5:58     ` chensong [this message]
2021-03-04  9:00       ` florian.bezdeka
2021-03-04  9:24         ` chensong
2021-03-02 13:44 ` Philippe Gerum
2021-03-04  9:01   ` chensong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6040770F.4000405@kylinos.cn \
    --to=chensong@kylinos.cn \
    --cc=chensong@tj.kylinos.cn \
    --cc=florian.bezdeka@siemens.com \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.