linux/arch/ia64/kernel
Srivatsa S. Bhat 9f37bca9a9 ia64, palinfo: 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 palinfo 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
..
.gitignore
acpi-ext.c
acpi.c ACPI and power management updates for 3.14-rc1 2014-01-24 15:51:02 -08:00
asm-offsets.c ia64/xen: Remove Xen support for ia64 2013-12-10 16:11:07 -08:00
audit.c
brl_emu.c
crash_dump.c crash_dump: export is_kdump_kernel to modules, consolidate elfcorehdr_addr, setup_elfcorehdr and saved_max_pfn 2011-03-23 19:47:19 -07:00
crash.c
cyclone.c ia64: Replace clocksource.fsys_mmio with generic arch data 2011-07-14 17:57:09 -07:00
dma-mapping.c ia64: Add export.h to arch/ia64 specific files as required 2011-10-31 19:30:58 -04:00
efi_stub.S
efi.c efi: x86: ia64: provide a generic efi_config_init() 2013-09-05 13:29:29 +01:00
elfcore.c switch elf_core_write_extra_data() to dump_emit() 2013-11-09 00:16:23 -05:00
entry.h
entry.S [IA64] Wire up new sched_setattr and sched_getattr syscalls 2014-01-28 09:52:53 -08:00
err_inject.c [IA64] Delete __cpuinit usage from all ia64 users 2013-06-24 15:44:27 -07:00
esi_stub.S
esi.c
fsys.S Fix broken fsys_getppid() 2013-03-19 16:14:52 -07:00
fsyscall_gtod_data.h ia64: vsyscall: Use seqcount instead of seqlock 2012-03-15 18:17:59 -07:00
ftrace.c
gate-data.S
gate.lds.S Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
gate.S Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
head.S ia64/xen: Remove Xen support for ia64 2013-12-10 16:11:07 -08:00
ia64_ksyms.c treewide: Put a space between #include and FILE 2012-06-28 11:44:36 +02:00
init_task.c
iosapic.c Fix kexec oops when iosapic was removed 2013-03-19 16:14:53 -07:00
irq_ia64.c random: remove rand_initialize_irq() 2012-07-19 10:38:32 -04:00
irq_lsapic.c ia64: Convert lsapic to new irq_chip functions 2011-03-29 14:48:02 +02:00
irq.c Fix initialization of CMCI/CMCP interrupts 2013-04-02 09:37:06 -07:00
ivt.S cputime: Generic on-demand virtual cputime accounting 2013-01-27 19:23:27 +01:00
jprobes.S
kprobes.c doc: typo on word accounting in kprobes.c in mutliple architectures 2013-10-14 15:46:39 +02:00
machine_kexec.c [IA64] kexec: Move the dereference below the NULL test 2012-09-10 14:31:23 -07:00
machvec.c Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
Makefile cpufreq: ia64: move cpufreq driver to drivers/cpufreq 2013-04-10 13:19:25 +02:00
Makefile.gate
mca_asm.S
mca_drv_asm.S
mca_drv.c Remove cast for kmalloc return value 2013-03-19 16:14:53 -07:00
mca_drv.h
mca.c [IA64] Delete __cpuinit usage from all ia64 users 2013-06-24 15:44:27 -07:00
minstate.h cputime: Generic on-demand virtual cputime accounting 2013-01-27 19:23:27 +01:00
module.c modules: make arch's use default loader hooks 2011-07-24 22:06:04 +09:30
msi_ia64.c arch/ia64: remove references to cpu_*_map 2012-03-28 17:14:36 -07:00
nr-irqs.c ia64/xen: Remove Xen support for ia64 2013-12-10 16:11:07 -08:00
numa.c [IA64] Delete __cpuinit usage from all ia64 users 2013-06-24 15:44:27 -07:00
pal.S
palinfo.c ia64, palinfo: Fix CPU hotplug callback registration 2014-03-20 13:43:40 +01:00
paravirt_inst.h ia64/xen: Remove Xen support for ia64 2013-12-10 16:11:07 -08:00
paravirt_patch.c
paravirt_patchlist.c
paravirt_patchlist.h ia64/xen: Remove Xen support for ia64 2013-12-10 16:11:07 -08:00
paravirt.c static keys: Introduce 'struct static_key', static_key_true()/false() and static_key_slow_[inc|dec]() 2012-02-24 10:05:59 +01:00
paravirtentry.S
patch.c Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
pci-dma.c [IA64] pci: Remove unused fallback_dev 2013-06-03 16:04:31 -07:00
pci-swiotlb.c X86 & IA64: adapt for dma_map_ops changes 2012-03-28 16:36:31 +02:00
perfmon_default_smpl.c Fix common misspellings 2011-03-31 11:26:23 -03:00
perfmon_generic.h
perfmon_itanium.h
perfmon_mckinley.h
perfmon_montecito.h
perfmon.c consolidate simple ->d_delete() instances 2013-11-15 22:04:17 -05:00
process.c dump_stack: unify debug information printed by show_regs() 2013-04-30 17:04:02 -07:00
ptrace.c ia64: kill thread_matches(), unexport ptrace_check_attach() 2013-01-20 12:26:05 -08:00
relocate_kernel.S
sal.c
salinfo.c ia64, salinfo: Fix hotplug callback registration 2014-03-20 13:43:40 +01:00
setup.c DMI: Parse memory device (type 17) in SMBIOS 2013-10-23 10:10:12 -07:00
sigframe.h
signal.c constify copy_siginfo_to_user{,32}() 2013-11-09 00:16:29 -05:00
smp.c Merge branch 'akpm' (Andrew's patch-bomb) 2012-03-28 17:19:28 -07:00
smpboot.c [IA64] Delete __cpuinit usage from all ia64 users 2013-06-24 15:44:27 -07:00
stacktrace.c
sys_ia64.c mm: use vm_unmapped_area() on ia64 architecture 2013-02-22 13:46:59 -08:00
time.c kvm: Prepare to add generic guest entry/exit callbacks 2013-01-27 20:35:40 +01:00
topology.c [IA64] Delete __cpuinit usage from all ia64 users 2013-06-24 15:44:27 -07:00
traps.c [IA64] Fix trap #45 handling 2013-06-03 15:47:42 -07:00
unaligned.c
uncached.c mm: fix GFP_THISNODE callers and clarify 2014-03-10 17:26:19 -07:00
unwind_decoder.c
unwind_i.h
unwind.c Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
vmlinux.lds.S ia64/xen: Remove Xen support for ia64 2013-12-10 16:11:07 -08:00