diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-01-30 11:40:20 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-01-31 16:48:53 -0500 |
commit | e98ff0f55a0232b578c9aa7f1c245868277ac7bc (patch) | |
tree | ae50cda9c6d20c260924979a64567399919a463d /arch | |
parent | c1928022ef94662a88329e35fa0968b1be328b8e (diff) |
ARM: smp_on_up: allow non-ARM SMP processors
Allow non-ARM SMP processors to use the SMP_ON_UP feature. CPUs
supporting SMP must have the new CPU ID format, so check for this first.
Then check for ARM11MPCore, which fails the MPIDR check. Lastly check
the MPIDR reports multiprocessing extensions and that the CPU is part of
a multiprocessing system.
Cc: <stable@kernel.org>
Reported-and-Tested-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/kernel/head.S | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index f17d9a09e8fb..c0225da3fb21 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -392,24 +392,22 @@ ENDPROC(__turn_mmu_on) | |||
392 | 392 | ||
393 | #ifdef CONFIG_SMP_ON_UP | 393 | #ifdef CONFIG_SMP_ON_UP |
394 | __fixup_smp: | 394 | __fixup_smp: |
395 | mov r4, #0x00070000 | 395 | and r3, r9, #0x000f0000 @ architecture version |
396 | orr r3, r4, #0xff000000 @ mask 0xff070000 | 396 | teq r3, #0x000f0000 @ CPU ID supported? |
397 | orr r4, r4, #0x41000000 @ val 0x41070000 | ||
398 | and r0, r9, r3 | ||
399 | teq r0, r4 @ ARM CPU and ARMv6/v7? | ||
400 | bne __fixup_smp_on_up @ no, assume UP | 397 | bne __fixup_smp_on_up @ no, assume UP |
401 | 398 | ||
402 | orr r3, r3, #0x0000ff00 | 399 | bic r3, r9, #0x00ff0000 |
403 | orr r3, r3, #0x000000f0 @ mask 0xff07fff0 | 400 | bic r3, r3, #0x0000000f @ mask 0xff00fff0 |
401 | mov r4, #0x41000000 | ||
404 | orr r4, r4, #0x0000b000 | 402 | orr r4, r4, #0x0000b000 |
405 | orr r4, r4, #0x00000020 @ val 0x4107b020 | 403 | orr r4, r4, #0x00000020 @ val 0x4100b020 |
406 | and r0, r9, r3 | 404 | teq r3, r4 @ ARM 11MPCore? |
407 | teq r0, r4 @ ARM 11MPCore? | ||
408 | moveq pc, lr @ yes, assume SMP | 405 | moveq pc, lr @ yes, assume SMP |
409 | 406 | ||
410 | mrc p15, 0, r0, c0, c0, 5 @ read MPIDR | 407 | mrc p15, 0, r0, c0, c0, 5 @ read MPIDR |
411 | tst r0, #1 << 31 | 408 | and r0, r0, #0xc0000000 @ multiprocessing extensions and |
412 | movne pc, lr @ bit 31 => SMP | 409 | teq r0, #0x80000000 @ not part of a uniprocessor system? |
410 | moveq pc, lr @ yes, assume SMP | ||
413 | 411 | ||
414 | __fixup_smp_on_up: | 412 | __fixup_smp_on_up: |
415 | adr r0, 1f | 413 | adr r0, 1f |