android_kernel_motorola_sm6375/arch/arm64
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Srivatsa S. Bhat 4b0b68af37 arm64, debug-monitors: Fix CPU hotplug callback registration
Subsystems that want to register CPU hotplug callbacks, as well as perform
initialization for the CPUs that are already online, often do it as shown
below:

	get_online_cpus();

	for_each_online_cpu(cpu)
		init_cpu(cpu);

	register_cpu_notifier(&foobar_cpu_notifier);

	put_online_cpus();

This is wrong, since it is prone to ABBA deadlocks involving the
cpu_add_remove_lock and the cpu_hotplug.lock (when running concurrently
with CPU hotplug operations).

Instead, the correct and race-free way of performing the callback
registration is:

	cpu_notifier_register_begin();

	for_each_online_cpu(cpu)
		init_cpu(cpu);

	/* Note the use of the double underscored version of the API */
	__register_cpu_notifier(&foobar_cpu_notifier);

	cpu_notifier_register_done();

Fix the debug-monitors code in arm64 by using this latter form of callback
registration.

Cc: Catalin Marinas <[email protected]>
Cc: Russell King <[email protected]>
Cc: Ingo Molnar <[email protected]>
Acked-by: Will Deacon <[email protected]>
Signed-off-by: Srivatsa S. Bhat <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
2014-03-20 13:43:44 +01:00
..
boot arm64: dts: Reduce size of virtio block device for foundation model 2013-12-20 16:20:21 +00:00
configs arm64: defconfig: Expand default enabled features 2014-02-07 17:17:28 +00:00
include arm64: Fix !CONFIG_SMP kernel build 2014-02-28 16:12:25 +00:00
kernel arm64, debug-monitors: Fix CPU hotplug callback registration 2014-03-20 13:43:44 +01:00
kvm arm/arm64: KVM: detect CPU reset on CPU_PM_EXIT 2014-02-27 19:27:10 +01:00
lib arm64: atomics: fix use of acquire + release for full barrier semantics 2014-02-07 16:45:43 +00:00
mm arm64: simplify pgd_alloc 2014-02-05 10:45:07 +00:00
xen
Kconfig arm64: defconfig: Expand default enabled features 2014-02-07 17:17:28 +00:00
Kconfig.debug
Makefile