mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Mariusz Skamra <mariuszx.skamra@intel.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ktime: Simplify ktime_compare implementation
Date: Mon, 26 Jun 2017 10:45:24 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1706261043140.2425@nanos> (raw)
In-Reply-To: <20170626065204.GA31609@ulmo.fritz.box>

On Mon, 26 Jun 2017, Thierry Reding wrote:
> On Fri, May 26, 2017 at 03:00:47PM +0200, Mariusz Skamra wrote:
> > ktime_sub can be used here instread of two conditional checks.
> 
> Boot is broken on Tegra186 on next-20170623. Bisection points at this
> commit and I've confirmed that reverting it also fixes the problem.
> 
> Another fix is to change the return value of ktime_compare() to ktime_t,
> though I'm not sure that'd be a good alternative because it breaks with
> the traditional return type of int (-1, 0, +1) for comparison functions.
> 
> It looks like the issue is with the truncation from s64 to int, as
> demonstrated by this minimal test case:

You are right. And I should have seen it when merging that patch. Looking
deeper, the patch is pointless, because the compiler will optimize the
checks away and use the proper CMP instruction to figure it out.

It's reverted now.

Thanks,

	tglx

      reply	other threads:[~2017-06-26  8:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-26 13:00 Mariusz Skamra
2017-06-12  7:04 ` [lkp-robot] [ktime] 02c180b3d0: INFO:ltp-pan_reported_some_tests_FAIL kernel test robot
2017-06-20 19:38 ` [tip:timers/core] ktime: Simplify ktime_compare implementation tip-bot for Mariusz Skamra
2017-06-26  6:52 ` [PATCH v2] " Thierry Reding
2017-06-26  8:45   ` Thomas Gleixner [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=alpine.DEB.2.20.1706261043140.2425@nanos \
    --to=tglx@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mariuszx.skamra@intel.com \
    --cc=thierry.reding@gmail.com \
    /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

all inboxes | Powered by JetHome®