[Xenomai-core] xeno_panic_trace-v2
Hi Philippe, now I finally found the bug in my first version of this patch: some UVM skin builds complained about an unknown symbol. Fixed now in this version, please apply. Jan Index: include/asm-uvm/system.h === --- include/asm-uvm/system.h (Revision 528) +++ include/asm-uvm/system.h (Arbeitskopie) @@ -767,4 +767,7 @@ #define xnarch_post_graph(obj,state) #define xnarch_post_graph_if(obj,state,cond) +/* Ipipe-tracer */ +#define ipipe_trace_panic_freeze() + #endif /* !_XENO_ASM_UVM_SYSTEM_H */ Index: include/asm-generic/system.h === --- include/asm-generic/system.h (Revision 528) +++ include/asm-generic/system.h (Arbeitskopie) @@ -39,6 +39,13 @@ #include asm/xenomai/atomic.h #include nucleus/shadow.h +#ifdef CONFIG_IPIPE_TRACE +#include linux/ipipe_trace.h +#else /* !CONFIG_IPIPE_TRACE */ +#define ipipe_trace_panic_freeze() +#define ipipe_trace_panic_dump() +#endif /* CONFIG_IPIPE_TRACE */ + #define module_param_value(parm) (parm) typedef unsigned long spl_t; @@ -185,6 +192,7 @@ rthal_emergency_console(); \ xnarch_logerr(fatal: %s\n,emsg); \ show_stack(NULL,NULL); \ +ipipe_trace_panic_dump(); \ for (;;) cpu_relax(); \ } while(0) Index: include/nucleus/types.h === --- include/nucleus/types.h (Revision 528) +++ include/nucleus/types.h (Arbeitskopie) @@ -107,8 +107,10 @@ #define xnpod_fatal(format,args...) \ do { \ - const char *panic = xnpod_fatal_helper(format,##args); \ - xnarch_halt(panic); \ +const char *panic; \ +ipipe_trace_panic_freeze(); \ +panic = xnpod_fatal_helper(format,##args); \ +xnarch_halt(panic); \ } while (0) #if defined(__XENO_SIM__) || defined(__XENO_UVM__) Index: ksrc/nucleus/shadow.c === --- ksrc/nucleus/shadow.c (Revision 528) +++ ksrc/nucleus/shadow.c (Arbeitskopie) @@ -1563,6 +1563,7 @@ testbits(status,XNSTARTED) testbits(status,XNPEND)) { + ipipe_trace_panic_freeze(); show_stack(xnthread_user_task(threadin),NULL); xnpod_fatal(blocked thread %s[%d] rescheduled?! (status=0x%lx, sig=%d, prev=%s[%d]), threadin-name, signature.asc Description: OpenPGP digital signature ___ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core
[Xenomai-core] [PATCH] SMI-doc improvement / RTDM paper
Hi Philippe, this patch tries to clarify where to solve SMI-related latencies. Or should we even mention the kconfig path? Moreover, I would like to upload my RTL-Workshop paper about RTDM to doc/nodist/pdf (~150k) so that it later makes it on the website as well. Ok? Jan Index: ksrc/arch/i386/smi.c === --- ksrc/arch/i386/smi.c (Revision 539) +++ ksrc/arch/i386/smi.c (Arbeitskopie) @@ -209,8 +209,8 @@ #else /* ! CONFIG_XENO_HW_SMI_WORKAROUND */ -printk(Xenomai: Intel chipset found and SMI workaround not enabled,\n - you may encounter high interrupt latencies.\n); +printk(Xenomai: Intel chipset found but SMI workaround not enabled in kernel\n +configuration. You may encounter high interrupt latencies.\n); pci_dev_put(dev); #endif /* ! CONFIG_XENO_HW_SMI_WORKAROUND */ signature.asc Description: OpenPGP digital signature ___ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core
Re: [Xenomai-core] [PATCH] SMI-doc improvement / RTDM paper
Hi all! Jan Kiszka wrote: [...] +printk(Xenomai: Intel chipset found but SMI workaround not enabled in kernel\n +configuration. You may encounter high interrupt latencies.\n); Speaking of printk. Since 2.1 I don't see any messages in the kernel log. I bet there is a new switch somewhere, but I can't find it. Any hint appreciated. BTW, Jan, the SMI seems to be disabled now, even if I haven't seen the message of disabling SMI in the klog. Thanks best regards, Hannes. ___ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core
Re: [Xenomai-core] Re: [PATCH] SMI-doc improvement / RTDM paper
Jan Kiszka wrote: Philippe Gerum wrote: Jan Kiszka wrote: Hi Philippe, this patch tries to clarify where to solve SMI-related latencies. Or should we even mention the kconfig path? The name of the config switch involved should be enough, I guess. What about this? Please apply if it's ok. Done, thanks. Jan Index: ksrc/arch/i386/smi.c === --- ksrc/arch/i386/smi.c(Revision 539) +++ ksrc/arch/i386/smi.c(Arbeitskopie) @@ -209,8 +209,9 @@ #else /* ! CONFIG_XENO_HW_SMI_WORKAROUND */ -printk(Xenomai: Intel chipset found and SMI workaround not enabled,\n - you may encounter high interrupt latencies.\n); +printk(Xenomai: Intel chipset found but SMI workaround not enabled (check\n +CONFIG_XENO_HW_SMI_WORKAROUND). You may encounter high\n +interrupt latencies!\n); pci_dev_put(dev); #endif /* ! CONFIG_XENO_HW_SMI_WORKAROUND */ -- Philippe. ___ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core
Re: [Xenomai-core] broken docs
Jan Kiszka wrote: Gilles Chanteperdrix wrote: Jan Kiszka wrote: ROSSIER Daniel wrote: Dear Xenomai workers, Would it be possible to have an updated API documentation for Xenomai 2.0.x ? (I mean with formal parameters in function prototypes) I tried to regenerate it with make generate-doc, but it seems that a SVN working dir is required. make generate-doc is needed for maintenance only. If you want to generate doxygen documentation, simply add --enable-dox-doc to Xenomai configure command line. It would be great. I just had a quick look at the status of the documentation in SVN-trunk (2.1). Unfortunately, doxygen is a terrible tool (to express it politely) when it comes to tracking down bugs in your formatting. Something is broken in all modules except RTDM, and although I spent *a lot* of time in getting RTDM correctly formatted, I cannot tell what's wrong with the rest. This will require some long evenings of continuous patching the docs, recompiling, and checking the result. Any volunteers - I'm lacking the time? :-/ Looking at the difference between RTDM documentation blocks and the other modules is that the other modules use the fn tag. Removing the fn tag from other modules documentation blocks seems to solve the issue. Indeed, works. Amazingly blind I was. Anyway, it still needs some work to remove that stuff (I wonder what the correct usage of @fn is...) and to wrap functions without bodies via #ifdef DOXYGEN_CPP like RTDM does. At this chance, I would also suggest to replace all \tag by @tag for the sake of a unified style (and who knows what side effects mixing up both may have). Here is a shell script aiming at an automated fix for parts of the mentioned issues. Anyone with better shell hacking skills may improve it (I'm always willing to learn!). for file in `find -name *.[c|h]`; do mv $file $file.tmp cat $file.tmp | ( echo $file while read -r; do # delete * @fn ... lines new_line=`echo $REPLY | sed 's/\ \*\ @fn[^$]*$//' | \ tr -d \n` if echo $REPLY | grep -q '\ \*\ @fn[^$]*$'; then # delete empty comment lines succeeding * @fn ... read -r if [ $REPLY != * ]; then echo $REPLY $file fi else # convert * \tag to * @tag echo $new_line | sed 's/\ \*\ \\\([a-z]\)/ * @\1/' \ $file fi done ) rm $file.tmp done I only tested it on ksrs/skins/native, but it seems to work - for those functions with a body :-/. We still need to manually wrap body-less function docs as it is done in the rtdm skin. But I think this is a start. Jan signature.asc Description: OpenPGP digital signature
Re: [Xenomai-core] xeno_panic_trace-v2
Jan Kiszka wrote: Hi Philippe, now I finally found the bug in my first version of this patch: some UVM skin builds complained about an unknown symbol. Fixed now in this version, please apply. Applied, thanks. Jan Index: include/asm-uvm/system.h === --- include/asm-uvm/system.h(Revision 528) +++ include/asm-uvm/system.h(Arbeitskopie) @@ -767,4 +767,7 @@ #define xnarch_post_graph(obj,state) #define xnarch_post_graph_if(obj,state,cond) +/* Ipipe-tracer */ +#define ipipe_trace_panic_freeze() + #endif /* !_XENO_ASM_UVM_SYSTEM_H */ Index: include/asm-generic/system.h === --- include/asm-generic/system.h(Revision 528) +++ include/asm-generic/system.h(Arbeitskopie) @@ -39,6 +39,13 @@ #include asm/xenomai/atomic.h #include nucleus/shadow.h +#ifdef CONFIG_IPIPE_TRACE +#include linux/ipipe_trace.h +#else /* !CONFIG_IPIPE_TRACE */ +#define ipipe_trace_panic_freeze() +#define ipipe_trace_panic_dump() +#endif /* CONFIG_IPIPE_TRACE */ + #define module_param_value(parm) (parm) typedef unsigned long spl_t; @@ -185,6 +192,7 @@ rthal_emergency_console(); \ xnarch_logerr(fatal: %s\n,emsg); \ show_stack(NULL,NULL); \ +ipipe_trace_panic_dump(); \ for (;;) cpu_relax(); \ } while(0) Index: include/nucleus/types.h === --- include/nucleus/types.h (Revision 528) +++ include/nucleus/types.h (Arbeitskopie) @@ -107,8 +107,10 @@ #define xnpod_fatal(format,args...) \ do { \ - const char *panic = xnpod_fatal_helper(format,##args); \ - xnarch_halt(panic); \ +const char *panic; \ +ipipe_trace_panic_freeze(); \ +panic = xnpod_fatal_helper(format,##args); \ +xnarch_halt(panic); \ } while (0) #if defined(__XENO_SIM__) || defined(__XENO_UVM__) Index: ksrc/nucleus/shadow.c === --- ksrc/nucleus/shadow.c (Revision 528) +++ ksrc/nucleus/shadow.c (Arbeitskopie) @@ -1563,6 +1563,7 @@ testbits(status,XNSTARTED) testbits(status,XNPEND)) { + ipipe_trace_panic_freeze(); show_stack(xnthread_user_task(threadin),NULL); xnpod_fatal(blocked thread %s[%d] rescheduled?! (status=0x%lx, sig=%d, prev=%s[%d]), threadin-name, ___ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core -- Philippe.
[Xenomai-core] [PATCH] SMI-doc improvement / RTDM paper
Hi Philippe, this patch tries to clarify where to solve SMI-related latencies. Or should we even mention the kconfig path? Moreover, I would like to upload my RTL-Workshop paper about RTDM to doc/nodist/pdf (~150k) so that it later makes it on the website as well. Ok? Jan Index: ksrc/arch/i386/smi.c === --- ksrc/arch/i386/smi.c (Revision 539) +++ ksrc/arch/i386/smi.c (Arbeitskopie) @@ -209,8 +209,8 @@ #else /* ! CONFIG_XENO_HW_SMI_WORKAROUND */ -printk(Xenomai: Intel chipset found and SMI workaround not enabled,\n - you may encounter high interrupt latencies.\n); +printk(Xenomai: Intel chipset found but SMI workaround not enabled in kernel\n +configuration. You may encounter high interrupt latencies.\n); pci_dev_put(dev); #endif /* ! CONFIG_XENO_HW_SMI_WORKAROUND */ signature.asc Description: OpenPGP digital signature
Re: [Xenomai-core] [PATCH] SMI-doc improvement / RTDM paper
Hi all! Jan Kiszka wrote: [...] +printk(Xenomai: Intel chipset found but SMI workaround not enabled in kernel\n +configuration. You may encounter high interrupt latencies.\n); Speaking of printk. Since 2.1 I don't see any messages in the kernel log. I bet there is a new switch somewhere, but I can't find it. Any hint appreciated. BTW, Jan, the SMI seems to be disabled now, even if I haven't seen the message of disabling SMI in the klog. Thanks best regards, Hannes.
Re: [Xenomai-core] [PATCH] SMI-doc improvement / RTDM paper
Philippe Gerum wrote: [...] dmesg | grep -i xenomai: ? Yeah, got it now! Sorry for the silly question! I forgot that as of 2.1 everything is compiled into the kernel by default, so when running a testsuite example there are no messages that xeno is loaded or unloaded. Thanks and best regards, Hannes.
Re: [Xenomai-core] Re: [PATCH] SMI-doc improvement / RTDM paper
Philippe Gerum wrote: Jan Kiszka wrote: Hi Philippe, this patch tries to clarify where to solve SMI-related latencies. Or should we even mention the kconfig path? The name of the config switch involved should be enough, I guess. What about this? Please apply if it's ok. Jan Index: ksrc/arch/i386/smi.c === --- ksrc/arch/i386/smi.c (Revision 539) +++ ksrc/arch/i386/smi.c (Arbeitskopie) @@ -209,8 +209,9 @@ #else /* ! CONFIG_XENO_HW_SMI_WORKAROUND */ -printk(Xenomai: Intel chipset found and SMI workaround not enabled,\n - you may encounter high interrupt latencies.\n); +printk(Xenomai: Intel chipset found but SMI workaround not enabled (check\n +CONFIG_XENO_HW_SMI_WORKAROUND). You may encounter high\n +interrupt latencies!\n); pci_dev_put(dev); #endif /* ! CONFIG_XENO_HW_SMI_WORKAROUND */ signature.asc Description: OpenPGP digital signature
Re: [Xenomai-core] Re: [PATCH] SMI-doc improvement / RTDM paper
Jan Kiszka wrote: Philippe Gerum wrote: Jan Kiszka wrote: Hi Philippe, this patch tries to clarify where to solve SMI-related latencies. Or should we even mention the kconfig path? The name of the config switch involved should be enough, I guess. What about this? Please apply if it's ok. Done, thanks. Jan Index: ksrc/arch/i386/smi.c === --- ksrc/arch/i386/smi.c(Revision 539) +++ ksrc/arch/i386/smi.c(Arbeitskopie) @@ -209,8 +209,9 @@ #else /* ! CONFIG_XENO_HW_SMI_WORKAROUND */ -printk(Xenomai: Intel chipset found and SMI workaround not enabled,\n - you may encounter high interrupt latencies.\n); +printk(Xenomai: Intel chipset found but SMI workaround not enabled (check\n +CONFIG_XENO_HW_SMI_WORKAROUND). You may encounter high\n +interrupt latencies!\n); pci_dev_put(dev); #endif /* ! CONFIG_XENO_HW_SMI_WORKAROUND */ -- Philippe.