* [PATCH] switch sibyte profiling driver to ->compat_ioctl
@ 2005-09-19 15:08 Christoph Hellwig
2005-09-20 6:03 ` Geert Uytterhoeven
2005-09-30 0:52 ` Ralf Baechle
0 siblings, 2 replies; 4+ messages in thread
From: Christoph Hellwig @ 2005-09-19 15:08 UTC (permalink / raw)
To: ralf, akpm; +Cc: linux-mips
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6/arch/mips/kernel/ioctl32.c
===================================================================
--- linux-2.6.orig/arch/mips/kernel/ioctl32.c 2005-09-18 13:46:51.000000000 +0200
+++ linux-2.6/arch/mips/kernel/ioctl32.c 2005-09-19 15:14:05.000000000 +0200
@@ -41,12 +41,6 @@
#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)
Index: linux-2.6/arch/mips/sibyte/sb1250/bcm1250_tbprof.c
===================================================================
--- linux-2.6.orig/arch/mips/sibyte/sb1250/bcm1250_tbprof.c 2005-09-18 13:46:52.000000000 +0200
+++ linux-2.6/arch/mips/sibyte/sb1250/bcm1250_tbprof.c 2005-09-19 15:13:53.000000000 +0200
@@ -28,6 +28,7 @@
#include <linux/fs.h>
#include <linux/errno.h>
#include <linux/reboot.h>
+#include <linux/smp_lock.h>
#include <asm/uaccess.h>
#include <asm/io.h>
#include <asm/sibyte/sb1250.h>
@@ -333,13 +334,13 @@
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);
@@ -355,6 +356,7 @@
error = -EINVAL;
break;
}
+ unlock_kernel();
return error;
}
@@ -364,7 +366,8 @@
.open = sbprof_tb_open,
.release = sbprof_tb_release,
.read = sbprof_tb_read,
- .ioctl = sbprof_tb_ioctl,
+ .unlocked_ioctl = sbprof_tb_ioctl,
+ .comapt_ioctl = sbprof_tb_ioctl,
.mmap = NULL,
};
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] switch sibyte profiling driver to ->compat_ioctl
2005-09-19 15:08 [PATCH] switch sibyte profiling driver to ->compat_ioctl Christoph Hellwig
@ 2005-09-20 6:03 ` Geert Uytterhoeven
2005-09-20 8:06 ` Christoph Hellwig
2005-09-30 0:52 ` Ralf Baechle
1 sibling, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2005-09-20 6:03 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Ralf Baechle, Andrew Morton, Linux/MIPS Development
On Mon, 19 Sep 2005, Christoph Hellwig wrote:
> --- linux-2.6.orig/arch/mips/sibyte/sb1250/bcm1250_tbprof.c 2005-09-18 13:46:52.000000000 +0200
> +++ linux-2.6/arch/mips/sibyte/sb1250/bcm1250_tbprof.c 2005-09-19 15:13:53.000000000 +0200
> @@ -364,7 +366,8 @@
> .open = sbprof_tb_open,
> .release = sbprof_tb_release,
> .read = sbprof_tb_read,
> - .ioctl = sbprof_tb_ioctl,
> + .unlocked_ioctl = sbprof_tb_ioctl,
> + .comapt_ioctl = sbprof_tb_ioctl,
^^^^^^^^^^^^
> .mmap = NULL,
> };
DISCLAIMER: I didn't check whether the spelling error is in the struct
definition as well.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] switch sibyte profiling driver to ->compat_ioctl
2005-09-20 6:03 ` Geert Uytterhoeven
@ 2005-09-20 8:06 ` Christoph Hellwig
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2005-09-20 8:06 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Christoph Hellwig, Ralf Baechle, Andrew Morton,
Linux/MIPS Development
On Tue, Sep 20, 2005 at 08:03:56AM +0200, Geert Uytterhoeven wrote:
> On Mon, 19 Sep 2005, Christoph Hellwig wrote:
> > --- linux-2.6.orig/arch/mips/sibyte/sb1250/bcm1250_tbprof.c 2005-09-18 13:46:52.000000000 +0200
> > +++ linux-2.6/arch/mips/sibyte/sb1250/bcm1250_tbprof.c 2005-09-19 15:13:53.000000000 +0200
> > @@ -364,7 +366,8 @@
> > .open = sbprof_tb_open,
> > .release = sbprof_tb_release,
> > .read = sbprof_tb_read,
> > - .ioctl = sbprof_tb_ioctl,
> > + .unlocked_ioctl = sbprof_tb_ioctl,
> > + .comapt_ioctl = sbprof_tb_ioctl,
> ^^^^^^^^^^^^
> > .mmap = NULL,
> > };
>
> DISCLAIMER: I didn't check whether the spelling error is in the struct
> definition as well.
no, it's not. thanks for catching it :)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] switch sibyte profiling driver to ->compat_ioctl
2005-09-19 15:08 [PATCH] switch sibyte profiling driver to ->compat_ioctl Christoph Hellwig
2005-09-20 6:03 ` Geert Uytterhoeven
@ 2005-09-30 0:52 ` Ralf Baechle
1 sibling, 0 replies; 4+ messages in thread
From: Ralf Baechle @ 2005-09-30 0:52 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: akpm, linux-mips
On Mon, Sep 19, 2005 at 05:08:22PM +0200, Christoph Hellwig wrote:
Thanks, applied.
Ralf
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-09-30 10:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-19 15:08 [PATCH] switch sibyte profiling driver to ->compat_ioctl Christoph Hellwig
2005-09-20 6:03 ` Geert Uytterhoeven
2005-09-20 8:06 ` Christoph Hellwig
2005-09-30 0:52 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox