diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-29 19:53:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-29 19:53:48 -0400 |
commit | 12679a2d7e3bfbdc7586e3e86d1ca90c46659363 (patch) | |
tree | d9c00f2e599d1c3e04a349229a6a19906d01f99e /arch/arm/kernel/smp.c | |
parent | 1c036588772d01655d851f75dffc27c971e072e2 (diff) | |
parent | b0df89868006517417251e02cc4ce5d4b0165885 (diff) |
Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm
Pull more ARM updates from Russell King.
This got a fair number of conflicts with the <asm/system.h> split, but
also with some other sparse-irq and header file include cleanups. They
all looked pretty trivial, though.
* 'for-linus' of git://git.linaro.org/people/rmk/linux-arm: (59 commits)
ARM: fix Kconfig warning for HAVE_BPF_JIT
ARM: 7361/1: provide XIP_VIRT_ADDR for no-MMU builds
ARM: 7349/1: integrator: convert to sparse irqs
ARM: 7259/3: net: JIT compiler for packet filters
ARM: 7334/1: add jump label support
ARM: 7333/2: jump label: detect %c support for ARM
ARM: 7338/1: add support for early console output via semihosting
ARM: use set_current_blocked() and block_sigmask()
ARM: exec: remove redundant set_fs(USER_DS)
ARM: 7332/1: extract out code patch function from kprobes
ARM: 7331/1: extract out insn generation code from ftrace
ARM: 7330/1: ftrace: use canonical Thumb-2 wide instruction format
ARM: 7351/1: ftrace: remove useless memory checks
ARM: 7316/1: kexec: EOI active and mask all interrupts in kexec crash path
ARM: Versatile Express: add NO_IOPORT
ARM: get rid of asm/irq.h in asm/prom.h
ARM: 7319/1: Print debug info for SIGBUS in user faults
ARM: 7318/1: gic: refactor irq_start assignment
ARM: 7317/1: irq: avoid NULL check in for_each_irq_desc loop
ARM: 7315/1: perf: add support for the Cortex-A7 PMU
...
Diffstat (limited to 'arch/arm/kernel/smp.c')
-rw-r--r-- | arch/arm/kernel/smp.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 8f8cce2c46c4..2cee7d1eb958 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -58,6 +58,8 @@ enum ipi_msg_type { | |||
58 | IPI_CPU_STOP, | 58 | IPI_CPU_STOP, |
59 | }; | 59 | }; |
60 | 60 | ||
61 | static DECLARE_COMPLETION(cpu_running); | ||
62 | |||
61 | int __cpuinit __cpu_up(unsigned int cpu) | 63 | int __cpuinit __cpu_up(unsigned int cpu) |
62 | { | 64 | { |
63 | struct cpuinfo_arm *ci = &per_cpu(cpu_data, cpu); | 65 | struct cpuinfo_arm *ci = &per_cpu(cpu_data, cpu); |
@@ -98,20 +100,12 @@ int __cpuinit __cpu_up(unsigned int cpu) | |||
98 | */ | 100 | */ |
99 | ret = boot_secondary(cpu, idle); | 101 | ret = boot_secondary(cpu, idle); |
100 | if (ret == 0) { | 102 | if (ret == 0) { |
101 | unsigned long timeout; | ||
102 | |||
103 | /* | 103 | /* |
104 | * CPU was successfully started, wait for it | 104 | * CPU was successfully started, wait for it |
105 | * to come online or time out. | 105 | * to come online or time out. |
106 | */ | 106 | */ |
107 | timeout = jiffies + HZ; | 107 | wait_for_completion_timeout(&cpu_running, |
108 | while (time_before(jiffies, timeout)) { | 108 | msecs_to_jiffies(1000)); |
109 | if (cpu_online(cpu)) | ||
110 | break; | ||
111 | |||
112 | udelay(10); | ||
113 | barrier(); | ||
114 | } | ||
115 | 109 | ||
116 | if (!cpu_online(cpu)) { | 110 | if (!cpu_online(cpu)) { |
117 | pr_crit("CPU%u: failed to come online\n", cpu); | 111 | pr_crit("CPU%u: failed to come online\n", cpu); |
@@ -288,9 +282,10 @@ asmlinkage void __cpuinit secondary_start_kernel(void) | |||
288 | /* | 282 | /* |
289 | * OK, now it's safe to let the boot CPU continue. Wait for | 283 | * OK, now it's safe to let the boot CPU continue. Wait for |
290 | * the CPU migration code to notice that the CPU is online | 284 | * the CPU migration code to notice that the CPU is online |
291 | * before we continue. | 285 | * before we continue - which happens after __cpu_up returns. |
292 | */ | 286 | */ |
293 | set_cpu_online(cpu, true); | 287 | set_cpu_online(cpu, true); |
288 | complete(&cpu_running); | ||
294 | 289 | ||
295 | /* | 290 | /* |
296 | * Setup the percpu timer for this CPU. | 291 | * Setup the percpu timer for this CPU. |