1 /* $Id: ioctl32.c,v 1.136 2002/01/14 09:49:52 davem Exp $
2 * ioctl32.c: Conversion between 32bit and 64bit native ioctls.
4 * Copyright (C) 1997-2000 Jakub Jelinek (jakub@redhat.com)
5 * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be)
6 * Copyright (C) 2003 Pavel Machek (pavel@suse.cz)
8 * These routines maintain argument size conversion between 32bit and 64bit
13 #include "compat_ioctl.c"
14 #include <linux/ncp_fs.h>
15 #include <linux/syscalls.h>
18 #include <asm/vuid_event.h>
19 #include <asm/envctrl.h>
20 #include <asm/display7seg.h>
21 #include <asm/openpromio.h>
22 #include <asm/watchdog.h>
24 /* Use this to get at 32-bit user passed pointers.
25 * See sys_sparc32.c for description about it.
27 #define A(__x) compat_ptr(__x)
30 #include "compat_ioctl.c"
33 int index; /* first element (0 origin) */
40 #define FBIOPUTCMAP32 _IOW('F', 3, struct fbcmap32)
41 #define FBIOGETCMAP32 _IOW('F', 4, struct fbcmap32)
43 static int fbiogetputcmap(unsigned int fd, unsigned int cmd, unsigned long arg)
45 struct fbcmap32 __user *argp = (void __user *)arg;
46 struct fbcmap __user *p = compat_alloc_user_space(sizeof(*p));
50 ret = copy_in_user(p, argp, 2 * sizeof(int));
51 ret |= get_user(addr, &argp->red);
52 ret |= put_user(compat_ptr(addr), &p->red);
53 ret |= get_user(addr, &argp->green);
54 ret |= put_user(compat_ptr(addr), &p->green);
55 ret |= get_user(addr, &argp->blue);
56 ret |= put_user(compat_ptr(addr), &p->blue);
59 return sys_ioctl(fd, (cmd == FBIOPUTCMAP32) ? FBIOPUTCMAP_SPARC : FBIOGETCMAP_SPARC, (unsigned long)p);
63 short set; /* what to set, choose from the list above */
64 short enable; /* cursor on/off */
65 struct fbcurpos pos; /* cursor position */
66 struct fbcurpos hot; /* cursor hot spot */
67 struct fbcmap32 cmap; /* color map info */
68 struct fbcurpos size; /* cursor bit map size */
69 u32 image; /* cursor image bits */
70 u32 mask; /* cursor mask bits */
73 #define FBIOSCURSOR32 _IOW('F', 24, struct fbcursor32)
74 #define FBIOGCURSOR32 _IOW('F', 25, struct fbcursor32)
76 static int fbiogscursor(unsigned int fd, unsigned int cmd, unsigned long arg)
78 struct fbcursor __user *p = compat_alloc_user_space(sizeof(*p));
79 struct fbcursor32 __user *argp = (void __user *)arg;
83 ret = copy_in_user(p, argp,
84 2 * sizeof (short) + 2 * sizeof(struct fbcurpos));
85 ret |= copy_in_user(&p->size, &argp->size, sizeof(struct fbcurpos));
86 ret |= copy_in_user(&p->cmap, &argp->cmap, 2 * sizeof(int));
87 ret |= get_user(addr, &argp->cmap.red);
88 ret |= put_user(compat_ptr(addr), &p->cmap.red);
89 ret |= get_user(addr, &argp->cmap.green);
90 ret |= put_user(compat_ptr(addr), &p->cmap.green);
91 ret |= get_user(addr, &argp->cmap.blue);
92 ret |= put_user(compat_ptr(addr), &p->cmap.blue);
93 ret |= get_user(addr, &argp->mask);
94 ret |= put_user(compat_ptr(addr), &p->mask);
95 ret |= get_user(addr, &argp->image);
96 ret |= put_user(compat_ptr(addr), &p->image);
99 return sys_ioctl (fd, FBIOSCURSOR, (unsigned long)p);
102 #if defined(CONFIG_DRM) || defined(CONFIG_DRM_MODULE)
103 /* This really belongs in include/linux/drm.h -DaveM */
104 #include "../../../drivers/char/drm/drm.h"
106 typedef struct drm32_version {
107 int version_major; /* Major version */
108 int version_minor; /* Minor version */
109 int version_patchlevel;/* Patch level */
110 int name_len; /* Length of name buffer */
111 u32 name; /* Name of driver */
112 int date_len; /* Length of date buffer */
113 u32 date; /* User-space buffer to hold date */
114 int desc_len; /* Length of desc buffer */
115 u32 desc; /* User-space buffer to hold desc */
117 #define DRM32_IOCTL_VERSION DRM_IOWR(0x00, drm32_version_t)
119 static int drm32_version(unsigned int fd, unsigned int cmd, unsigned long arg)
121 drm32_version_t __user *uversion = (drm32_version_t __user *)arg;
122 drm_version_t __user *p = compat_alloc_user_space(sizeof(*p));
127 if (clear_user(p, 3 * sizeof(int)) ||
128 get_user(n, &uversion->name_len) ||
129 put_user(n, &p->name_len) ||
130 get_user(addr, &uversion->name) ||
131 put_user(compat_ptr(addr), &p->name) ||
132 get_user(n, &uversion->date_len) ||
133 put_user(n, &p->date_len) ||
134 get_user(addr, &uversion->date) ||
135 put_user(compat_ptr(addr), &p->date) ||
136 get_user(n, &uversion->desc_len) ||
137 put_user(n, &p->desc_len) ||
138 get_user(addr, &uversion->desc) ||
139 put_user(compat_ptr(addr), &p->desc))
142 ret = sys_ioctl(fd, DRM_IOCTL_VERSION, (unsigned long)p);
146 if (copy_in_user(uversion, p, 3 * sizeof(int)) ||
147 get_user(n, &p->name_len) ||
148 put_user(n, &uversion->name_len) ||
149 get_user(n, &p->date_len) ||
150 put_user(n, &uversion->date_len) ||
151 get_user(n, &p->desc_len) ||
152 put_user(n, &uversion->desc_len))
158 typedef struct drm32_unique {
159 int unique_len; /* Length of unique */
160 u32 unique; /* Unique name for driver instantiation */
162 #define DRM32_IOCTL_GET_UNIQUE DRM_IOWR(0x01, drm32_unique_t)
163 #define DRM32_IOCTL_SET_UNIQUE DRM_IOW( 0x10, drm32_unique_t)
165 static int drm32_getsetunique(unsigned int fd, unsigned int cmd, unsigned long arg)
167 drm32_unique_t __user *uarg = (drm32_unique_t __user *)arg;
168 drm_unique_t __user *p = compat_alloc_user_space(sizeof(*p));
173 if (get_user(n, &uarg->unique_len) ||
174 put_user(n, &p->unique_len) ||
175 get_user(addr, &uarg->unique) ||
176 put_user(compat_ptr(addr), &p->unique))
179 if (cmd == DRM32_IOCTL_GET_UNIQUE)
180 ret = sys_ioctl (fd, DRM_IOCTL_GET_UNIQUE, (unsigned long)p);
182 ret = sys_ioctl (fd, DRM_IOCTL_SET_UNIQUE, (unsigned long)p);
187 if (get_user(n, &p->unique_len) || put_user(n, &uarg->unique_len))
193 typedef struct drm32_map {
194 u32 offset; /* Requested physical address (0 for SAREA)*/
195 u32 size; /* Requested physical size (bytes) */
196 drm_map_type_t type; /* Type of memory to map */
197 drm_map_flags_t flags; /* Flags */
198 u32 handle; /* User-space: "Handle" to pass to mmap */
199 /* Kernel-space: kernel-virtual address */
200 int mtrr; /* MTRR slot used */
203 #define DRM32_IOCTL_ADD_MAP DRM_IOWR(0x15, drm32_map_t)
205 static int drm32_addmap(unsigned int fd, unsigned int cmd, unsigned long arg)
207 drm32_map_t __user *uarg = (drm32_map_t __user *) arg;
213 ret = get_user(karg.offset, &uarg->offset);
214 ret |= get_user(karg.size, &uarg->size);
215 ret |= get_user(karg.type, &uarg->type);
216 ret |= get_user(karg.flags, &uarg->flags);
217 ret |= get_user(tmp, &uarg->handle);
218 ret |= get_user(karg.mtrr, &uarg->mtrr);
222 karg.handle = (void *) (unsigned long) tmp;
226 ret = sys_ioctl(fd, DRM_IOCTL_ADD_MAP, (unsigned long) &karg);
230 ret = put_user(karg.offset, &uarg->offset);
231 ret |= put_user(karg.size, &uarg->size);
232 ret |= put_user(karg.type, &uarg->type);
233 ret |= put_user(karg.flags, &uarg->flags);
234 tmp = (u32) (long)karg.handle;
235 ret |= put_user(tmp, &uarg->handle);
236 ret |= put_user(karg.mtrr, &uarg->mtrr);
244 typedef struct drm32_buf_info {
245 int count; /* Entries in list */
246 u32 list; /* (drm_buf_desc_t *) */
248 #define DRM32_IOCTL_INFO_BUFS DRM_IOWR(0x18, drm32_buf_info_t)
250 static int drm32_info_bufs(unsigned int fd, unsigned int cmd, unsigned long arg)
252 drm32_buf_info_t __user *uarg = (drm32_buf_info_t __user *)arg;
253 drm_buf_info_t __user *p = compat_alloc_user_space(sizeof(*p));
258 if (get_user(n, &uarg->count) || put_user(n, &p->count) ||
259 get_user(addr, &uarg->list) || put_user(compat_ptr(addr), &p->list))
262 ret = sys_ioctl(fd, DRM_IOCTL_INFO_BUFS, (unsigned long)p);
266 if (get_user(n, &p->count) || put_user(n, &uarg->count))
272 typedef struct drm32_buf_free {
274 u32 list; /* (int *) */
276 #define DRM32_IOCTL_FREE_BUFS DRM_IOW( 0x1a, drm32_buf_free_t)
278 static int drm32_free_bufs(unsigned int fd, unsigned int cmd, unsigned long arg)
280 drm32_buf_free_t __user *uarg = (drm32_buf_free_t __user *)arg;
281 drm_buf_free_t __user *p = compat_alloc_user_space(sizeof(*p));
285 if (get_user(n, &uarg->count) || put_user(n, &p->count) ||
286 get_user(addr, &uarg->list) || put_user(compat_ptr(addr), &p->list))
289 return sys_ioctl(fd, DRM_IOCTL_FREE_BUFS, (unsigned long)p);
292 typedef struct drm32_buf_pub {
293 int idx; /* Index into master buflist */
294 int total; /* Buffer size */
295 int used; /* Amount of buffer in use (for DMA) */
296 u32 address; /* Address of buffer (void *) */
299 typedef struct drm32_buf_map {
300 int count; /* Length of buflist */
301 u32 virtual; /* Mmaped area in user-virtual (void *) */
302 u32 list; /* Buffer information (drm_buf_pub_t *) */
304 #define DRM32_IOCTL_MAP_BUFS DRM_IOWR(0x19, drm32_buf_map_t)
306 static int drm32_map_bufs(unsigned int fd, unsigned int cmd, unsigned long arg)
308 drm32_buf_map_t __user *uarg = (drm32_buf_map_t __user *)arg;
309 drm32_buf_pub_t __user *ulist;
310 drm_buf_map_t __user *arg64;
311 drm_buf_pub_t __user *list;
312 int orig_count, ret, i;
316 if (get_user(orig_count, &uarg->count))
319 arg64 = compat_alloc_user_space(sizeof(drm_buf_map_t) +
320 (size_t)orig_count * sizeof(drm_buf_pub_t));
321 list = (void __user *)(arg64 + 1);
323 if (put_user(orig_count, &arg64->count) ||
324 put_user(list, &arg64->list) ||
325 get_user(addr, &uarg->virtual) ||
326 put_user(compat_ptr(addr), &arg64->virtual) ||
327 get_user(addr, &uarg->list))
330 ulist = compat_ptr(addr);
332 for (i = 0; i < orig_count; i++) {
333 if (get_user(n, &ulist[i].idx) ||
334 put_user(n, &list[i].idx) ||
335 get_user(n, &ulist[i].total) ||
336 put_user(n, &list[i].total) ||
337 get_user(n, &ulist[i].used) ||
338 put_user(n, &list[i].used) ||
339 get_user(addr, &ulist[i].address) ||
340 put_user(compat_ptr(addr), &list[i].address))
344 ret = sys_ioctl(fd, DRM_IOCTL_MAP_BUFS, (unsigned long) arg64);
348 for (i = 0; i < orig_count; i++) {
350 if (get_user(n, &list[i].idx) ||
351 put_user(n, &ulist[i].idx) ||
352 get_user(n, &list[i].total) ||
353 put_user(n, &ulist[i].total) ||
354 get_user(n, &list[i].used) ||
355 put_user(n, &ulist[i].used) ||
356 get_user(p, &list[i].address) ||
357 put_user((unsigned long)p, &ulist[i].address))
361 if (get_user(n, &arg64->count) || put_user(n, &uarg->count))
367 typedef struct drm32_dma {
368 /* Indices here refer to the offset into
369 buflist in drm_buf_get_t. */
370 int context; /* Context handle */
371 int send_count; /* Number of buffers to send */
372 u32 send_indices; /* List of handles to buffers (int *) */
373 u32 send_sizes; /* Lengths of data to send (int *) */
374 drm_dma_flags_t flags; /* Flags */
375 int request_count; /* Number of buffers requested */
376 int request_size; /* Desired size for buffers */
377 u32 request_indices; /* Buffer information (int *) */
378 u32 request_sizes; /* (int *) */
379 int granted_count; /* Number of buffers granted */
381 #define DRM32_IOCTL_DMA DRM_IOWR(0x29, drm32_dma_t)
383 /* RED PEN The DRM layer blindly dereferences the send/request
384 * index/size arrays even though they are userland
387 static int drm32_dma(unsigned int fd, unsigned int cmd, unsigned long arg)
389 drm32_dma_t __user *uarg = (drm32_dma_t __user *) arg;
390 drm_dma_t __user *p = compat_alloc_user_space(sizeof(*p));
394 if (copy_in_user(p, uarg, 2 * sizeof(int)) ||
395 get_user(addr, &uarg->send_indices) ||
396 put_user(compat_ptr(addr), &p->send_indices) ||
397 get_user(addr, &uarg->send_sizes) ||
398 put_user(compat_ptr(addr), &p->send_sizes) ||
399 copy_in_user(&p->flags, &uarg->flags, sizeof(drm_dma_flags_t)) ||
400 copy_in_user(&p->request_count, &uarg->request_count, sizeof(int))||
401 copy_in_user(&p->request_size, &uarg->request_size, sizeof(int)) ||
402 get_user(addr, &uarg->request_indices) ||
403 put_user(compat_ptr(addr), &p->request_indices) ||
404 get_user(addr, &uarg->request_sizes) ||
405 put_user(compat_ptr(addr), &p->request_sizes) ||
406 copy_in_user(&p->granted_count, &uarg->granted_count, sizeof(int)))
409 ret = sys_ioctl(fd, DRM_IOCTL_DMA, (unsigned long)p);
413 if (copy_in_user(uarg, p, 2 * sizeof(int)) ||
414 copy_in_user(&uarg->flags, &p->flags, sizeof(drm_dma_flags_t)) ||
415 copy_in_user(&uarg->request_count, &p->request_count, sizeof(int))||
416 copy_in_user(&uarg->request_size, &p->request_size, sizeof(int)) ||
417 copy_in_user(&uarg->granted_count, &p->granted_count, sizeof(int)))
423 typedef struct drm32_ctx_res {
425 u32 contexts; /* (drm_ctx_t *) */
427 #define DRM32_IOCTL_RES_CTX DRM_IOWR(0x26, drm32_ctx_res_t)
429 static int drm32_res_ctx(unsigned int fd, unsigned int cmd, unsigned long arg)
431 drm32_ctx_res_t __user *uarg = (drm32_ctx_res_t __user *) arg;
432 drm_ctx_res_t __user *p = compat_alloc_user_space(sizeof(*p));
436 if (copy_in_user(p, uarg, sizeof(int)) ||
437 get_user(addr, &uarg->contexts) ||
438 put_user(compat_ptr(addr), &p->contexts))
441 ret = sys_ioctl(fd, DRM_IOCTL_RES_CTX, (unsigned long)p);
445 if (copy_in_user(uarg, p, sizeof(int)))
453 typedef int (* ioctl32_handler_t)(unsigned int, unsigned int, unsigned long, struct file *);
455 #define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL((cmd),sys_ioctl)
456 #define HANDLE_IOCTL(cmd,handler) { (cmd), (ioctl32_handler_t)(handler), NULL },
457 #define IOCTL_TABLE_START \
458 struct ioctl_trans ioctl_start[] = {
459 #define IOCTL_TABLE_END \
463 #include <linux/compat_ioctl.h>
465 #include "compat_ioctl.c"
466 COMPATIBLE_IOCTL(FBIOGTYPE)
467 COMPATIBLE_IOCTL(FBIOSATTR)
468 COMPATIBLE_IOCTL(FBIOGATTR)
469 COMPATIBLE_IOCTL(FBIOSVIDEO)
470 COMPATIBLE_IOCTL(FBIOGVIDEO)
471 COMPATIBLE_IOCTL(FBIOGCURSOR32) /* This is not implemented yet. Later it should be converted... */
472 COMPATIBLE_IOCTL(FBIOSCURPOS)
473 COMPATIBLE_IOCTL(FBIOGCURPOS)
474 COMPATIBLE_IOCTL(FBIOGCURMAX)
476 COMPATIBLE_IOCTL(KIOCTYPE)
477 COMPATIBLE_IOCTL(KIOCLAYOUT)
478 COMPATIBLE_IOCTL(KIOCGTRANS)
479 COMPATIBLE_IOCTL(KIOCTRANS)
480 COMPATIBLE_IOCTL(KIOCCMD)
481 COMPATIBLE_IOCTL(KIOCSDIRECT)
482 COMPATIBLE_IOCTL(KIOCSLED)
483 COMPATIBLE_IOCTL(KIOCGLED)
484 COMPATIBLE_IOCTL(KIOCSRATE)
485 COMPATIBLE_IOCTL(KIOCGRATE)
486 COMPATIBLE_IOCTL(VUIDSFORMAT)
487 COMPATIBLE_IOCTL(VUIDGFORMAT)
488 /* Little v, the video4linux ioctls */
489 COMPATIBLE_IOCTL(_IOR('p', 20, int[7])) /* RTCGET */
490 COMPATIBLE_IOCTL(_IOW('p', 21, int[7])) /* RTCSET */
491 COMPATIBLE_IOCTL(ENVCTRL_RD_WARNING_TEMPERATURE)
492 COMPATIBLE_IOCTL(ENVCTRL_RD_SHUTDOWN_TEMPERATURE)
493 COMPATIBLE_IOCTL(ENVCTRL_RD_CPU_TEMPERATURE)
494 COMPATIBLE_IOCTL(ENVCTRL_RD_FAN_STATUS)
495 COMPATIBLE_IOCTL(ENVCTRL_RD_VOLTAGE_STATUS)
496 COMPATIBLE_IOCTL(ENVCTRL_RD_SCSI_TEMPERATURE)
497 COMPATIBLE_IOCTL(ENVCTRL_RD_ETHERNET_TEMPERATURE)
498 COMPATIBLE_IOCTL(ENVCTRL_RD_MTHRBD_TEMPERATURE)
499 COMPATIBLE_IOCTL(ENVCTRL_RD_CPU_VOLTAGE)
500 COMPATIBLE_IOCTL(ENVCTRL_RD_GLOBALADDRESS)
501 /* COMPATIBLE_IOCTL(D7SIOCRD) same value as ENVCTRL_RD_VOLTAGE_STATUS */
502 COMPATIBLE_IOCTL(D7SIOCWR)
503 COMPATIBLE_IOCTL(D7SIOCTM)
504 /* OPENPROMIO, SunOS/Solaris only, the NetBSD one's have
505 * embedded pointers in the arg which we'd need to clean up...
507 COMPATIBLE_IOCTL(OPROMGETOPT)
508 COMPATIBLE_IOCTL(OPROMSETOPT)
509 COMPATIBLE_IOCTL(OPROMNXTOPT)
510 COMPATIBLE_IOCTL(OPROMSETOPT2)
511 COMPATIBLE_IOCTL(OPROMNEXT)
512 COMPATIBLE_IOCTL(OPROMCHILD)
513 COMPATIBLE_IOCTL(OPROMGETPROP)
514 COMPATIBLE_IOCTL(OPROMNXTPROP)
515 COMPATIBLE_IOCTL(OPROMU2P)
516 COMPATIBLE_IOCTL(OPROMGETCONS)
517 COMPATIBLE_IOCTL(OPROMGETFBNAME)
518 COMPATIBLE_IOCTL(OPROMGETBOOTARGS)
519 COMPATIBLE_IOCTL(OPROMSETCUR)
520 COMPATIBLE_IOCTL(OPROMPCI2NODE)
521 COMPATIBLE_IOCTL(OPROMPATH2NODE)
523 COMPATIBLE_IOCTL(LOOP_SET_STATUS64)
524 COMPATIBLE_IOCTL(LOOP_GET_STATUS64)
526 COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE_MULTI)
527 #if defined(CONFIG_DRM) || defined(CONFIG_DRM_MODULE)
528 COMPATIBLE_IOCTL(DRM_IOCTL_GET_MAGIC)
529 COMPATIBLE_IOCTL(DRM_IOCTL_IRQ_BUSID)
530 COMPATIBLE_IOCTL(DRM_IOCTL_AUTH_MAGIC)
531 COMPATIBLE_IOCTL(DRM_IOCTL_BLOCK)
532 COMPATIBLE_IOCTL(DRM_IOCTL_UNBLOCK)
533 COMPATIBLE_IOCTL(DRM_IOCTL_CONTROL)
534 COMPATIBLE_IOCTL(DRM_IOCTL_ADD_BUFS)
535 COMPATIBLE_IOCTL(DRM_IOCTL_MARK_BUFS)
536 COMPATIBLE_IOCTL(DRM_IOCTL_ADD_CTX)
537 COMPATIBLE_IOCTL(DRM_IOCTL_RM_CTX)
538 COMPATIBLE_IOCTL(DRM_IOCTL_MOD_CTX)
539 COMPATIBLE_IOCTL(DRM_IOCTL_GET_CTX)
540 COMPATIBLE_IOCTL(DRM_IOCTL_SWITCH_CTX)
541 COMPATIBLE_IOCTL(DRM_IOCTL_NEW_CTX)
542 COMPATIBLE_IOCTL(DRM_IOCTL_ADD_DRAW)
543 COMPATIBLE_IOCTL(DRM_IOCTL_RM_DRAW)
544 COMPATIBLE_IOCTL(DRM_IOCTL_LOCK)
545 COMPATIBLE_IOCTL(DRM_IOCTL_UNLOCK)
546 COMPATIBLE_IOCTL(DRM_IOCTL_FINISH)
548 COMPATIBLE_IOCTL(WIOCSTART)
549 COMPATIBLE_IOCTL(WIOCSTOP)
550 COMPATIBLE_IOCTL(WIOCGSTAT)
551 /* And these ioctls need translation */
552 /* Note SIOCRTMSG is no longer, so this is safe and * the user would have seen just an -EINVAL anyways. */
553 HANDLE_IOCTL(FBIOPUTCMAP32, fbiogetputcmap)
554 HANDLE_IOCTL(FBIOGETCMAP32, fbiogetputcmap)
555 HANDLE_IOCTL(FBIOSCURSOR32, fbiogscursor)
556 #if defined(CONFIG_DRM) || defined(CONFIG_DRM_MODULE)
557 HANDLE_IOCTL(DRM32_IOCTL_VERSION, drm32_version)
558 HANDLE_IOCTL(DRM32_IOCTL_GET_UNIQUE, drm32_getsetunique)
559 HANDLE_IOCTL(DRM32_IOCTL_SET_UNIQUE, drm32_getsetunique)
560 HANDLE_IOCTL(DRM32_IOCTL_ADD_MAP, drm32_addmap)
561 HANDLE_IOCTL(DRM32_IOCTL_INFO_BUFS, drm32_info_bufs)
562 HANDLE_IOCTL(DRM32_IOCTL_FREE_BUFS, drm32_free_bufs)
563 HANDLE_IOCTL(DRM32_IOCTL_MAP_BUFS, drm32_map_bufs)
564 HANDLE_IOCTL(DRM32_IOCTL_DMA, drm32_dma)
565 HANDLE_IOCTL(DRM32_IOCTL_RES_CTX, drm32_res_ctx)
568 HANDLE_IOCTL(RTC32_IRQP_READ, do_rtc_ioctl)
569 HANDLE_IOCTL(RTC32_IRQP_SET, do_rtc_ioctl)
570 HANDLE_IOCTL(RTC32_EPOCH_READ, do_rtc_ioctl)
571 HANDLE_IOCTL(RTC32_EPOCH_SET, do_rtc_ioctl)
573 /* take care of sizeof(sizeof()) breakage */
576 int ioctl_table_size = ARRAY_SIZE(ioctl_start);