lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 14 Apr 2022 21:16:15 +0800
From:   郭力豪 <lhjeff911@...il.com>
To:     Tom Rix <trix@...hat.com>
Cc:     Mark Brown <broonie@...nel.org>, linux-spi@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        呂芳騰LuWells <wells.lu@...plus.com>,
        "lh.kuo" <lh.kuo@...plus.com>, nathan@...nel.org
Subject: Re: [PATCH] spi: remove spin_lock_irq in the irq procress

Hi Tom :

    This SPI driver only handles one transfer at a time.
That's why locks are not needed.


Li-hao Kuo

Tom Rix <trix@...hat.com> 於 2022年4月13日 週三 下午7:45寫道:
>
>
> On 4/12/22 6:38 PM, Li-hao Kuo wrote:
> > - remove spin_lock_irq and spin_unlock_irq in the irq funciton
>
> function
>
> I was expecting a statement on why is the lock is not needed.
>
> Could you add one ?
>
> Tom
>
> >
> > Signed-off-by: Li-hao Kuo <lhjeff911@...il.com>
> > ---
> >   drivers/spi/spi-sunplus-sp7021.c | 4 +---
> >   1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/drivers/spi/spi-sunplus-sp7021.c b/drivers/spi/spi-sunplus-sp7021.c
> > index f989f7b..120623c 100644
> > --- a/drivers/spi/spi-sunplus-sp7021.c
> > +++ b/drivers/spi/spi-sunplus-sp7021.c
> > @@ -199,8 +199,6 @@ static irqreturn_t sp7021_spi_master_irq(int irq, void *dev)
> >       if (tx_len == 0 && total_len == 0)
> >               return IRQ_NONE;
> >
> > -     spin_lock_irq(&pspim->lock);
> > -
> >       rx_cnt = FIELD_GET(SP7021_RX_CNT_MASK, fd_status);
> >       if (fd_status & SP7021_RX_FULL_FLAG)
> >               rx_cnt = pspim->data_unit;
> > @@ -239,7 +237,7 @@ static irqreturn_t sp7021_spi_master_irq(int irq, void *dev)
> >
> >       if (isrdone)
> >               complete(&pspim->isr_done);
> > -     spin_unlock_irq(&pspim->lock);
> > +
> >       return IRQ_HANDLED;
> >   }
> >
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ