All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Rob Herring <robherring2@gmail.com>,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Mark Rutland <mark.rutland@arm.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Kukjin Kim <kgene.kim@samsung.com>,
	"linux-sh@vger.kernel.org" <linux-sh@vger.kernel.org>,
	Tony Lindgren <tony@atomide.com>,
	Catalin Marinas <Catalin.Marinas@arm.com>,
	Magnus Damm <magnus.damm@gmail.com>,
	"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
	"linux-samsung-soc@vger.kernel.org"
	<linux-samsung-soc@vger.kernel.org>,
	Simon Horman <horms@verge.net.au>,
	Will Deacon <Will.Deacon@arm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [PATCH] ARM: convert arm/arm64 arch timer to use CLKSRC_OF init
Date: Mon, 25 Mar 2013 15:53:01 -0700	[thread overview]
Message-ID: <5150D54D.1070004@linaro.org> (raw)
In-Reply-To: <201303252236.23270.arnd@arndb.de>

On 03/25/2013 03:36 PM, Arnd Bergmann wrote:
> On Monday 25 March 2013, Rob Herring wrote:
>> I count integrator-cp, realview, versatile and non-DT VExpress that do
>> this (not surprisingly) and 25 platforms or timer implementations plus
>> arm64 that do sched_clock setup in time_init. What's broken by not
>> moving these earlier?
> timekeeping_init() will leave the persistent_clock_exist variable as "false",
> which is read in rtc_suspend() and timekeeping_inject_sleeptime().

Are you mixing up the persistent_clock and sched_clock here? From a 
generic stand-point they have different requirements.

> For all I can tell, you will get a little jitter every time you
> do a suspend in that case. Or perhaps it means the system clock
> will be forwarded by the amount of time spent in suspend twice
> after wakeup, but I'm probably misreading the code for that case.

No, you shouldn't see timekeeping being incremented twice, we check in 
rtc_resume code if the persistent clock is present if so we won't inject 
any measured suspend time there. But you're probably right that we're 
being a little overly paranoid checking the same value twice.

As far as the benefit to the persistent clock: it is just a little 
better to use, since we can access it earlier in resume, prior to 
interrupts being enabled. So we should see less time error introduced 
each suspend.

thanks
-john

WARNING: multiple messages have this Message-ID (diff)
From: John Stultz <john.stultz@linaro.org>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM: convert arm/arm64 arch timer to use CLKSRC_OF init
Date: Mon, 25 Mar 2013 22:53:01 +0000	[thread overview]
Message-ID: <5150D54D.1070004@linaro.org> (raw)
In-Reply-To: <201303252236.23270.arnd@arndb.de>

On 03/25/2013 03:36 PM, Arnd Bergmann wrote:
> On Monday 25 March 2013, Rob Herring wrote:
>> I count integrator-cp, realview, versatile and non-DT VExpress that do
>> this (not surprisingly) and 25 platforms or timer implementations plus
>> arm64 that do sched_clock setup in time_init. What's broken by not
>> moving these earlier?
> timekeeping_init() will leave the persistent_clock_exist variable as "false",
> which is read in rtc_suspend() and timekeeping_inject_sleeptime().

Are you mixing up the persistent_clock and sched_clock here? From a 
generic stand-point they have different requirements.

> For all I can tell, you will get a little jitter every time you
> do a suspend in that case. Or perhaps it means the system clock
> will be forwarded by the amount of time spent in suspend twice
> after wakeup, but I'm probably misreading the code for that case.

No, you shouldn't see timekeeping being incremented twice, we check in 
rtc_resume code if the persistent clock is present if so we won't inject 
any measured suspend time there. But you're probably right that we're 
being a little overly paranoid checking the same value twice.

As far as the benefit to the persistent clock: it is just a little 
better to use, since we can access it earlier in resume, prior to 
interrupts being enabled. So we should see less time error introduced 
each suspend.

thanks
-john


WARNING: multiple messages have this Message-ID (diff)
From: john.stultz@linaro.org (John Stultz)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: convert arm/arm64 arch timer to use CLKSRC_OF init
Date: Mon, 25 Mar 2013 15:53:01 -0700	[thread overview]
Message-ID: <5150D54D.1070004@linaro.org> (raw)
In-Reply-To: <201303252236.23270.arnd@arndb.de>

On 03/25/2013 03:36 PM, Arnd Bergmann wrote:
> On Monday 25 March 2013, Rob Herring wrote:
>> I count integrator-cp, realview, versatile and non-DT VExpress that do
>> this (not surprisingly) and 25 platforms or timer implementations plus
>> arm64 that do sched_clock setup in time_init. What's broken by not
>> moving these earlier?
> timekeeping_init() will leave the persistent_clock_exist variable as "false",
> which is read in rtc_suspend() and timekeeping_inject_sleeptime().

Are you mixing up the persistent_clock and sched_clock here? From a 
generic stand-point they have different requirements.

> For all I can tell, you will get a little jitter every time you
> do a suspend in that case. Or perhaps it means the system clock
> will be forwarded by the amount of time spent in suspend twice
> after wakeup, but I'm probably misreading the code for that case.

No, you shouldn't see timekeeping being incremented twice, we check in 
rtc_resume code if the persistent clock is present if so we won't inject 
any measured suspend time there. But you're probably right that we're 
being a little overly paranoid checking the same value twice.

As far as the benefit to the persistent clock: it is just a little 
better to use, since we can access it earlier in resume, prior to 
interrupts being enabled. So we should see less time error introduced 
each suspend.

thanks
-john

  reply	other threads:[~2013-03-25 22:53 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-20 22:34 [PATCH] ARM: convert arm/arm64 arch timer to use CLKSRC_OF init Rob Herring
2013-03-20 22:34 ` Rob Herring
2013-03-20 22:34 ` Rob Herring
2013-03-21 11:06 ` Mark Rutland
2013-03-21 11:06   ` Mark Rutland
2013-03-21 11:06   ` Mark Rutland
2013-03-21 11:35   ` Marc Zyngier
2013-03-21 11:35     ` Marc Zyngier
2013-03-21 11:35     ` Marc Zyngier
2013-03-21 12:52   ` Rob Herring
2013-03-21 12:52     ` Rob Herring
2013-03-21 12:52     ` Rob Herring
2013-03-25 17:26   ` Russell King - ARM Linux
2013-03-25 17:26     ` Russell King - ARM Linux
2013-03-25 17:26     ` Russell King - ARM Linux
2013-03-25 21:28     ` Rob Herring
2013-03-25 21:28       ` Rob Herring
2013-03-25 21:28       ` Rob Herring
2013-03-25 22:36       ` Arnd Bergmann
2013-03-25 22:36         ` Arnd Bergmann
2013-03-25 22:36         ` Arnd Bergmann
2013-03-25 22:53         ` John Stultz [this message]
2013-03-25 22:53           ` John Stultz
2013-03-25 22:53           ` John Stultz
2013-03-26  2:19           ` Rob Herring
2013-03-26  2:19             ` Rob Herring
2013-03-26  2:19             ` Rob Herring
2013-03-26  9:56           ` Arnd Bergmann
2013-03-26  9:56             ` Arnd Bergmann
2013-03-26  9:56             ` Arnd Bergmann
2013-03-25 23:07       ` Catalin Marinas
2013-03-25 23:07         ` Catalin Marinas
2013-03-25 23:07         ` Catalin Marinas
2013-04-23 21:23 ` [PATCH] ARM: OMAP: remove unused variable Arnd Bergmann
2013-04-23 21:23   ` Arnd Bergmann
2013-04-23 21:23   ` Arnd Bergmann
2013-04-23 21:26   ` Tony Lindgren
2013-04-23 21:26     ` Tony Lindgren
2013-04-23 21:26     ` Tony Lindgren

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=5150D54D.1070004@linaro.org \
    --to=john.stultz@linaro.org \
    --cc=Catalin.Marinas@arm.com \
    --cc=Will.Deacon@arm.com \
    --cc=arnd@arndb.de \
    --cc=horms@verge.net.au \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=magnus.damm@gmail.com \
    --cc=mark.rutland@arm.com \
    --cc=rob.herring@calxeda.com \
    --cc=robherring2@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=tony@atomide.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 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.