Re: [PATCH] omap: fix clocksource_32k to start from zero

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Aaro Koskinen <aaro.koskinen@xxxxxxxxx> 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@xxxxxxxxx>
> ---
>
> 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@xxxxxxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux