diff options
author | Peter Zijlstra | 2011-11-20 23:30:47 +0100 |
---|---|---|
committer | Ingo Molnar | 2011-12-21 11:01:11 +0100 |
commit | 0c9d42ed4cee2aa1dfc3a260b741baae8615744f (patch) | |
tree | 393a3a3d0be5cbd57e1d03490b3f6a5a15d5367d /kernel/events | |
parent | perf, x86: Implement user-space RDPMC support, to allow fast, user-space acce... (diff) | |
download | kernel-qcow2-linux-0c9d42ed4cee2aa1dfc3a260b741baae8615744f.tar.gz kernel-qcow2-linux-0c9d42ed4cee2aa1dfc3a260b741baae8615744f.tar.xz kernel-qcow2-linux-0c9d42ed4cee2aa1dfc3a260b741baae8615744f.zip |
perf, x86: Provide means for disabling userspace RDPMC
Allow the disabling of RDPMC via a pmu specific attribute:
echo 0 > /sys/bus/event_source/devices/cpu/rdpmc
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Cc: Arun Sharma <asharma@fb.com>
Link: http://lkml.kernel.org/n/tip-pqeog465zo5hsimtkfz73f27@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/events')
-rw-r--r-- | kernel/events/core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c index 05affc3878ff..dcd4049e92fc 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -5505,6 +5505,7 @@ static int pmu_dev_alloc(struct pmu *pmu) if (!pmu->dev) goto out; + pmu->dev->groups = pmu->attr_groups; device_initialize(pmu->dev); ret = dev_set_name(pmu->dev, "%s", pmu->name); if (ret) |