diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-11-22 15:44:19 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-11-22 15:44:19 -0500 |
commit | 7334c6755eb7dbaa5d3112a33f5f2cb9826abe8c (patch) | |
tree | f4937b349b3dae67725d24a3b08c9a973ffc57c4 /arch | |
parent | 53cbcbcf4362ef39e0a692b1d23c395999397fca (diff) | |
parent | e5a21327644adba32816f74a415114d11c57f2e9 (diff) |
Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into fixes
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/include/asm/pmu.h | 10 | ||||
-rw-r--r-- | arch/arm/kernel/perf_event.c | 11 | ||||
-rw-r--r-- | arch/arm/kernel/pmu.c | 1 |
3 files changed, 11 insertions, 11 deletions
diff --git a/arch/arm/include/asm/pmu.h b/arch/arm/include/asm/pmu.h index 71d99b83cdb9..0bda22c094a6 100644 --- a/arch/arm/include/asm/pmu.h +++ b/arch/arm/include/asm/pmu.h | |||
@@ -55,16 +55,6 @@ reserve_pmu(enum arm_pmu_type type); | |||
55 | extern void | 55 | extern void |
56 | release_pmu(enum arm_pmu_type type); | 56 | release_pmu(enum arm_pmu_type type); |
57 | 57 | ||
58 | /** | ||
59 | * init_pmu() - Initialise the PMU. | ||
60 | * | ||
61 | * Initialise the system ready for PMU enabling. This should typically set the | ||
62 | * IRQ affinity and nothing else. The users (oprofile/perf events etc) will do | ||
63 | * the actual hardware initialisation. | ||
64 | */ | ||
65 | extern int | ||
66 | init_pmu(enum arm_pmu_type type); | ||
67 | |||
68 | #else /* CONFIG_CPU_HAS_PMU */ | 58 | #else /* CONFIG_CPU_HAS_PMU */ |
69 | 59 | ||
70 | #include <linux/err.h> | 60 | #include <linux/err.h> |
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 24e2347be6b1..c475379199b1 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c | |||
@@ -343,8 +343,14 @@ validate_group(struct perf_event *event) | |||
343 | { | 343 | { |
344 | struct perf_event *sibling, *leader = event->group_leader; | 344 | struct perf_event *sibling, *leader = event->group_leader; |
345 | struct pmu_hw_events fake_pmu; | 345 | struct pmu_hw_events fake_pmu; |
346 | DECLARE_BITMAP(fake_used_mask, ARMPMU_MAX_HWEVENTS); | ||
346 | 347 | ||
347 | memset(&fake_pmu, 0, sizeof(fake_pmu)); | 348 | /* |
349 | * Initialise the fake PMU. We only need to populate the | ||
350 | * used_mask for the purposes of validation. | ||
351 | */ | ||
352 | memset(fake_used_mask, 0, sizeof(fake_used_mask)); | ||
353 | fake_pmu.used_mask = fake_used_mask; | ||
348 | 354 | ||
349 | if (!validate_event(&fake_pmu, leader)) | 355 | if (!validate_event(&fake_pmu, leader)) |
350 | return -ENOSPC; | 356 | return -ENOSPC; |
@@ -396,6 +402,9 @@ armpmu_reserve_hardware(struct arm_pmu *armpmu) | |||
396 | int i, err, irq, irqs; | 402 | int i, err, irq, irqs; |
397 | struct platform_device *pmu_device = armpmu->plat_device; | 403 | struct platform_device *pmu_device = armpmu->plat_device; |
398 | 404 | ||
405 | if (!pmu_device) | ||
406 | return -ENODEV; | ||
407 | |||
399 | err = reserve_pmu(armpmu->type); | 408 | err = reserve_pmu(armpmu->type); |
400 | if (err) { | 409 | if (err) { |
401 | pr_warning("unable to reserve pmu\n"); | 410 | pr_warning("unable to reserve pmu\n"); |
diff --git a/arch/arm/kernel/pmu.c b/arch/arm/kernel/pmu.c index 2c3407ee8576..2334bf8a650a 100644 --- a/arch/arm/kernel/pmu.c +++ b/arch/arm/kernel/pmu.c | |||
@@ -33,3 +33,4 @@ release_pmu(enum arm_pmu_type type) | |||
33 | { | 33 | { |
34 | clear_bit_unlock(type, pmu_lock); | 34 | clear_bit_unlock(type, pmu_lock); |
35 | } | 35 | } |
36 | EXPORT_SYMBOL_GPL(release_pmu); | ||