lkml.org 
[lkml]   [2015]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v6 1/2] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup sources
Date
> -----Original Message-----
> From: Thomas Gleixner [mailto:tglx@linutronix.de]
> Sent: 2015年7月26日 6:48
> To: Wang Shenwei-B38339
> Cc: shawn.guo@linaro.org; jason@lakedaemon.net;
> linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; Huang
> Yongcai-B20788
> Subject: Re: [PATCH v6 1/2] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup
> sources
>
> On Wed, 22 Jul 2015, Shenwei Wang wrote:
> > +static int imx_gpcv2_irq_set_wake(struct irq_data *d, unsigned int
> > +on) {
> > + struct imx_gpcv2_irq *cd = d->chip_data;
> > + unsigned int idx = d->hwirq / 32;
> > + unsigned long flags;
> > + void __iomem *reg;
> > + u32 mask, val;
> > +
> > + raw_spin_lock_irqsave(&cd->lock.rlock, flags);
>
> Oh no. You need to make cd->lock a raw_spinlock and then use
> raw_spin_lock_irqsave() on it. How on earth did you come up with this hackery?

I was thinking to use one spin_lock between the current two modules. But it should be
okay to use a dedicate one for irqchip.

> Thanks,
>
> tglx
\
 
 \ /
  Last update: 2015-07-27 16:21    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog