|
@@ -195,9 +195,7 @@ static void ide_pio_bytes(ide_drive_t *drive, struct ide_cmd *cmd,
|
|
struct scatterlist *sg = hwif->sg_table;
|
|
struct scatterlist *sg = hwif->sg_table;
|
|
struct scatterlist *cursg = cmd->cursg;
|
|
struct scatterlist *cursg = cmd->cursg;
|
|
struct page *page;
|
|
struct page *page;
|
|
-#ifdef CONFIG_HIGHMEM
|
|
|
|
unsigned long flags;
|
|
unsigned long flags;
|
|
-#endif
|
|
|
|
unsigned int offset;
|
|
unsigned int offset;
|
|
u8 *buf;
|
|
u8 *buf;
|
|
|
|
|
|
@@ -218,9 +216,9 @@ static void ide_pio_bytes(ide_drive_t *drive, struct ide_cmd *cmd,
|
|
page = nth_page(page, (offset >> PAGE_SHIFT));
|
|
page = nth_page(page, (offset >> PAGE_SHIFT));
|
|
offset %= PAGE_SIZE;
|
|
offset %= PAGE_SIZE;
|
|
|
|
|
|
-#ifdef CONFIG_HIGHMEM
|
|
|
|
- local_irq_save(flags);
|
|
|
|
-#endif
|
|
|
|
|
|
+ if (PageHighMem(page))
|
|
|
|
+ local_irq_save(flags);
|
|
|
|
+
|
|
buf = kmap_atomic(page, KM_BIO_SRC_IRQ) + offset;
|
|
buf = kmap_atomic(page, KM_BIO_SRC_IRQ) + offset;
|
|
|
|
|
|
cmd->nleft -= nr_bytes;
|
|
cmd->nleft -= nr_bytes;
|
|
@@ -238,9 +236,9 @@ static void ide_pio_bytes(ide_drive_t *drive, struct ide_cmd *cmd,
|
|
hwif->tp_ops->input_data(drive, cmd, buf, nr_bytes);
|
|
hwif->tp_ops->input_data(drive, cmd, buf, nr_bytes);
|
|
|
|
|
|
kunmap_atomic(buf, KM_BIO_SRC_IRQ);
|
|
kunmap_atomic(buf, KM_BIO_SRC_IRQ);
|
|
-#ifdef CONFIG_HIGHMEM
|
|
|
|
- local_irq_restore(flags);
|
|
|
|
-#endif
|
|
|
|
|
|
+
|
|
|
|
+ if (PageHighMem(page))
|
|
|
|
+ local_irq_restore(flags);
|
|
|
|
|
|
len -= nr_bytes;
|
|
len -= nr_bytes;
|
|
}
|
|
}
|