ARM: perf: probe devicetree in preference to current CPU
The CPU PMU is probed using the current cpuid information as part of the early_initcall initialising the architecture perf backend. For architectures without NMI (such as ARM), this does not need to be performed early and can be deferred to the driver probe callback. This also allows us to probe the devicetree in preference to parsing the current cpuid, which may be invalid on a big.LITTLE multi-cluster system. This patch defers the PMU probing and uses the devicetree information when available. Signed-off-by: Will Deacon <will.deacon@arm.com>
This commit is contained in:
@@ -664,7 +664,7 @@ static struct arm_pmu armv6pmu = {
|
||||
.max_period = (1LLU << 32) - 1,
|
||||
};
|
||||
|
||||
static struct arm_pmu *__init armv6pmu_init(void)
|
||||
static struct arm_pmu *__devinit armv6pmu_init(void)
|
||||
{
|
||||
return &armv6pmu;
|
||||
}
|
||||
@@ -698,17 +698,17 @@ static struct arm_pmu armv6mpcore_pmu = {
|
||||
.max_period = (1LLU << 32) - 1,
|
||||
};
|
||||
|
||||
static struct arm_pmu *__init armv6mpcore_pmu_init(void)
|
||||
static struct arm_pmu *__devinit armv6mpcore_pmu_init(void)
|
||||
{
|
||||
return &armv6mpcore_pmu;
|
||||
}
|
||||
#else
|
||||
static struct arm_pmu *__init armv6pmu_init(void)
|
||||
static struct arm_pmu *__devinit armv6pmu_init(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static struct arm_pmu *__init armv6mpcore_pmu_init(void)
|
||||
static struct arm_pmu *__devinit armv6mpcore_pmu_init(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user