Re: [PATCH] time, Fix setting of hardware clock in NTP code

From: John Stultz
Date: Fri Feb 08 2013 - 16:46:35 EST


On Fri, Feb 8, 2013 at 4:55 AM, Prarit Bhargava <prarit@xxxxxxxxxx> wrote:
> diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
> index 24174b4..e98f6b7 100644
> --- a/kernel/time/ntp.c
> +++ b/kernel/time/ntp.c
> @@ -510,8 +510,12 @@ static void sync_cmos_clock(struct work_struct *work)
> }
>
> getnstimeofday(&now);
> - if (abs(now.tv_nsec - (NSEC_PER_SEC / 2)) <= tick_nsec / 2)
> - fail = update_persistent_clock(now);
> + if (abs(now.tv_nsec - (NSEC_PER_SEC / 2)) <= tick_nsec / 2) {
> + struct timespec adjust = now;
> + if (persistent_clock_is_local)
> + adjust.tv_sec -= (sys_tz.tz_minuteswest * 60);
> + fail = update_persistent_clock(adjust);
> + }
>
Do you mind reworking this patch on top of tip/timers/core? There's
some recent changes that interact here.

thanks
-john
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/