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

ide: don't disable interrupts during kmap_atomic()

ide_pio_bytes() disables interrupts around kmap_atomic(). This is a
leftover from the old kmap_atomic() implementation which relied on fixed
mapping slots, so the caller had to make sure that the same slot could not
be reused from an interrupting context.

kmap_atomic() was changed to dynamic slots long ago and commit 1ec9c5ddc17a
("include/linux/highmem.h: remove the second argument of k[un]map_atomic()")
removed the slot assignements, but the callers were not checked for now
redundant interrupt disabling.

Remove the conditional interrupt disable.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Sebastian Andrzej Siewior and committed by
David S. Miller
ce1e5181 56f0ddad

-8
-8
drivers/ide/ide-taskfile.c
··· 237 237 238 238 while (len) { 239 239 unsigned nr_bytes = min(len, cursg->length - cmd->cursg_ofs); 240 - int page_is_high; 241 240 242 241 page = sg_page(cursg); 243 242 offset = cursg->offset + cmd->cursg_ofs; ··· 246 247 offset %= PAGE_SIZE; 247 248 248 249 nr_bytes = min_t(unsigned, nr_bytes, (PAGE_SIZE - offset)); 249 - 250 - page_is_high = PageHighMem(page); 251 - if (page_is_high) 252 - local_irq_save(flags); 253 250 254 251 buf = kmap_atomic(page) + offset; 255 252 ··· 264 269 hwif->tp_ops->input_data(drive, cmd, buf, nr_bytes); 265 270 266 271 kunmap_atomic(buf); 267 - 268 - if (page_is_high) 269 - local_irq_restore(flags); 270 272 271 273 len -= nr_bytes; 272 274 }