]>
Commit | Line | Data |
---|---|---|
c7880ca6 GKH |
1 | From 2d68b7fe55d9e19a8a868224ed0dfd6526568521 Mon Sep 17 00:00:00 2001 |
2 | From: Catalin Marinas <catalin.marinas@arm.com> | |
3 | Date: Thu, 4 Feb 2010 01:04:50 -0500 | |
4 | Subject: [libata] Call flush_dcache_page after PIO data transfers in libata-sff.c | |
5 | ||
6 | From: Catalin Marinas <catalin.marinas@arm.com> | |
7 | ||
8 | commit 2d68b7fe55d9e19a8a868224ed0dfd6526568521 upstream. | |
9 | ||
10 | flush_dcache_page() must be called after (!ATA_TFLAG_WRITE) the | |
11 | data copying to avoid D-cache aliasing with user space or I-D cache | |
12 | coherency issues (when reading data from an ATA device using PIO, | |
13 | the kernel dirties the D-cache but there is no flush_dcache_page() | |
14 | required on Harvard architectures). | |
15 | ||
16 | Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> | |
17 | Signed-off-by: Jeff Garzik <jgarzik@redhat.com> | |
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | |
19 | ||
20 | --- | |
21 | drivers/ata/libata-sff.c | 3 +++ | |
22 | 1 file changed, 3 insertions(+) | |
23 | ||
24 | --- a/drivers/ata/libata-sff.c | |
25 | +++ b/drivers/ata/libata-sff.c | |
26 | @@ -893,6 +893,9 @@ static void ata_pio_sector(struct ata_qu | |
27 | do_write); | |
28 | } | |
29 | ||
30 | + if (!do_write) | |
31 | + flush_dcache_page(page); | |
32 | + | |
33 | qc->curbytes += qc->sect_size; | |
34 | qc->cursg_ofs += qc->sect_size; | |
35 |