Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/drivers/tick.c

    rd46f5cc r965dc18  
    2727 */
    2828
    29 /** @addtogroup sparc64
     29/** @addtogroup sparc64 
    3030 * @{
    3131 */
     
    5454        interrupt_register(14, "tick_int", tick_interrupt);
    5555        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;
    5857        CPU->arch.next_tick_cmpr = compare.tick_cmpr;
    5958        tick_compare_write(compare.value);
     59        tick_write(0);
    6060
    61 #if defined (US3) || defined (SUN4V)
     61#if defined (US3)
    6262        /* disable STICK interrupts and clear any pending ones */
    6363        tick_compare_reg_t stick_compare;
     
    7777/** Process tick interrupt.
    7878 *
    79  * @param n      Interrupt Level (14, can be ignored)
     79 * @param n Interrupt Level, 14,  (can be ignored)
    8080 * @param istate Interrupted state.
    81  *
    8281 */
    83 void tick_interrupt(unsigned int n, istate_t *istate)
     82void tick_interrupt(int n, istate_t *istate)
    8483{
    8584        softint_reg_t softint, clear;
     
    112111         * overflow only in 146 years.
    113112         */
    114         drift = tick_counter_read() - CPU->arch.next_tick_cmpr;
     113        drift = tick_read() - CPU->arch.next_tick_cmpr;
    115114        while (drift > CPU->arch.clock_frequency / HZ) {
    116115                drift -= CPU->arch.clock_frequency / HZ;
    117116                CPU->missed_clock_ticks++;
    118117        }
    119         CPU->arch.next_tick_cmpr = tick_counter_read() +
     118        CPU->arch.next_tick_cmpr = tick_read() +
    120119            (CPU->arch.clock_frequency / HZ) - drift;
    121120        tick_compare_write(CPU->arch.next_tick_cmpr);
Note: See TracChangeset for help on using the changeset viewer.