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=c03cab5c4c798e763108480de6382312f41ba5ca;hpb=12e36b2f41b6cbc67386fcb9c59c32a3e2033905;p=pandora-kernel.git diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index c03cab5c4c79..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); } } @@ -327,13 +340,12 @@ EXPORT_SYMBOL(restore_time_delta); */ void timer_tick(void) { - struct pt_regs *regs = get_irq_regs(); profile_tick(CPU_PROFILING); do_leds(); do_set_rtc(); do_timer(1); #ifndef CONFIG_SMP - update_process_times(user_mode(regs)); + update_process_times(user_mode(get_irq_regs())); #endif }