Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270139
b: refs/heads/master
c: 7325eae
h: refs/heads/master
i:
  270137: 0951736
  270135: 751d10e
v: v3
  • Loading branch information
Mark Rutland authored and Will Deacon committed Aug 31, 2011
1 parent 5c17582 commit f262067
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0ce47080dfffe71edd433b35dcdada24c61079eb
refs/heads/master: 7325eaec439cd0cc8c9b61b59d41d99abace1b23
14 changes: 2 additions & 12 deletions trunk/arch/arm/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/
#define pr_fmt(fmt) "hw perfevents: " fmt

#include <linux/bitmap.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
Expand Down Expand Up @@ -557,20 +558,9 @@ static int armpmu_event_init(struct perf_event *event)

static void armpmu_enable(struct pmu *pmu)
{
/* Enable all of the perf events on hardware. */
struct arm_pmu *armpmu = to_arm_pmu(pmu);
int idx, enabled = 0;
struct pmu_hw_events *hw_events = armpmu->get_hw_events();

for (idx = 0; idx < armpmu->num_events; ++idx) {
struct perf_event *event = hw_events->events[idx];

if (!event)
continue;

armpmu->enable(&event->hw, idx);
enabled = 1;
}
int enabled = bitmap_weight(hw_events->used_mask, armpmu->num_events);

if (enabled)
armpmu->start();
Expand Down

0 comments on commit f262067

Please sign in to comment.