Re: [PATCH] Fix/add raw1394 CONFIG_COMPAT code

2007-05-22 Thread Stefan Richter
Dan Dennedy wrote: > On Sunday 20 May 2007 08:28, Stefan Richter wrote: >> maybe we should change ... >> struct raw1394_cycle_timer { [to consist of two u64 to get same alignment on all architectures] ... >> before a libraw1394 with get-cycle-timer support is released. >> Shall I prepare according

Re: [PATCH] Fix/add raw1394 CONFIG_COMPAT code

2007-05-22 Thread Dan Dennedy
On Sunday 20 May 2007 08:28, Stefan Richter wrote: > Arnd Bergmann wrote: > > On Sunday 20 May 2007, Stefan Richter wrote: > >>> Note that this data structure only needs conversion on x86_64 and ia64, but > >>> not on powerpc and other 64 bit architectures that align __u64 also in > >>> 32 bit mod

Re: [PATCH] Fix/add raw1394 CONFIG_COMPAT code

2007-05-21 Thread Stefan Richter
I wrote: > Arnd Bergmann wrote: Note that this data structure only needs conversion on x86_64 and ia64, but not on powerpc and other 64 bit architectures that align __u64 also in 32 bit mode. ... > maybe we should change > > /* argument to RAW1394_IOC_GET_CYCLE_TIMER ioctl */ > stru

Re: [PATCH] Fix/add raw1394 CONFIG_COMPAT code

2007-05-20 Thread Stefan Richter
Arnd Bergmann wrote: > On Sunday 20 May 2007, Stefan Richter wrote: >> maybe we should change ... >> struct raw1394_cycle_timer { ... >> before a libraw1394 with get-cycle-timer support is released. > > Yes, if you still have the chance to change this without breaking > users, that would be ideal.

Re: [PATCH] Fix/add raw1394 CONFIG_COMPAT code

2007-05-20 Thread Arnd Bergmann
On Sunday 20 May 2007, Stefan Richter wrote: > maybe we should change > > /* argument to RAW1394_IOC_GET_CYCLE_TIMER ioctl */ > struct raw1394_cycle_timer { > /* contents of Isochronous Cycle Timer register, >   as in OHCI 1.1 clause 5.13 (also with non-OHCI hosts) */ > __

Re: [PATCH] Fix/add raw1394 CONFIG_COMPAT code

2007-05-20 Thread Stefan Richter
Arnd Bergmann wrote: > On Sunday 20 May 2007, Stefan Richter wrote: >>> Note that this data structure only needs conversion on x86_64 and ia64, but >>> not on powerpc and other 64 bit architectures that align __u64 also in >>> 32 bit mode. >> Is this conversion just unnecessary or actually harmful

Re: [PATCH] Fix/add raw1394 CONFIG_COMPAT code

2007-05-20 Thread Arnd Bergmann
On Sunday 20 May 2007, Stefan Richter wrote: > > > Note that this data structure only needs conversion on x86_64 and ia64, but > > not on powerpc and other 64 bit architectures that align __u64 also in > > 32 bit mode. > > Is this conversion just unnecessary or actually harmful on ppc64 and other

Re: [PATCH] Fix/add raw1394 CONFIG_COMPAT code

2007-05-19 Thread Stefan Richter
Arnd Bergmann wrote: > On Monday 07 May 2007, Petr Vandrovec wrote: >> +struct raw1394_cycle_timer32 { >> +__u32 cycle_timer; >> +__u64 local_time; >> +} __attribute__((packed)); > > Note that this data structure only needs conversion on x86_64 and ia64, but > not on powerpc and ot

Re: [PATCH] Fix/add raw1394 CONFIG_COMPAT code

2007-05-19 Thread Arnd Bergmann
On Monday 07 May 2007, Petr Vandrovec wrote: > +struct raw1394_cycle_timer32 { > +        __u32 cycle_timer; > +        __u64 local_time; > +} __attribute__((packed)); Note that this data structure only needs conversion on x86_64 and ia64, but not on powerpc and other 64 bit architectures that ali

Re: [PATCH] Fix/add raw1394 CONFIG_COMPAT code

2007-05-15 Thread Petr Vandrovec
Stefan Richter wrote: On 7 May, Petr Vandrovec wrote: This patch makes raw1394 in current Linux git tree (2.6.21-1570) usable to 32bit applications running on 64bit kernel (tested on i386 app using x86_64 kernel). [...] With this in place I was able to run my test app and grab some mpegs, so

Re: [PATCH] Fix/add raw1394 CONFIG_COMPAT code

2007-05-15 Thread Stefan Richter
On 7 May, Petr Vandrovec wrote: > This patch makes raw1394 in current Linux git tree (2.6.21-1570) usable to > 32bit > applications running on 64bit kernel (tested on i386 app using x86_64 kernel). [...] > With this in place I was able to run my test app and grab some mpegs, so I > believe > tha

Re: [PATCH] Fix/add raw1394 CONFIG_COMPAT code

2007-05-14 Thread Dan Dennedy
On Sunday 06 May 2007 19:14, Petr Vandrovec wrote: > Hello Dan, > > This patch makes raw1394 in current Linux git tree (2.6.21-1570) usable to > 32bit > applications running on 64bit kernel (tested on i386 app using x86_64 > kernel). I > had to make following changes: > > * read() always fail

Re: [PATCH] Fix/add raw1394 CONFIG_COMPAT code

2007-05-07 Thread Stefan Richter
Petr Vandrovec wrote: [...] > * read() always failed with -EFAULT. This was happening due to > raw1394_compat_read copying data to wrong location - access_ok always > failed as 'r' is kernel address, not user. Whole function just tried to > copy data from 'r' to 'r', which is not good. > >

[PATCH] Fix/add raw1394 CONFIG_COMPAT code

2007-05-06 Thread Petr Vandrovec
Hello Dan, This patch makes raw1394 in current Linux git tree (2.6.21-1570) usable to 32bit applications running on 64bit kernel (tested on i386 app using x86_64 kernel). I had to make following changes: * read() always failed with -EFAULT. This was happening due to raw1394_compat_read copy