aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/counter_32k.c
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 /arch/arm/plat-omap/counter_32k.c
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>
Diffstat (limited to 'arch/arm/plat-omap/counter_32k.c')
-rw-r--r--arch/arm/plat-omap/counter_32k.c15
1 files changed, 8 insertions, 7 deletions
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);