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

mmc: tifm_sd: Remove local_irq_{save,restore}() around tifm_sd_bounce_block()

tifm_sd_bounce_block() calls functions that ultimate use kmap_atomic() to
map pages.

A long time ago the kmap_atomic API required a slot to be provided which
risked the possibility that other code might use the same slot at the
same time. Disabling interrupts prevented the possibility of an interrupt
handler doing that. However, that went away with
commit 3e4d3af501cc ("mm: stack based kmap_atomic()").

When the second argument to kmap_atomic was removed by commit 482fce997e14
("mmc: remove the second argument of k[un]map_atomic()"),
local_irq_{save,restore}() should have been removed also.

Remove it now.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20221005101951.3165-10-adrian.hunter@intel.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Adrian Hunter and committed by
Ulf Hansson
36bbdc30 b7093c10

+2 -7
+2 -7
drivers/mmc/host/tifm_sd.c
··· 264 264 unsigned int t_size = TIFM_DMA_TSIZE * r_data->blksz; 265 265 unsigned int dma_len, dma_blk_cnt, dma_off; 266 266 struct scatterlist *sg = NULL; 267 - unsigned long flags; 268 267 269 268 if (host->sg_pos == host->sg_len) 270 269 return 1; 271 270 272 271 if (host->cmd_flags & DATA_CARRY) { 273 272 host->cmd_flags &= ~DATA_CARRY; 274 - local_irq_save(flags); 275 273 tifm_sd_bounce_block(host, r_data); 276 - local_irq_restore(flags); 277 274 if (host->sg_pos == host->sg_len) 278 275 return 1; 279 276 } ··· 297 300 if (dma_blk_cnt) 298 301 sg = &r_data->sg[host->sg_pos]; 299 302 else if (dma_len) { 300 - if (r_data->flags & MMC_DATA_WRITE) { 301 - local_irq_save(flags); 303 + if (r_data->flags & MMC_DATA_WRITE) 302 304 tifm_sd_bounce_block(host, r_data); 303 - local_irq_restore(flags); 304 - } else 305 + else 305 306 host->cmd_flags |= DATA_CARRY; 306 307 307 308 sg = &host->bounce_buf;