Skip to content

Commit

Permalink
MIPS: smp-cps: use CPC core-other locking
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Burton committed May 28, 2014
1 parent 0f4d3d1 commit dd9233d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions arch/mips/kernel/smp-cps.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,10 @@ static void boot_core(unsigned core)
write_gcr_access(access);

if (mips_cpc_present()) {
/* Select the appropriate core */
write_cpc_cl_other(core << CPC_Cx_OTHER_CORENUM_SHF);

/* Reset the core */
mips_cpc_lock_other(core);
write_cpc_co_cmd(CPC_Cx_CMD_RESET);
mips_cpc_unlock_other();
} else {
/* Take the core out of reset */
write_gcr_co_reset_release(0);
Expand Down

0 comments on commit dd9233d

Please sign in to comment.