From e3f432919feb4f26fe837472669e397ba8e8fccb Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Mon, 17 Jun 2013 11:29:46 +0300 Subject: xtensa: ccount based sched_clock Signed-off-by: Baruch Siach Signed-off-by: Chris Zankel --- arch/xtensa/kernel/time.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'arch/xtensa/kernel/time.c') diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c index ece4f9588625..bdbb17312526 100644 --- a/arch/xtensa/kernel/time.c +++ b/arch/xtensa/kernel/time.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -37,6 +38,11 @@ static cycle_t ccount_read(struct clocksource *cs) return (cycle_t)get_ccount(); } +static u32 notrace ccount_sched_clock_read(void) +{ + return get_ccount(); +} + static struct clocksource ccount_clocksource = { .name = "ccount", .rating = 200, @@ -134,6 +140,8 @@ void __init time_init(void) 0xffffffff); setup_irq(ccount_timer.evt.irq, &timer_irqaction); ccount_timer.irq_enabled = 1; + + setup_sched_clock(ccount_sched_clock_read, 32, ccount_freq); } /* -- cgit