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

dmaengine: ipu_idmac: remove redundant irqsave and restore in hardIRQ

Running in hardIRQ, disabling IRQ is redundant since hardIRQ has disabled
IRQ. This patch removes the irqsave and irqstore to save some instruction
cycles.

Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
Link: https://lore.kernel.org/r/20201027215252.25820-2-song.bao.hua@hisilicon.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Barry Song and committed by
Vinod Koul
f3b10249 69973b48

+5 -6
+5 -6
drivers/dma/ipu/ipu_idmac.c
··· 1160 1160 struct idmac_tx_desc *desc, *descnew; 1161 1161 bool done = false; 1162 1162 u32 ready0, ready1, curbuf, err; 1163 - unsigned long flags; 1164 1163 struct dmaengine_desc_callback cb; 1165 1164 1166 1165 /* IDMAC has cleared the respective BUFx_RDY bit, we manage the buffer */ 1167 1166 1168 1167 dev_dbg(dev, "IDMAC irq %d, buf %d\n", irq, ichan->active_buffer); 1169 1168 1170 - spin_lock_irqsave(&ipu_data.lock, flags); 1169 + spin_lock(&ipu_data.lock); 1171 1170 1172 1171 ready0 = idmac_read_ipureg(&ipu_data, IPU_CHA_BUF0_RDY); 1173 1172 ready1 = idmac_read_ipureg(&ipu_data, IPU_CHA_BUF1_RDY); ··· 1175 1176 1176 1177 if (err & (1 << chan_id)) { 1177 1178 idmac_write_ipureg(&ipu_data, 1 << chan_id, IPU_INT_STAT_4); 1178 - spin_unlock_irqrestore(&ipu_data.lock, flags); 1179 + spin_unlock(&ipu_data.lock); 1179 1180 /* 1180 1181 * Doing this 1181 1182 * ichan->sg[0] = ichan->sg[1] = NULL; ··· 1187 1188 chan_id, ready0, ready1, curbuf); 1188 1189 return IRQ_HANDLED; 1189 1190 } 1190 - spin_unlock_irqrestore(&ipu_data.lock, flags); 1191 + spin_unlock(&ipu_data.lock); 1191 1192 1192 1193 /* Other interrupts do not interfere with this channel */ 1193 1194 spin_lock(&ichan->lock); ··· 1250 1251 if (unlikely(sgnew)) { 1251 1252 ipu_submit_buffer(ichan, descnew, sgnew, !ichan->active_buffer); 1252 1253 } else { 1253 - spin_lock_irqsave(&ipu_data.lock, flags); 1254 + spin_lock(&ipu_data.lock); 1254 1255 ipu_ic_disable_task(&ipu_data, chan_id); 1255 - spin_unlock_irqrestore(&ipu_data.lock, flags); 1256 + spin_unlock(&ipu_data.lock); 1256 1257 ichan->status = IPU_CHANNEL_READY; 1257 1258 /* Continue to check for complete descriptor */ 1258 1259 }