Commit 0fc03d4c authored by Russell King's avatar Russell King

ARM: SMP enable of cache maintanence broadcast

Masahiro Yamada reports that we can fail to set the FW bit in the
auxiliary control register, which enables broadcasting the cache
maintanence operations.  This occurs because we only check that the
SMP/nAMP bit is set, rather than checking whether all the bits we
want to be set are set.

Rearrange the code to ensure that all desired bits are set, and only
update the register if we discover some required bits are not set.
Tested-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent f55532a0
...@@ -281,12 +281,12 @@ __v7_ca17mp_setup: ...@@ -281,12 +281,12 @@ __v7_ca17mp_setup:
bl v7_invalidate_l1 bl v7_invalidate_l1
ldmia r12, {r1-r6, lr} ldmia r12, {r1-r6, lr}
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
orr r10, r10, #(1 << 6) @ Enable SMP/nAMP mode
ALT_SMP(mrc p15, 0, r0, c1, c0, 1) ALT_SMP(mrc p15, 0, r0, c1, c0, 1)
ALT_UP(mov r0, #(1 << 6)) @ fake it for UP ALT_UP(mov r0, r10) @ fake it for UP
tst r0, #(1 << 6) @ SMP/nAMP mode enabled? orr r10, r10, r0 @ Set required bits
orreq r0, r0, #(1 << 6) @ Enable SMP/nAMP mode teq r10, r0 @ Were they already set?
orreq r0, r0, r10 @ Enable CPU-specific SMP bits mcrne p15, 0, r10, c1, c0, 1 @ No, update register
mcreq p15, 0, r0, c1, c0, 1
#endif #endif
b __v7_setup_cont b __v7_setup_cont
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment