diff options
author | Paul Burton <paul.burton@imgtec.com> | 2015-09-22 21:12:18 +0300 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2015-11-11 10:35:18 +0300 |
commit | 78a54c4d8e5a7915a4ec2ba0eb461fae50590683 (patch) | |
tree | 50c7b53aa1728ae03979055b249b79f7e88ca3d4 /arch/mips/kernel/mips-cm.c | |
parent | 4ede31617056b7424eef28dce59dd6dbe81729c3 (diff) | |
download | linux-78a54c4d8e5a7915a4ec2ba0eb461fae50590683.tar.xz |
MIPS: CM, CPC: Ensure core-other GCRs reflect the correct core
Ensure the update to which core the core-other GCR regions reflect has
taken place before any core-other GCRs are accessed by placing a memory
barrier (sync instruction) between the write to the core-other registers
and any such GCR accesses.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-kernel@vger.kernel.org
Cc: Markos Chandras <markos.chandras@imgtec.com>
Patchwork: https://patchwork.linux-mips.org/patch/11209/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/mips-cm.c')
-rw-r--r-- | arch/mips/kernel/mips-cm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/mips/kernel/mips-cm.c b/arch/mips/kernel/mips-cm.c index 01908dbdf677..1448c1f43d4e 100644 --- a/arch/mips/kernel/mips-cm.c +++ b/arch/mips/kernel/mips-cm.c @@ -278,6 +278,12 @@ void mips_cm_lock_other(unsigned int core, unsigned int vp) } write_gcr_cl_other(val); + + /* + * Ensure the core-other region reflects the appropriate core & + * VP before any accesses to it occur. + */ + mb(); } void mips_cm_unlock_other(void) |