ARM: 8815/1: V7M: align v7m_dma_inv_range() with v7 counterpart
authorVladimir Murzin <vladimir.murzin@arm.com>
Fri, 23 Nov 2018 11:25:21 +0000 (12:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Dec 2018 13:15:21 +0000 (14:15 +0100)
commit5cb9667104e8de4d0a7ae0a6e5647d7b9055cb94
treeabb63cd5000b54c44763311ca52d88dd1abf5787
parentb3d52556794c0ab021667b54551685d812d500ca
ARM: 8815/1: V7M: align v7m_dma_inv_range() with v7 counterpart

[ Upstream commit 3d0358d0ba048c5afb1385787aaec8fa5ad78fcc ]

Chris has discovered and reported that v7_dma_inv_range() may corrupt
memory if address range is not aligned to cache line size.

Since the whole cache-v7m.S was lifted form cache-v7.S the same
observation applies to v7m_dma_inv_range(). So the fix just mirrors
what has been done for v7 with a little specific of M-class.

Cc: Chris Cole <chris@sageembedded.com>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/mm/cache-v7m.S