* [PATCH 1/3] clocksource/arm_arch_timer: mark arch_counter_get_* as notrace
@ 2019-06-03 9:12 Anders Roxell
2019-06-03 9:23 ` Marc Zyngier
0 siblings, 1 reply; 3+ messages in thread
From: Anders Roxell @ 2019-06-03 9:12 UTC (permalink / raw)
To: mark.rutland, marc.zyngier, daniel.lezcano, tglx
Cc: mingo, Anders Roxell, linux-kernel, linux-arm-kernel
When CONFIG_FUNCTION_GRAPH_TRACER is enabled we end up in this circular
call trace since function arch_counter_get_cntvct() isn't marked with no
trace:
[ 17.914934] Call trace:
[ 17.915211] ftrace_return_to_handler+0x194/0x288
[ 17.915551] return_to_handler+0x1c/0x38
[ 17.915855] trace_clock_local+0x38/0x88
[ 17.916159] function_graph_enter+0xf0/0x258
[ 17.916465] prepare_ftrace_return+0x60/0x90
[ 17.916772] ftrace_graph_caller+0x1c/0x24
[ 17.917093] arch_counter_get_cntvct+0x10/0x30
[ 17.917417] sched_clock+0x70/0x218
[ 17.917723] trace_clock_local+0x38/0x88
[ 17.918026] function_graph_enter+0xf0/0x258
[ 17.918332] prepare_ftrace_return+0x60/0x90
[ 17.918649] ftrace_graph_caller+0x1c/0x24
[ 17.918963] arch_counter_get_cntvct+0x10/0x30
[ 17.919286] sched_clock+0x70/0x218
Rework so that function arch_counter_get_cntvct() is marked with notrace.
Fixes: 0ea415390cd3 ("clocksource/arm_arch_timer: Use arch_timer_read_counter to access stable counters")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
drivers/clocksource/arm_arch_timer.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index b2a951a798e2..f4d5bd8fe906 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -149,22 +149,22 @@ u32 arch_timer_reg_read(int access, enum arch_timer_reg reg,
return val;
}
-static u64 arch_counter_get_cntpct_stable(void)
+static u64 notrace arch_counter_get_cntpct_stable(void)
{
return __arch_counter_get_cntpct_stable();
}
-static u64 arch_counter_get_cntpct(void)
+static u64 notrace arch_counter_get_cntpct(void)
{
return __arch_counter_get_cntpct();
}
-static u64 arch_counter_get_cntvct_stable(void)
+static u64 notrace arch_counter_get_cntvct_stable(void)
{
return __arch_counter_get_cntvct_stable();
}
-static u64 arch_counter_get_cntvct(void)
+static u64 notrace arch_counter_get_cntvct(void)
{
return __arch_counter_get_cntvct();
}
@@ -947,7 +947,7 @@ bool arch_timer_evtstrm_available(void)
return cpumask_test_cpu(raw_smp_processor_id(), &evtstrm_available);
}
-static u64 arch_counter_get_cntvct_mem(void)
+static u64 notrace arch_counter_get_cntvct_mem(void)
{
u32 vct_lo, vct_hi, tmp_hi;
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/3] clocksource/arm_arch_timer: mark arch_counter_get_* as notrace
2019-06-03 9:12 [PATCH 1/3] clocksource/arm_arch_timer: mark arch_counter_get_* as notrace Anders Roxell
@ 2019-06-03 9:23 ` Marc Zyngier
2019-06-04 5:52 ` Daniel Lezcano
0 siblings, 1 reply; 3+ messages in thread
From: Marc Zyngier @ 2019-06-03 9:23 UTC (permalink / raw)
To: Anders Roxell, mark.rutland, daniel.lezcano, tglx
Cc: mingo, linux-kernel, linux-arm-kernel
Hi Anders,
On 03/06/2019 10:12, Anders Roxell wrote:
> When CONFIG_FUNCTION_GRAPH_TRACER is enabled we end up in this circular
> call trace since function arch_counter_get_cntvct() isn't marked with no
> trace:
>
> [ 17.914934] Call trace:
> [ 17.915211] ftrace_return_to_handler+0x194/0x288
> [ 17.915551] return_to_handler+0x1c/0x38
> [ 17.915855] trace_clock_local+0x38/0x88
> [ 17.916159] function_graph_enter+0xf0/0x258
> [ 17.916465] prepare_ftrace_return+0x60/0x90
> [ 17.916772] ftrace_graph_caller+0x1c/0x24
> [ 17.917093] arch_counter_get_cntvct+0x10/0x30
> [ 17.917417] sched_clock+0x70/0x218
> [ 17.917723] trace_clock_local+0x38/0x88
> [ 17.918026] function_graph_enter+0xf0/0x258
> [ 17.918332] prepare_ftrace_return+0x60/0x90
> [ 17.918649] ftrace_graph_caller+0x1c/0x24
> [ 17.918963] arch_counter_get_cntvct+0x10/0x30
> [ 17.919286] sched_clock+0x70/0x218
>
> Rework so that function arch_counter_get_cntvct() is marked with notrace.
>
> Fixes: 0ea415390cd3 ("clocksource/arm_arch_timer: Use arch_timer_read_counter to access stable counters")
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
This has already been queued by Daniel, I believe [1].
[1] https://lore.kernel.org/lkml/1558689025-50679-1-git-send-email-julien.thierry@arm.com/
Thanks,
M.
--
Jazz is not dead. It just smells funny...
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/3] clocksource/arm_arch_timer: mark arch_counter_get_* as notrace
2019-06-03 9:23 ` Marc Zyngier
@ 2019-06-04 5:52 ` Daniel Lezcano
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Lezcano @ 2019-06-04 5:52 UTC (permalink / raw)
To: Marc Zyngier, Anders Roxell, mark.rutland, tglx
Cc: mingo, linux-kernel, linux-arm-kernel
Hi Anders,
thanks for your patch. As mentioned by Mark I already applied this fix
from Julien Thierry.
-- Daniel
On 03/06/2019 11:23, Marc Zyngier wrote:
> Hi Anders,
>
>
> On 03/06/2019 10:12, Anders Roxell wrote:
>> When CONFIG_FUNCTION_GRAPH_TRACER is enabled we end up in this circular
>> call trace since function arch_counter_get_cntvct() isn't marked with no
>> trace:
>>
>> [ 17.914934] Call trace:
>> [ 17.915211] ftrace_return_to_handler+0x194/0x288
>> [ 17.915551] return_to_handler+0x1c/0x38
>> [ 17.915855] trace_clock_local+0x38/0x88
>> [ 17.916159] function_graph_enter+0xf0/0x258
>> [ 17.916465] prepare_ftrace_return+0x60/0x90
>> [ 17.916772] ftrace_graph_caller+0x1c/0x24
>> [ 17.917093] arch_counter_get_cntvct+0x10/0x30
>> [ 17.917417] sched_clock+0x70/0x218
>> [ 17.917723] trace_clock_local+0x38/0x88
>> [ 17.918026] function_graph_enter+0xf0/0x258
>> [ 17.918332] prepare_ftrace_return+0x60/0x90
>> [ 17.918649] ftrace_graph_caller+0x1c/0x24
>> [ 17.918963] arch_counter_get_cntvct+0x10/0x30
>> [ 17.919286] sched_clock+0x70/0x218
>>
>> Rework so that function arch_counter_get_cntvct() is marked with notrace.
>>
>> Fixes: 0ea415390cd3 ("clocksource/arm_arch_timer: Use arch_timer_read_counter to access stable counters")
>> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
>
> This has already been queued by Daniel, I believe [1].
>
> [1] https://lore.kernel.org/lkml/1558689025-50679-1-git-send-email-julien.thierry@arm.com/
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-06-04 5:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-03 9:12 [PATCH 1/3] clocksource/arm_arch_timer: mark arch_counter_get_* as notrace Anders Roxell
2019-06-03 9:23 ` Marc Zyngier
2019-06-04 5:52 ` Daniel Lezcano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).