lkml.org 
[lkml]   [2013]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] time, Fix setting of hardware clock in NTP code
From
On Fri, Feb 8, 2013 at 4:55 AM, Prarit Bhargava <prarit@redhat.com> 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


\
 
 \ /
  Last update: 2013-02-08 23:22    [W:1.032 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site