Re: [Xenomai-core] [PATCH v3 02/24] RTDM: Add rtdm_rt_capable() service

2010-04-19 Thread Jan Kiszka
Philippe Gerum wrote: On Sun, 2010-04-18 at 15:40 +0200, Jan Kiszka wrote: Philippe Gerum wrote: On Sun, 2010-04-18 at 15:26 +0200, Philippe Gerum wrote: On Sun, 2010-04-18 at 15:12 +0200, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com This adds rtdm_rt_capable(), a function that

Re: [Xenomai-core] [PATCH v3 02/24] RTDM: Add rtdm_rt_capable() service

2010-04-19 Thread Philippe Gerum
On Mon, 2010-04-19 at 09:31 +0200, Jan Kiszka wrote: Philippe Gerum wrote: On Sun, 2010-04-18 at 15:40 +0200, Jan Kiszka wrote: Philippe Gerum wrote: On Sun, 2010-04-18 at 15:26 +0200, Philippe Gerum wrote: On Sun, 2010-04-18 at 15:12 +0200, Jan Kiszka wrote: From: Jan Kiszka

Re: [Xenomai-core] [PATCH v3 02/24] RTDM: Add rtdm_rt_capable() service

2010-04-19 Thread Philippe Gerum
On Mon, 2010-04-19 at 09:37 +0200, Philippe Gerum wrote: On Mon, 2010-04-19 at 09:31 +0200, Jan Kiszka wrote: Philippe Gerum wrote: On Sun, 2010-04-18 at 15:40 +0200, Jan Kiszka wrote: Philippe Gerum wrote: On Sun, 2010-04-18 at 15:26 +0200, Philippe Gerum wrote: On Sun, 2010-04-18

[Xenomai-core] [PATCH v4 09/25] 16550A: Drop support for device opening/closing in real-time

2010-04-19 Thread Jan Kiszka
This is deprected now, RT callers will automatically be switched to non-RT. Along this, simplify the allocation logic for the RX timestamp history buffer. We only support allocations from non-RT now and migrate RT callers as required. Signed-off-by: Jan Kiszka jan.kis...@siemens.com ---

[Xenomai-core] [PATCH v4 01/25] RTDM: Fix potential NULL pointer dereference

2010-04-19 Thread Jan Kiszka
From: Wolfgang Mauerer wolfgang.maue...@siemens.com The rework in 95278926edc559d4 misses the case that context can be NULL, which can (and has) triggered a kernel oops. Take care of this case. Signed-off-by: Wolfgang Mauerer wolfgang.maue...@siemens.com Signed-off-by: Jan Kiszka

[Xenomai-core] [PATCH v4 06/25] RTIPC: Fix memory leak on failing socket creation

2010-04-19 Thread Jan Kiszka
CC: Philippe Gerum r...@xenomai.org Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- ksrc/drivers/ipc/rtipc.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/ksrc/drivers/ipc/rtipc.c b/ksrc/drivers/ipc/rtipc.c index d529912..563cc4e 100644 ---

[Xenomai-core] [PATCH v4 12/25] RTDM: Add rtdm_context_put()

2010-04-19 Thread Jan Kiszka
As suggested by Philippe: This is an alias of rtdm_context_unlock(), but it is more intuitive to match it with rtdm_context_get() calls. CC: Philippe Gerum r...@xenomai.org Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- include/rtdm/rtdm_driver.h |5 + ksrc/skins/rtdm/API.CHANGES

[Xenomai-core] [PATCH v4 04/25] Revert rtdm: tag syscalls as conforming

2010-04-19 Thread Jan Kiszka
This reverts commit 13bfdd477ab880499d2e8f3b82c49ef4d2cccff0. We better let the driver trigger the confoming switch once it detects such a case by using the new service rtdm_rt_capable(). Always being comforming caused regressions for existing designs. CC: Philippe Gerum r...@xenomai.org CC:

[Xenomai-core] [PATCH v4 14/25] irqbench: Fix x86-64 build

2010-04-19 Thread Jan Kiszka
Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- configure.in |2 +- src/testsuite/irqbench/Makefile.am |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 0228f51..9d6fe35 100644 --- a/configure.in +++

[Xenomai-core] [PATCH v4 19/25] RTIPC: Drop unused wrapper around close_lock_count

2010-04-19 Thread Jan Kiszka
CC: Philippe Gerum r...@xenomai.org Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- ksrc/drivers/ipc/internal.h |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/ksrc/drivers/ipc/internal.h b/ksrc/drivers/ipc/internal.h index 296a988..ed8c103 100644 ---

[Xenomai-core] [PATCH v4 08/25] RTCAN: Drop support for socket creation/deletion in real-time

2010-04-19 Thread Jan Kiszka
This is deprecated now, RT callers will automatically be migrated to NRT to perform the requests. CC: Wolfgang Grandegger w...@grandegger.com Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- ksrc/drivers/can/rtcan_raw.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git

[Xenomai-core] [PATCH v4 13/25] Fix historic msleep wrapping

2010-04-19 Thread Jan Kiszka
Probably only an academic exercise: Fix the rounding bug in msleep wrapper for kernels 2.4.28. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- include/asm-generic/wrappers.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/asm-generic/wrappers.h

[Xenomai-core] [PATCH v4 15/25] irqbench: Refactor user space helpers

2010-04-19 Thread Jan Kiszka
Indent according to our style, push irqbench's inner loop into separate function. No functional changes. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- src/testsuite/irqbench/irqbench.c | 480 ++--- src/testsuite/irqbench/irqloop.c | 303

[Xenomai-core] [PATCH v4 18/25] testing: Clean up Kconfig rules

2010-04-19 Thread Jan Kiszka
To exclude modules from built-in, make them depend on 'm' is sufficient. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- ksrc/drivers/testing/Config.in |2 +- ksrc/drivers/testing/Kconfig | 14 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git

[Xenomai-core] [PATCH v4 10/25] Analogy: Drop support for opening/closing in real-time

2010-04-19 Thread Jan Kiszka
This is deprected now, RT callers will automatically be switched to non-RT. CC: Alexis Berlemont berlemont.h...@free.fr Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- ksrc/drivers/analogy/rtdm_interface.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git

[Xenomai-core] [PATCH v4 00/25] [git pull v4] RTDM fixes and reworks

2010-04-19 Thread Jan Kiszka
The following changes since commit 2bed24477882dd7937d59f4e33a0811981c7362c: Gilles Chanteperdrix (1): arm: declare the VFP inline asm snippets as volatile. are available in the git repository at: git://git.xenomai.org/xenomai-jki.git for-upstream Changes in v4: - fixed

[Xenomai-core] [PATCH v4 02/25] RTDM: Add rtdm_rt_capable() service

2010-04-19 Thread Jan Kiszka
This adds rtdm_rt_capable(), a function that can be used by drivers to detect callers that could issue a service request also from the (typically preferred) real-time context. If that is the case, the driver can trigger a restart of the request if the current context is not real-time. CC:

[Xenomai-core] [PATCH v4 07/25] RTIPC: Drop support for RT socket creation/deletion

2010-04-19 Thread Jan Kiszka
This is deprecated now, RT callers will automatically be migrated to NRT to perform the requests. Moreover, dropping it allows us to allocate resources from Linux instead of using the precious system heap. CC: Philippe Gerum r...@xenomai.org Signed-off-by: Jan Kiszka jan.kis...@siemens.com ---

[Xenomai-core] [PATCH v4 23/25] RTDM: Early fd release with poll-free context reference tracking

2010-04-19 Thread Jan Kiszka
Two changes in one as they are tightly related: Once close is called, remove the file descriptor from open table, allowing its reuse while close for the previous user proceeds. The second and major part of the patch avoids time-based polling while waiting for context references to be dropped.

[Xenomai-core] [PATCH v4 25/25] RTDM: Use non-atomic bitops for used_fildes

2010-04-19 Thread Jan Kiszka
All bit manipulations happen under rt_fildes_lock, so there is no need for atomic ops. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- ksrc/skins/rtdm/core.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ksrc/skins/rtdm/core.c b/ksrc/skins/rtdm/core.c index

[Xenomai-core] [PATCH v4 24/25] RTDM: Add basic unit test

2010-04-19 Thread Jan Kiszka
This unit test for RTDM validates deferred device closing and driver deregistration due to pending references. Further tests can be added in the future. CC: Philippe Gerum r...@xenomai.org Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- include/rtdm/rttesting.h|9 ++

[Xenomai-core] [PATCH v4 03/25] RTDM: Bump API version and document changes

2010-04-19 Thread Jan Kiszka
Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- include/rtdm/rtdm.h |4 ++-- ksrc/skins/rtdm/API.CHANGES |6 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/rtdm/rtdm.h b/include/rtdm/rtdm.h index 6e02083..1e6e41e 100644 --- a/include/rtdm/rtdm.h

[Xenomai-core] [RFC] fix XENO_OPT_DEBUG bugs.

2010-04-19 Thread Gilles Chanteperdrix
Hi, I found some code which was referencing directly some CONFIG_XENO_OPT_DEBUG_ variables with things like: #ifdef CONFIG_XENO_OPT_DEBUG_FOO This usage is incompatible with the pre-requisites of the assert.h header that CONFIG_XENO_OPT_DEBUG_FOO should be defined at all times. While grepping

Re: [Xenomai-core] [RFC] fix XENO_OPT_DEBUG bugs.

2010-04-19 Thread Philippe Gerum
On Mon, 2010-04-19 at 15:58 +0200, Gilles Chanteperdrix wrote: Hi, I found some code which was referencing directly some CONFIG_XENO_OPT_DEBUG_ variables with things like: #ifdef CONFIG_XENO_OPT_DEBUG_FOO This usage is incompatible with the pre-requisites of the assert.h header that

Re: [Xenomai-core] [RFC] fix XENO_OPT_DEBUG bugs.

2010-04-19 Thread Gilles Chanteperdrix
Jan Kiszka wrote: Gilles Chanteperdrix wrote: Jan Kiszka wrote: Gilles Chanteperdrix wrote: Hi, I found some code which was referencing directly some CONFIG_XENO_OPT_DEBUG_ variables with things like: #ifdef CONFIG_XENO_OPT_DEBUG_FOO This usage is incompatible with the pre-requisites of

Re: [Xenomai-core] [RFC] fix XENO_OPT_DEBUG bugs.

2010-04-19 Thread Gilles Chanteperdrix
Jan Kiszka wrote: Gilles Chanteperdrix wrote: Jan Kiszka wrote: Gilles Chanteperdrix wrote: Jan Kiszka wrote: Gilles Chanteperdrix wrote: Hi, I found some code which was referencing directly some CONFIG_XENO_OPT_DEBUG_ variables with things like: #ifdef CONFIG_XENO_OPT_DEBUG_FOO This

Re: [Xenomai-core] [RFC] fix XENO_OPT_DEBUG bugs.

2010-04-19 Thread Jan Kiszka
Gilles Chanteperdrix wrote: Jan Kiszka wrote: Gilles Chanteperdrix wrote: Jan Kiszka wrote: Gilles Chanteperdrix wrote: Jan Kiszka wrote: Gilles Chanteperdrix wrote: Hi, I found some code which was referencing directly some CONFIG_XENO_OPT_DEBUG_ variables with things like: #ifdef

Re: [Xenomai-core] [RFC] fix XENO_OPT_DEBUG bugs.

2010-04-19 Thread Philippe Gerum
On Mon, 2010-04-19 at 17:58 +0200, Jan Kiszka wrote: Gilles Chanteperdrix wrote: Jan Kiszka wrote: Gilles Chanteperdrix wrote: Jan Kiszka wrote: Gilles Chanteperdrix wrote: Jan Kiszka wrote: Gilles Chanteperdrix wrote: Hi, I found some code which was referencing directly some

Re: [Xenomai-core] [RFC] fix XENO_OPT_DEBUG bugs.

2010-04-19 Thread Gilles Chanteperdrix
Jan Kiszka wrote: Philippe Gerum wrote: config XENO_OPT_DEBUG_FOO bool ... config XENO_OPT_DEBUG_FOO_P int default 1 if XENO_OPT_DEBUG_FOO default 0 and XENO_DEBUG() could be extended to test for CONFIG_XENO_OPT_DEBUG_FOO_P when given FOO. I'm just not sure if this can be

Re: [Xenomai-core] [RFC] fix XENO_OPT_DEBUG bugs.

2010-04-19 Thread Jan Kiszka
Philippe Gerum wrote: On Mon, 2010-04-19 at 18:25 +0200, Philippe Gerum wrote: On Mon, 2010-04-19 at 18:14 +0200, Jan Kiszka wrote: Philippe Gerum wrote: On Mon, 2010-04-19 at 17:58 +0200, Jan Kiszka wrote: Gilles Chanteperdrix wrote: Jan Kiszka wrote: Gilles Chanteperdrix wrote: Jan

Re: [Xenomai-core] [RFC] fix XENO_OPT_DEBUG bugs.

2010-04-19 Thread Philippe Gerum
On Mon, 2010-04-19 at 19:22 +0200, Jan Kiszka wrote: Philippe Gerum wrote: On Mon, 2010-04-19 at 18:25 +0200, Philippe Gerum wrote: On Mon, 2010-04-19 at 18:14 +0200, Jan Kiszka wrote: Philippe Gerum wrote: On Mon, 2010-04-19 at 17:58 +0200, Jan Kiszka wrote: Gilles Chanteperdrix wrote:

Re: [Xenomai-core] [RFC] fix XENO_OPT_DEBUG bugs.

2010-04-19 Thread Gilles Chanteperdrix
Jan Kiszka wrote: Gilles Chanteperdrix wrote: Jan Kiszka wrote: Gilles Chanteperdrix wrote: Jan Kiszka wrote: Philippe Gerum wrote: config XENO_OPT_DEBUG_FOO bool ... config XENO_OPT_DEBUG_FOO_P int default 1 if XENO_OPT_DEBUG_FOO default 0 and XENO_DEBUG()

Re: [Xenomai-core] [RFC] fix XENO_OPT_DEBUG bugs.

2010-04-19 Thread Gilles Chanteperdrix
Jan Kiszka wrote: Gilles Chanteperdrix wrote: Jan Kiszka wrote: Gilles Chanteperdrix wrote: Jan Kiszka wrote: Philippe Gerum wrote: config XENO_OPT_DEBUG_FOO bool ... config XENO_OPT_DEBUG_FOO_P int default 1 if XENO_OPT_DEBUG_FOO default 0 and XENO_DEBUG()

Re: [Xenomai-core] [RFC] fix XENO_OPT_DEBUG bugs.

2010-04-19 Thread Gilles Chanteperdrix
Gilles Chanteperdrix wrote: Jan Kiszka wrote: Gilles Chanteperdrix wrote: Jan Kiszka wrote: Gilles Chanteperdrix wrote: Jan Kiszka wrote: Philippe Gerum wrote: config XENO_OPT_DEBUG_FOO bool ... config XENO_OPT_DEBUG_FOO_P int default 1 if XENO_OPT_DEBUG_FOO

Re: [Xenomai-core] [RFC] fix XENO_OPT_DEBUG bugs.

2010-04-19 Thread Jan Kiszka
Gilles Chanteperdrix wrote: Jan Kiszka wrote: My compiler still complains about undefined 'y0' in the enabled case. I'll try to dig into a different direction now: Automatic generation during build. This is what the kernel does as well when the preprocessor gives up. Would even save the

Re: [Xenomai-core] [RFC] fix XENO_OPT_DEBUG bugs.

2010-04-19 Thread Gilles Chanteperdrix
Jan Kiszka wrote: Gilles Chanteperdrix wrote: Jan Kiszka wrote: Gilles Chanteperdrix wrote: Jan Kiszka wrote: Gilles Chanteperdrix wrote: Jan Kiszka wrote: My compiler still complains about undefined 'y0' in the enabled case. I'll try to dig into a different direction now: Automatic