summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/time.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.osdl.org>2007-01-08 15:06:39 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2007-01-08 15:06:39 -0800
commit74bda9310fe9776f3d940057ac2e7881214577d6 (patch)
tree38989eda1ce69bcf580a6b82c977d0862497151c /arch/arm/kernel/time.c
parentfea5f1e19611d94fbf3905875a427c4cb959cd06 (diff)
parente97126cd9056b3b42cdc862ace2ed66f8026f55b (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: [ARM] Provide basic printk_clock() implementation [ARM] Resolve fuse and direct-IO failures due to missing cache flushes [ARM] pass vma for flush_anon_page() [ARM] Fix potential MMCI bug [ARM] Fix kernel-mode undefined instruction aborts [ARM] 4082/1: iop3xx: fix iop33x gpio register offset [ARM] 4070/1: arch/arm/kernel: fix warnings from missing includes [ARM] 4079/1: iop: Update MAINTAINERS
Diffstat (limited to 'arch/arm/kernel/time.c')
-rw-r--r--arch/arm/kernel/time.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c
index 6ff5e3ff6cb..3c8cdcfe8d4 100644
--- a/arch/arm/kernel/time.c
+++ b/arch/arm/kernel/time.c
@@ -29,6 +29,8 @@
#include <linux/timer.h>
#include <linux/irq.h>
+#include <linux/mc146818rtc.h>
+
#include <asm/leds.h>
#include <asm/thread_info.h>
#include <asm/mach/time.h>
@@ -85,6 +87,17 @@ unsigned long long __attribute__((weak)) sched_clock(void)
return (unsigned long long)jiffies * (1000000000 / HZ);
}
+/*
+ * An implementation of printk_clock() independent from
+ * sched_clock(). This avoids non-bootable kernels when
+ * printk_clock is enabled.
+ */
+unsigned long long printk_clock(void)
+{
+ return (unsigned long long)(jiffies - INITIAL_JIFFIES) *
+ (1000000000 / HZ);
+}
+
static unsigned long next_rtc_update;
/*