[PATCH v4 6/7] staging: fsl-mc: Add locking to serialize mc_send_command() calls

Dan Carpenter dan.carpenter at oracle.com
Wed Jun 10 11:59:29 UTC 2015


On Tue, Jun 09, 2015 at 04:59:07PM -0500, J. German Rivera wrote:
> Add a locking mechanism to serialize mc_send_command() calls that use
> the same fsl_mc_io object (same MC portal). When the fsl_mc_io object is
> created the owner needs to know in which type of context the fsl_mc_io
> object is going to be used. A flag passed-in to fsl_create_mc_io()
> will indicate whether the fsl_mc_io object will be used in atomic or
> non-atomic context. If the fsl_mc_io object is going to be used in
> non-atomic context only, mc_send_command() calls with it will be
> serialized using a mutex. Otherwise, if the fsl_mc_io object is
> going to be used in atomic context, mc_semd_command() calls with it
> will be serialized using a spinlock.
> 
> Signed-off-by: J. German Rivera <German.Rivera at freescale.com>
> Reviewed-by: Stuart Yoder <stuart.yoder at freescale.com>

My understanding is that no one actually sets
FSL_MC_IO_ATOMIC_CONTEXT_PORTAL?

It's hard to review patches 6 & 7 properly without users.  Why don't you
just wait on those until we have a use for it.

regards,
dan carpenter



More information about the devel mailing list