sh: perf: Set up perf_max_events.
authorPaul Mundt <lethal@linux-sh.org>
Wed, 13 Oct 2010 08:52:14 +0000 (17:52 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 13 Oct 2010 08:52:14 +0000 (17:52 +0900)
Presently this is uninitialized in the architecture code, so it's
artificlally capped to the default initialization value. Set it up at
registration time.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/perf_event.c

index 7a3dc356725839f2cf8579491efd8d02ba11b483..ecef1fe02566c277a893f39e5182d452dc732b27 100644 (file)
@@ -324,6 +324,7 @@ int __cpuinit register_sh_pmu(struct sh_pmu *pmu)
        pr_info("Performance Events: %s support registered\n", pmu->name);
 
        WARN_ON(pmu->num_events > MAX_HWEVENTS);
+       perf_max_events = pmu->num_events;
 
        perf_cpu_notifier(sh_pmu_notifier);
        return 0;