Hi John,
On Tue, May 28, 2013 at 01:24:17PM -0700, John Stultz wrote:On 05/26/2013 05:12 AM, Baruch Siach wrote:Thanks for your comments. I'll rework the patch and resubmit.static const struct of_device_id osctimer_ids[] __initconst = {Also, can you try to condense the number of #ifndef
@@ -124,3 +135,10 @@ void __init dw_apb_timer_init(void)
init_sched_clock();
}
+
+#ifndef CONFIG_HAVE_SETUP_SCHED_CLOCK
+unsigned long long notrace sched_clock()
+{
+ return read_sched_clock() * sched_clock_mult;
+}
+#endif
CONFIG_HAVE_SETUP_SCHED_CLOCK checks to one, and consolidate the
needed functions all in that one conditional?
I've just noticed that I have a bigger problem. read_sched_clock() returns
u32, not u64. This means that in a rate of, say, 100MHz it will wrap around
after a little more than 40 seconds. Would it make sense to put ARM's 32 bin
sched_clock extension code (arch/arm/kernel/sched_clock.c) is a common place
(maybe drivers/clocksource), and use that? There seems to be nothing ARM
specific in this code, after all.