summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2018-05-04 10:24:45 -0400
committerDavid S. Miller <davem@davemloft.net>2018-06-05 16:26:47 -0400
commitce1e518190ea71d1ecf1a91a8b0794ba9bd78e89 (patch)
tree829b73812093465b6af318d10e41d86aa328d864
parent56f0ddadcea9dc264f1c8eed6cc984071b141554 (diff)
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>
-rw-r--r--drivers/ide/ide-taskfile.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index c034cd965831..14bdab15a454 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -237,7 +237,6 @@ void ide_pio_bytes(ide_drive_t *drive, struct ide_cmd *cmd,
237 237
238 while (len) { 238 while (len) {
239 unsigned nr_bytes = min(len, cursg->length - cmd->cursg_ofs); 239 unsigned nr_bytes = min(len, cursg->length - cmd->cursg_ofs);
240 int page_is_high;
241 240
242 page = sg_page(cursg); 241 page = sg_page(cursg);
243 offset = cursg->offset + cmd->cursg_ofs; 242 offset = cursg->offset + cmd->cursg_ofs;
@@ -248,10 +247,6 @@ void ide_pio_bytes(ide_drive_t *drive, struct ide_cmd *cmd,
248 247
249 nr_bytes = min_t(unsigned, nr_bytes, (PAGE_SIZE - offset)); 248 nr_bytes = min_t(unsigned, nr_bytes, (PAGE_SIZE - offset));
250 249
251 page_is_high = PageHighMem(page);
252 if (page_is_high)
253 local_irq_save(flags);
254
255 buf = kmap_atomic(page) + offset; 250 buf = kmap_atomic(page) + offset;
256 251
257 cmd->nleft -= nr_bytes; 252 cmd->nleft -= nr_bytes;
@@ -270,9 +265,6 @@ void ide_pio_bytes(ide_drive_t *drive, struct ide_cmd *cmd,
270 265
271 kunmap_atomic(buf); 266 kunmap_atomic(buf);
272 267
273 if (page_is_high)
274 local_irq_restore(flags);
275
276 len -= nr_bytes; 268 len -= nr_bytes;
277 } 269 }
278} 270}