*
* @pps_valid: PPS signal watchdog counter
* @pps_tf: PPS phase median filter
+ * @pps_jitter: PPS current jitter in nanoseconds
*
* Protected by the timekeeping locks.
*/
#ifdef CONFIG_NTP_PPS
int pps_valid;
long pps_tf[3];
+ long pps_jitter;
#endif
};
intervals to decrease it */
#define PPS_MAXWANDER 100000 /* max PPS freq wander (ns/s) */
-static long pps_jitter; /* current jitter (ns) */
static struct timespec64 pps_fbase; /* beginning of the last freq interval */
static int pps_shift; /* current interval duration (s) (shift) */
static int pps_intcnt; /* interval counter */
{
txc->ppsfreq = shift_right((pps_freq >> PPM_SCALE_INV_SHIFT) *
PPM_SCALE_INV, NTP_SCALE_SHIFT);
- txc->jitter = pps_jitter;
+ txc->jitter = ntpdata->pps_jitter;
if (!(ntpdata->time_status & STA_NANO))
- txc->jitter = pps_jitter / NSEC_PER_USEC;
+ txc->jitter = ntpdata->pps_jitter / NSEC_PER_USEC;
txc->shift = pps_shift;
txc->stabil = pps_stabil;
txc->jitcnt = pps_jitcnt;
* threshold, the sample is discarded; otherwise, if so enabled,
* the time offset is updated.
*/
- if (jitter > (pps_jitter << PPS_POPCORN)) {
+ if (jitter > (ntpdata->pps_jitter << PPS_POPCORN)) {
printk_deferred(KERN_WARNING "hardpps: PPSJITTER: jitter=%ld, limit=%ld\n",
- jitter, (pps_jitter << PPS_POPCORN));
+ jitter, (ntpdata->pps_jitter << PPS_POPCORN));
ntpdata->time_status |= STA_PPSJITTER;
pps_jitcnt++;
} else if (ntpdata->time_status & STA_PPSTIME) {
ntpdata->time_adjust = 0;
}
/* Update jitter */
- pps_jitter += (jitter - pps_jitter) >> PPS_INTMIN;
+ ntpdata->pps_jitter += (jitter - ntpdata->pps_jitter) >> PPS_INTMIN;
}
/*