Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
time.c File Reference
#include <linux/errno.h>
#include <linux/export.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/param.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/timex.h>
#include <linux/kernel_stat.h>
#include <linux/time.h>
#include <linux/init.h>
#include <linux/profile.h>
#include <linux/cpu.h>
#include <linux/security.h>
#include <linux/percpu.h>
#include <linux/rtc.h>
#include <linux/jiffies.h>
#include <linux/posix-timers.h>
#include <linux/irq.h>
#include <linux/delay.h>
#include <linux/irq_work.h>
#include <asm/trace.h>
#include <asm/io.h>
#include <asm/processor.h>
#include <asm/nvram.h>
#include <asm/cache.h>
#include <asm/machdep.h>
#include <asm/uaccess.h>
#include <asm/time.h>
#include <asm/prom.h>
#include <asm/irq.h>
#include <asm/div64.h>
#include <asm/smp.h>
#include <asm/vdso_datapage.h>
#include <asm/firmware.h>
#include <asm/cputime.h>
#include <linux/clockchips.h>
#include <linux/timekeeper_internal.h>

Go to the source code of this file.


#define DECREMENTER_MAX   0x7fffffff
#define XSEC_PER_SEC   (1024*1024)
#define SCALE_XSEC(xsec, max)   mulhwu((xsec) << 12, max)
#define calc_cputime_factors()
#define test_irq_work_pending()   0
#define clear_irq_work_pending()
#define FEBRUARY   2
#define STARTOFTIME   1970
#define SECDAY   86400L
#define SECYR   (SECDAY * 365)
#define leapyear(year)
#define days_in_year(a)   (leapyear(a) ? 366 : 365)
#define days_in_month(a)   (month_days[(a) - 1])


 EXPORT_SYMBOL (decrementer_clockevent)
 DEFINE_PER_CPU (u64, decrementers_next_tb)
 EXPORT_SYMBOL (tb_ticks_per_usec)
 EXPORT_SYMBOL (tb_ticks_per_sec)
 EXPORT_SYMBOL_GPL (ppc_proc_freq)
 EXPORT_SYMBOL_GPL (ppc_tb_freq)
void __delay (unsigned long loops)
 EXPORT_SYMBOL (__delay)
void udelay (unsigned long usecs)
void timer_interrupt (struct pt_regs *regs)
void hdec_interrupt (struct pt_regs *regs)
unsigned long long sched_clock (void)
void start_cpu_decrementer (void)
void __init generic_calibrate_decr (void)
int update_persistent_clock (struct timespec now)
void read_persistent_clock (struct timespec *ts)
void update_vsyscall_old (struct timespec *wall_time, struct timespec *wtm, struct clocksource *clock, u32 mult)
void update_vsyscall_tz (void)
void secondary_cpu_time_init (void)
void __init time_init (void)
void GregorianDay (struct rtc_time *tm)
void to_tm (int tim, struct rtc_time *tm)
void div128_by_32 (u64 dividend_high, u64 dividend_low, unsigned divisor, struct div_result *dr)
void calibrate_delay (void)
 module_init (rtc_init)


struct clock_event_device decrementer_clockevent
unsigned long tb_ticks_per_jiffy
unsigned long tb_ticks_per_usec = 100
unsigned long tb_ticks_per_sec
struct timezone sys_tz
unsigned long ppc_proc_freq
unsigned long ppc_tb_freq

Macro Definition Documentation

#define calc_cputime_factors ( )

Definition at line 385 of file time.c.

#define clear_irq_work_pending ( )

Definition at line 480 of file time.c.

#define days_in_month (   a)    (month_days[(a) - 1])

Definition at line 933 of file time.c.

#define days_in_year (   a)    (leapyear(a) ? 366 : 365)

Definition at line 932 of file time.c.

#define DECREMENTER_MAX   0x7fffffff

Definition at line 96 of file time.c.

#define FEBRUARY   2

Definition at line 926 of file time.c.

#define leapyear (   year)
((year) % 4 == 0 && \
((year) % 100 != 0 || (year) % 400 == 0))

Definition at line 930 of file time.c.

#define SCALE_XSEC (   xsec,
)    mulhwu((xsec) << 12, max)

Definition at line 122 of file time.c.

#define SECDAY   86400L

Definition at line 928 of file time.c.

#define SECYR   (SECDAY * 365)

Definition at line 929 of file time.c.

#define STARTOFTIME   1970

Definition at line 927 of file time.c.

#define test_irq_work_pending ( )    0

Definition at line 479 of file time.c.

#define XSEC_PER_SEC   (1024*1024)

Definition at line 116 of file time.c.

Function Documentation

void __delay ( unsigned long  loops)

Definition at line 388 of file time.c.

void calibrate_delay ( void  )

Definition at line 1039 of file time.c.

DEFINE_SPINLOCK ( rtc_lock  )
void div128_by_32 ( u64  dividend_high,
u64  dividend_low,
unsigned  divisor,
struct div_result *  dr 

Definition at line 1009 of file time.c.

EXPORT_SYMBOL ( decrementer_clockevent  )
EXPORT_SYMBOL ( tb_ticks_per_usec  )
EXPORT_SYMBOL ( tb_ticks_per_sec  )
EXPORT_SYMBOL ( __delay  )
EXPORT_SYMBOL ( udelay  )
EXPORT_SYMBOL_GPL ( rtc_lock  )
EXPORT_SYMBOL_GPL ( ppc_proc_freq  )
EXPORT_SYMBOL_GPL ( ppc_tb_freq  )
void __init generic_calibrate_decr ( void  )

Definition at line 644 of file time.c.

void GregorianDay ( struct rtc_time tm)

Definition at line 942 of file time.c.

void hdec_interrupt ( struct pt_regs regs)

Definition at line 558 of file time.c.

module_init ( rtc_init  )
void read_persistent_clock ( struct timespec ts)

Definition at line 707 of file time.c.

unsigned long long sched_clock ( void  )

Definition at line 603 of file time.c.

void secondary_cpu_time_init ( void  )

Definition at line 847 of file time.c.

void start_cpu_decrementer ( void  )

Definition at line 633 of file time.c.

void __init time_init ( void  )

Definition at line 860 of file time.c.

void timer_interrupt ( struct pt_regs regs)

Definition at line 488 of file time.c.

void to_tm ( int  tim,
struct rtc_time tm 

Definition at line 970 of file time.c.

void udelay ( unsigned long  usecs)

Definition at line 410 of file time.c.

int update_persistent_clock ( struct timespec  now)

Definition at line 665 of file time.c.

void update_vsyscall_old ( struct timespec wall_time,
struct timespec wtm,
struct clocksource clock,
u32  mult 

Definition at line 730 of file time.c.

void update_vsyscall_tz ( void  )

Definition at line 775 of file time.c.

Variable Documentation

struct clock_event_device decrementer_clockevent
Initial value:
= {
.name = "decrementer",
.rating = 200,
.irq = 0,
.set_next_event = decrementer_set_next_event,
.set_mode = decrementer_set_mode,

Definition at line 103 of file time.c.

unsigned long ppc_proc_freq

Definition at line 141 of file time.c.

unsigned long ppc_tb_freq

Definition at line 143 of file time.c.

struct timezone sys_tz

Definition at line 50 of file time.c.

unsigned long tb_ticks_per_jiffy

Definition at line 125 of file time.c.

unsigned long tb_ticks_per_sec

Definition at line 128 of file time.c.

unsigned long tb_ticks_per_usec = 100

Definition at line 126 of file time.c.