mmc: sdhci: avoid unnecessary mapping/unmapping of align buffer
authorRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 26 Jan 2016 13:39:50 +0000 (13:39 +0000)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 29 Feb 2016 10:03:15 +0000 (11:03 +0100)
commitedd63fcc97cdb53279a7c43fa1691f5913d92793
tree816f08494c3df518e58211e1971eb92cbc2447a4
parent71fcbda0fcddd0896c4982a484f6c8aa802d28b1
mmc: sdhci: avoid unnecessary mapping/unmapping of align buffer

Unnecessarily mapping and unmapping the align buffer for SD cards is
expensive: performance measurements on iMX6 show that this gives a hit
of 10% on hdparm buffered disk reads.

MMC/SD card IO comes from the mm/vfs which gives us page based IO, so
for this case, the align buffer is not going to be used.  However, we
still map and unmap this buffer.

Eliminate this by switching the align buffer to be a DMA coherent
buffer, which needs no DMA maintenance to access the buffer.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: stable@vger.kernel.org # v4.5+
Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci.c