lkml.org 
[lkml]   [2020]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mmc: owl-mmc: replace spin_lock_irqsave by spin_lock in hard IRQ
On Mon, Nov 02, 2020 at 08:52:17AM +0800, Tian Tao wrote:
> The code has been in a irq-disabled context since it is hard IRQ. There
> is no necessity to do it again.
>

Ah, yes. This should save few cycles!

> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Thanks,
Mani

> ---
> drivers/mmc/host/owl-mmc.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/owl-mmc.c b/drivers/mmc/host/owl-mmc.c
> index ccf214a..82d2bad 100644
> --- a/drivers/mmc/host/owl-mmc.c
> +++ b/drivers/mmc/host/owl-mmc.c
> @@ -134,10 +134,9 @@ static void owl_mmc_update_reg(void __iomem *reg, unsigned int val, bool state)
> static irqreturn_t owl_irq_handler(int irq, void *devid)
> {
> struct owl_mmc_host *owl_host = devid;
> - unsigned long flags;
> u32 state;
>
> - spin_lock_irqsave(&owl_host->lock, flags);
> + spin_lock(&owl_host->lock);
>
> state = readl(owl_host->base + OWL_REG_SD_STATE);
> if (state & OWL_SD_STATE_TEI) {
> @@ -147,7 +146,7 @@ static irqreturn_t owl_irq_handler(int irq, void *devid)
> complete(&owl_host->sdc_complete);
> }
>
> - spin_unlock_irqrestore(&owl_host->lock, flags);
> + spin_unlock(&owl_host->lock);
>
> return IRQ_HANDLED;
> }
> --
> 2.7.4
>

\
 
 \ /
  Last update: 2020-11-02 16:55    [W:0.043 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site