arm/perf: Fix hotplug state machine conversion
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Wed, 20 Jul 2016 07:51:11 +0000 (09:51 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 20 Jul 2016 07:57:34 +0000 (09:57 +0200)
commit37b502f121adab26ccc2769c3063f0e1272be7de
tree68e8d160f3344282a5b7d64737b9fed3f5435b75
parentc76c15e6f16c1529b524ba2c519c4fcef7a45e16
arm/perf: Fix hotplug state machine conversion

Mark Rutland pointed out that this commit is incomplete:

  7d88eb695a1f ("arm/perf: Convert to hotplug state machine")

The problem is that:

 > We may have multiple PMUs (e.g. two in big.LITTLE systems), and
 > __oprofile_cpu_pmu only contains one of these. So this conversion is not
 > correct.
 >
 > We were relying on the notifier list implicitly containing a list of
 > those PMUs. It seems like we need an explicit list here.
 >
 > We keep __oprofile_cpu_pmu around for legacy 32-bit users of OProfile
 > (on non-hetereogeneous systems), and that's all that the variable should
 > be used for.

Introduce arm_pmu_list to correctly handle multiple PMUs in the system.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Cc: Anna-Maria Gleixner <anna-maria@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-tip-commits@vger.kernel.org
Cc: rt@linutronix.de
Link: http://lkml.kernel.org/r/20160719111733.GA22911@linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
drivers/perf/arm_pmu.c
include/linux/perf/arm_pmu.h