[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151229042510.GI16437@tuxbot>
Date: Mon, 28 Dec 2015 20:25:10 -0800
From: Bjorn Andersson <bjorn@...o.se>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: Eugene Krasnikov <k.eugene.e@...il.com>,
Kalle Valo <kvalo@...eaurora.org>, fengwei.yin@...aro.org,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
wcn36xx@...ts.infradead.org
Subject: Re: [PATCH 2/4] wcn36xx: Change indication list lock to spinlock
On Mon 28 Dec 15:06 PST 2015, Stephen Hemminger wrote:
> On Sun, 27 Dec 2015 17:34:25 -0800
> Bjorn Andersson <bjorn@...o.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@...ymobile.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists