Skip to contentSkip to conversation

OMAP: don't trace functions called from sched_clock

PATCH New Rabin Vincent 3 participants 7 messages May 8, 2011 – May 31, 2011

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 OMAP: don't trace functions called from sched_clock

omap_readl() is used from the sched_clock() implementations and so must be marked notrace to avoid recursion in ftrace. Same thing with mpu_read() for OMAP1.

---
 arch/arm/mach-omap1/io.c   |    2 +-
 arch/arm/mach-omap1/time.c |    2 +-
 arch/arm/mach-omap2/io.c   |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-omap1/io.c +1 -1
index 870886a..36ec2d7 100644
@@ -158,7 +158,7 @@ u16 omap_readw(u32 pa)
 }
 EXPORT_SYMBOL(omap_readw);
 
-u32 omap_readl(u32 pa)
+u32 notrace omap_readl(u32 pa)
 {
 	return __raw_readl(OMAP1_IO_ADDRESS(pa));
 }
arch/arm/mach-omap1/time.c +1 -1
index 6885d2f..88c5c5e 100644
@@ -203,7 +203,7 @@ static struct irqaction omap_mpu_timer2_irq = {
 	.handler	= omap_mpu_timer2_interrupt,
 };
 
-static cycle_t mpu_read(struct clocksource *cs)
+static cycle_t notrace mpu_read(struct clocksource *cs)
 {
 	return ~omap_mpu_timer_read(1);
 }
arch/arm/mach-omap2/io.c +1 -1
index 441e79d..f1987b1 100644
@@ -441,7 +441,7 @@ u16 omap_readw(u32 pa)
 }
 EXPORT_SYMBOL(omap_readw);
 
-u32 omap_readl(u32 pa)
+u32 notrace omap_readl(u32 pa)
 {
 	return __raw_readl(OMAP2_L4_IO_ADDRESS(pa));
 }
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/1 OMAP: don't trace functions called from sched_clock

Tony,

Quoted 5 lines · Rabin Vincent

omap_readl() is used from the sched_clock() implementations and so must be marked notrace to avoid recursion in ftrace. ?Same thing with mpu_read() for OMAP1.

Comments on this patch? This is a bugfix; the function graph tracer will crash and burn on OMAP without this.

Quoted 49 lines

---

?arch/arm/mach-omap1/io.c ? | ? ?2 +-
?arch/arm/mach-omap1/time.c | ? ?2 +-
?arch/arm/mach-omap2/io.c ? | ? ?2 +-

?3 files changed, 3 insertions(+), 3 deletions(-)

arch/arm/mach-omap1/io.c +1 -1
index 870886a..36ec2d7 100644
@@ -158,7 +158,7 @@ u16 omap_readw(u32 pa)
 ?}
 ?EXPORT_SYMBOL(omap_readw);
 
-u32 omap_readl(u32 pa)
+u32 notrace omap_readl(u32 pa)
 ?{
 ? ? ? ?return __raw_readl(OMAP1_IO_ADDRESS(pa));
 ?}
arch/arm/mach-omap1/time.c +1 -1
index 6885d2f..88c5c5e 100644
@@ -203,7 +203,7 @@ static struct irqaction omap_mpu_timer2_irq = {
 ? ? ? ?.handler ? ? ? ?= omap_mpu_timer2_interrupt,
 ?};
 
-static cycle_t mpu_read(struct clocksource *cs)
+static cycle_t notrace mpu_read(struct clocksource *cs)
 ?{
 ? ? ? ?return ~omap_mpu_timer_read(1);
 ?}
arch/arm/mach-omap2/io.c +1 -2
index 441e79d..f1987b1 100644
@@ -441,7 +441,7 @@ u16 omap_readw(u32 pa)
 ?}
 ?EXPORT_SYMBOL(omap_readw);
 
-u32 omap_readl(u32 pa)
+u32 notrace omap_readl(u32 pa)
 ?{
 ? ? ? ?return __raw_readl(OMAP2_L4_IO_ADDRESS(pa));
 ?}
--

1.7.4.1

maintainer
#2 lore raw

PATCH 1/1 OMAP: don't trace functions called from sched_clock

Quoted 6 lines · Rabin Vincent

Tony,

Quoted 3 lines · Rabin Vincent

omap_readl() is used from the sched_clock() implementations and so must be marked notrace to avoid recursion in ftrace. ?Same thing with mpu_read() for OMAP1.

We should rather ioremap the 32KSYNCT_BASE in omap_init_clocksource_32k and then use __raw_readl. That allows us to get rid of omap_read usage here and simplifies the code.

Regards,

Tony

#4 lore raw

PATCH 1/1 OMAP: don't trace functions called from sched_clock

Quoted 9 lines · Kevin Hilman
Quoted 5 lines · Rabin Vincent

omap_readl() is used from the sched_clock() implementations and so must be marked notrace to avoid recursion in ftrace. Same thing with mpu_read() for OMAP1.

I also meant to suggest this should probably queue for .40-rc series.

Kevin

maintainer
#5 lore raw

PATCH 1/1 OMAP: don't trace functions called from sched_clock

Quoted 8 lines · Kevin Hilman
Quoted 6 lines · Kevin Hilman
Quoted 4 lines · Rabin Vincent

omap_readl() is used from the sched_clock() implementations and so must be marked notrace to avoid recursion in ftrace. Same thing with mpu_read() for OMAP1.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

I also meant to suggest this should probably queue for .40-rc series.

Took a quick look and we should get rid of the omap_readl usage instead like I commented in another mail.

Tony

#6 lore raw

PATCH 1/1 OMAP: don't trace functions called from sched_clock

Quoted 9 lines · Tony Lindgren
Quoted 8 lines · Kevin Hilman
Quoted 6 lines · Kevin Hilman
Quoted 4 lines · Rabin Vincent

omap_readl() is used from the sched_clock() implementations and so must be marked notrace to avoid recursion in ftrace. Same thing with mpu_read() for OMAP1.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

I also meant to suggest this should probably queue for .40-rc series.

Took a quick look and we should get rid of the omap_readl usage instead like I commented in another mail.

Agreed, that's a better approach.

Kevin