Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 0c91cff in mainline for kernel/arch/ppc32/src/interrupt.c


Ignore:
Timestamp:
2014-08-23T22:09:41Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
master
Children:
4cb938b
Parents:
c451d22
Message:

Use the actual clock-frequency when starting decrementer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ppc32/src/interrupt.c

    rc451d22 r0c91cff  
    3838#include <typedefs.h>
    3939#include <arch.h>
    40 #include <time/clock.h>
    4140#include <ipc/sysipc.h>
    4241#include <arch/drivers/pic.h>
     
    4645#include <log.h>
    4746
    48 void start_decrementer(void)
     47static uint32_t decrementer_value;
     48
     49void decrementer_start(uint32_t val)
     50{
     51        decrementer_value = val;
     52        decrementer_restart();
     53}
     54
     55void decrementer_restart(void)
    4956{
    5057        asm volatile (
    5158                "mtdec %[dec]\n"
    52                 :: [dec] "r" (1000)
     59                :: [dec] "r" (decrementer_value)
    5360        );
    5461}
     
    140147static void exception_decrementer(unsigned int n, istate_t *istate)
    141148{
    142         start_decrementer();
     149        decrementer_restart();
    143150        clock();
    144151}
Note: See TracChangeset for help on using the changeset viewer.