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
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
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
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
>
>
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
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
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
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
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
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
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
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
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
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
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.
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
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
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
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
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:
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:
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
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
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)
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.
+
+
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,
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:
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:
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
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.
+
+
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
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
32 matches
Mail list logo