diff options
author | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2013-09-27 16:56:31 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-10-03 05:39:44 -0400 |
commit | bc41b8724f24b9a27d1dcc6c974b8f686b38d554 (patch) | |
tree | 3572fd34c6dd22e6b72c0a855ac8943921d419ad /arch | |
parent | 856337283a215b9f92189f22862e4415f4d6bd85 (diff) |
ARM: 7846/1: Update SMP_ON_UP code to detect A9MPCore with 1 CPU devices
The generic code is well equipped to differentiate between
SMP and UP configurations.However, there are some devices which
use Cortex-A9 MP core IP with 1 CPU as configuration. To let
these SOCs to co-exist in a CONFIG_SMP=y build by leveraging
the SMP_ON_UP support, we need to additionally check the
number the cores in Cortex-A9 MPCore configuration. Without
such a check in place, the startup code tries to execute
ALT_SMP() set of instructions which lead to CPU faults.
The issue was spotted on TI's Aegis device and this patch
makes now the device work with omap2plus_defconfig which
enables SMP by default. The change is kept limited to only
Cortex-A9 MPCore detection code.
Note that if any future SoC *does* use 0x0 as the PERIPH_BASE, then
the SCU address check code needs to be #ifdef'd for for the Aegis
platform.
Acked-by: Sricharan R <r.sricharan@ti.com>
Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/kernel/head.S | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 2c7cc1e03473..476de57dcef2 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -487,7 +487,26 @@ __fixup_smp: | |||
487 | mrc p15, 0, r0, c0, c0, 5 @ read MPIDR | 487 | mrc p15, 0, r0, c0, c0, 5 @ read MPIDR |
488 | and r0, r0, #0xc0000000 @ multiprocessing extensions and | 488 | and r0, r0, #0xc0000000 @ multiprocessing extensions and |
489 | teq r0, #0x80000000 @ not part of a uniprocessor system? | 489 | teq r0, #0x80000000 @ not part of a uniprocessor system? |
490 | moveq pc, lr @ yes, assume SMP | 490 | bne __fixup_smp_on_up @ no, assume UP |
491 | |||
492 | @ Core indicates it is SMP. Check for Aegis SOC where a single | ||
493 | @ Cortex-A9 CPU is present but SMP operations fault. | ||
494 | mov r4, #0x41000000 | ||
495 | orr r4, r4, #0x0000c000 | ||
496 | orr r4, r4, #0x00000090 | ||
497 | teq r3, r4 @ Check for ARM Cortex-A9 | ||
498 | movne pc, lr @ Not ARM Cortex-A9, | ||
499 | |||
500 | @ If a future SoC *does* use 0x0 as the PERIPH_BASE, then the | ||
501 | @ below address check will need to be #ifdef'd or equivalent | ||
502 | @ for the Aegis platform. | ||
503 | mrc p15, 4, r0, c15, c0 @ get SCU base address | ||
504 | teq r0, #0x0 @ '0' on actual UP A9 hardware | ||
505 | beq __fixup_smp_on_up @ So its an A9 UP | ||
506 | ldr r0, [r0, #4] @ read SCU Config | ||
507 | and r0, r0, #0x3 @ number of CPUs | ||
508 | teq r0, #0x0 @ is 1? | ||
509 | movne pc, lr | ||
491 | 510 | ||
492 | __fixup_smp_on_up: | 511 | __fixup_smp_on_up: |
493 | adr r0, 1f | 512 | adr r0, 1f |