From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754232AbbFJL7z (ORCPT ); Wed, 10 Jun 2015 07:59:55 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:20239 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754047AbbFJL7w (ORCPT ); Wed, 10 Jun 2015 07:59:52 -0400 Date: Wed, 10 Jun 2015 14:59:29 +0300 From: Dan Carpenter To: "J. German Rivera" Cc: gregkh@linuxfoundation.org, arnd@arndb.de, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, stuart.yoder@freescale.com, bhupesh.sharma@freescale.com, agraf@suse.de, bhamciu1@freescale.com, nir.erez@freescale.com, itai.katz@freescale.com, scottwood@freescale.com, R89243@freescale.com, richard.schmitt@freescale.com Subject: Re: [PATCH v4 6/7] staging: fsl-mc: Add locking to serialize mc_send_command() calls Message-ID: <20150610115929.GE28762@mwanda> References: <1433887148-2310-1-git-send-email-German.Rivera@freescale.com> <1433887148-2310-7-git-send-email-German.Rivera@freescale.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1433887148-2310-7-git-send-email-German.Rivera@freescale.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Reviewed-by: Stuart Yoder 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