various fixes
PATCH 1/1 various fixes
Hi again,
I would like to remind of the following three patches:
* rtdm-excl-dev.patch - RTDM fix for bug in opening of exclusive devices (both 2.0 and 2.1)
* rtdm-nrt-close.patch - don't permit RTDM devices without NRT closure handlers
* maxlat_proc.patch - export NMI watchdog threshold via /proc, trigger trace freezing instead of die_nmi() if CONFIG_IPIPE_TRACE is enabled
Moreover, here are two minor fixes:
* accuracy.patch - add missing define to let this posix demo compile
* rtdm-license.patch - add missing COPYING files to RTDM skin and lib (or go for just a single file for ksrc/skins and src/skins if this is applicable)
Jan
asm-i386/hal.h +19 -0
@@ -266,6 +266,13 @@void rthal_nmi_arm (unsigned long delay);void rthal_nmi_disarm (void ); + +void rthal_nmi_proc_register (void ); + +void rthal_nmi_proc_unregister (void ); +#else /* !CONFIG_XENO_HW_NMI_DEBUG_LATENCY */ +# define rthal_nmi_proc_register () +# define rthal_nmi_proc_unregister ()#endif /* CONFIG_XENO_HW_NMI_DEBUG_LATENCY */ static inline void rthal_timer_program_shot (unsigned long delay)
@@ -325,6 +332,18 @@const char __user *src, long count); +#ifdef CONFIG_PROC_FS +#include <linux/proc_fs.h> + +extern struct proc_dir_entry *rthal_proc_root; + +struct proc_dir_entry *__rthal_add_proc_leaf (const char *name, +read_proc_t rdproc, +write_proc_t wrproc, +void *data, +struct proc_dir_entry *parent); +#endif /* CONFIG_PROC_FS */ +#endif /* !__cplusplus */ #endif /* !_XENO_ASM_I386_HAL_H */
arch/i386/hal.c +74 -1
89 lines not on this page · raw message
arch/generic/hal.c +14 -10
@@ -279,7 +279,7 @@* * @return 0 is returned upon success. Otherwise: * -* - -EINVAL is returned if @a irq is invalid or @� handler is NULL. +* - -EINVAL is returned if @a irq is invalid or @a handler is NULL. * * Environments: *
@@ -841,11 +841,11 @@return len; } -static struct proc_dir_entry *add_proc_leaf (const char *name, -read_proc_t rdproc, -write_proc_t wrproc, -void *data, -struct proc_dir_entry *parent) +struct proc_dir_entry *__rthal_add_proc_leaf (const char *name, +read_proc_t rdproc, +write_proc_t wrproc, +void *data, +struct proc_dir_entry *parent) {int mode = wrproc ?0644 :0444 ;struct proc_dir_entry *entry;
@@ -877,35 +877,39 @@ rthal_proc_root->owner =THIS_MODULE ; -add_proc_leaf ("hal" , +__rthal_add_proc_leaf ("hal" , &hal_read_proc,NULL ,NULL , rthal_proc_root); -add_proc_leaf ("irq" , +__rthal_add_proc_leaf ("irq" , &irq_read_proc,NULL ,NULL , rthal_proc_root); -add_proc_leaf ("faults" , +__rthal_add_proc_leaf ("faults" , &faults_read_proc,NULL ,NULL , rthal_proc_root); -add_proc_leaf ("apc" , +__rthal_add_proc_leaf ("apc" , &apc_read_proc,NULL ,NULL , rthal_proc_root); + +rthal_nmi_proc_register (); +return 0 ; }static void rthal_proc_unregister (void ) { +rthal_nmi_proc_unregister ();remove_proc_entry ("hal" ,rthal_proc_root);remove_proc_entry ("irq" ,rthal_proc_root);remove_proc_entry ("faults" ,rthal_proc_root);
skins/rtdm/core.c +3 -1
@@ -129,7 +129,7 @@xnlock_put_irqrestore (&rt_fildes_lock, s); - *context_ptr = context = device->reserved.exclusive_context; + context = device->reserved.exclusive_context;if (context) {xnlock_get_irqsave (&rt_dev_lock, s);
@@ -140,6 +140,8 @@ context->device = device;xnlock_put_irqrestore (&rt_dev_lock, s); + + *context_ptr = context; }else {if (nrt_mem) context = kmalloc(sizeof(struct rtdm_dev_context) +
skins/rtdm/device.c +4 -3
@@ -233,9 +233,10 @@return -EINVAL ; } -/* Sanity check: any close handler? */ -if (NO_HANDLER (device->ops, close)) { -xnlogerr ("RTDM: no close handler\n" ); +/* Sanity check: non-RT close handler? +* (Always required for forced cleanup) */ +if (!device->ops.close_nrt) { +xnlogerr ("RTDM: no non-RT close handler\n" );return -EINVAL ; }
skins/rtdm/COPYING +340 -0
340 lines not on this page · raw message
skins/rtdm/COPYING +504 -0
504 lines not on this page · raw message
skins/posix/demos/accuracy.c +1 -0
@@ -14,6 +14,7 @@#include <semaphore.h> #define SEMB_NAME "/semB" +#define SPERIOD 100static int sampling_period =SPERIOD ;
Quoted 4 lines · Jan Kiszka
...
Moreover, here are two minor fixes:* accuracy.patch - add missing define to let this posix demo compile
Forget about this one. I oversaw the way SPERIOD is passed in the original Makefile while compiling accuracy.c by hand.
Jan
Hi Jan,
Am Montag, 2. Januar 2006 14.36 schrieb Jan Kiszka:
Quoted 3 lines
* rtdm-license.patch - add missing COPYING files to RTDM skin and lib (or go for just a single file for ksrc/skins and src/skins if this is applicable)
The COPYING file in your patch contains the GPL license. Should'nt it be the LGPL license ? I mean, its your choice :-), but all other skins are LGPL and in the headers of the rtdm/*.c-files is also the LGPL license.
greetings
kisda
Quoted 4 lines · Stefan Kisdaroczi
Hi Jan,
Am Montag, 2. Januar 2006 14.36 schrieb Jan Kiszka:
Quoted 9 lines
Quoted 3 lines
* rtdm-license.patch - add missing COPYING files to RTDM skin and lib (or go for just a single file for ksrc/skins and src/skins if this is applicable)
The COPYING file in your patch contains the GPL license. Should'nt it be the LGPL license ? I mean, its your choice :-), but all other skins are LGPL and in the headers of the rtdm/*.c-files is also the LGPL license.
[Hold on, re-checking...]
All fine: it's GPL for the core, but LGPL for the lib:
skins/rtdm/COPYING +2 -0
@@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999
Or what do you mean?
Jan
Philippe Gerum
AppliedQuoted 6 lines · Jan Kiszka
Hi again,
I would like to remind of the following three patches:
* rtdm-excl-dev.patch - RTDM fix for bug in opening of exclusive devices (both 2.0 and 2.1)
Merged.
Quoted 2 lines
* rtdm-nrt-close.patch - don't permit RTDM devices without NRT closure handlers
Merged.
Quoted 2 lines
* maxlat_proc.patch - export NMI watchdog threshold via /proc, trigger trace freezing instead of
die_nmi()ifCONFIG_IPIPE_TRACEis enabled
Merged.
Quoted 4 lines
Moreover, here are two minor fixes:
* accuracy.patch - add missing define to let this posix demo compile
Discarded.
Quoted 4 lines
* rtdm-license.patch - add missing COPYING files to RTDM skin and lib (or go for just a single file for ksrc/skins and src/skins if this is applicable)
Applied, thanks.
Signature · 1 line
Philippe.
Quoted 6 lines · Philippe Gerum
Quoted 3 lines
* maxlat_proc.patch - export NMI watchdog threshold via /proc, trigger trace freezing instead of
die_nmi()ifCONFIG_IPIPE_TRACEis enabledMerged.
Gilles pointed out that ipipe_trace_freeze() is not NMI-save. After sorting my private patch chaos, I'm going to work on this.
There is also already a fix+update for the latency benchmark pending. This will be next. Puh!
Jan