Lines Matching +full:one +full:- +full:timer +full:- +full:only

1 // SPDX-License-Identifier: GPL-2.0
9 * 1994-07-02 Alan Modra
11 * 1998-12-20 Updated NTP code according to technical memorandum Jan '96
45 static unsigned long clocktick __ro_after_init; /* timer cycles per tick */
48 * We keep time on PA-RISC Linux by using the Interval Timer which is
49 * a pair of registers; one is read-only and one is write-only; both
50 * accessed through CR16. The read-only register is 32 or 64 bits wide,
51 * and increments by 1 every CPU clock tick. The architecture only
53 * rate of 1. The write-only register is 32-bits wide. When the lowest
54 * 32 bits of the read-only register compare equal to the write-only
56 * an Interval Timer of its own and they are not synchronised.
62 * disabled, so we may miss one or more ticks.
72 /* gcc can optimize for "read-only" case with a local clocktick */ in timer_interrupt()
76 next_tick = cpuinfo->it_value; in timer_interrupt()
83 } while (next_tick - now > cpt); in timer_interrupt()
86 cpuinfo->it_value = next_tick; in timer_interrupt()
95 * itimer would not fire until CR16 wrapped - e.g 4 seconds in timer_interrupt()
97 * ticks on the next timer interrupt. in timer_interrupt()
101 * "next_tick - now" will always give the difference regardless in timer_interrupt()
102 * if one or the other wrapped. If "now" is "bigger" we'll end up in timer_interrupt()
106 while (next_tick - now > cpt) in timer_interrupt()
110 * Only bottom 32-bits of next_tick are writable in CR16! in timer_interrupt()
111 * Timer interrupt will be delivered at least a few hundred cycles in timer_interrupt()
115 if (next_tick - now <= 8000) in timer_interrupt()
127 if (regs->gr[0] & PSW_N) in profile_pc()
128 pc -= 4; in profile_pc()
132 pc = regs->gr[2]; in profile_pc()
160 mtctl(next_tick, 16); /* kick off Interval Timer (CR16) */ in start_cpu_itimer()
172 return -EOPNOTSUPP; in rtc_generic_get_time()
189 return -EINVAL; in rtc_generic_set_time()
190 return -EOPNOTSUPP; in rtc_generic_set_time()
205 pdev = platform_device_register_data(NULL, "rtc-generic", -1, in rtc_init()
218 ts->tv_sec = tod_data.tod_sec; in read_persistent_clock64()
219 ts->tv_nsec = tod_data.tod_usec * 1000; in read_persistent_clock64()
222 ts->tv_sec = 0; in read_persistent_clock64()
223 ts->tv_nsec = 0; in read_persistent_clock64()
235 * timer interrupt and sched_clock() initialization
242 clocktick = (100 * PAGE0->mem_10msec) / HZ; in time_init()
245 cr16_hz = 100 * PAGE0->mem_10msec; /* Hz */ in time_init()
264 100 * PAGE0->mem_10msec); in init_cr16_clocksource()