All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn@kryo.se>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Eugene Krasnikov <k.eugene.e@gmail.com>,
	Kalle Valo <kvalo@codeaurora.org>,
	fengwei.yin@linaro.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org,
	netdev@vger.kernel.org, wcn36xx@lists.infradead.org
Subject: Re: [PATCH 2/4] wcn36xx: Change indication list lock to spinlock
Date: Mon, 28 Dec 2015 20:25:10 -0800	[thread overview]
Message-ID: <20151229042510.GI16437@tuxbot> (raw)
In-Reply-To: <20151228150635.79181f6e@xeon-e3>

On Mon 28 Dec 15:06 PST 2015, Stephen Hemminger wrote:

> On Sun, 27 Dec 2015 17:34:25 -0800
> Bjorn Andersson <bjorn@kryo.se> wrote:
> 
> > In preparation for handling incoming messages from IRQ context, change
> > the indication list lock to a spinlock
> > 
> > Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
> > ---
> >  drivers/net/wireless/ath/wcn36xx/smd.c     | 12 ++++++------
> >  drivers/net/wireless/ath/wcn36xx/wcn36xx.h |  2 +-
> >  2 files changed, 7 insertions(+), 7 deletions(-)
> > 
> > diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
> > index 6b5dbe6f0d0a..4307429740a9 100644
> > --- a/drivers/net/wireless/ath/wcn36xx/smd.c
> > +++ b/drivers/net/wireless/ath/wcn36xx/smd.c
> > @@ -2165,10 +2165,10 @@ static void wcn36xx_smd_rsp_process(struct wcn36xx *wcn, void *buf, size_t len)
> >  		msg_ind->msg_len = len;
> >  		memcpy(msg_ind->msg, buf, len);
> >  
> > -		mutex_lock(&wcn->hal_ind_mutex);
> > +		spin_lock(&wcn->hal_ind_lock);
> 
> If you are going to handle messages in IRQ context, that better be a
> spin_lock_irq() or spin_lock_bh().

This function is executed in IRQ context after the next patch, as such I
use spin_lock() here and spin_lock_irqsave() in the worker thread
(wcn36xx_ind_smd_work()).

Is this not how the spin_lock API should be used?

Regards,
Bjorn

  reply	other threads:[~2015-12-29  4:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-28  1:34 [PATCH 0/4] WCN36xx convert to mainline SMD interface Bjorn Andersson
2015-12-28  1:34 ` [PATCH 1/4] wcn36xx: Fold indication payload into message header Bjorn Andersson
2015-12-28  1:34 ` [PATCH 2/4] wcn36xx: Change indication list lock to spinlock Bjorn Andersson
2015-12-28 23:06   ` Stephen Hemminger
2015-12-29  4:25     ` Bjorn Andersson [this message]
     [not found] ` <1451266467-15377-1-git-send-email-bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
2015-12-28  1:34   ` [PATCH 3/4] wcn36xx: Transition driver to SMD client Bjorn Andersson
2015-12-28  1:34     ` Bjorn Andersson
2016-01-11  9:02     ` Eugene Krasnikov
     [not found]       ` <CAFSJ42a2mD1gSaarKEny4xp9g_PbcLuv3PLsRnHp+qviv6f6mg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-29  4:39         ` Bjorn Andersson
2016-03-29  4:39           ` Bjorn Andersson
2015-12-28  1:34 ` [PATCH 4/4] dt: binding: Add Qualcomm wcn36xx WiFi binding Bjorn Andersson
2015-12-29 18:34   ` Rob Herring
2015-12-29 19:03     ` Bjorn Andersson
2015-12-29 23:27       ` Rob Herring
2016-01-25 17:50       ` Bjorn Andersson
2016-01-25 17:50         ` Bjorn Andersson
     [not found]   ` <1451266467-15377-5-git-send-email-bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
2015-12-29 19:11     ` Andy Gross
2015-12-29 19:11       ` Andy Gross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151229042510.GI16437@tuxbot \
    --to=bjorn@kryo.se \
    --cc=fengwei.yin@linaro.org \
    --cc=k.eugene.e@gmail.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=wcn36xx@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.