[PATCH] mmci: don't flush the dcache

Rabin Vincent rabin at rab.in
Sat Jan 1 05:12:34 EST 2011


Since freshly created page cache pages are considered dirty and are
always flushed before they are mapped into userspace, and an
already-mapped page will never be passed to be read into by the mmci
driver, remove the flush_dcache_page() calls.

Signed-off-by: Rabin Vincent <rabin at rab.in>
---
 drivers/mmc/host/mmci.c |   19 -------------------
 1 files changed, 0 insertions(+), 19 deletions(-)

diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 0814b88..ccbbc18 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -284,22 +284,6 @@ mmci_data_irq(struct mmci_host *host, struct
mmc_data *data,
 		/* Force-complete the transaction */
 		host->blockend =3D true;
 		host->dataend =3D true;
-
-		/*
-		 * We hit an error condition.  Ensure that any data
-		 * partially written to a page is properly coherent.
-		 */
-		if (data->flags & MMC_DATA_READ) {
-			struct sg_mapping_iter *sg_miter =3D &host->sg_miter;
-			unsigned long flags;
-
-			local_irq_save(flags);
-			if (sg_miter_next(sg_miter)) {
-				flush_dcache_page(sg_miter->page);
-				sg_miter_stop(sg_miter);
-			}
-			local_irq_restore(flags);
-		}
 	}

 	/*
@@ -530,9 +514,6 @@ static irqreturn_t mmci_pio_irq(int irq, void *dev_id)
 		if (remain)
 			break;

-		if (status & MCI_RXACTIVE)
-			flush_dcache_page(sg_miter->page);
-
 		status =3D readl(base + MMCISTATUS);
 	} while (1);

--=20
1.7.2.3



More information about the linux-arm-kernel mailing list