public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Arnd Bergmann <arnd@arndb.de>
Cc: y2038@lists.linaro.org, John Stultz <john.stultz@linaro.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Rodolfo Giometti <giometti@enneenne.com>,
	linux-net-drivers@solarflare.com,
	Shradha Shah <sshah@solarflare.com>,
	Richard Cochran <richardcochran@gmail.com>
Subject: Re: [PATCH 5/5] net: sfc: avoid using timespec
Date: Wed, 30 Sep 2015 09:26:01 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.11.1509300925420.4500@nanos> (raw)
In-Reply-To: <1443471692-2946597-6-git-send-email-arnd@arndb.de>

On Mon, 28 Sep 2015, Arnd Bergmann wrote:

> The sfc driver internally uses a time format based on 32-bit (unsigned)
> seconds and 32-bit nanoseconds. This means it will overflow in 2106,
> but the value we pass into it is a signed 32-bit tv_sec that already
> overflows in 2038 to a negative value.
> 
> This patch changes the logic to use the lower 32 bits of the timespec64
> tv_sec in efx_ptp_ns_to_s_ns, which will have the correct value beyond the overflow.
> While this does not change any of the register values, it lets us
> keep using the driver after we deprecate the use of the timespec type
> in the kernel.
> 
> In the efx_ptp_process_times function, the change to use timespec64
> is similar, in that the tv_sec portion is ignored anyway and we only
> care about the nanosecond portion that remains unchanged.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>

  reply	other threads:[~2015-09-30  7:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-28 20:21 [PATCH 0/5] y2038 conversion for ntp/pps and sfc driver Arnd Bergmann
2015-09-28 20:21 ` [PATCH 1/5] ntp/pps: use timespec64 for hardpps() Arnd Bergmann
2015-09-30  7:20   ` Thomas Gleixner
2015-09-28 20:21 ` [PATCH 2/5] ntp/pps: replace getnstime_raw_and_real with 64-bit version Arnd Bergmann
2015-09-30  7:20   ` Thomas Gleixner
2015-09-28 20:21 ` [PATCH 3/5] ntp: use timespec64 in sync_cmos_clock Arnd Bergmann
2015-09-30  7:22   ` Thomas Gleixner
2015-09-28 20:21 ` [PATCH 4/5] ntp/pps: use y2038 safe types in pps_event_time Arnd Bergmann
2015-09-30  7:25   ` Thomas Gleixner
2015-09-28 20:21 ` [PATCH 5/5] net: sfc: avoid using timespec Arnd Bergmann
2015-09-30  7:26   ` Thomas Gleixner [this message]
2015-09-29 19:17 ` [PATCH 0/5] y2038 conversion for ntp/pps and sfc driver Richard Cochran
2015-09-30  4:06 ` David Miller
2015-09-30  7:27   ` Thomas Gleixner
2015-10-01 17:00     ` John Stultz

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=alpine.DEB.2.11.1509300925420.4500@nanos \
    --to=tglx@linutronix.de \
    --cc=arnd@arndb.de \
    --cc=giometti@enneenne.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net-drivers@solarflare.com \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=sshah@solarflare.com \
    --cc=y2038@lists.linaro.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