[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090216001322.27491.58344.sendpatchset@localhost.localdomain>
Date: Mon, 16 Feb 2009 01:13:22 +0100
From: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
To: linux-ide@...r.kernel.org
Cc: Borislav Petkov <petkovbb@...il.com>,
Bartlomiej Zolnierkiewicz <bzolnier@...il.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 02/20] ide: use PageHighMem() instead of ifdefs in ide_pio_bytes()
From: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
Subject: [PATCH] ide: use PageHighMem() instead of ifdefs in ide_pio_bytes()
Use PageHighMem() instead of ifdefs in ide_pio_bytes()
(=> local IRQs won't be disabled when not necessary).
Cc: Borislav Petkov <petkovbb@...il.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
---
drivers/ide/ide-taskfile.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
Index: b/drivers/ide/ide-taskfile.c
===================================================================
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -195,9 +195,7 @@ static void ide_pio_bytes(ide_drive_t *d
struct scatterlist *sg = hwif->sg_table;
struct scatterlist *cursg = cmd->cursg;
struct page *page;
-#ifdef CONFIG_HIGHMEM
unsigned long flags;
-#endif
unsigned int offset;
u8 *buf;
@@ -215,9 +213,9 @@ static void ide_pio_bytes(ide_drive_t *d
page = nth_page(page, (offset >> PAGE_SHIFT));
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;
cmd->nleft -= nr_bytes;
@@ -235,9 +233,9 @@ static void ide_pio_bytes(ide_drive_t *d
hwif->tp_ops->input_data(drive, cmd, buf, nr_bytes);
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;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists