]> 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>
Mon, 15 Oct 2012 12:58:06 +0000 (13:58 +0100)
commite528b94f2ae357e1d17bc0fdd2bdb8311055e99c
tree8e61c111f482545f8e4a3588e58e1f8d267b75ff
parent794ea0a073c0c939063fcca5f3dfbf587ae606f4
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