Lines Matching refs:ffth
528 static struct fftimehands ffth[10]; variable
529 static struct fftimehands *volatile fftimehands = ffth;
537 memset(ffth, 0, sizeof(ffth)); in ffclock_init()
539 last = ffth + NUM_ELEMENTS(ffth) - 1; in ffclock_init()
540 for (cur = ffth; cur < last; cur++) in ffclock_init()
542 last->next = ffth; in ffclock_init()
626 struct fftimehands *ffth; in ffclock_windup() local
638 ffth = fftimehands->next; in ffclock_windup()
639 ogen = ffth->gen; in ffclock_windup()
640 ffth->gen = 0; in ffclock_windup()
641 cest = &ffth->cest; in ffclock_windup()
644 ffth->period_lerp = fftimehands->period_lerp; in ffclock_windup()
646 ffth->tick_time = fftimehands->tick_time; in ffclock_windup()
648 bintime_add(&ffth->tick_time, &bt); in ffclock_windup()
650 ffth->tick_time_lerp = fftimehands->tick_time_lerp; in ffclock_windup()
651 ffclock_convert_delta(ffdelta, ffth->period_lerp, &bt); in ffclock_windup()
652 bintime_add(&ffth->tick_time_lerp, &bt); in ffclock_windup()
654 ffth->tick_ffcount = fftimehands->tick_ffcount + ffdelta; in ffclock_windup()
662 ffdelta = ffth->tick_ffcount - cest->update_ffcount; in ffclock_windup()
679 ffdelta = ffth->tick_ffcount - cest->update_ffcount; in ffclock_windup()
680 ffth->tick_time = cest->update_time; in ffclock_windup()
682 bintime_add(&ffth->tick_time, &bt); in ffclock_windup()
686 ffth->tick_time_lerp = ffth->tick_time; in ffclock_windup()
688 if (bintime_cmp(&ffth->tick_time, &ffth->tick_time_lerp, >)) in ffclock_windup()
695 gap_lerp = ffth->tick_time; in ffclock_windup()
696 bintime_sub(&gap_lerp, &ffth->tick_time_lerp); in ffclock_windup()
698 gap_lerp = ffth->tick_time_lerp; in ffclock_windup()
699 bintime_sub(&gap_lerp, &ffth->tick_time); in ffclock_windup()
719 ffth->tick_time_lerp = ffth->tick_time; in ffclock_windup()
724 ffth->period_lerp = cest->period; in ffclock_windup()
751 ffth->period_lerp += frac; in ffclock_windup()
753 ffth->period_lerp -= frac; in ffclock_windup()
760 ffth->gen = ogen; in ffclock_windup()
761 fftimehands = ffth; in ffclock_windup()
777 struct fftimehands *ffth; in ffclock_change_tc() local
783 ffth = fftimehands->next; in ffclock_change_tc()
784 ogen = ffth->gen; in ffclock_change_tc()
785 ffth->gen = 0; in ffclock_change_tc()
787 cest = &ffth->cest; in ffclock_change_tc()
794 ffth->tick_ffcount = fftimehands->tick_ffcount; in ffclock_change_tc()
795 ffth->tick_time_lerp = fftimehands->tick_time_lerp; in ffclock_change_tc()
796 ffth->tick_time = fftimehands->tick_time; in ffclock_change_tc()
797 ffth->period_lerp = cest->period; in ffclock_change_tc()
804 ffth->gen = ogen; in ffclock_change_tc()
805 fftimehands = ffth; in ffclock_change_tc()
814 struct fftimehands *ffth; in ffclock_last_tick() local
822 ffth = fftimehands; in ffclock_last_tick()
823 gen = ffth->gen; in ffclock_last_tick()
825 *bt = ffth->tick_time_lerp; in ffclock_last_tick()
827 *bt = ffth->tick_time; in ffclock_last_tick()
828 *ffcount = ffth->tick_ffcount; in ffclock_last_tick()
829 } while (gen == 0 || gen != ffth->gen); in ffclock_last_tick()
842 struct fftimehands *ffth; in ffclock_convert_abs() local
852 ffth = fftimehands; in ffclock_convert_abs()
853 gen = ffth->gen; in ffclock_convert_abs()
854 if (ffcount > ffth->tick_ffcount) in ffclock_convert_abs()
855 ffdelta = ffcount - ffth->tick_ffcount; in ffclock_convert_abs()
857 ffdelta = ffth->tick_ffcount - ffcount; in ffclock_convert_abs()
860 *bt = ffth->tick_time_lerp; in ffclock_convert_abs()
861 ffclock_convert_delta(ffdelta, ffth->period_lerp, &bt2); in ffclock_convert_abs()
863 *bt = ffth->tick_time; in ffclock_convert_abs()
864 ffclock_convert_delta(ffdelta, ffth->cest.period, &bt2); in ffclock_convert_abs()
867 if (ffcount > ffth->tick_ffcount) in ffclock_convert_abs()
871 } while (gen == 0 || gen != ffth->gen); in ffclock_convert_abs()
883 struct fftimehands *ffth; in ffclock_convert_diff() local
888 ffth = fftimehands; in ffclock_convert_diff()
889 gen = ffth->gen; in ffclock_convert_diff()
890 ffclock_convert_delta(ffdelta, ffth->cest.period, bt); in ffclock_convert_diff()
891 } while (gen == 0 || gen != ffth->gen); in ffclock_convert_diff()
901 struct fftimehands *ffth; in ffclock_read_counter() local
911 ffth = fftimehands; in ffclock_read_counter()
913 *ffcount = ffth->tick_ffcount; in ffclock_read_counter()
1055 struct fftimehands *ffth; in sysclock_getsnapshot() local
1071 ffth = fftimehands; in sysclock_getsnapshot()
1072 ffi->tick_time = ffth->tick_time_lerp; in sysclock_getsnapshot()
1073 ffi->tick_time_lerp = ffth->tick_time_lerp; in sysclock_getsnapshot()
1074 ffi->period = ffth->cest.period; in sysclock_getsnapshot()
1075 ffi->period_lerp = ffth->period_lerp; in sysclock_getsnapshot()
1076 clock_snap->ffcount = ffth->tick_ffcount; in sysclock_getsnapshot()
1077 cest = ffth->cest; in sysclock_getsnapshot()