Changeset View
Changeset View
Standalone View
Standalone View
sys/mips/nlm/tick.c
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | |||||
#include <machine/intr_machdep.h> | #include <machine/intr_machdep.h> | ||||
#include <mips/nlm/interrupt.h> | #include <mips/nlm/interrupt.h> | ||||
uint64_t counter_freq; | uint64_t counter_freq; | ||||
struct timecounter *platform_timecounter; | struct timecounter *platform_timecounter; | ||||
static DPCPU_DEFINE(uint32_t, cycles_per_tick); | DPCPU_STATIC_DEFINE(uint32_t, cycles_per_tick); | ||||
static uint32_t cycles_per_usec; | static uint32_t cycles_per_usec; | ||||
static DPCPU_DEFINE(volatile uint32_t, counter_upper); | DPCPU_STATIC_DEFINE(volatile uint32_t, counter_upper); | ||||
static DPCPU_DEFINE(volatile uint32_t, counter_lower_last); | DPCPU_STATIC_DEFINE(volatile uint32_t, counter_lower_last); | ||||
static DPCPU_DEFINE(uint32_t, compare_ticks); | DPCPU_STATIC_DEFINE(uint32_t, compare_ticks); | ||||
static DPCPU_DEFINE(uint32_t, lost_ticks); | DPCPU_STATIC_DEFINE(uint32_t, lost_ticks); | ||||
struct clock_softc { | struct clock_softc { | ||||
int intr_rid; | int intr_rid; | ||||
struct resource *intr_res; | struct resource *intr_res; | ||||
void *intr_handler; | void *intr_handler; | ||||
struct timecounter tc; | struct timecounter tc; | ||||
struct eventtimer et; | struct eventtimer et; | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 308 Lines • Show Last 20 Lines |