raw1394_request user/kernel space size differences
Brought to you by:
aeb,
bencollins
From: Ben C. <bco...@de...> - 2000-05-27 00:13:22
|
I'm messing around with getting the ieee1394 drivers working across platforms (specifically I am testing with sparc64). The unusual thing about sparc64 is that the user space is (currently) 32bit, while the kernel is 64bit. This makes sizeof(struct raw1394_request) different between the kernel driver and the libraw1394 library (56 in the driver, 40 in the library, mainly because unsigned int and size_t are 8 in the kernel and 4 in userspace). Now, usually this would be overcome in cases like this for sparc64 because the comunication is via ioctl's, and sparc64 has conversions. However, this is a different case since we are reading and writing directly to the device. I forced the size's in the library to match that of driver for each member of the struct, but that causes an oops with: Unsupported unaligned load/store trap for kernel testlibraw(13217): Kernel does fpu/atomic unaligned load/store. Any ideas on working around this? I suspect that libraw1394 will have to be special cased for this (which is a hack) but the driver code still performs this unaligned bit on 64bit (which I suspect is the real problem). The driver most likely needs to use things like u32 for the struct, and libraw1394 will need some configure.in macros for detecting properly sized replacements to match the kernel. I am going to start looking at it, but I wanted some other people closer to the code to realize this (mostly because there are probably other 64bit issues in the drivers aswell). Thanks, Ben -- -----------=======-=-======-=========-----------=====------------=-=------ / Ben Collins -- ...on that fantastic voyage... -- Debian GNU/Linux \ ` bco...@de... -- bco...@op... -- bco...@li... ' `---=========------=======-------------=-=-----=-===-======-------=--=---' |