diff options
Diffstat (limited to 'arch/arm/mach-u300/timer.c')
-rw-r--r-- | arch/arm/mach-u300/timer.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-u300/timer.c b/arch/arm/mach-u300/timer.c index cce53204880e..26d26f5100fe 100644 --- a/arch/arm/mach-u300/timer.c +++ b/arch/arm/mach-u300/timer.c | |||
@@ -346,6 +346,21 @@ static struct clocksource clocksource_u300_1mhz = { | |||
346 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 346 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
347 | }; | 347 | }; |
348 | 348 | ||
349 | /* | ||
350 | * Override the global weak sched_clock symbol with this | ||
351 | * local implementation which uses the clocksource to get some | ||
352 | * better resolution when scheduling the kernel. We accept that | ||
353 | * this wraps around for now, since it is just a relative time | ||
354 | * stamp. (Inspired by OMAP implementation.) | ||
355 | */ | ||
356 | unsigned long long notrace sched_clock(void) | ||
357 | { | ||
358 | return clocksource_cyc2ns(clocksource_u300_1mhz.read( | ||
359 | &clocksource_u300_1mhz), | ||
360 | clocksource_u300_1mhz.mult, | ||
361 | clocksource_u300_1mhz.shift); | ||
362 | } | ||
363 | |||
349 | 364 | ||
350 | /* | 365 | /* |
351 | * This sets up the system timers, clock source and clock event. | 366 | * This sets up the system timers, clock source and clock event. |