android_kernel_motorola_sm6225/arch/arm/kernel
Srivatsa S. Bhat c5929bd3a9 arm, hw-breakpoint: 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 hw-breakpoint code in arm by using this latter form of callback
registration.

Cc: Russell King <linux@arm.linux.org.uk>
Cc: Ingo Molnar <mingo@kernel.org>
Acked-by: Will Deacon <will.deacon@arm.com>
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:41 +01:00
..
.gitignore
arch_timer.c arch_timer: Move to generic sched_clock framework 2013-10-09 16:54:10 -07:00
armksyms.c ARM: 7877/1: use built-in byte swap function 2013-12-29 12:32:45 +00:00
arthur.c
asm-offsets.c ARM: kernel: implement stack pointer save array through MPIDR hashing 2013-06-20 11:24:11 +01:00
atags.h ARM: constify machine_desc structure uses 2013-07-26 14:55:59 +01:00
atags_compat.c ARM: 7505/1: split out ATAGS parsing 2012-09-03 22:55:56 +01:00
atags_parse.c ARM: constify machine_desc structure uses 2013-07-26 14:55:59 +01:00
atags_proc.c procfs: new helper - PDE_DATA(inode) 2013-04-09 14:13:32 -04:00
bios32.c ARM: SoC platform changes for 3.12 2013-09-06 13:30:06 -07:00
calls.S sched: Add new scheduler syscalls to support an extended scheduling parameters ABI 2014-01-13 13:41:04 +01:00
cpuidle.c cpuidle: Add common time keeping and irq enabling 2012-03-21 01:59:40 -04:00
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
debug.S ARM: compile fix for DEBUG_LL=y && MMU=n 2013-01-16 14:30:06 -08:00
devtree.c arch/arm/kernel/: use memblock apis for early memory allocations 2014-01-21 16:19:47 -08:00
dma-isa.c
dma.c locking, ARM: Annotate low level hw locks as raw 2011-09-13 11:12:14 +02:00
early_printk.c early_printk: consolidate random copies of identical code 2013-04-29 18:28:13 -07:00
elf.c Disintegrate asm/system.h for ARM 2012-03-28 18:30:01 +01:00
entry-armv.S ARM: 7946/1: asm: __und_usr_thumb need byteswap instructions in BE case 2014-01-28 14:34:02 +00:00
entry-common.S ARM: asm: Add ARM_BE8() assembly helper 2013-10-19 20:46:33 +01:00
entry-header.S arm: Fix build error with context tracking calls 2013-09-27 17:59:47 +02:00
entry-v7m.S ARM: 7890/1: v7-M: drop using mach/entry-macro.S 2013-12-29 12:32:32 +00:00
etm.c ARM: 7905/1: etm: Remove unnecessary amba_set_drvdata() 2013-12-29 12:32:34 +00:00
fiq.c ARM: 7819/1: fiq: Cast the first argument of flush_icache_range() 2013-08-20 00:11:50 +01:00
fiqasm.S ARM: 6938/1: fiq: Refactor {get,set}_fiq_regs() for Thumb-2 2011-05-26 10:31:06 +01:00
ftrace.c ARM: 7468/1: ftrace: Trace function entry before updating index 2012-07-31 10:30:42 +01:00
head-common.S ARM: 7980/1: kernel: improve error message when LPAE config doesn't match CPU 2014-02-21 11:56:32 +00:00
head-nommu.S ARM: fix asm/memory.h build error 2013-12-13 20:25:30 +00:00
head.S ARM: 7980/1: kernel: improve error message when LPAE config doesn't match CPU 2014-02-21 11:56:32 +00:00
hw_breakpoint.c arm, hw-breakpoint: Fix CPU hotplug callback registration 2014-03-20 13:43:41 +01:00
hyp-stub.S ARM: 7786/1: hyp: fix macro parameterisation 2013-07-22 14:30:34 +01:00
insn.c ARM: fix missing bug.h include in arch/arm/kernel/insn.c 2012-03-30 11:51:46 +01:00
insn.h ARM: 7334/1: add jump label support 2012-03-24 09:38:56 +00:00
io.c ARM: 7930/1: Introduce atomic MMIO modify 2014-01-28 14:06:25 +00:00
irq.c ARM: irq: Call irqchip_init if no init_irq function is specified 2013-04-02 11:05:40 -07:00
isa.c
iwmmxt.S ARM: pxa: fix logic error in PJ4 iWMMXt handling 2011-08-11 10:10:26 +08:00
jump_label.c ARM: 7334/1: add jump label support 2012-03-24 09:38:56 +00:00
kgdb.c kgdb,arm: fix register dump 2010-10-29 13:14:40 -05:00
kprobes-arm.c ARM: 7181/1: Restrict kprobes probing SWP instructions to ARMv5 and below 2011-11-30 23:54:54 +00:00
kprobes-common.c Disintegrate asm/system.h for ARM 2012-03-28 18:30:01 +01:00
kprobes-test-arm.c ARM: kprobes: make more tests conditional 2012-10-09 17:07:43 +02:00
kprobes-test-thumb.c ARM: 7174/1: Fix build error in kprobes test code on Thumb2 kernels 2011-11-26 21:58:53 +00:00
kprobes-test.c treewide: fix printk typo in multiple drivers 2012-11-19 11:08:17 +01:00
kprobes-test.h ARM: 7174/1: Fix build error in kprobes test code on Thumb2 kernels 2011-11-26 21:58:53 +00:00
kprobes-thumb.c ARM: 7423/1: kprobes: run t32_simulate_ldr_literal() without insn slot 2012-06-14 15:11:44 +01:00
kprobes.c ARM: 7862/1: pcpu: replace __get_cpu_var_uses 2013-10-29 11:06:27 +00:00
kprobes.h ARM: kprobes: Add exports for test code 2011-09-20 18:17:43 +00:00
machine_kexec.c ARM: 7897/1: kexec: Use the right ISA for relocate_new_kernel 2013-11-30 22:21:02 +00:00
Makefile Merge branch 'baserock/bjdooks/312-rc4/be/core-v3' of git://git.baserock.org/delta/linux into devel-stable 2013-10-30 22:20:26 +00:00
module.c Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2013-11-14 08:51:29 +09:00
opcodes.c ARM: 7206/1: Add generic ARM instruction set condition code checks. 2011-12-13 08:52:02 +00:00
patch.c ARM: 7332/1: extract out code patch function from kprobes 2012-03-24 09:38:55 +00:00
patch.h ARM: 7332/1: extract out code patch function from kprobes 2012-03-24 09:38:55 +00:00
perf_event.c Revert "ARM: 7556/1: perf: fix updated event period in response to PERF_EVENT_IOC_PERIOD" 2013-12-17 15:21:35 +01:00
perf_event_cpu.c ARM: 7937/1: perf_event: Silence sparse warning 2014-01-11 12:06:58 +00:00
perf_event_v6.c ARM: perf: don't pretend to support counting of L1I writes 2013-01-16 12:01:59 +00:00
perf_event_v7.c ARM: 7663/1: perf: fix ARMv7 EVTYPE_MASK to include NSH bit 2013-03-03 22:54:17 +00:00
perf_event_xscale.c ARM: perf: don't pretend to support counting of L1I writes 2013-01-16 12:01:59 +00:00
perf_regs.c ARM: perf: add support for perf registers API 2013-09-30 16:41:50 +01:00
pj4-cp0.c arm: remove several unnecessary module.h include instances 2011-10-31 19:30:48 -04:00
process.c ARM: 7912/1: check stack pointer in get_wchan 2013-12-09 23:24:31 +00:00
psci.c arm: introduce psci_smp_ops 2013-05-21 14:24:11 +00:00
psci_smp.c ARM: PSCI: remove unnecessary include of arm-gic.h 2013-10-01 16:34:10 -05:00
ptrace.c ptrace/arm: revert "hw_breakpoints: Fix racy access to ptrace breakpoints" 2013-07-09 10:33:25 -07:00
relocate_kernel.S ARM: 7897/1: kexec: Use the right ISA for relocate_new_kernel 2013-11-30 22:21:02 +00:00
return_address.c ARM: 7676/1: fix a wrong value returned from CALLER_ADDRn 2013-03-19 11:43:46 +00:00
setup.c ARM: 7952/1: mm: Fix the memblock allocation for LPAE machines 2014-02-10 11:44:12 +00:00
signal.c Merge branches 'fixes', 'mmci' and 'sa11x0' into for-next 2013-11-12 10:59:08 +00:00
sigreturn_codes.S ARM: 7895/1: signal: fix armv7-m build issue in sigreturn_codes.S 2013-11-30 22:21:00 +00:00
sleep.S Merge branch 'baserock/bjdooks/312-rc4/be/core-v3' of git://git.baserock.org/delta/linux into devel-stable 2013-10-30 22:20:26 +00:00
smp.c ARM: SMP implementations are not supposed to return from smp_ops.cpu_die() 2014-01-21 16:42:14 +00:00
smp_scu.c ARM: smp_scu: data endian fixes 2013-10-19 20:46:33 +01:00
smp_tlb.c ARM: 7855/1: Add check for Cortex-A15 errata 798181 ECO 2013-10-29 11:06:13 +00:00
smp_twd.c ARM: twd: data endian fix 2013-10-19 20:46:33 +01:00
stacktrace.c ARM: 7913/1: fix framepointer check in unwind_frame 2013-12-09 23:24:33 +00:00
suspend.c ARM: suspend: use hash of cpu_logical_map value to index into save array 2013-07-30 09:00:43 -04:00
swp_emulate.c arm: single_open() leaks 2013-05-05 00:07:22 -04:00
sys_arm.c arm: switch to generic fork/vfork/clone 2012-11-28 22:13:54 -05:00
sys_oabi-compat.c userns: Convert stat to return values mapped from kuids and kgids 2012-05-15 14:08:35 -07:00
tcm.c ARM: add permission annotations to MT_MEMORY* mapping types 2013-12-11 09:53:14 +00:00
thumbee.c ARM: 7385/1: ThumbEE: Use cpuid macros to read ID_PFR0 for ThumbEE 2012-04-25 19:49:26 +01:00
time.c ARM: call of_clk_init from default time_init handler 2013-09-29 21:09:15 +02:00
topology.c ARM: 7920/1: topology: Staticise non-exported symbols 2013-12-29 12:32:42 +00:00
traps.c Merge branches 'amba', 'fixes', 'kees', 'misc' and 'unstable/sa11x0' into for-next 2014-01-21 21:26:33 +00:00
unwind.c ARM: unwinder: fix bisection to find origin in .idx section 2011-12-15 14:02:19 -08:00
v7m.c ARM: 7828/1: ARMv7-M: implement restart routine common to all v7-M machines 2013-09-02 13:49:29 +01:00
vmlinux.lds.S ARM: use linker magic for vectors and vector stubs 2013-07-31 21:34:24 +01:00
xscale-cp0.c arm: remove several unnecessary module.h include instances 2011-10-31 19:30:48 -04:00