#define DECLARES
 #include "compat_ioctl.c"
 
-#ifdef CONFIG_SIBYTE_TBPROF
-COMPATIBLE_IOCTL(SBPROF_ZBSTART)
-COMPATIBLE_IOCTL(SBPROF_ZBSTOP)
-COMPATIBLE_IOCTL(SBPROF_ZBWAITFULL)
-#endif /* CONFIG_SIBYTE_TBPROF */
-
 /*HANDLE_IOCTL(RTC_IRQP_READ, w_long)
 COMPATIBLE_IOCTL(RTC_IRQP_SET)
 HANDLE_IOCTL(RTC_EPOCH_READ, w_long)
 
 #include <linux/fs.h>
 #include <linux/errno.h>
 #include <linux/reboot.h>
+#include <linux/smp_lock.h>
 #include <linux/wait.h>
 #include <asm/uaccess.h>
 #include <asm/io.h>
        return count;
 }
 
-static int sbprof_tb_ioctl(struct inode *inode,
-                          struct file *filp,
-                          unsigned int command,
-                          unsigned long arg)
+static long sbprof_tb_ioctl(struct file *filp,
+                           unsigned int command,
+                           unsigned long arg)
 {
        int error = 0;
 
+       lock_kernel();
        switch (command) {
        case SBPROF_ZBSTART:
                error = sbprof_zbprof_start(filp);
                error = -EINVAL;
                break;
        }
+       unlock_kernel();
 
        return error;
 }
        .open           = sbprof_tb_open,
        .release        = sbprof_tb_release,
        .read           = sbprof_tb_read,
-       .ioctl          = sbprof_tb_ioctl,
+       .unlocked_ioctl = sbprof_tb_ioctl,
+       .compat_ioctl   = sbprof_tb_ioctl,
        .mmap           = NULL,
 };