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@xxxxxxxxx> --- 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 - : send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html