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

dmaengine: pl330: fix wrong usage of spinlock flags in dma_cyclc

flags varible which is the input parameter of pl330_prep_dma_cyclic()
should not be used by spinlock_irq[save/restore] function.

Signed-off-by: Jongho Park <jongho7.park@samsung.com>
Signed-off-by: Bumyong Lee <bumyong.lee@samsung.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Link: https://lore.kernel.org/r/20210507063647.111209-1-chanho61.park@samsung.com
Fixes: f6f2421c0a1c ("dmaengine: pl330: Merge dma_pl330_dmac and pl330_dmac structs")
Cc: stable@vger.kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Bumyong Lee and committed by
Vinod Koul
4ad5dd2d 17866bc6

+4 -2
+4 -2
drivers/dma/pl330.c
··· 2694 2694 for (i = 0; i < len / period_len; i++) { 2695 2695 desc = pl330_get_desc(pch); 2696 2696 if (!desc) { 2697 + unsigned long iflags; 2698 + 2697 2699 dev_err(pch->dmac->ddma.dev, "%s:%d Unable to fetch desc\n", 2698 2700 __func__, __LINE__); 2699 2701 2700 2702 if (!first) 2701 2703 return NULL; 2702 2704 2703 - spin_lock_irqsave(&pl330->pool_lock, flags); 2705 + spin_lock_irqsave(&pl330->pool_lock, iflags); 2704 2706 2705 2707 while (!list_empty(&first->node)) { 2706 2708 desc = list_entry(first->node.next, ··· 2712 2710 2713 2711 list_move_tail(&first->node, &pl330->desc_pool); 2714 2712 2715 - spin_unlock_irqrestore(&pl330->pool_lock, flags); 2713 + spin_unlock_irqrestore(&pl330->pool_lock, iflags); 2716 2714 2717 2715 return NULL; 2718 2716 }