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/mm.h>
#include <linux/vmalloc.h>
#include <linux/interrupt.h>
#include <linux/time.h>
#include <linux/delay.h>
#include <asm/segment.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/delay.h>
#include <arch/svinto.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_FREQ   15
 
#define MAX_USABLE_TIMER_FREQ   7
 
#define MAX_DELAY_US   853333L
 
#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_timer1 (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
 
const unsigned long timer_freq_100 [NUM_TIMER_FREQ]
 
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_freq_settings [NUM_TIMER_STATS]
 
int timer_delay_settings [NUM_TIMER_STATS]
 

Macro Definition Documentation

#define D1 (   x)

Definition at line 40 of file fasttimer.c.

#define D2 (   x)

Definition at line 41 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 61 of file fasttimer.c.

#define DEBUG_LOG_INCLUDED

Definition at line 30 of file fasttimer.c.

#define DEBUG_LOG_MAX   128

Definition at line 55 of file fasttimer.c.

#define DP (   x)

Definition at line 42 of file fasttimer.c.

#define FAST_TIMER_LOG

Definition at line 31 of file fasttimer.c.

#define FAST_TIMER_SANITY_CHECKS

Definition at line 34 of file fasttimer.c.

#define MAX_DELAY_US   853333L

Definition at line 82 of file fasttimer.c.

#define MAX_USABLE_TIMER_FREQ   7

Definition at line 81 of file fasttimer.c.

#define NUM_TIMER_FREQ   15

Definition at line 80 of file fasttimer.c.

#define NUM_TIMER_STATS   16

Definition at line 102 of file fasttimer.c.

Function Documentation

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

Definition at line 315 of file fasttimer.c.

void do_gettimeofday_fast ( struct fasttime_t *  tv)
inline

Definition at line 114 of file fasttimer.c.

int fast_timer_init ( void  )

Definition at line 841 of file fasttimer.c.

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

Definition at line 120 of file fasttimer.c.

void schedule_usleep ( unsigned long  us)

Definition at line 475 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 208 of file fasttimer.c.

void start_timer1 ( unsigned long  delay_us)
inline

Definition at line 136 of file fasttimer.c.

Variable Documentation

struct fast_timer* fast_timer_list = NULL

Definition at line 52 of file fasttimer.c.

struct fast_timer timer_added_log[NUM_TIMER_STATS]

Definition at line 104 of file fasttimer.c.

int timer_delay_settings[NUM_TIMER_STATS]

Definition at line 111 of file fasttimer.c.

int timer_div_settings[NUM_TIMER_STATS]

Definition at line 109 of file fasttimer.c.

struct fast_timer timer_expired_log[NUM_TIMER_STATS]

Definition at line 106 of file fasttimer.c.

const unsigned long timer_freq_100[NUM_TIMER_FREQ]
Initial value:
=
{
3,
6,
12,
24,
48,
96,
192,
384,
576,
1152,
2304,
4608,
9216,
18432,
62500,
}

Definition at line 83 of file fasttimer.c.

int timer_freq_settings[NUM_TIMER_STATS]

Definition at line 110 of file fasttimer.c.

struct fast_timer timer_started_log[NUM_TIMER_STATS]

Definition at line 105 of file fasttimer.c.