* [PATCH 00/16] drivers: y2038 updates
@ 2019-11-08 21:32 Arnd Bergmann
2019-11-08 21:32 ` [PATCH 14/16] drm/msm: avoid using 'timespec' Arnd Bergmann
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2019-11-08 21:32 UTC (permalink / raw)
To: y2038
Cc: linux-kernel, Arnd Bergmann, jdike, richard, jcmvbkbc, stefanr,
l.stach, linux+etnaviv, christian.gmeiner, airlied, daniel,
robdclark, sean, valdis.kletnieks, gregkh, ccaulfie, teigland,
hirofumi, jack, davem, edumazet, pablo, kadlec, fw, willemb,
viro, rfontana, tglx, linux-um, linux1394-devel, etnaviv,
dri-devel, linux-arm-msm, freedreno, devel, cluster-devel,
linux-fsdevel, netdev, netfilter-devel, coreteam
These are updates to devidce drivers and file systems that for some
reason or another were not included in the kernel in the previous
y2038 series.
I've gone through all users of time_t again to make sure the
kernel is in a long-term maintainable state.
Posting these as a series for better organization, but each change
here is applicable standalone.
Please merge, review, ack/nack etc as you see fit. My plan is to
include any patches that don't get a reply this time around in
a future pull request, probably for linux-5.6.
As mentioned before, the full series of 90 patches is available at
https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/log/?h=y2038-endgame
Arnd
Arnd Bergmann (16):
staging: exfat: use prandom_u32() for i_generation
fat: use prandom_u32() for i_generation
net: sock: use __kernel_old_timespec instead of timespec
dlm: use SO_SNDTIMEO_NEW instead of SO_SNDTIMEO_OLD
xtensa: ISS: avoid struct timeval
um: ubd: use 64-bit time_t where possible
acct: stop using get_seconds()
tsacct: add 64-bit btime field
netfilter: nft_meta: use 64-bit time arithmetic
packet: clarify timestamp overflow
quota: avoid time_t in v1_disk_dqblk definition
hostfs: pass 64-bit timestamps to/from user space
hfs/hfsplus: use 64-bit inode timestamps
drm/msm: avoid using 'timespec'
drm/etnaviv: use ktime_t for timeouts
firewire: ohci: stop using get_seconds() for BUS_TIME
arch/um/drivers/cow.h | 2 +-
arch/um/drivers/cow_user.c | 7 +++--
arch/um/drivers/ubd_kern.c | 10 +++----
arch/um/include/shared/os.h | 2 +-
arch/um/os-Linux/file.c | 2 +-
.../platforms/iss/include/platform/simcall.h | 4 +--
drivers/firewire/ohci.c | 2 +-
drivers/gpu/drm/etnaviv/etnaviv_drv.c | 19 ++++++-------
drivers/gpu/drm/etnaviv/etnaviv_drv.h | 21 ++++++--------
drivers/gpu/drm/etnaviv/etnaviv_gem.c | 5 ++--
drivers/gpu/drm/etnaviv/etnaviv_gem.h | 2 +-
drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 4 +--
drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 4 +--
drivers/gpu/drm/msm/msm_drv.h | 3 +-
drivers/staging/exfat/exfat_super.c | 4 +--
fs/dlm/lowcomms.c | 6 ++--
fs/fat/inode.c | 3 +-
fs/hfs/hfs_fs.h | 26 +++++++++++++----
fs/hfs/inode.c | 4 +--
fs/hfsplus/hfsplus_fs.h | 26 +++++++++++++----
fs/hfsplus/inode.c | 12 ++++----
fs/hostfs/hostfs.h | 22 +++++++++------
fs/hostfs/hostfs_kern.c | 15 ++++++----
fs/quota/quotaio_v1.h | 6 ++--
include/linux/skbuff.h | 7 +++--
include/uapi/linux/acct.h | 2 ++
include/uapi/linux/taskstats.h | 6 +++-
kernel/acct.c | 4 ++-
kernel/tsacct.c | 9 ++++--
net/compat.c | 2 +-
net/ipv4/tcp.c | 28 +++++++++++--------
net/netfilter/nft_meta.c | 10 +++----
net/packet/af_packet.c | 27 +++++++++++-------
net/socket.c | 2 +-
34 files changed, 184 insertions(+), 124 deletions(-)
--
2.20.0
Cc: jdike@addtoit.com
Cc: richard@nod.at
Cc: jcmvbkbc@gmail.com
Cc: stefanr@s5r6.in-berlin.de
Cc: l.stach@pengutronix.de
Cc: linux+etnaviv@armlinux.org.uk
Cc: christian.gmeiner@gmail.com
Cc: airlied@linux.ie
Cc: daniel@ffwll.ch
Cc: robdclark@gmail.com
Cc: sean@poorly.run
Cc: valdis.kletnieks@vt.edu
Cc: gregkh@linuxfoundation.org
Cc: ccaulfie@redhat.com
Cc: teigland@redhat.com
Cc: hirofumi@mail.parknet.co.jp
Cc: jack@suse.com
Cc: davem@davemloft.net
Cc: edumazet@google.com
Cc: pablo@netfilter.org
Cc: kadlec@netfilter.org
Cc: fw@strlen.de
Cc: willemb@google.com
Cc: viro@zeniv.linux.org.uk
Cc: rfontana@redhat.com
Cc: tglx@linutronix.de
Cc: linux-um@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: linux1394-devel@lists.sourceforge.net
Cc: etnaviv@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org>
Cc: linux-arm-msm@vger.kernel.org>
Cc: freedreno@lists.freedesktop.org>
Cc: devel@driverdev.osuosl.org>
Cc: cluster-devel@redhat.com>
Cc: linux-fsdevel@vger.kernel.org>
Cc: netdev@vger.kernel.org>
Cc: netfilter-devel@vger.kernel.org>
Cc: coreteam@netfilter.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 14/16] drm/msm: avoid using 'timespec'
2019-11-08 21:32 [PATCH 00/16] drivers: y2038 updates Arnd Bergmann
@ 2019-11-08 21:32 ` Arnd Bergmann
2019-11-12 16:55 ` Jordan Crouse
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2019-11-08 21:32 UTC (permalink / raw)
To: y2038, Rob Clark, Sean Paul, David Airlie, Daniel Vetter
Cc: linux-kernel, Arnd Bergmann, Jordan Crouse, Jeykumar Sankaran,
Sam Ravnborg, Joe Perches, Jonathan Marek,
Kristian H. Kristensen, Thomas Gleixner, linux-arm-msm,
dri-devel, freedreno
The timespec structure and associated interfaces are deprecated and will
be removed in the future because of the y2038 overflow.
The use of ktime_to_timespec() in timeout_to_jiffies() does not
suffer from that overflow, but is easy to avoid by just converting
the ktime_t into jiffies directly.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpu/drm/msm/msm_drv.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h
index 71547e756e29..740bf7c70d8f 100644
--- a/drivers/gpu/drm/msm/msm_drv.h
+++ b/drivers/gpu/drm/msm/msm_drv.h
@@ -454,8 +454,7 @@ static inline unsigned long timeout_to_jiffies(const ktime_t *timeout)
remaining_jiffies = 0;
} else {
ktime_t rem = ktime_sub(*timeout, now);
- struct timespec ts = ktime_to_timespec(rem);
- remaining_jiffies = timespec_to_jiffies(&ts);
+ remaining_jiffies = ktime_divns(rem, NSEC_PER_SEC / HZ);
}
return remaining_jiffies;
--
2.20.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 14/16] drm/msm: avoid using 'timespec'
2019-11-08 21:32 ` [PATCH 14/16] drm/msm: avoid using 'timespec' Arnd Bergmann
@ 2019-11-12 16:55 ` Jordan Crouse
0 siblings, 0 replies; 3+ messages in thread
From: Jordan Crouse @ 2019-11-12 16:55 UTC (permalink / raw)
To: Arnd Bergmann
Cc: y2038, Rob Clark, Sean Paul, David Airlie, Daniel Vetter,
linux-kernel, Jeykumar Sankaran, Sam Ravnborg, Joe Perches,
Jonathan Marek, Kristian H. Kristensen, Thomas Gleixner,
linux-arm-msm, dri-devel, freedreno
On Fri, Nov 08, 2019 at 10:32:52PM +0100, Arnd Bergmann wrote:
> The timespec structure and associated interfaces are deprecated and will
> be removed in the future because of the y2038 overflow.
>
> The use of ktime_to_timespec() in timeout_to_jiffies() does not
> suffer from that overflow, but is easy to avoid by just converting
> the ktime_t into jiffies directly.
This seems good to me. y2038 changes are the best changes.
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/gpu/drm/msm/msm_drv.h | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h
> index 71547e756e29..740bf7c70d8f 100644
> --- a/drivers/gpu/drm/msm/msm_drv.h
> +++ b/drivers/gpu/drm/msm/msm_drv.h
> @@ -454,8 +454,7 @@ static inline unsigned long timeout_to_jiffies(const ktime_t *timeout)
> remaining_jiffies = 0;
> } else {
> ktime_t rem = ktime_sub(*timeout, now);
> - struct timespec ts = ktime_to_timespec(rem);
> - remaining_jiffies = timespec_to_jiffies(&ts);
> + remaining_jiffies = ktime_divns(rem, NSEC_PER_SEC / HZ);
> }
>
> return remaining_jiffies;
> --
> 2.20.0
>
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-11-12 16:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-08 21:32 [PATCH 00/16] drivers: y2038 updates Arnd Bergmann
2019-11-08 21:32 ` [PATCH 14/16] drm/msm: avoid using 'timespec' Arnd Bergmann
2019-11-12 16:55 ` Jordan Crouse
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).