Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
fasttimer.c File Reference
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/param.h>
#include <linux/string.h>
#include <linux/vmalloc.h>
#include <linux/interrupt.h>
#include <linux/time.h>
#include <linux/delay.h>
#include <asm/irq.h>
#include <hwregs/reg_map.h>
#include <hwregs/reg_rdwr.h>
#include <hwregs/timer_defs.h>
#include <asm/fasttimer.h>
#include <linux/proc_fs.h>

Go to the source code of this file.

Macros

#define DEBUG_LOG_INCLUDED
 
#define FAST_TIMER_LOG
 
#define FAST_TIMER_SANITY_CHECKS
 
#define D1(x)
 
#define D2(x)
 
#define DP(x)
 
#define DEBUG_LOG_MAX   128
 
#define DEBUG_LOG(string, value)
 
#define NUM_TIMER_STATS   16
 

Functions

void do_gettimeofday_fast (struct fasttime_t *tv)
 
int fasttime_cmp (struct fasttime_t *t0, struct fasttime_t *t1)
 
void start_timer_trig (unsigned long delay_us)
 
void start_one_shot_timer (struct fast_timer *t, fast_timer_function_type *function, unsigned long data, unsigned long delay_us, const char *name)
 
int del_fast_timer (struct fast_timer *t)
 
void schedule_usleep (unsigned long us)
 
int fast_timer_init (void)
 
 __initcall (fast_timer_init)
 

Variables

struct fast_timer * fast_timer_list = NULL
 
struct fast_timer timer_added_log [NUM_TIMER_STATS]
 
struct fast_timer timer_started_log [NUM_TIMER_STATS]
 
struct fast_timer timer_expired_log [NUM_TIMER_STATS]
 
int timer_div_settings [NUM_TIMER_STATS]
 
int timer_delay_settings [NUM_TIMER_STATS]
 
struct work_struct fast_work
 

Macro Definition Documentation

#define D1 (   x)

Definition at line 47 of file fasttimer.c.

#define D2 (   x)

Definition at line 48 of file fasttimer.c.

#define DEBUG_LOG (   string,
  value 
)
Value:
{ \
unsigned long log_flags; \
local_irq_save(log_flags); \
debug_log_string[debug_log_cnt] = (string); \
debug_log_value[debug_log_cnt] = (unsigned long)(value); \
if (++debug_log_cnt >= DEBUG_LOG_MAX) \
{ \
debug_log_cnt = debug_log_cnt % DEBUG_LOG_MAX; \
debug_log_cnt_wrapped = 1; \
} \
local_irq_restore(log_flags); \
}

Definition at line 68 of file fasttimer.c.

#define DEBUG_LOG_INCLUDED

Definition at line 37 of file fasttimer.c.

#define DEBUG_LOG_MAX   128

Definition at line 62 of file fasttimer.c.

#define DP (   x)

Definition at line 49 of file fasttimer.c.

#define FAST_TIMER_LOG

Definition at line 38 of file fasttimer.c.

#define FAST_TIMER_SANITY_CHECKS

Definition at line 41 of file fasttimer.c.

#define NUM_TIMER_STATS   16

Definition at line 86 of file fasttimer.c.

Function Documentation

__initcall ( fast_timer_init  )
int del_fast_timer ( struct fast_timer *  t)

Definition at line 289 of file fasttimer.c.

void do_gettimeofday_fast ( struct fasttime_t *  tv)
inline

Definition at line 104 of file fasttimer.c.

int fast_timer_init ( void  )

Definition at line 811 of file fasttimer.c.

int fasttime_cmp ( struct fasttime_t *  t0,
struct fasttime_t *  t1 
)
inline

Definition at line 110 of file fasttimer.c.

void schedule_usleep ( unsigned long  us)

Definition at line 449 of file fasttimer.c.

void start_one_shot_timer ( struct fast_timer *  t,
fast_timer_function_type *  function,
unsigned long  data,
unsigned long  delay_us,
const char name 
)

Definition at line 187 of file fasttimer.c.

void start_timer_trig ( unsigned long  delay_us)
inline

Definition at line 127 of file fasttimer.c.

Variable Documentation

struct fast_timer* fast_timer_list = NULL

Definition at line 59 of file fasttimer.c.

struct work_struct fast_work

Definition at line 96 of file fasttimer.c.

struct fast_timer timer_added_log[NUM_TIMER_STATS]

Definition at line 88 of file fasttimer.c.

int timer_delay_settings[NUM_TIMER_STATS]

Definition at line 94 of file fasttimer.c.

int timer_div_settings[NUM_TIMER_STATS]

Definition at line 93 of file fasttimer.c.

struct fast_timer timer_expired_log[NUM_TIMER_STATS]

Definition at line 90 of file fasttimer.c.

struct fast_timer timer_started_log[NUM_TIMER_STATS]

Definition at line 89 of file fasttimer.c.