MIPS: CPC: Avoid lock when MIPS CM >= 3 is present
authorMatt Redfearn <matt.redfearn@imgtec.com>
Wed, 7 Sep 2016 09:45:10 +0000 (10:45 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 4 Oct 2016 14:13:57 +0000 (16:13 +0200)
commitd6219420480b75258b93583caa3885fb80d83313
treed58c4928655e95d4ef4cac1ed67234d85c82dd53
parent6b89d22e742aa3fbb1878c2e6684b0bfd591f7c8
MIPS: CPC: Avoid lock when MIPS CM >= 3 is present

MIPS CM version 3 removed the CPC_CL_OTHER register and instead the
CM_CL_OTHER register is used to redirect the CPC_OTHER region. As such,
we should not write the unimplmented register and can avoid the
spinlock as well.
These lock functions should aleady be called within the context of a
mips_cm_{lock,unlock}_other pair ensuring the correct CPC_OTHER region
will be accessed.

Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
Reviewed-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/14219/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/mips-cpc.c