diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2010-06-11 11:32:03 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-09-09 14:46:29 -0400 |
commit | 24cd7f54a0d47e1d5b3de29e2456bfbd2d8447b7 (patch) | |
tree | a37d3a4cb101e3f67635a1920f447c9e9e8d8ab2 /arch/sparc | |
parent | 9ed6060d286b1eb55974d09080f442f809408c42 (diff) |
perf: Reduce perf_disable() usage
Since the current perf_disable() usage is only an optimization,
remove it for now. This eases the removal of the __weak
hw_perf_enable() interface.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: paulus <paulus@samba.org>
Cc: stephane eranian <eranian@googlemail.com>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Lin Ming <ming.m.lin@intel.com>
Cc: Yanmin <yanmin_zhang@linux.intel.com>
Cc: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>
Cc: David Miller <davem@davemloft.net>
Cc: Michael Cree <mcree@orcon.net.nz>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/kernel/perf_event.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c index bed4327f5a7a..d0131deeeaf6 100644 --- a/arch/sparc/kernel/perf_event.c +++ b/arch/sparc/kernel/perf_event.c | |||
@@ -1113,6 +1113,7 @@ static void sparc_pmu_start_txn(struct pmu *pmu) | |||
1113 | { | 1113 | { |
1114 | struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events); | 1114 | struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events); |
1115 | 1115 | ||
1116 | perf_disable(); | ||
1116 | cpuhw->group_flag |= PERF_EVENT_TXN; | 1117 | cpuhw->group_flag |= PERF_EVENT_TXN; |
1117 | } | 1118 | } |
1118 | 1119 | ||
@@ -1126,6 +1127,7 @@ static void sparc_pmu_cancel_txn(struct pmu *pmu) | |||
1126 | struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events); | 1127 | struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events); |
1127 | 1128 | ||
1128 | cpuhw->group_flag &= ~PERF_EVENT_TXN; | 1129 | cpuhw->group_flag &= ~PERF_EVENT_TXN; |
1130 | perf_enable(); | ||
1129 | } | 1131 | } |
1130 | 1132 | ||
1131 | /* | 1133 | /* |
@@ -1149,6 +1151,7 @@ static int sparc_pmu_commit_txn(struct pmu *pmu) | |||
1149 | return -EAGAIN; | 1151 | return -EAGAIN; |
1150 | 1152 | ||
1151 | cpuc->group_flag &= ~PERF_EVENT_TXN; | 1153 | cpuc->group_flag &= ~PERF_EVENT_TXN; |
1154 | perf_enable(); | ||
1152 | return 0; | 1155 | return 0; |
1153 | } | 1156 | } |
1154 | 1157 | ||