All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: Aaro Koskinen <aaro.koskinen@nokia.com>
Cc: linux-omap@vger.kernel.org, tony@atomide.com
Subject: Re: [PATCH] omap: fix clocksource_32k to start from zero
Date: Fri, 19 Mar 2010 10:41:02 -0700	[thread overview]
Message-ID: <87iq8sxl8x.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1269007534-9282-1-git-send-email-aaro.koskinen@nokia.com> (Aaro Koskinen's message of "Fri\, 19 Mar 2010 16\:05\:34 +0200")

Aaro Koskinen <aaro.koskinen@nokia.com> writes:

> When the 32k sync timer is used for sched_clock(), it should count
> time from the kernel boot (clocksource init) instead of the last HW
> reset. Otherwise printk.time values will jump suddenly during the boot:
>
> 	[    0.000000] calling  omap2_clk_arch_init+0x0/0x138 @ 1
> 	[    0.000000] initcall omap2_clk_arch_init+0x0/0x138 returned -22 after 0 usecs
> 	[    0.000000] initcall omap2_clk_arch_init+0x0/0x138 returned with error code -22
> 	[    0.000000] calling  omap_init_clocksource_32k+0x0/0x98 @ 1
> 	[  508.697937] initcall omap_init_clocksource_32k+0x0/0x98 returned 0 after 0 usecs
> 	[  508.697967] calling  omap_init_devices+0x0/0x38 @ 1
> 	[  508.698425] initcall omap_init_devices+0x0/0x38 returned 0 after 0 usecs
>
> This will confuse tools such as scripts/bootgraph.pl.
>
> Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
> ---
>
> See also the thread in linux-kernel:
> http://marc.info/?t=126893533300022&r=1&w=2
>
>  arch/arm/plat-omap/common.c |   14 +++++++++-----
>  1 files changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
> index 088c1a0..ce2ad10 100644
> --- a/arch/arm/plat-omap/common.c
> +++ b/arch/arm/plat-omap/common.c
> @@ -100,10 +100,12 @@ EXPORT_SYMBOL(omap_get_var_config);
>  
>  #include <linux/clocksource.h>
>  
> +static u32 offset_32k __read_mostly;
> +

I think you need a comment in the code here as well, something like
the first sentence from the changelog, so readers of this code can
make easy sense of the '- offset_32k'.

Otherwise,

Acked-by: Kevin Hilman <khilman@deeprootsystems.com>

      reply	other threads:[~2010-03-19 17:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-19 14:05 [PATCH] omap: fix clocksource_32k to start from zero Aaro Koskinen
2010-03-19 17:41 ` Kevin Hilman [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=87iq8sxl8x.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=aaro.koskinen@nokia.com \
    --cc=linux-omap@vger.kernel.org \
    --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.