Re: how to add 32/64 compatible ioctls at runtime via module?

From: Mikael Pettersson
Date: Tue Dec 14 2004 - 12:29:05 EST


On Tue, 14 Dec 2004 10:39:14 -0600, Chris Friesen wrote:
>I'm working on a driver for 2.6.
>
>I'd like to be able to load the driver as a module, and have it register for
>various ioctl() calls on a device node (which can be dynamic, so no problem there).
>
>I'm not sure how to go about registering at runtime for 32/64 bit compatibility
>so that I can load a module into a ppc64 kernel, and have 32-bit userspace code
>call those ioctls.
>
>Can anyone give some pointers, or direct me to existing code?

register_ioctl32_conversion(ioctl, handler)

tells your 64-bit kernel that the given ioctl, when issued by
a 32-bit mode task, should be routed to the given handler.
The handler can be NULL, in which case the ioctl is routed to
the normal handler via the filp.

/Mikael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/