summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/perf_event_v6.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-04-13 13:32:07 -0700
committerDavid S. Miller <davem@davemloft.net>2012-04-13 13:32:07 -0700
commit3423166fdbc2444bf3a4a27af1d7508364a17be7 (patch)
tree0a42bd5fbe6bcca79802bf1ec5af6acf12aadd82 /arch/arm/kernel/perf_event_v6.c
parente9b57cca3dbdc7a0b90514af8bf613baf97105a5 (diff)
parent7d93101fc71ec47c7cc66ac99f76ef795c5207aa (diff)
downloadblackbird-op-linux-3423166fdbc2444bf3a4a27af1d7508364a17be7.tar.gz
blackbird-op-linux-3423166fdbc2444bf3a4a27af1d7508364a17be7.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Diffstat (limited to 'arch/arm/kernel/perf_event_v6.c')
-rw-r--r--arch/arm/kernel/perf_event_v6.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/arch/arm/kernel/perf_event_v6.c b/arch/arm/kernel/perf_event_v6.c
index 533be9930ec2..b78af0cc6ef3 100644
--- a/arch/arm/kernel/perf_event_v6.c
+++ b/arch/arm/kernel/perf_event_v6.c
@@ -467,23 +467,6 @@ armv6pmu_enable_event(struct hw_perf_event *hwc,
raw_spin_unlock_irqrestore(&events->pmu_lock, flags);
}
-static int counter_is_active(unsigned long pmcr, int idx)
-{
- unsigned long mask = 0;
- if (idx == ARMV6_CYCLE_COUNTER)
- mask = ARMV6_PMCR_CCOUNT_IEN;
- else if (idx == ARMV6_COUNTER0)
- mask = ARMV6_PMCR_COUNT0_IEN;
- else if (idx == ARMV6_COUNTER1)
- mask = ARMV6_PMCR_COUNT1_IEN;
-
- if (mask)
- return pmcr & mask;
-
- WARN_ONCE(1, "invalid counter number (%d)\n", idx);
- return 0;
-}
-
static irqreturn_t
armv6pmu_handle_irq(int irq_num,
void *dev)
@@ -513,7 +496,8 @@ armv6pmu_handle_irq(int irq_num,
struct perf_event *event = cpuc->events[idx];
struct hw_perf_event *hwc;
- if (!counter_is_active(pmcr, idx))
+ /* Ignore if we don't have an event. */
+ if (!event)
continue;
/*
@@ -524,7 +508,7 @@ armv6pmu_handle_irq(int irq_num,
continue;
hwc = &event->hw;
- armpmu_event_update(event, hwc, idx, 1);
+ armpmu_event_update(event, hwc, idx);
data.period = event->hw.last_period;
if (!armpmu_event_set_period(event, hwc, idx))
continue;
OpenPOWER on IntegriCloud