aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-12-15 14:19:25 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-12-22 17:44:42 -0500
commit5e06b6492e53ab2a4e467763a9ee9f70b032c301 (patch)
tree6259d673f427d7194c6825bb1868ccf8b0ee21fe
parent684e94cbcb5add60356d124166e40feb2174f0f1 (diff)
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: Santosh Shilimkar <santosh.shilimkar@ti.com> Tested-by: Will Deacon <will.deacon@arm.com> Tested-by: Mikael Pettersson <mikpe@it.uu.se> Tested-by: Eric Miao <eric.y.miao@gmail.com> Tested-by: Olof Johansson <olof@lixom.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/mach-ixp4xx/common.c2
-rw-r--r--arch/arm/mach-mmp/time.c2
-rw-r--r--arch/arm/mach-pxa/time.c2
-rw-r--r--arch/arm/mach-sa1100/generic.c2
-rw-r--r--arch/arm/mach-tegra/timer.c3
-rw-r--r--arch/arm/mach-u300/timer.c1
-rw-r--r--arch/arm/plat-iop/time.c3
-rw-r--r--arch/arm/plat-nomadik/timer.c1
-rw-r--r--arch/arm/plat-omap/counter_32k.c15
-rw-r--r--arch/arm/plat-orion/time.c2
-rw-r--r--arch/arm/plat-versatile/sched-clock.c2
11 files changed, 20 insertions, 15 deletions
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 82fc003aae8b..e0b91d8ef644 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -424,7 +424,7 @@ static void __init ixp4xx_clocksource_init(void)
424/* 424/*
425 * sched_clock() 425 * sched_clock()
426 */ 426 */
427unsigned long long sched_clock(void) 427unsigned long long notrace sched_clock(void)
428{ 428{
429 cycle_t cyc = ixp4xx_get_cycles(NULL); 429 cycle_t cyc = ixp4xx_get_cycles(NULL);
430 struct clocksource *cs = &clocksource_ixp4xx; 430 struct clocksource *cs = &clocksource_ixp4xx;
diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c
index 0c0ab0931735..a2ea33d04e63 100644
--- a/arch/arm/mach-mmp/time.c
+++ b/arch/arm/mach-mmp/time.c
@@ -75,7 +75,7 @@ static inline uint32_t timer_read(void)
75 return __raw_readl(TIMERS_VIRT_BASE + TMR_CVWR(0)); 75 return __raw_readl(TIMERS_VIRT_BASE + TMR_CVWR(0));
76} 76}
77 77
78unsigned long long sched_clock(void) 78unsigned long long notrace sched_clock(void)
79{ 79{
80 unsigned long long v = cnt32_to_63(timer_read()); 80 unsigned long long v = cnt32_to_63(timer_read());
81 return (v * tcr2ns_scale) >> TCR2NS_SCALE_FACTOR; 81 return (v * tcr2ns_scale) >> TCR2NS_SCALE_FACTOR;
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
index caf92c0bfba5..b8d9dff00ad1 100644
--- a/arch/arm/mach-pxa/time.c
+++ b/arch/arm/mach-pxa/time.c
@@ -51,7 +51,7 @@ static void __init set_oscr2ns_scale(unsigned long oscr_rate)
51 oscr2ns_scale++; 51 oscr2ns_scale++;
52} 52}
53 53
54unsigned long long sched_clock(void) 54unsigned long long notrace sched_clock(void)
55{ 55{
56 unsigned long long v = cnt32_to_63(OSCR); 56 unsigned long long v = cnt32_to_63(OSCR);
57 return (v * oscr2ns_scale) >> OSCR2NS_SCALE_FACTOR; 57 return (v * oscr2ns_scale) >> OSCR2NS_SCALE_FACTOR;
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c
index 3c1fcd696714..33b4969e9d51 100644
--- a/arch/arm/mach-sa1100/generic.c
+++ b/arch/arm/mach-sa1100/generic.c
@@ -119,7 +119,7 @@ unsigned int sa11x0_getspeed(unsigned int cpu)
119 * 119 *
120 * ( * 1E9 / 3686400 => * 78125 / 288) 120 * ( * 1E9 / 3686400 => * 78125 / 288)
121 */ 121 */
122unsigned long long sched_clock(void) 122unsigned long long notrace sched_clock(void)
123{ 123{
124 unsigned long long v = cnt32_to_63(OSCR); 124 unsigned long long v = cnt32_to_63(OSCR);
125 125
diff --git a/arch/arm/mach-tegra/timer.c b/arch/arm/mach-tegra/timer.c
index b49f2f5025f2..c52bd84652e5 100644
--- a/arch/arm/mach-tegra/timer.c
+++ b/arch/arm/mach-tegra/timer.c
@@ -18,6 +18,7 @@
18 */ 18 */
19 19
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/sched.h>
21#include <linux/time.h> 22#include <linux/time.h>
22#include <linux/interrupt.h> 23#include <linux/interrupt.h>
23#include <linux/irq.h> 24#include <linux/irq.h>
@@ -110,7 +111,7 @@ static struct clocksource tegra_clocksource = {
110 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 111 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
111}; 112};
112 113
113unsigned long long sched_clock(void) 114unsigned long long notrace sched_clock(void)
114{ 115{
115 return cnt32_to_63(timer_readl(TIMERUS_CNTR_1US)) * 1000; 116 return cnt32_to_63(timer_readl(TIMERUS_CNTR_1US)) * 1000;
116} 117}
diff --git a/arch/arm/mach-u300/timer.c b/arch/arm/mach-u300/timer.c
index 377ff7ff9182..6c68fe797903 100644
--- a/arch/arm/mach-u300/timer.c
+++ b/arch/arm/mach-u300/timer.c
@@ -9,6 +9,7 @@
9 * Author: Linus Walleij <linus.walleij@stericsson.com> 9 * Author: Linus Walleij <linus.walleij@stericsson.com>
10 */ 10 */
11#include <linux/interrupt.h> 11#include <linux/interrupt.h>
12#include <linux/sched.h>
12#include <linux/time.h> 13#include <linux/time.h>
13#include <linux/timex.h> 14#include <linux/timex.h>
14#include <linux/clockchips.h> 15#include <linux/clockchips.h>
diff --git a/arch/arm/plat-iop/time.c b/arch/arm/plat-iop/time.c
index 4332dc458ff9..d03a93295e60 100644
--- a/arch/arm/plat-iop/time.c
+++ b/arch/arm/plat-iop/time.c
@@ -17,6 +17,7 @@
17#include <linux/interrupt.h> 17#include <linux/interrupt.h>
18#include <linux/time.h> 18#include <linux/time.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/sched.h>
20#include <linux/timex.h> 21#include <linux/timex.h>
21#include <linux/io.h> 22#include <linux/io.h>
22#include <linux/clocksource.h> 23#include <linux/clocksource.h>
@@ -52,7 +53,7 @@ static struct clocksource iop_clocksource = {
52/* 53/*
53 * IOP sched_clock() implementation via its clocksource. 54 * IOP sched_clock() implementation via its clocksource.
54 */ 55 */
55unsigned long long sched_clock(void) 56unsigned long long notrace sched_clock(void)
56{ 57{
57 cycle_t cyc = iop_clocksource_read(NULL); 58 cycle_t cyc = iop_clocksource_read(NULL);
58 struct clocksource *cs = &iop_clocksource; 59 struct clocksource *cs = &iop_clocksource;
diff --git a/arch/arm/plat-nomadik/timer.c b/arch/arm/plat-nomadik/timer.c
index b0bd6dfea52b..c3b8a2246b99 100644
--- a/arch/arm/plat-nomadik/timer.c
+++ b/arch/arm/plat-nomadik/timer.c
@@ -19,6 +19,7 @@
19#include <linux/err.h> 19#include <linux/err.h>
20#include <linux/cnt32_to_63.h> 20#include <linux/cnt32_to_63.h>
21#include <linux/timer.h> 21#include <linux/timer.h>
22#include <linux/sched.h>
22#include <asm/mach/time.h> 23#include <asm/mach/time.h>
23 24
24#include <plat/mtu.h> 25#include <plat/mtu.h>
diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c
index 8f149f51cb46..aed301bfa2f9 100644
--- a/arch/arm/plat-omap/counter_32k.c
+++ b/arch/arm/plat-omap/counter_32k.c
@@ -16,6 +16,7 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/clk.h> 17#include <linux/clk.h>
18#include <linux/io.h> 18#include <linux/io.h>
19#include <linux/sched.h>
19 20
20#include <plat/common.h> 21#include <plat/common.h>
21#include <plat/board.h> 22#include <plat/board.h>
@@ -44,7 +45,7 @@
44static u32 offset_32k __read_mostly; 45static u32 offset_32k __read_mostly;
45 46
46#ifdef CONFIG_ARCH_OMAP16XX 47#ifdef CONFIG_ARCH_OMAP16XX
47static cycle_t omap16xx_32k_read(struct clocksource *cs) 48static cycle_t notrace omap16xx_32k_read(struct clocksource *cs)
48{ 49{
49 return omap_readl(OMAP16XX_TIMER_32K_SYNCHRONIZED) - offset_32k; 50 return omap_readl(OMAP16XX_TIMER_32K_SYNCHRONIZED) - offset_32k;
50} 51}
@@ -53,7 +54,7 @@ static cycle_t omap16xx_32k_read(struct clocksource *cs)
53#endif 54#endif
54 55
55#ifdef CONFIG_ARCH_OMAP2420 56#ifdef CONFIG_ARCH_OMAP2420
56static cycle_t omap2420_32k_read(struct clocksource *cs) 57static cycle_t notrace omap2420_32k_read(struct clocksource *cs)
57{ 58{
58 return omap_readl(OMAP2420_32KSYNCT_BASE + 0x10) - offset_32k; 59 return omap_readl(OMAP2420_32KSYNCT_BASE + 0x10) - offset_32k;
59} 60}
@@ -62,7 +63,7 @@ static cycle_t omap2420_32k_read(struct clocksource *cs)
62#endif 63#endif
63 64
64#ifdef CONFIG_ARCH_OMAP2430 65#ifdef CONFIG_ARCH_OMAP2430
65static cycle_t omap2430_32k_read(struct clocksource *cs) 66static cycle_t notrace omap2430_32k_read(struct clocksource *cs)
66{ 67{
67 return omap_readl(OMAP2430_32KSYNCT_BASE + 0x10) - offset_32k; 68 return omap_readl(OMAP2430_32KSYNCT_BASE + 0x10) - offset_32k;
68} 69}
@@ -71,7 +72,7 @@ static cycle_t omap2430_32k_read(struct clocksource *cs)
71#endif 72#endif
72 73
73#ifdef CONFIG_ARCH_OMAP3 74#ifdef CONFIG_ARCH_OMAP3
74static cycle_t omap34xx_32k_read(struct clocksource *cs) 75static cycle_t notrace omap34xx_32k_read(struct clocksource *cs)
75{ 76{
76 return omap_readl(OMAP3430_32KSYNCT_BASE + 0x10) - offset_32k; 77 return omap_readl(OMAP3430_32KSYNCT_BASE + 0x10) - offset_32k;
77} 78}
@@ -80,7 +81,7 @@ static cycle_t omap34xx_32k_read(struct clocksource *cs)
80#endif 81#endif
81 82
82#ifdef CONFIG_ARCH_OMAP4 83#ifdef CONFIG_ARCH_OMAP4
83static cycle_t omap44xx_32k_read(struct clocksource *cs) 84static cycle_t notrace omap44xx_32k_read(struct clocksource *cs)
84{ 85{
85 return omap_readl(OMAP4430_32KSYNCT_BASE + 0x10) - offset_32k; 86 return omap_readl(OMAP4430_32KSYNCT_BASE + 0x10) - offset_32k;
86} 87}
@@ -92,7 +93,7 @@ static cycle_t omap44xx_32k_read(struct clocksource *cs)
92 * Kernel assumes that sched_clock can be called early but may not have 93 * Kernel assumes that sched_clock can be called early but may not have
93 * things ready yet. 94 * things ready yet.
94 */ 95 */
95static cycle_t omap_32k_read_dummy(struct clocksource *cs) 96static cycle_t notrace omap_32k_read_dummy(struct clocksource *cs)
96{ 97{
97 return 0; 98 return 0;
98} 99}
@@ -109,7 +110,7 @@ static struct clocksource clocksource_32k = {
109 * Returns current time from boot in nsecs. It's OK for this to wrap 110 * Returns current time from boot in nsecs. It's OK for this to wrap
110 * around for now, as it's just a relative time stamp. 111 * around for now, as it's just a relative time stamp.
111 */ 112 */
112unsigned long long sched_clock(void) 113unsigned long long notrace sched_clock(void)
113{ 114{
114 return clocksource_cyc2ns(clocksource_32k.read(&clocksource_32k), 115 return clocksource_cyc2ns(clocksource_32k.read(&clocksource_32k),
115 clocksource_32k.mult, clocksource_32k.shift); 116 clocksource_32k.mult, clocksource_32k.shift);
diff --git a/arch/arm/plat-orion/time.c b/arch/arm/plat-orion/time.c
index 11e2583e85e4..123f96f4194f 100644
--- a/arch/arm/plat-orion/time.c
+++ b/arch/arm/plat-orion/time.c
@@ -55,7 +55,7 @@ static u32 ticks_per_jiffy;
55 55
56static unsigned long tclk2ns_scale; 56static unsigned long tclk2ns_scale;
57 57
58unsigned long long sched_clock(void) 58unsigned long long notrace sched_clock(void)
59{ 59{
60 unsigned long long v = cnt32_to_63(0xffffffff - readl(TIMER0_VAL)); 60 unsigned long long v = cnt32_to_63(0xffffffff - readl(TIMER0_VAL));
61 return (v * tclk2ns_scale) >> TCLK2NS_SCALE_FACTOR; 61 return (v * tclk2ns_scale) >> TCLK2NS_SCALE_FACTOR;
diff --git a/arch/arm/plat-versatile/sched-clock.c b/arch/arm/plat-versatile/sched-clock.c
index 9696ddc238c9..42efd14ed4b3 100644
--- a/arch/arm/plat-versatile/sched-clock.c
+++ b/arch/arm/plat-versatile/sched-clock.c
@@ -42,7 +42,7 @@
42 * long as there is always less than 89 seconds between successive 42 * long as there is always less than 89 seconds between successive
43 * calls to this function. 43 * calls to this function.
44 */ 44 */
45unsigned long long sched_clock(void) 45unsigned long long notrace sched_clock(void)
46{ 46{
47 unsigned long long v = cnt32_to_63(readl(REFCOUNTER)); 47 unsigned long long v = cnt32_to_63(readl(REFCOUNTER));
48 48