Revert "phc2sys: Notify kernel if clock is not in sync"
This novel use of the STA_UNSYNC flag breaks with the established,
traditional meaning of that flag, which is:
The clock has is believed to have an error larger than 16 seconds.
This reverts commit 944f5f7ac6
.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
master
parent
944f5f7ac6
commit
25d4e4fbdd
11
clockadj.c
11
clockadj.c
|
@ -182,14 +182,3 @@ void sysclk_set_sync(void)
|
||||||
if (clock_adjtime(clkid, &tx) < 0)
|
if (clock_adjtime(clkid, &tx) < 0)
|
||||||
pr_err("failed to set clock status and maximum error: %m");
|
pr_err("failed to set clock status and maximum error: %m");
|
||||||
}
|
}
|
||||||
|
|
||||||
void sysclk_set_unsync(void)
|
|
||||||
{
|
|
||||||
clockid_t clkid = CLOCK_REALTIME;
|
|
||||||
struct timex tx;
|
|
||||||
memset(&tx, 0, sizeof(tx));
|
|
||||||
tx.modes = ADJ_STATUS;
|
|
||||||
tx.status = STA_UNSYNC;
|
|
||||||
if (clock_adjtime(clkid, &tx) < 0)
|
|
||||||
pr_err("failed to set clock status: %m");
|
|
||||||
}
|
|
||||||
|
|
|
@ -80,9 +80,4 @@ int sysclk_max_freq(void);
|
||||||
* the real-time clock (RTC) to it.
|
* the real-time clock (RTC) to it.
|
||||||
*/
|
*/
|
||||||
void sysclk_set_sync(void);
|
void sysclk_set_sync(void);
|
||||||
|
|
||||||
/**
|
|
||||||
* Mark the system clock as unsynchronized.
|
|
||||||
*/
|
|
||||||
void sysclk_set_unsync(void);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -735,10 +735,8 @@ static int do_loop(struct node *node, int subscriptions)
|
||||||
reconfigure(node);
|
reconfigure(node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!node->master) {
|
if (!node->master)
|
||||||
sysclk_set_unsync();
|
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
LIST_FOREACH(clock, &node->dst_clocks, dst_list) {
|
LIST_FOREACH(clock, &node->dst_clocks, dst_list) {
|
||||||
if (!update_needed(clock))
|
if (!update_needed(clock))
|
||||||
|
|
Loading…
Reference in New Issue