Lines Matching defs:cpu
45 #include <sys/cpu.h>
70 openpic_write(struct cpu_softc *cpu, bus_size_t offset, uint32_t val)
73 return bus_space_write_4(cpu->cpu_bst, cpu->cpu_bsh,
82 struct cpu_softc * const cpu = ci->ci_softc;
88 if (!cpu->cpu_ticks_per_clock_intr)
101 uint64_t latency = now - (ci->ci_lastintr + cpu->cpu_ticks_per_clock_intr);
105 if (now < ci->ci_lastintr + cpu->cpu_ticks_per_clock_intr)
108 nticks = 1 + latency / cpu->cpu_ticks_per_clock_intr;
109 latency %= cpu->cpu_ticks_per_clock_intr;
111 for (nticks = 1; latency >= cpu->cpu_ticks_per_clock_intr; nticks++) {
112 latency -= cpu->cpu_ticks_per_clock_intr;
117 cpu->cpu_ev_late_clock.ev_count += nticks - 1;
124 if (nticks > 10 || now - ci->ci_lastintr < 7 * cpu->cpu_ticks_per_clock_intr / 8)
151 struct cpu_softc * const cpu = ci->ci_softc;
153 cpu->cpu_ticks_per_clock_intr = (ci->ci_data.cpu_cc_freq + hz/2 - 1) / hz;
158 openpic_write(cpu, cpu->cpu_clock_gtbcr,
159 GTBCR_CI | cpu->cpu_ticks_per_clock_intr);
160 openpic_write(cpu, cpu->cpu_clock_gtbcr,
161 cpu->cpu_ticks_per_clock_intr);