Re: [Xenomai-core] Kernel crash with Xenomai (caused by fork?)
On Tue, Apr 1, 2008 at 7:52 AM, Gilles Chanteperdrix [EMAIL PROTECTED] wrote: Tomas Kalibera wrote: I added a missing underscore and re-tried, and none of the debug messages was printed. I added another one to make sure that there is not a problem with getting printk messages to the serial console. The resulting highmem_32.c and the output is attached. T The interesting part of the output is the printk which occurs right before the first bug, what happens afterwards is of little use. Do you get any output before the first bug ? There are other kmap_atomic calls in copy_pte_range than the kmap_atomic taking place in cow_user_page, they use KM_PTE0 and KM_PTE1 as the type value. So, we should track these types as well in highmem_32.c. -- Gilles ___ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core
[Xenomai-core] [PATCH][SOLO] sparse: include panic header file
Sparse warns about this one: panic.c:31:6: warning: symbol 'warning' was not declared. Should it be static? panic.c:40:6: warning: symbol 'panic' was not declared. Should it be static? Include the declarations. Signed-off-by: Robert Schwebel [EMAIL PROTECTED] --- base/panic.c |1 + 1 file changed, 1 insertion(+) Index: xenomai-solo/base/panic.c === --- xenomai-solo.orig/base/panic.c 2008-03-30 20:51:06.0 +0200 +++ xenomai-solo/base/panic.c 2008-03-30 20:51:20.0 +0200 @@ -19,6 +19,7 @@ #include stdio.h #include stdlib.h #include stdarg.h +#include xenomai/panic.h static void __warning(const char *fmt, va_list ap) { -- Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de Pengutronix - Linux Solutions for Science and Industry Handelsregister: Amtsgericht Hildesheim, HRA 2686 Hannoversche Str. 2, 31134 Hildesheim, Germany Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9 ___ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core
[Xenomai-core] [PATCH][SOLO] sparse: threadobj_global_rr not declared
Sparse warns about this one: clockobj.c:245:5: warning: symbol 'clockobj_unmap' was not declared. Should it be static? Looks like the declaration for threadobj_global_rr is missing. Signed-off-by: Robert Schwebel [EMAIL PROTECTED] --- include/xenomai/threadobj.h |2 ++ 1 file changed, 2 insertions(+) Index: xenomai-solo/include/xenomai/threadobj.h === --- xenomai-solo.orig/include/xenomai/threadobj.h 2008-03-30 19:57:52.0 +0200 +++ xenomai-solo/include/xenomai/threadobj.h2008-03-30 19:58:14.0 +0200 @@ -79,6 +79,8 @@ extern int threadobj_async; +extern int threadobj_global_rr; + #ifdef __cplusplus extern C { #endif -- Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de Pengutronix - Linux Solutions for Science and Industry Handelsregister: Amtsgericht Hildesheim, HRA 2686 Hannoversche Str. 2, 31134 Hildesheim, Germany Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9 ___ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core
[Xenomai-core] [PATCH][SOLO] sparse: include sysClkRateGet declaration
Sparse warns about this one: sysLib.c:22:5: warning: symbol 'sysClkRateGet' was not declared. Should it be static? sysLib.c:28:8: warning: symbol 'sysClkRateSet' was not declared. Should it be static? Signed-off-by: Robert Schwebel [EMAIL PROTECTED] --- vxworks/sysLib.c |1 + 1 file changed, 1 insertion(+) Index: xenomai-solo/vxworks/sysLib.c === --- xenomai-solo.orig/vxworks/sysLib.c 2008-03-30 21:14:49.0 +0200 +++ xenomai-solo/vxworks/sysLib.c 2008-03-30 21:14:54.0 +0200 @@ -18,6 +18,7 @@ #include tickLib.h #include vxworks/errnoLib.h +#include vxworks/sysLib.h int sysClkRateGet(void) { -- Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de Pengutronix - Linux Solutions for Science and Industry Handelsregister: Amtsgericht Hildesheim, HRA 2686 Hannoversche Str. 2, 31134 Hildesheim, Germany Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9 ___ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core
[Xenomai-core] [PATCH][SOLO] add sparse support
This patch adds static analysis support with sparse to the xenomai-solo makefiles. To enable sparse checking, use ./configure --with-sparse[=PATH] and run 'make sparse' afterwards. I don't have a good idea right now how to avoid this extra step; it would be much nicer if every call to $(COMPILE) could be substituted by a sparse call plus the original one, but I didn't find a good method for that yet that also works with the libtool calls. Signed-off-by: Robert Schwebel [EMAIL PROTECTED] --- Makefile.am | 18 +- base/Makefile.am|6 ++ configure.in| 32 psos/Makefile.am|6 ++ vxworks/Makefile.am |5 + 5 files changed, 66 insertions(+), 1 deletion(-) Index: xenomai-solo/base/Makefile.am === --- xenomai-solo.orig/base/Makefile.am 2008-03-30 21:29:12.0 +0200 +++ xenomai-solo/base/Makefile.am 2008-03-30 21:29:46.0 +0200 @@ -36,3 +36,9 @@ -DTLSF_USE_LOCKS=1 -DUSE_MMAP=1 -DUSE_SBRK=1 EXTRA_DIST = tlsf/README + +sparse: + @for i in $(libxenomai_la_SOURCES) $(libtlsf_la_SOURCES); do \ + $(SPARSE) $(CHECKFLAGS) $$i; \ + done + Index: xenomai-solo/configure.in === --- xenomai-solo.orig/configure.in 2008-03-30 21:29:12.0 +0200 +++ xenomai-solo/configure.in 2008-03-30 21:29:14.0 +0200 @@ -70,6 +70,38 @@ esac]) AC_MSG_RESULT(${debug_symbols:-no}) +dnl Sparse check (default: off) + +sparse= +AC_MSG_CHECKING(whether to enable sparse) +AC_ARG_WITH(sparse, +AC_HELP_STRING([--with-sparse@:@=PATH@:@], [activate static code analysis with sparse]), +[case $withval in +y | yes) sparse=sparse ;; +n | no) sparse= ;; +*) sparse=$withval +esac], +[sparse=],[] +) +if test -n $sparse ; then +AC_MSG_RESULT(yes) +AC_SUBST(SPARSE, $sparse) +AC_MSG_CHECKING(whether sparse=$sparse is executable) +if test `$sparse 21 /dev/null; echo $?` = 0; then +AC_MSG_RESULT(yes) +AC_SUBST(SPARSE, $sparse) +else +AC_MSG_RESULT(no) +AC_MSG_ERROR($sparse is not executable) +fi +else +AC_MSG_RESULT(no) +AC_SUBST(SPARSE, true) +fi + +checkflags=-nostdinc -isystem \$(SYSROOT)/usr/include -isystem `$CC -print-file-name=include` -Wbitwise -Wno-transparent-union -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_REENTRANT \$(DEFS) \$(DEFAULT_INCLUDES) \$(INCLUDES) \$(AM_CPPFLAGS) \$(CPPFLAGS) +AC_SUBST(CHECKFLAGS, $checkflags) + dnl Enable assertions (default: off) AC_MSG_CHECKING(whether assertions should be enabled) Index: xenomai-solo/Makefile.am === --- xenomai-solo.orig/Makefile.am 2008-03-30 21:29:12.0 +0200 +++ xenomai-solo/Makefile.am2008-03-30 21:29:14.0 +0200 @@ -1,6 +1,15 @@ ACLOCAL_AMFLAGS=-I config -SUBDIRS = base vxworks psos include config scripts +SRC_SUBDIRS= \ + base \ + vxworks \ + psos + +SUBDIRS = \ + $(SRC_SUBDIRS) \ + include \ + config \ + scripts EXTRA_DIST = @@ -11,3 +20,10 @@ install-user: $(MAKE) install + +sparse: + @for i in $(SRC_SUBDIRS); do \ + echo; \ + make -C $$i sparse; \ + done + Index: xenomai-solo/psos/Makefile.am === --- xenomai-solo.orig/psos/Makefile.am 2008-03-30 21:29:12.0 +0200 +++ xenomai-solo/psos/Makefile.am 2008-03-30 21:29:14.0 +0200 @@ -22,3 +22,9 @@ -I$(top_srcdir)/include EXTRA_DIST = + +sparse: + @for i in $(libpsos_la_SOURCES); do \ + $(SPARSE) $(CHECKFLAGS) $$i; \ + done + Index: xenomai-solo/vxworks/Makefile.am === --- xenomai-solo.orig/vxworks/Makefile.am 2008-03-30 21:29:53.0 +0200 +++ xenomai-solo/vxworks/Makefile.am2008-03-30 21:30:10.0 +0200 @@ -24,3 +24,8 @@ -I$(top_srcdir)/include EXTRA_DIST = testsuite + +sparse: + @for i in $(libvxworks_la_SOURCES); do \ + $(SPARSE) $(CHECKFLAGS) $$i; \ + done -- Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de Pengutronix - Linux Solutions for Science and Industry Handelsregister: Amtsgericht Hildesheim, HRA 2686 Hannoversche Str. 2, 31134 Hildesheim, Germany Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9 ___ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core