I-pipe tracer issue on at91
Hi,
since the AT91 I-pipe timer code was rebased on the mainline tcb_clksrc driver, the I-pipe tracer is broken for these platforms. The following patch is an attempt to fix it. If everyone agrees with the patch, I can apply it to the most recent I-pipe branches.
Regards.
Signature · 2 lines
Gilles. https://click-hack.org
PATCH 1/1 ipipe/tracer: allow hrclock late init
On some platforms (notably some AT91), the tsc may come late in the boot process. Get the I-pipe tracer to also work in that case. Also get panic traces working without a tsc; in that case, print all timestamps differences as zero.
--- arch/arm/kernel/ipipe_tsc.c | 2 ++ include/linux/ipipe_trace.h | 2 ++ kernel/ipipe/tracer.c | 59 ++++++++++++++++++++++++++++++--------------- 3 files changed, 44 insertions(+), 19 deletions(-)
arch/arm/kernel/ipipe_tsc.c +2 -0
@@ -165,6 +165,8 @@ void __init __ipipe_tsc_register(struct __ipipe_tscinfo *info) ipipe_tsc_update_timer.function = __ipipe_tsc_update_fn;mod_timer (&ipipe_tsc_update_timer, jiffies + ipipe_tsc_update_timer.data); + +__ipipe_tracer_hrclock_initialized (); }void __ipipe_mach_get_tscinfo (struct __ipipe_tscinfo *info)
include/linux/ipipe_trace.h +2 -0
@@ -32,6 +32,7 @@#define __BUILTIN_RETURN_ADDRESS1 ((unsigned long)__builtin_return_address(1))#endif /* !BUILTIN_RETURN_ADDRESS */ +void __ipipe_tracer_hrclock_initialized (void );void ipipe_trace_begin (unsigned long v);void ipipe_trace_end (unsigned long v);void ipipe_trace_freeze (unsigned long v);
@@ -43,6 +44,7 @@ int ipipe_trace_frozen_reset(void);#else /* !CONFIG_IPIPE_TRACE */ +#define __ipipe_tracer_hrclock_initialized () do { } while(0)#define ipipe_trace_begin (v) do { (void)(v); } while(0)#define ipipe_trace_end (v) do { (void)(v); } while(0)#define ipipe_trace_freeze (v) do { (void)(v); } while(0)
kernel/ipipe/tracer.c +40 -19
96 lines not on this page · raw message
Signature · 1 line
1.8.4
Re: [Xenomai] [PATCH] ipipe/tracer: allow hrclock late init
Quoted 13 lines · Gilles Chanteperdrix
include/linux/ipipe_trace.h +1
-0@@ -32,6 +32,7 @@#define __BUILTIN_RETURN_ADDRESS1 ((unsigned long)__builtin_return_address(1))#endif /* !BUILTIN_RETURN_ADDRESS */ +void __ipipe_tracer_hrclock_initialized (void );void ipipe_trace_begin (unsigned long v);void ipipe_trace_end (unsigned long v);void ipipe_trace_freeze (unsigned long v);
include/linux/ipipe_trace.h int ipipe_trace_frozen_reset(void); · line 50
Quoted 7 lines
include/linux/ipipe_trace.h +1
-0@@ -43,6 +44,7 @@ int ipipe_trace_frozen_reset(void);#else /* !CONFIG_IPIPE_TRACE */ +#define __ipipe_tracer_hrclock_initialized () do { } while(0)#define ipipe_trace_begin (v) do { (void)(v); } while(0)#define ipipe_trace_end (v) do { (void)(v); } while(0)#define ipipe_trace_freeze (v) do { (void)(v); } while(0)
The function __ipipe_tracer_hrclock_initialized() function is an internal function, so has no reason to be in the linux/ipipe_trace.h header, which contains the ipipe tracer public API. The following patch moves it to linux/ipipe.h where all the I-pipe internal functions are declared.
Signature · 2 lines
Gilles. https://click-hack.org
PATCH 1/1 ipipe/tracer: allow hrclock late init
On some platforms (notably some AT91), the tsc may come late in the boot process. Get the I-pipe tracer to also work in that case. Also get panic traces working without a tsc; in that case, print all timestamps differences as zero.
--- arch/arm/kernel/ipipe_tsc.c | 2 ++ include/linux/ipipe.h | 6 +++++ kernel/ipipe/tracer.c | 59 ++++++++++++++++++++++++++++++--------------- 3 files changed, 48 insertions(+), 19 deletions(-)
arch/arm/kernel/ipipe_tsc.c +2 -0
@@ -165,6 +165,8 @@ void __init __ipipe_tsc_register(struct __ipipe_tscinfo *info) ipipe_tsc_update_timer.function = __ipipe_tsc_update_fn;mod_timer (&ipipe_tsc_update_timer, jiffies + ipipe_tsc_update_timer.data); + +__ipipe_tracer_hrclock_initialized (); }void __ipipe_mach_get_tscinfo (struct __ipipe_tscinfo *info)
include/linux/ipipe.h +6 -0
@@ -414,6 +414,12 @@ extern void __ipipe_uaccess_might_fault(void);#define __ipipe_uaccess_might_fault () might_fault()#endif +#ifdef CONFIG_IPIPE_TRACE +void __ipipe_tracer_hrclock_initialized (void ); +#else /* !CONFIG_IPIPE_TRACE */ +#define __ipipe_tracer_hrclock_initialized () do { } while(0) +#endif /* !CONFIG_IPIPE_TRACE */ +#include <linux/ipipe_compat.h> #else /* !CONFIG_IPIPE */
kernel/ipipe/tracer.c +40 -19
96 lines not on this page · raw message
Signature · 1 line
1.8.4
Quoted 6 lines · On Tue, 29 Sep 2015 03:25:42 +0200 Gilles Chanteperdrix…
Hi,
since the AT91 I-pipe timer code was rebased on the mainline
tcb_clksrcdriver, the I-pipe tracer is broken for these platforms. The following patch is an attempt to fix it. If everyone agrees with the patch, I can apply it to the most recent I-pipe branches.
On the way to 3.19 a lot more at91 consolidated is done. Have a look at kernel commit 878ba61aa98cbb97a513757800e77613f856a029 and what happened before.
In my merge that was one of the bigger arm-topics where i probably broke something.
Should be in my merges 90eef0a7881a4..92529d1ed9bca on
https://github.com/siemens/linux-ipipe.git
Henning
Quoted 14 lines · Henning Schild
Quoted 6 lines · On Tue, 29 Sep 2015 03:25:42 +0200 Gilles Chanteperdrix…
Hi,
since the AT91 I-pipe timer code was rebased on the mainline
tcb_clksrcdriver, the I-pipe tracer is broken for these platforms. The following patch is an attempt to fix it. If everyone agrees with the patch, I can apply it to the most recent I-pipe branches.On the way to 3.19 a lot more at91 consolidated is done. Have a look at kernel commit
878ba61aa98cbb97a513757800e77613f856a029and what happened before.
Quoted 5 lines
In my merge that was one of the bigger arm-topics where i probably broke something.
Should be in my merges
90eef0a7881a4..92529d1ed9bcaon
https://github.com/siemens/linux-ipipe.git
My objective is to fix the I-pipe patches for the Xenomai 3.0 release. But of course working on 3.19 will come next.
Signature · 2 lines
Gilles. https://click-hack.org
Quoted 15 lines · Gilles Chanteperdrix
Quoted 14 lines · Henning Schild
Quoted 6 lines · On Tue, 29 Sep 2015 03:25:42 +0200 Gilles Chanteperdrix…
Hi,
since the AT91 I-pipe timer code was rebased on the mainline
tcb_clksrcdriver, the I-pipe tracer is broken for these platforms. The following patch is an attempt to fix it. If everyone agrees with the patch, I can apply it to the most recent I-pipe branches.On the way to 3.19 a lot more at91 consolidated is done. Have a look at kernel commit
878ba61aa98cbb97a513757800e77613f856a029and what happened before.
Quoted 8 lines
Quoted 5 lines
In my merge that was one of the bigger arm-topics where i probably broke something.
Should be in my merges
90eef0a7881a4..92529d1ed9bcaon
https://github.com/siemens/linux-ipipe.gitMy objective is to fix the I-pipe patches for the Xenomai 3.0 release. But of course working on 3.19 will come next.
By the way, since 4.1 is the next stable, and 3.19 is probably already EOL, would not it make sense to skip to 4.1 directly?
Signature · 2 lines
Gilles. https://click-hack.org
Quoted 20 lines · On Tue, 29 Sep 2015 10:50:18 +0200 Gilles Chanteperdrix…
Quoted 19 lines · Gilles Chanteperdrix
Quoted 18 lines · Henning Schild
Quoted 7 lines · On Tue, 29 Sep 2015 03:25:42 +0200 Gilles Chanteperdrix…
Hi,
since the AT91 I-pipe timer code was rebased on the mainline
tcb_clksrcdriver, the I-pipe tracer is broken for these platforms. The following patch is an attempt to fix it. If everyone agrees with the patch, I can apply it to the most recent I-pipe branches.On the way to 3.19 a lot more at91 consolidated is done. Have a look at kernel commit
878ba61aa98cbb97a513757800e77613f856a029and what happened before.In my merge that was one of the bigger arm-topics where i probably broke something.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Should be in my merges
90eef0a7881a4..92529d1ed9bcaon
https://github.com/siemens/linux-ipipe.gitMy objective is to fix the I-pipe patches for the Xenomai 3.0 release. But of course working on 3.19 will come next.
By the way, since 4.1 is the next stable, and 3.19 is probably already EOL, would not it make sense to skip to 4.1 directly?
As i explained in the thread about the merge i decided to do it step by step after all. I am still new to xenomai and merging all at once seemed overwhelming. When merging with 4.1 3.19-conflicts will still hit me anyways.
I am pretty happy with the partial merge strategy. It allows to examine conflicts where they occur. And if someone picks up my work to look at arm and powerpc they can use my tree to do the same.
Also it seems like a good strategy to keep up with mainline in the future, possibly identifying conflicts before mainline even releases another kernel.
But lets discuss this in the other thread. I hope people will try working with the zipmerge i have prepared and it will proof to be useful for others.
Henning
Quoted 16 lines · On Tue, 29 Sep 2015 10:47:05 +0200 Gilles Chanteperdrix…
Quoted 15 lines · Henning Schild
Quoted 7 lines · On Tue, 29 Sep 2015 03:25:42 +0200 Gilles Chanteperdrix…
Hi,
since the AT91 I-pipe timer code was rebased on the mainline
tcb_clksrcdriver, the I-pipe tracer is broken for these platforms. The following patch is an attempt to fix it. If everyone agrees with the patch, I can apply it to the most recent I-pipe branches.On the way to 3.19 a lot more at91 consolidated is done. Have a look at kernel commit
878ba61aa98cbb97a513757800e77613f856a029and what happened before.
Quoted 8 lines
Quoted 5 lines
In my merge that was one of the bigger arm-topics where i probably broke something.
Should be in my merges
90eef0a7881a4..92529d1ed9bcaon
https://github.com/siemens/linux-ipipe.gitMy objective is to fix the I-pipe patches for the Xenomai 3.0 release. But of course working on 3.19 will come next.
Just wanted to leave that note somewhere, and a thread about at91 seemed appropriate ;).
Henning