linux/arch/ia64
Srivatsa S. Bhat eff722b06b ia64, salinfo: Fix 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 salinfo code in ia64 by using this latter form of callback
registration.

Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-03-20 13:43:40 +01:00
..
configs ia64/xen: Remove Xen support for ia64 2013-12-10 16:11:07 -08:00
dig Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
hp ACPI and power management updates for 3.14-rc1 2014-01-24 15:51:02 -08:00
include [IA64] Wire up new sched_setattr and sched_getattr syscalls 2014-01-28 09:52:53 -08:00
kernel ia64, salinfo: Fix hotplug callback registration 2014-03-20 13:43:40 +01:00
kvm KVM: Use cond_resched() directly and remove useless kvm_resched() 2013-12-13 14:23:45 +01:00
lib Fix common misspellings 2011-03-31 11:26:23 -03:00
mm mm, show_mem: remove SHOW_MEM_FILTER_PAGE_COUNT 2014-01-21 16:19:44 -08:00
oprofile Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
pci ACPI / driver core: Store an ACPI device pointer in struct acpi_dev_node 2013-11-14 23:14:43 +01:00
scripts scripts: change scripts to use system python instead of env 2010-02-02 14:33:56 +01:00
sn ia64/PCI: Use dev_is_pci() to identify PCI devices 2013-12-09 16:50:22 -07:00
uv ia64: change to new flag variables 2011-03-17 14:02:56 +01:00
install.sh kbuild: use INSTALLKERNEL to select customized installkernel script 2009-09-20 12:18:14 +02:00
Kconfig Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2014-01-24 17:17:30 -08:00
Kconfig.debug
Makefile ia64/xen: Remove Xen support for ia64 2013-12-10 16:11:07 -08:00
module.lds