* [PATCH] mmc: cavium: Replace spin_lock_irqsave with spin_lock in hard IRQ
@ 2021-02-04 7:07 Xiaofei Tan
2021-02-08 12:06 ` Ulf Hansson
0 siblings, 1 reply; 2+ messages in thread
From: Xiaofei Tan @ 2021-02-04 7:07 UTC (permalink / raw)
To: rric, ulf.hansson, rmfrfs, linus.walleij
Cc: Xiaofei Tan, linux-mmc, linux-kernel, linuxarm
It is redundant to do irqsave and irqrestore in hardIRQ context, where
it has been in a irq-disabled context.
Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com>
---
drivers/mmc/host/cavium.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/host/cavium.c b/drivers/mmc/host/cavium.c
index c5da3aa..4bb8f28 100644
--- a/drivers/mmc/host/cavium.c
+++ b/drivers/mmc/host/cavium.c
@@ -436,12 +436,11 @@ irqreturn_t cvm_mmc_interrupt(int irq, void *dev_id)
{
struct cvm_mmc_host *host = dev_id;
struct mmc_request *req;
- unsigned long flags = 0;
u64 emm_int, rsp_sts;
bool host_done;
if (host->need_irq_handler_lock)
- spin_lock_irqsave(&host->irq_handler_lock, flags);
+ spin_lock(&host->irq_handler_lock);
else
__acquire(&host->irq_handler_lock);
@@ -504,7 +503,7 @@ irqreturn_t cvm_mmc_interrupt(int irq, void *dev_id)
host->release_bus(host);
out:
if (host->need_irq_handler_lock)
- spin_unlock_irqrestore(&host->irq_handler_lock, flags);
+ spin_unlock(&host->irq_handler_lock);
else
__release(&host->irq_handler_lock);
return IRQ_RETVAL(emm_int != 0);
--
2.8.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] mmc: cavium: Replace spin_lock_irqsave with spin_lock in hard IRQ
2021-02-04 7:07 [PATCH] mmc: cavium: Replace spin_lock_irqsave with spin_lock in hard IRQ Xiaofei Tan
@ 2021-02-08 12:06 ` Ulf Hansson
0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2021-02-08 12:06 UTC (permalink / raw)
To: Xiaofei Tan
Cc: rric, Rui Miguel Silva, Linus Walleij, linux-mmc,
Linux Kernel Mailing List, linuxarm
On Thu, 4 Feb 2021 at 08:09, Xiaofei Tan <tanxiaofei@huawei.com> wrote:
>
> It is redundant to do irqsave and irqrestore in hardIRQ context, where
> it has been in a irq-disabled context.
>
> Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com>
Applied for next, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/host/cavium.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/cavium.c b/drivers/mmc/host/cavium.c
> index c5da3aa..4bb8f28 100644
> --- a/drivers/mmc/host/cavium.c
> +++ b/drivers/mmc/host/cavium.c
> @@ -436,12 +436,11 @@ irqreturn_t cvm_mmc_interrupt(int irq, void *dev_id)
> {
> struct cvm_mmc_host *host = dev_id;
> struct mmc_request *req;
> - unsigned long flags = 0;
> u64 emm_int, rsp_sts;
> bool host_done;
>
> if (host->need_irq_handler_lock)
> - spin_lock_irqsave(&host->irq_handler_lock, flags);
> + spin_lock(&host->irq_handler_lock);
> else
> __acquire(&host->irq_handler_lock);
>
> @@ -504,7 +503,7 @@ irqreturn_t cvm_mmc_interrupt(int irq, void *dev_id)
> host->release_bus(host);
> out:
> if (host->need_irq_handler_lock)
> - spin_unlock_irqrestore(&host->irq_handler_lock, flags);
> + spin_unlock(&host->irq_handler_lock);
> else
> __release(&host->irq_handler_lock);
> return IRQ_RETVAL(emm_int != 0);
> --
> 2.8.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-08 12:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04 7:07 [PATCH] mmc: cavium: Replace spin_lock_irqsave with spin_lock in hard IRQ Xiaofei Tan
2021-02-08 12:06 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®