diff options
author | Paul Burton <paul.burton@imgtec.com> | 2014-03-07 05:42:52 -0500 |
---|---|---|
committer | Paul Burton <paul.burton@imgtec.com> | 2014-05-28 11:20:30 -0400 |
commit | dd9233d0470bb8b02b30982c1de0a2dbffb407d5 (patch) | |
tree | e46190f57b2f17a0b9f8d67f09c1670f6e5c1eaa /arch/mips/kernel | |
parent | 0f4d3d1155d9a5e71e74658ac50b61141e370cf3 (diff) |
MIPS: smp-cps: use CPC core-other locking
The core which the CPC core-other region relates to is based upon the
core-local core-other addressing register. As its name suggests this
register is shared between all VPEs within a core, and if there is a
possibility that multiple VPEs within a core will attempt to access
another core simultaneously then locking is required. This wasn't
previously a problem with the only user being cpu0 during boot, but will
be an issue once hotplug is implemented & may race with other users such
as cpuidle.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r-- | arch/mips/kernel/smp-cps.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c index c3661ca5f25c..b519c8510972 100644 --- a/arch/mips/kernel/smp-cps.c +++ b/arch/mips/kernel/smp-cps.c | |||
@@ -161,11 +161,10 @@ static void boot_core(unsigned core) | |||
161 | write_gcr_access(access); | 161 | write_gcr_access(access); |
162 | 162 | ||
163 | if (mips_cpc_present()) { | 163 | if (mips_cpc_present()) { |
164 | /* Select the appropriate core */ | ||
165 | write_cpc_cl_other(core << CPC_Cx_OTHER_CORENUM_SHF); | ||
166 | |||
167 | /* Reset the core */ | 164 | /* Reset the core */ |
165 | mips_cpc_lock_other(core); | ||
168 | write_cpc_co_cmd(CPC_Cx_CMD_RESET); | 166 | write_cpc_co_cmd(CPC_Cx_CMD_RESET); |
167 | mips_cpc_unlock_other(); | ||
169 | } else { | 168 | } else { |
170 | /* Take the core out of reset */ | 169 | /* Take the core out of reset */ |
171 | write_gcr_co_reset_release(0); | 170 | write_gcr_co_reset_release(0); |