Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e06b649 authored by Russell King's avatar Russell King
Browse files

ARM: ensure all sched_clock() implementations are notrace marked



ftrace requires sched_clock() to be notrace.  Ensure that all
implementations are so marked.  Also make sure that they include
linux/sched.h

Also ensure OMAP clocksource read functions are marked notrace as
they're used for sched_clock() too.

Tested-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: default avatarWill Deacon <will.deacon@arm.com>
Tested-by: default avatarMikael Pettersson <mikpe@it.uu.se>
Tested-by: default avatarEric Miao <eric.y.miao@gmail.com>
Tested-by: default avatarOlof Johansson <olof@lixom.net>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 684e94cb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -424,7 +424,7 @@ static void __init ixp4xx_clocksource_init(void)
/*
 * sched_clock()
 */
unsigned long long sched_clock(void)
unsigned long long notrace sched_clock(void)
{
	cycle_t cyc = ixp4xx_get_cycles(NULL);
	struct clocksource *cs = &clocksource_ixp4xx;
+1 −1
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ static inline uint32_t timer_read(void)
	return __raw_readl(TIMERS_VIRT_BASE + TMR_CVWR(0));
}

unsigned long long sched_clock(void)
unsigned long long notrace sched_clock(void)
{
	unsigned long long v = cnt32_to_63(timer_read());
	return (v * tcr2ns_scale) >> TCR2NS_SCALE_FACTOR;
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ static void __init set_oscr2ns_scale(unsigned long oscr_rate)
		oscr2ns_scale++;
}

unsigned long long sched_clock(void)
unsigned long long notrace sched_clock(void)
{
	unsigned long long v = cnt32_to_63(OSCR);
	return (v * oscr2ns_scale) >> OSCR2NS_SCALE_FACTOR;
+1 −1
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@ unsigned int sa11x0_getspeed(unsigned int cpu)
 *
 *  ( * 1E9 / 3686400 => * 78125 / 288)
 */
unsigned long long sched_clock(void)
unsigned long long notrace sched_clock(void)
{
	unsigned long long v = cnt32_to_63(OSCR);

+2 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
 */

#include <linux/init.h>
#include <linux/sched.h>
#include <linux/time.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
@@ -110,7 +111,7 @@ static struct clocksource tegra_clocksource = {
	.flags	= CLOCK_SOURCE_IS_CONTINUOUS,
};

unsigned long long sched_clock(void)
unsigned long long notrace sched_clock(void)
{
	return cnt32_to_63(timer_readl(TIMERUS_CNTR_1US)) * 1000;
}
Loading