]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/spi/spi-davinci.c
spi: davinci: do not use DMA for vmalloc'ed buffers
authorFrode Isaksen <fisaksen@baylibre.com>
Thu, 23 Feb 2017 18:02:00 +0000 (19:02 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 15 Mar 2017 19:35:39 +0000 (19:35 +0000)
commit4dd9becbce4f10009322c3e2297f9db3ace94a10
tree09a1f660b4fd532335aa44d8df4220fcb37f835b
parent0718b764880434ac7a5b7c0f5cb2c805c589a807
spi: davinci: do not use DMA for vmalloc'ed buffers

Using vmalloc'ed buffers will fail since daVinci has
VIVT cache and only the kernel lowmem virtual address
is invalidated/flushed when performing DMA.
The virtual address returned from vmalloc() is not
invalidated/flushed and may contain stale data when
returning from spi_sync().
Fixes errors when running UBIFS over SPI NOR.
Revert this when all upper layer users of vmalloc'ed
buffers sent to SPI handles cache flushing/invalidating.

Signed-off-by: Frode Isaksen <fisaksen@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-davinci.c