]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Apr 2016 14:33:44 +0000 (07:33 -0700)
commit15c1e7e44eca833be1d9c165706778dfbb2917d9
treed808cce600ab0c0226edb1d5b53d91af4a21fee6
parentef9ddac5e4640ce6ae78cc70f2b2b1cb80b1e8ac
mmc: sdhci: avoid unnecessary mapping/unmapping of align buffer

commit edd63fcc97cdb53279a7c43fa1691f5913d92793 upstream.

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>
Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/host/sdhci.c