lkml.org 
[lkml]   [2006]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 2/5] ide: add cpu cache flushes after kmapping and modifying a page
Date
From
Add calls to flush_kernel_dcache_page() after CPU has kmapped and
modified a page. This fixes PIO cache coherency bugs on architectures
with aliased caches.

Signed-off-by: Tejun Heo <htejun@gmail.com>

---

drivers/ide/ide-floppy.c | 1 +
drivers/ide/ide-taskfile.c | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)

861367f65bbbbc5c9f5d3a27aab91c587a3a9049
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index a53e3ce..5be22c2 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -618,6 +618,7 @@ static void idefloppy_input_buffers (ide

data = bvec_kmap_irq(bvec, &flags);
drive->hwif->atapi_input_bytes(drive, data, count);
+ flush_kernel_dcache_page(kmap_atomic_to_page(data));
bvec_kunmap_irq(data, &flags);

bcount -= count;
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 9233b81..c183c07 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -294,6 +294,8 @@ #endif
else
taskfile_input_data(drive, buf, SECTOR_WORDS);

+ if (!write)
+ flush_kernel_dcache_page(kmap_atomic_to_page(buf));
kunmap_atomic(buf, KM_BIO_SRC_IRQ);
#ifdef CONFIG_HIGHMEM
local_irq_restore(flags);
--
1.3.2

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-04 05:45    [W:0.103 / U:15.888 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site