Changes in kernel/arch/sparc64/src/drivers/tick.c [d46f5cc:965dc18] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/drivers/tick.c
rd46f5cc r965dc18 27 27 */ 28 28 29 /** @addtogroup sparc64 29 /** @addtogroup sparc64 30 30 * @{ 31 31 */ … … 54 54 interrupt_register(14, "tick_int", tick_interrupt); 55 55 compare.int_dis = false; 56 compare.tick_cmpr = tick_counter_read() + 57 CPU->arch.clock_frequency / HZ; 56 compare.tick_cmpr = CPU->arch.clock_frequency / HZ; 58 57 CPU->arch.next_tick_cmpr = compare.tick_cmpr; 59 58 tick_compare_write(compare.value); 59 tick_write(0); 60 60 61 #if defined (US3) || defined (SUN4V)61 #if defined (US3) 62 62 /* disable STICK interrupts and clear any pending ones */ 63 63 tick_compare_reg_t stick_compare; … … 77 77 /** Process tick interrupt. 78 78 * 79 * @param n Interrupt Level (14,can be ignored)79 * @param n Interrupt Level, 14, (can be ignored) 80 80 * @param istate Interrupted state. 81 *82 81 */ 83 void tick_interrupt( unsignedint n, istate_t *istate)82 void tick_interrupt(int n, istate_t *istate) 84 83 { 85 84 softint_reg_t softint, clear; … … 112 111 * overflow only in 146 years. 113 112 */ 114 drift = tick_ counter_read() - CPU->arch.next_tick_cmpr;113 drift = tick_read() - CPU->arch.next_tick_cmpr; 115 114 while (drift > CPU->arch.clock_frequency / HZ) { 116 115 drift -= CPU->arch.clock_frequency / HZ; 117 116 CPU->missed_clock_ticks++; 118 117 } 119 CPU->arch.next_tick_cmpr = tick_ counter_read() +118 CPU->arch.next_tick_cmpr = tick_read() + 120 119 (CPU->arch.clock_frequency / HZ) - drift; 121 120 tick_compare_write(CPU->arch.next_tick_cmpr);
Note:
See TracChangeset
for help on using the changeset viewer.