diff options
author | Tony Thompson <Anthony.Thompson@arm.com> | 2009-11-04 07:16:38 -0500 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2009-11-04 07:19:22 -0500 |
commit | 1b3a02eb452354fa9b36a7f33dc4c8307bbc40aa (patch) | |
tree | 232eab4b30cda81c310864e0dc18b57c431f33dd /arch/arm/mm/proc-v7.S | |
parent | b419148e567728f6af0c3b01965c1cc141e3e13a (diff) |
ARMv7: Check whether the SMP/nAMP mode was already enabled
If running in non-secure mode, enabling this register will fault.
Signed-off-by: Tony Thompson <Anthony.Thompson@arm.com>
Acked-by: Srinidhi Kasagar <srinidhikasagar@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm/mm/proc-v7.S')
-rw-r--r-- | arch/arm/mm/proc-v7.S | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index eeeed01ee44a..3a285218fd15 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -186,9 +186,10 @@ cpu_v7_name: | |||
186 | */ | 186 | */ |
187 | __v7_setup: | 187 | __v7_setup: |
188 | #ifdef CONFIG_SMP | 188 | #ifdef CONFIG_SMP |
189 | mrc p15, 0, r0, c1, c0, 1 @ Enable SMP/nAMP mode and | 189 | mrc p15, 0, r0, c1, c0, 1 |
190 | orr r0, r0, #(1 << 6) | (1 << 0) @ TLB ops broadcasting | 190 | tst r0, #(1 << 6) @ SMP/nAMP mode enabled? |
191 | mcr p15, 0, r0, c1, c0, 1 | 191 | orreq r0, r0, #(1 << 6) | (1 << 0) @ Enable SMP/nAMP mode and |
192 | mcreq p15, 0, r0, c1, c0, 1 @ TLB ops broadcasting | ||
192 | #endif | 193 | #endif |
193 | adr r12, __v7_setup_stack @ the local stack | 194 | adr r12, __v7_setup_stack @ the local stack |
194 | stmia r12, {r0-r5, r7, r9, r11, lr} | 195 | stmia r12, {r0-r5, r7, r9, r11, lr} |