14 #include <linux/export.h>
15 #include <linux/kernel.h>
17 #include <linux/time.h>
19 #include <linux/sched.h>
21 #include <linux/timex.h>
22 #include <linux/errno.h>
28 #include <asm/thread_info.h>
30 #include <asm/stacktrace.h>
39 #if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || \
40 defined(CONFIG_NVRAM) || defined(CONFIG_NVRAM_MODULE)
47 #define USECS_PER_JIFFY (1000000/HZ)
57 frame.
fp = regs->ARM_fp;
58 frame.
sp = regs->ARM_sp;
59 frame.
lr = regs->ARM_lr;
60 frame.
pc = regs->ARM_pc;
72 #ifdef CONFIG_ARCH_USES_GETTIMEOFFSET
75 if (system_timer->offset !=
NULL)
76 return system_timer->offset() * 1000;
82 #ifndef CONFIG_GENERIC_CLOCKEVENTS
96 static void dummy_clock_access(
struct timespec *
ts)
107 __read_persistent_clock(ts);
112 __read_boot_clock(ts);
119 if (__read_persistent_clock == dummy_clock_access &&
120 __read_boot_clock == dummy_clock_access) {
122 __read_boot_clock = read_boot;
124 __read_persistent_clock = read_persistent;
132 #if defined(CONFIG_PM) && !defined(CONFIG_GENERIC_CLOCKEVENTS)
147 #define timer_suspend NULL
148 #define timer_resume NULL
156 static int __init timer_init_syscore_ops(
void)
168 system_timer->
init();