X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Farm%2Fkernel%2Ftime.c;h=3c8cdcfe8d4a9f72c9ffb3762a72b260be85d73c;hb=51e6ed23fc95c3e710d8a98717924ccb2571aa66;hp=0c5a6091a93cbc7038eaad22c768a414ed9d4424;hpb=752c58a471c108d64da1676b2925dfbd83eb177e;p=pandora-kernel.git diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index 0c5a6091a93c..3c8cdcfe8d4a 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c @@ -29,6 +29,8 @@ #include #include +#include + #include #include #include @@ -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; /* @@ -220,10 +233,10 @@ EXPORT_SYMBOL(leds_event); #ifdef CONFIG_LEDS_TIMER static inline void do_leds(void) { - static unsigned int count = 50; + static unsigned int count = HZ/2; if (--count == 0) { - count = 50; + count = HZ/2; leds_event(led_timer); } }