Re: Looking for experiences with ia64 architectures.
dan_gora <[email protected]>
| Newsgroups | gmane.linux.kernel.streams |
|---|---|
| Message-ID | <[email protected]> |
I have had success porting LiS to SuSE 9.2 on both 32 bit and 64 bit. I think that I posted before to this list what I did to get the 32 bit SuSE to work. Porting to 64 bits has some issues. You cannot use the _syscall macros in head/linux-mdep.c, so everything that calls them (the ldl driver, another test driver) is broken. We don't use any of those functions so I haven't looked into trying to work around the lack of those syscalls. The problem with them is not the macro expansion (althogh you have to remove the KERNEL_SYSCALLS define at the top of the file to get the macros), but that the machine just locks up or crashes if you actually call one of them. So I just #defined all of those macros to be -EINVAL and moved on. You also need to modify all of the Makefiles which build kernel drivers to add -mcmodel=kernel -mno-red-zone to get the kernel level code to compile correctly. Another wierd gotcha is that in SuSE 9.2 AMD64 the gcc compiler uses register argument passing by default. The AMD64 has a whole new ABI from the i386, so the extensive tricks that Dave did to try and protect us against differences in the register passing methods with the _RP macro don't help us too much with 64 bit. The thing is that gcc uses register passing by default so there is no way for LiS to detect if the kernel was build for register passing or stack passing. LiS doesn't detect register passing so it defines the _RP macros to be nothing, which means that all of the DKI functions will use the default, or in this case register passing, calling method. The tricky part is that the AMD64 gcc still has a -mregsparm flag that allows you to specify the number of arguments to pass in registers. What got me was that for 32 bit, when you compile your driver, you have to explicitly define -mregsparm=0 so that your driver will always use stack passing no matter how your compilation machine was built since the LiS DKI functions set the _RP macros to the proper value to always get you stack passing. For 64 bit, you want no -mregsparm argument so that you get the default argument passing convention. I believe that on 64 bit you get 5 (integer) parameters passed in regs by default. The AMD64 ABI is available at www.x86-64.org. The last thing that I got stuck by was holding a spinlock for "too long". I didn't see this on the 32 bit SuSE, but on 64 bit I had a spinlock that I held for 4 seconds while I did a long memory test on my board. This caused the machine to just lock up with no indication at all what was wrong. So, be forewarned, don't hold spin locks too long! We might be able to work something out where I can release the changes that I made to support 64 bit, but I have to discuss this with my employer, etc.... thanks- dan --- LOUVET Eric <[email protected]> wrote: > Hi, I'm looking for someone having experiences with 64 bits > architectures. (Opteron or something running a 64 bits linux > kernel). > > Is someone has successful stories (or unsuccessful) in trying to > get LiS > running on such hardwares ? > > Regards. > > _______________________________________________ > Linux-streams mailing list > [email protected] > http://gsyc.escet.urjc.es/mailman/listinfo/linux-streams > > >