[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1242125974.11251.329.camel@twins>
Date: Tue, 12 May 2009 12:59:33 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: Paul Mackerras <paulus@...ba.org>, Ingo Molnar <mingo@...e.hu>,
Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>
Subject: [PATCH] perf_counter: fix ioctl()s
On Tue, 2009-05-12 at 09:52 +0200, Arnd Bergmann wrote:
> On Tuesday 12 May 2009, Peter Zijlstra wrote:
> > Ah, so _IO() gets an unsigned long 3rd argument.
> > _IOW() treats the 3rd arg as a (type __user *) and copies the bits over
> > _IOR() copies the bits back out to userspace
> > _IORW() does both
> >
> > In which case the below should fix things up, no?
> >
>
> Yes, this looks good now.
---
Arnd spotted that I misunderstood and wrongly used the 3rd ioctl
argument. Fix up the perf counter ioctl()s to use the 3rd argument as
value -- as opposed to a pointer as would now be the case.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
---
include/linux/perf_counter.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h
index 614f921..6a9cebc 100644
--- a/include/linux/perf_counter.h
+++ b/include/linux/perf_counter.h
@@ -159,10 +159,10 @@ struct perf_counter_hw_event {
/*
* Ioctls that can be done on a perf counter fd:
*/
-#define PERF_COUNTER_IOC_ENABLE _IOW('$', 0, u32)
-#define PERF_COUNTER_IOC_DISABLE _IOW('$', 1, u32)
-#define PERF_COUNTER_IOC_REFRESH _IOW('$', 2, u32)
-#define PERF_COUNTER_IOC_RESET _IOW('$', 3, u32)
+#define PERF_COUNTER_IOC_ENABLE _IO('$', 0)
+#define PERF_COUNTER_IOC_DISABLE _IO('$', 1)
+#define PERF_COUNTER_IOC_REFRESH _IO('$', 2)
+#define PERF_COUNTER_IOC_RESET _IO('$', 3)
enum perf_counter_ioc_flags {
PERF_IOC_FLAG_GROUP = 1U << 0,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists