firmware: arm_scmi: Make mutex channel specific
authorSudeep Holla <sudeep.holla@arm.com>
Fri, 27 Mar 2020 16:36:51 +0000 (16:36 +0000)
committerSudeep Holla <sudeep.holla@arm.com>
Tue, 14 Apr 2020 08:31:48 +0000 (09:31 +0100)
commit18988265b87615b93cd4cf15001c8c883236a137
tree84021eb5b6c1c4c2fcf67e723933c647ae3e362a
parent1dc6558062dadfabd2fb3bd885fa6e92ec7196f2
firmware: arm_scmi: Make mutex channel specific

In order to support multiple SMC/HVC transport channels with associated
shared memory, it is better to maintain the mutex per channel instead of
existing global one.

Move the smc_mutex into the scmi_smc structure and also rename it to
shmem_lock which is more appropriate for it's use.

Link: https://lore.kernel.org/r/20200327163654.13389-2-sudeep.holla@arm.com
Tested-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/smc.c