[PATCH] synclink_gt add compat_ioctl

2007-05-09 Thread Paul Fulghum
Add support for 32 bit ioctl on 64 bit systems for synclink_gt Cc: Arnd Bergmann <[EMAIL PROTECTED]> Signed-off-by: Paul Fulghum <[EMAIL PROTECTED]> --- a/include/linux/Kbuild 2007-04-25 22:08:32.0 -0500 +++ b/include/linux/Kbuild 2007-05-09 10:11:22.0 -0500 @@ -140,7

[PATCH] synclink_gt add compat_ioctl

2007-05-09 Thread Paul Fulghum
Add support for 32 bit ioctl on 64 bit systems for synclink_gt Cc: Arnd Bergmann [EMAIL PROTECTED] Signed-off-by: Paul Fulghum [EMAIL PROTECTED] --- a/include/linux/Kbuild 2007-04-25 22:08:32.0 -0500 +++ b/include/linux/Kbuild 2007-05-09 10:11:22.0 -0500 @@ -140,7

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-08 Thread Paul Fulghum
Arnd Bergmann wrote: To solve this, you can to change include/linux/Kbuild to list synclink.h as unifdef-y instead of header-y, and put the parts that you don't want to be in user space inside of #ifdef __KERNEL__. Alternatively, you can put these kernel-internal definitions into a private

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-08 Thread Arnd Bergmann
On Tuesday 08 May 2007, Paul Fulghum wrote: > make[3]: *** No rule to make target > `/usr/src/devel/usr/include/linux/.check.synclink.h', needed by > `__headerscheck'.  Stop. > > linux/kexec.h includes linux/compat.h without a similar error, > though that is inside of a #ifdef CONFIG_KEXEC > >

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-08 Thread Paul Fulghum
On Sun, 2007-05-06 at 02:27 +0200, Arnd Bergmann wrote: > Now that you mention the duplication, this sounds wrong as well. The easiest > solution is probably to just put the definition of your data structure > inside of #ifdef CONFIG_COMPAT in the header file. The structure definition was

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-08 Thread Paul Fulghum
On Sun, 2007-05-06 at 02:27 +0200, Arnd Bergmann wrote: Now that you mention the duplication, this sounds wrong as well. The easiest solution is probably to just put the definition of your data structure inside of #ifdef CONFIG_COMPAT in the header file. The structure definition was already

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-08 Thread Arnd Bergmann
On Tuesday 08 May 2007, Paul Fulghum wrote: make[3]: *** No rule to make target `/usr/src/devel/usr/include/linux/.check.synclink.h', needed by `__headerscheck'.  Stop. linux/kexec.h includes linux/compat.h without a similar error, though that is inside of a #ifdef CONFIG_KEXEC Moving

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-08 Thread Paul Fulghum
Arnd Bergmann wrote: To solve this, you can to change include/linux/Kbuild to list synclink.h as unifdef-y instead of header-y, and put the parts that you don't want to be in user space inside of #ifdef __KERNEL__. Alternatively, you can put these kernel-internal definitions into a private

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-05 Thread Arnd Bergmann
On Saturday 05 May 2007, Paul Fulghum wrote: > That declaration will need to be duplicated in each driver that > uses it (4 drivers in my case). In that sense (a structure declaration > used by multiple code modules) it does seem like an interface definition. > > If that is what is needed, I

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-05 Thread Arnd Bergmann
On Friday 04 May 2007, Paul Fulghum wrote: > > > - It is fishy that apart from one outlier in kexec.h, synclink.h is the > >   only header file which uses compat_ulong_t.  Are we doing this right? > > Arnd, do you have any comment on this? I think most others just define the compat data

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-05 Thread Paul Fulghum
Arnd Bergmann wrote: On Friday 04 May 2007, Paul Fulghum wrote: - It is fishy that apart from one outlier in kexec.h, synclink.h is the only header file which uses compat_ulong_t. Are we doing this right? Arnd, do you have any comment on this? I think most others just define the compat

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-05 Thread Paul Fulghum
Arnd Bergmann wrote: On Friday 04 May 2007, Paul Fulghum wrote: - It is fishy that apart from one outlier in kexec.h, synclink.h is the only header file which uses compat_ulong_t. Are we doing this right? Arnd, do you have any comment on this? I think most others just define the compat

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-05 Thread Arnd Bergmann
On Friday 04 May 2007, Paul Fulghum wrote: - It is fishy that apart from one outlier in kexec.h, synclink.h is the   only header file which uses compat_ulong_t.  Are we doing this right? Arnd, do you have any comment on this? I think most others just define the compat data structures in

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-05 Thread Arnd Bergmann
On Saturday 05 May 2007, Paul Fulghum wrote: That declaration will need to be duplicated in each driver that uses it (4 drivers in my case). In that sense (a structure declaration used by multiple code modules) it does seem like an interface definition. If that is what is needed, I will do

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-04 Thread Paul Fulghum
Andrew Morton wrote: On Thu, 03 May 2007 13:01:17 -0500 Paul Fulghum <[EMAIL PROTECTED]> wrote: Add compat_ioctl handler to synclink_gt driver. i386 allmodconfig: make[3]: *** No rule to make target `/usr/src/devel/usr/include/linux/.check.synclink.h', needed by `__headerscheck'. Stop.

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-04 Thread Paul Fulghum
Andrew Morton wrote: In file included from drivers/char/synclink_gt.c:85: include/linux/synclink.h:175: error: expected specifier-qualifier-list before 'compat_ulong_t' - We might as well do the same ifdef-avoidery trick around compat_ioctl() too. That required that it be renamed. - It is

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-04 Thread Paul Fulghum
Andrew Morton wrote: In file included from drivers/char/synclink_gt.c:85: include/linux/synclink.h:175: error: expected specifier-qualifier-list before 'compat_ulong_t' - We might as well do the same ifdef-avoidery trick around compat_ioctl() too. That required that it be renamed. - It is

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-04 Thread Paul Fulghum
Andrew Morton wrote: On Thu, 03 May 2007 13:01:17 -0500 Paul Fulghum [EMAIL PROTECTED] wrote: Add compat_ioctl handler to synclink_gt driver. i386 allmodconfig: make[3]: *** No rule to make target `/usr/src/devel/usr/include/linux/.check.synclink.h', needed by `__headerscheck'. Stop. I

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-03 Thread Andrew Morton
On Thu, 03 May 2007 13:01:17 -0500 Paul Fulghum <[EMAIL PROTECTED]> wrote: > Add compat_ioctl handler to synclink_gt driver. > > The one case requiring a separate 32 bit handler could be > removed by redefining the associated structure in > a way compatible with both 32 and 64 bit systems. But

[PATCH] synclink_gt add compat_ioctl

2007-05-03 Thread Paul Fulghum
Add compat_ioctl handler to synclink_gt driver. The one case requiring a separate 32 bit handler could be removed by redefining the associated structure in a way compatible with both 32 and 64 bit systems. But that approach would break existing native 64 bit user applications. Signed-off-by:

[PATCH] synclink_gt add compat_ioctl

2007-05-03 Thread Paul Fulghum
Add compat_ioctl handler to synclink_gt driver. The one case requiring a separate 32 bit handler could be removed by redefining the associated structure in a way compatible with both 32 and 64 bit systems. But that approach would break existing native 64 bit user applications. Signed-off-by:

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-03 Thread Andrew Morton
On Thu, 03 May 2007 13:01:17 -0500 Paul Fulghum [EMAIL PROTECTED] wrote: Add compat_ioctl handler to synclink_gt driver. The one case requiring a separate 32 bit handler could be removed by redefining the associated structure in a way compatible with both 32 and 64 bit systems. But that

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-02 Thread Paul Fulghum
Arnd Bergmann wrote: The same function contains a copy_from_user(), which cannot be called with interrupts disabled, so yes, I am very certain it will not change. Good point. -- Paul - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-02 Thread Arnd Bergmann
On Thursday 03 May 2007, Paul Fulghum wrote: > >> + > >> +spin_lock_irqsave(>lock, flags); > > > > no need for _irqsave, just use spin_{,un}lock_irq() when you know that > > interrupts are enabled. > > That makes me a little uneasy. The locking > mechanisms (and just about everything else)

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-02 Thread Paul Fulghum
Arnd Bergmann wrote: + case MGSL_IOCGPARAMS32: + rc = get_params32(info, (struct MGSL_PARAMS32 __user *)compat_ptr(arg)); + break; No need for the cast here. OK, for some reason I remember getting a warning error without it. I must have been mistaken. + +

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-02 Thread Arnd Bergmann
On Wednesday 02 May 2007, Paul Fulghum wrote: > + switch (cmd) { > + > + case MGSL_IOCSPARAMS32: > + rc = set_params32(info, (struct MGSL_PARAMS32 __user > *)compat_ptr(arg)); > + break; > + > + case MGSL_IOCGPARAMS32: > + rc = get_params32(info,

[PATCH] synclink_gt add compat_ioctl

2007-05-02 Thread Paul Fulghum
Add compat_ioctl handler to synclink_gt driver. The one case requiring a separate 32 bit handler could be removed by redefining the associated structure in a way compatible with both 32 and 64 bit systems. But that approach would break existing native 64 bit user applications. Signed-off-by:

[PATCH] synclink_gt add compat_ioctl

2007-05-02 Thread Paul Fulghum
Add compat_ioctl handler to synclink_gt driver. The one case requiring a separate 32 bit handler could be removed by redefining the associated structure in a way compatible with both 32 and 64 bit systems. But that approach would break existing native 64 bit user applications. Signed-off-by:

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-02 Thread Arnd Bergmann
On Wednesday 02 May 2007, Paul Fulghum wrote: + switch (cmd) { + + case MGSL_IOCSPARAMS32: + rc = set_params32(info, (struct MGSL_PARAMS32 __user *)compat_ptr(arg)); + break; + + case MGSL_IOCGPARAMS32: + rc = get_params32(info, (struct

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-02 Thread Paul Fulghum
Arnd Bergmann wrote: + case MGSL_IOCGPARAMS32: + rc = get_params32(info, (struct MGSL_PARAMS32 __user *)compat_ptr(arg)); + break; No need for the cast here. OK, for some reason I remember getting a warning error without it. I must have been mistaken. + +

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-02 Thread Arnd Bergmann
On Thursday 03 May 2007, Paul Fulghum wrote: + +spin_lock_irqsave(info-lock, flags); no need for _irqsave, just use spin_{,un}lock_irq() when you know that interrupts are enabled. That makes me a little uneasy. The locking mechanisms (and just about everything else) above the

Re: [PATCH] synclink_gt add compat_ioctl

2007-05-02 Thread Paul Fulghum
Arnd Bergmann wrote: The same function contains a copy_from_user(), which cannot be called with interrupts disabled, so yes, I am very certain it will not change. Good point. -- Paul - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL