Hi Dave...
Thank you for the latest 2.17.C release. The changes for the 12 bit
majors and 20 bit minors will help a lot for many of our products.
I ran into a snag compiling 2.17.C on 2.4.X kernels (specifically RH 7.2
and RH 8.0). On both of these kernels, compiling LiS 2.17.C complained
about the lis_down_nosig_fcn().
It complains about 'sighand' missing from the struct task_struct
('current', specifically). It also complained about recalc_sigpending()
having the wrong number of arguments. Note that 2.17.A compiles fine
(and seems to work fine) because it doesn't have this new function.
I whipped up the patch below, but it comes with several caveats:
1) It's not entirely clear to me what lis_down_nosig_fcn() is trying
to do. This appears to be recently introduced as it was not in 2.17.A
and it's not used anywhere inside of LiS, so...
2) I probably have the defines wrong for the spin_locks that I changed,
but I don't have a 2.6 kernel to play with so I couldn't tell what
you were going for with that lock. 'sigmask_lock' was my best guess.
(I doubt that what I did was correct because 'Configure' has SIGMASKLOCK
set to 'y' for 2.6, so you must of had a good reason not to use
'sigmask_lock')
3) It compiles ("it must be good..."), but I haven't tried the changes
that I did since I don't have anything which uses a semaphore...
This effort was mostly just to get me over the hump and get 2.17.C
installed so that I could try it with my driver.
Another question that I had was whether or not there was file specific
commentary about where and why changes are implemented. For example is there
a document or comments hidden in the CVS tree which describes why this
function was added?
Thanks-
Dan
*** lislocks.c Tue Mar 2 14:18:45 2004
--- lislocks.c.new Thu Mar 11 19:37:36 2004
***************
*** 21,27 ****
* *
************************************************************************/
! #ident "@(#) LiS lislocks.c 1.33 03/02/04"
#include <sys/LiS/linux-mdep.h>
#include <sys/LiS/strmdbg.h>
--- 21,27 ----
* *
************************************************************************/
! #ident "@(#) LiS lislocks.c 1.34 03/11/04"
#include <sys/LiS/linux-mdep.h>
#include <sys/LiS/strmdbg.h>
***************
*** 949,966 ****
--- 949,995 ----
{
sigset_t save_sigs ;
+ #ifdef KERNEL_2_6
spin_lock_irq(¤t->sighand->siglock) ;
+ #elif defined SIGMASKLOCK
+ spin_lock_irq(¤t->sigmask_lock) ;
+ #endif
+
save_sigs = current->blocked ;
sigfillset(¤t->blocked) ; /* block all signals */
+ #ifdef RCVOID
recalc_sigpending() ;
+ #else
+ recalc_sigpending(current) ;
+ #endif
+
+ #ifdef KERNEL_2_6
spin_unlock_irq(¤t->sighand->siglock) ;
+ #elif defined SIGMASKLOCK
+ spin_unlock_irq(¤t->sigmask_lock);
+ #endif
while (lis_down_fcn(lsem, file, line) < 0) ;
+ #ifdef KERNEL_2_6
spin_lock_irq(¤t->sighand->siglock) ;
+ #elif defined SIGMASKLOCK
+ spin_lock_irq(¤t->sigmask_lock) ;
+ #endif
+
current->blocked = save_sigs ;
+
+ #ifdef RCVOID
recalc_sigpending() ;
+ #else
+ recalc_sigpending(current) ;
+ #endif
+
+ #ifdef KERNEL_2_6
spin_unlock_irq(¤t->sighand->siglock) ;
+ #elif defined SIGMASKLOCK
+ spin_unlock_irq(¤t->sigmask_lock);
+ #endif
}
static void lis_sem_fill(lis_semaphore_t *lsem, int count)