mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-03 12:56:44 +07:00
Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into fixes
This commit is contained in:
commit
7334c6755e
@ -55,16 +55,6 @@ reserve_pmu(enum arm_pmu_type type);
|
||||
extern void
|
||||
release_pmu(enum arm_pmu_type type);
|
||||
|
||||
/**
|
||||
* init_pmu() - Initialise the PMU.
|
||||
*
|
||||
* Initialise the system ready for PMU enabling. This should typically set the
|
||||
* IRQ affinity and nothing else. The users (oprofile/perf events etc) will do
|
||||
* the actual hardware initialisation.
|
||||
*/
|
||||
extern int
|
||||
init_pmu(enum arm_pmu_type type);
|
||||
|
||||
#else /* CONFIG_CPU_HAS_PMU */
|
||||
|
||||
#include <linux/err.h>
|
||||
|
@ -343,8 +343,14 @@ validate_group(struct perf_event *event)
|
||||
{
|
||||
struct perf_event *sibling, *leader = event->group_leader;
|
||||
struct pmu_hw_events fake_pmu;
|
||||
DECLARE_BITMAP(fake_used_mask, ARMPMU_MAX_HWEVENTS);
|
||||
|
||||
memset(&fake_pmu, 0, sizeof(fake_pmu));
|
||||
/*
|
||||
* Initialise the fake PMU. We only need to populate the
|
||||
* used_mask for the purposes of validation.
|
||||
*/
|
||||
memset(fake_used_mask, 0, sizeof(fake_used_mask));
|
||||
fake_pmu.used_mask = fake_used_mask;
|
||||
|
||||
if (!validate_event(&fake_pmu, leader))
|
||||
return -ENOSPC;
|
||||
@ -396,6 +402,9 @@ armpmu_reserve_hardware(struct arm_pmu *armpmu)
|
||||
int i, err, irq, irqs;
|
||||
struct platform_device *pmu_device = armpmu->plat_device;
|
||||
|
||||
if (!pmu_device)
|
||||
return -ENODEV;
|
||||
|
||||
err = reserve_pmu(armpmu->type);
|
||||
if (err) {
|
||||
pr_warning("unable to reserve pmu\n");
|
||||
|
@ -33,3 +33,4 @@ release_pmu(enum arm_pmu_type type)
|
||||
{
|
||||
clear_bit_unlock(type, pmu_lock);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(release_pmu);
|
||||
|
Loading…
Reference in New Issue
Block a user