MIPS: Fix potencial corruption
authorRalf Baechle <ralf@linux-mips.org>
Sat, 9 Jun 2012 19:48:47 +0000 (20:48 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 1 Apr 2014 23:58:52 +0000 (00:58 +0100)
commitb280aaa4ce04a6ab491fc9dc7eb4091336fd91ec
treec14b102b5b8fa54060b0619aa55bdca6d243aae4
parent2de2c2e956dbf164c5acb1dca16e9a3c1938096e
MIPS: Fix potencial corruption

commit a16dad7763420a3b46cff1e703a9070827796cfc upstream.

Normally r4k_dma_cache_inv should only ever be called with cacheline
aligned addresses.  If however, it isn't there is the theoretical
possibility of data corruption.  There is no correct way of handling this
and anyway, it should only happen if the DMA API is used incorrectly
so drop

There is a different corruption scenario with these CACHE instructions
removed but again there is no way of handling this correctly and it can
be triggered only through incorrect use of the DMA API.

So just get rid of the complexity.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Reported-by: James Rodriguez <jamesr@juniper.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/mips/mm/c-r4k.c