2020-11-03 03:50:06

by Tian Tao

[permalink] [raw]
Subject: [PATCH] mmc: meson-mx-sdio: replace spin_lock_irqsave by spin_lock in hard IRQ

The code has been in a irq-disabled context since it is hard IRQ. There
is no necessity to do it again.

Signed-off-by: Tian Tao <[email protected]>
---
drivers/mmc/host/meson-mx-sdio.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/meson-mx-sdio.c b/drivers/mmc/host/meson-mx-sdio.c
index 1c5299c..d4a4891 100644
--- a/drivers/mmc/host/meson-mx-sdio.c
+++ b/drivers/mmc/host/meson-mx-sdio.c
@@ -418,10 +418,9 @@ static irqreturn_t meson_mx_mmc_irq(int irq, void *data)
{
struct meson_mx_mmc_host *host = (void *) data;
u32 irqs, send;
- unsigned long irqflags;
irqreturn_t ret;

- spin_lock_irqsave(&host->irq_lock, irqflags);
+ spin_lock(&host->irq_lock);

irqs = readl(host->base + MESON_MX_SDIO_IRQS);
send = readl(host->base + MESON_MX_SDIO_SEND);
@@ -434,7 +433,7 @@ static irqreturn_t meson_mx_mmc_irq(int irq, void *data)
/* finally ACK all pending interrupts */
writel(irqs, host->base + MESON_MX_SDIO_IRQS);

- spin_unlock_irqrestore(&host->irq_lock, irqflags);
+ spin_unlock(&host->irq_lock);

return ret;
}
--
2.7.4


2020-11-05 10:00:55

by Jerome Brunet

[permalink] [raw]
Subject: Re: [PATCH] mmc: meson-mx-sdio: replace spin_lock_irqsave by spin_lock in hard IRQ


On Tue 03 Nov 2020 at 04:48, Tian Tao <[email protected]> wrote:

> The code has been in a irq-disabled context since it is hard IRQ. There
> is no necessity to do it again.
>
> Signed-off-by: Tian Tao <[email protected]>

Reviewed-by: Jerome Brunet <[email protected]>

> ---
> drivers/mmc/host/meson-mx-sdio.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/meson-mx-sdio.c b/drivers/mmc/host/meson-mx-sdio.c
> index 1c5299c..d4a4891 100644
> --- a/drivers/mmc/host/meson-mx-sdio.c
> +++ b/drivers/mmc/host/meson-mx-sdio.c
> @@ -418,10 +418,9 @@ static irqreturn_t meson_mx_mmc_irq(int irq, void *data)
> {
> struct meson_mx_mmc_host *host = (void *) data;
> u32 irqs, send;
> - unsigned long irqflags;
> irqreturn_t ret;
>
> - spin_lock_irqsave(&host->irq_lock, irqflags);
> + spin_lock(&host->irq_lock);
>
> irqs = readl(host->base + MESON_MX_SDIO_IRQS);
> send = readl(host->base + MESON_MX_SDIO_SEND);
> @@ -434,7 +433,7 @@ static irqreturn_t meson_mx_mmc_irq(int irq, void *data)
> /* finally ACK all pending interrupts */
> writel(irqs, host->base + MESON_MX_SDIO_IRQS);
>
> - spin_unlock_irqrestore(&host->irq_lock, irqflags);
> + spin_unlock(&host->irq_lock);
>
> return ret;
> }

2020-11-05 13:02:00

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH] mmc: meson-mx-sdio: replace spin_lock_irqsave by spin_lock in hard IRQ

On Tue, 3 Nov 2020 at 04:48, Tian Tao <[email protected]> wrote:
>
> The code has been in a irq-disabled context since it is hard IRQ. There
> is no necessity to do it again.
>
> Signed-off-by: Tian Tao <[email protected]>

Applied for next, thanks!

Kind regards
Uffe


> ---
> drivers/mmc/host/meson-mx-sdio.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/meson-mx-sdio.c b/drivers/mmc/host/meson-mx-sdio.c
> index 1c5299c..d4a4891 100644
> --- a/drivers/mmc/host/meson-mx-sdio.c
> +++ b/drivers/mmc/host/meson-mx-sdio.c
> @@ -418,10 +418,9 @@ static irqreturn_t meson_mx_mmc_irq(int irq, void *data)
> {
> struct meson_mx_mmc_host *host = (void *) data;
> u32 irqs, send;
> - unsigned long irqflags;
> irqreturn_t ret;
>
> - spin_lock_irqsave(&host->irq_lock, irqflags);
> + spin_lock(&host->irq_lock);
>
> irqs = readl(host->base + MESON_MX_SDIO_IRQS);
> send = readl(host->base + MESON_MX_SDIO_SEND);
> @@ -434,7 +433,7 @@ static irqreturn_t meson_mx_mmc_irq(int irq, void *data)
> /* finally ACK all pending interrupts */
> writel(irqs, host->base + MESON_MX_SDIO_IRQS);
>
> - spin_unlock_irqrestore(&host->irq_lock, irqflags);
> + spin_unlock(&host->irq_lock);
>
> return ret;
> }
> --
> 2.7.4
>