Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: dw_mmc: 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 <tiantao6@hisilicon.com>
Link: https://lore.kernel.org/r/1604627813-59785-1-git-send-email-tiantao6@hisilicon.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Tian Tao and committed by
Ulf Hansson
9f7d4c91 e2c01e91

+8 -9
+8 -9
drivers/mmc/host/dw_mmc.c
··· 2617 2617 struct dw_mci *host = dev_id; 2618 2618 u32 pending; 2619 2619 struct dw_mci_slot *slot = host->slot; 2620 - unsigned long irqflags; 2621 2620 2622 2621 pending = mci_readl(host, MINTSTS); /* read-only mask reg */ 2623 2622 ··· 2631 2632 * Hold the lock; we know cmd11_timer can't be kicked 2632 2633 * off after the lock is released, so safe to delete. 2633 2634 */ 2634 - spin_lock_irqsave(&host->irq_lock, irqflags); 2635 + spin_lock(&host->irq_lock); 2635 2636 dw_mci_cmd_interrupt(host, pending); 2636 - spin_unlock_irqrestore(&host->irq_lock, irqflags); 2637 + spin_unlock(&host->irq_lock); 2637 2638 2638 2639 del_timer(&host->cmd11_timer); 2639 2640 } 2640 2641 2641 2642 if (pending & DW_MCI_CMD_ERROR_FLAGS) { 2642 - spin_lock_irqsave(&host->irq_lock, irqflags); 2643 + spin_lock(&host->irq_lock); 2643 2644 2644 2645 del_timer(&host->cto_timer); 2645 2646 mci_writel(host, RINTSTS, DW_MCI_CMD_ERROR_FLAGS); ··· 2647 2648 smp_wmb(); /* drain writebuffer */ 2648 2649 set_bit(EVENT_CMD_COMPLETE, &host->pending_events); 2649 2650 2650 - spin_unlock_irqrestore(&host->irq_lock, irqflags); 2651 + spin_unlock(&host->irq_lock); 2651 2652 } 2652 2653 2653 2654 if (pending & DW_MCI_DATA_ERROR_FLAGS) { ··· 2660 2661 } 2661 2662 2662 2663 if (pending & SDMMC_INT_DATA_OVER) { 2663 - spin_lock_irqsave(&host->irq_lock, irqflags); 2664 + spin_lock(&host->irq_lock); 2664 2665 2665 2666 del_timer(&host->dto_timer); 2666 2667 ··· 2675 2676 set_bit(EVENT_DATA_COMPLETE, &host->pending_events); 2676 2677 tasklet_schedule(&host->tasklet); 2677 2678 2678 - spin_unlock_irqrestore(&host->irq_lock, irqflags); 2679 + spin_unlock(&host->irq_lock); 2679 2680 } 2680 2681 2681 2682 if (pending & SDMMC_INT_RXDR) { ··· 2691 2692 } 2692 2693 2693 2694 if (pending & SDMMC_INT_CMD_DONE) { 2694 - spin_lock_irqsave(&host->irq_lock, irqflags); 2695 + spin_lock(&host->irq_lock); 2695 2696 2696 2697 mci_writel(host, RINTSTS, SDMMC_INT_CMD_DONE); 2697 2698 dw_mci_cmd_interrupt(host, pending); 2698 2699 2699 - spin_unlock_irqrestore(&host->irq_lock, irqflags); 2700 + spin_unlock(&host->irq_lock); 2700 2701 } 2701 2702 2702 2703 if (pending & SDMMC_INT_CD) {