]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ARM: perf: register cpu_notifier at driver init
authorMark Rutland <Mark.Rutland@arm.com>
Fri, 21 Sep 2012 10:53:41 +0000 (11:53 +0100)
committerWill Deacon <will.deacon@arm.com>
Tue, 23 Oct 2012 12:23:50 +0000 (13:23 +0100)
commite1e4a993c86535fc0b65c6bb39f5a0344d4c0bbe
tree83ca373480b3b3b37e0c56719af9561400d6582c
parente8fd634a0011b8ad577eaee72cedc463060c3375
ARM: perf: register cpu_notifier at driver init

The current practice of registering the cpu hotplug notifier at PMU
registration time won't be safe with multiple PMUs, as we'll repeatedly
attempt to register the notifier. This has the unfortunate effect of
silently corrupting the notifier list, leading to boot stalling.

Instead, register the notifier at init time. Its sanity checks will
prevent anything bad from happening if the notifier is called before we
have any PMUs registered.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm/kernel/perf_event_cpu.c