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 <[email protected]>
---
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]