#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>
#endif
/*
- * Scheduler clock - returns current time in nanosec units.
- * This is the default implementation. Sub-architecture
- * implementations can override this.
+ * An implementation of printk_clock() independent from
+ * sched_clock(). This avoids non-bootable kernels when
+ * printk_clock is enabled.
*/
-unsigned long long __attribute__((weak)) sched_clock(void)
+unsigned long long printk_clock(void)
{
- return (unsigned long long)jiffies * (1000000000 / HZ);
+ return (unsigned long long)(jiffies - INITIAL_JIFFIES) *
+ (1000000000 / HZ);
}
static unsigned long next_rtc_update;