Skip to content

Commit ce1e518

Browse files
Sebastian Andrzej Siewiordavem330
authored andcommitted
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 1ec9c5d ("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>
1 parent 56f0dda commit ce1e518

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

‎drivers/ide/ide-taskfile.c‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ void ide_pio_bytes(ide_drive_t *drive, struct ide_cmd *cmd,
237237

238238
while (len) {
239239
unsigned nr_bytes = min(len, cursg->length - cmd->cursg_ofs);
240-
int page_is_high;
241240

242241
page = sg_page(cursg);
243242
offset = cursg->offset + cmd->cursg_ofs;
@@ -248,10 +247,6 @@ void ide_pio_bytes(ide_drive_t *drive, struct ide_cmd *cmd,
248247

249248
nr_bytes = min_t(unsigned, nr_bytes, (PAGE_SIZE - offset));
250249

251-
page_is_high = PageHighMem(page);
252-
if (page_is_high)
253-
local_irq_save(flags);
254-
255250
buf = kmap_atomic(page) + offset;
256251

257252
cmd->nleft -= nr_bytes;
@@ -270,9 +265,6 @@ void ide_pio_bytes(ide_drive_t *drive, struct ide_cmd *cmd,
270265

271266
kunmap_atomic(buf);
272267

273-
if (page_is_high)
274-
local_irq_restore(flags);
275-
276268
len -= nr_bytes;
277269
}
278270
}

0 commit comments

Comments
 (0)