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

From: Dan Carpenter
Date: Wed Jun 10 2015 - 07:59:59 EST


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@xxxxxxxxxxxxx>
> Reviewed-by: Stuart Yoder <stuart.yoder@xxxxxxxxxxxxx>

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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/