From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Adaptec OEM Raid Solutions <aacraid@microsemi.com>,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Finn Thain <fthain@telegraphics.com.au>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [v2] scsi: ips: fix firmware timestamps for 32-bit
Date: Fri, 20 Apr 2018 19:38:11 -0400 [thread overview]
Message-ID: <yq1wox1fnz0.fsf@oracle.com> (raw)
In-Reply-To: <20180420160459.3621883-1-arnd@arndb.de> (Arnd Bergmann's message of "Fri, 20 Apr 2018 18:04:40 +0200")
Arnd,
> do_gettimeofday() is deprecated since it will stop working in 2038 on
> 32-bit platforms, leading to incorrect times passed to the firmware.
> On 64-bit platforms the current code appears to be fine, as the
> calculation passes an 8-bit century number into the firmware that can
> represent times long in the future (possibly until 25599).
>
> Using ktime_get_real_seconds() to get a 64-bit seconds value and
> time64_to_tm() to convert it into the firmware format greatly
> simplifies the ips timekeeping code, makes 32-bit and 64-bit behave
> the same way here, and gets us closer to removing the deprecated
> interfaces.
Applied to 4.18/scsi-queue, thanks!
--
Martin K. Petersen Oracle Linux Engineering
prev parent reply other threads:[~2018-04-20 23:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-20 16:04 [PATCH] [v2] scsi: ips: fix firmware timestamps for 32-bit Arnd Bergmann
2018-04-20 23:38 ` Martin K. Petersen [this message]
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=yq1wox1fnz0.fsf@oracle.com \
--to=martin.petersen@oracle.com \
--cc=aacraid@microsemi.com \
--cc=arnd@arndb.de \
--cc=fthain@telegraphics.com.au \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).