On Thu, May 30, 2013 at 7:36 AM, Andy Green andy.green@linaro.org wrote:
Hi -
We're using one kernel binary with BL Switcher enabled in config, but able to work on SoC without Big Little.
This is OK except where the BL patches touch the PMU driver. It makes an assumption about BL configured == in use which is not true. PMU init fails and when you try to use perf list later, it blows chunks.
I worked around it with the hack below, so it can fail out from the bigLITTLE path when it doesn't see the cluster property in DT, but there's presumably a better way to do that which more directly checks if we care about BL in this execution environment.
-Andy
This is Dave's area but Nico ought to weigh in whether the presence of the DT property is the best place for this. It seems OK to me.
Author: Andy Green andy.green@linaro.org Date: Thu May 30 09:44:17 2013 +0800
bl switcher fix dont assume bl active in pmu probe Signed-off-by: Andy Green <andy.green@linaro.org>
diff --git a/arch/arm/kernel/perf_event_cpu.c b/arch/arm/kernel/perf_event_cpu.c index b3ae24f..c02ea21 100644 --- a/arch/arm/kernel/perf_event_cpu.c +++ b/arch/arm/kernel/perf_event_cpu.c @@ -440,6 +440,9 @@ static int cpu_pmu_device_probe(struct platform_device *pdev) hwid = of_get_property(ncluster, "reg", &len); if (hwid && len == 4) cluster = be32_to_cpup(hwid);
} else {
ret = probe_current_pmu(pmu);
goto bail; } /* set sibling mask to all cpu mask if socket is not
specified */ /* @@ -501,7 +504,7 @@ static int cpu_pmu_device_probe(struct platform_device *pdev) } else { ret = probe_current_pmu(pmu); }
+bail: if (ret) goto error;