ARM: 8297/1: cache-l2x0: optimize aurora range operations
authorArnd Bergmann <arnd@arndb.de>
Wed, 28 Jan 2015 16:55:31 +0000 (17:55 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 6 Feb 2015 20:16:40 +0000 (20:16 +0000)
commit1d88967900b87f94435581dad4ae319686c6ce10
tree7fc8d85ca097dfdb6a49276061ffb1466723ef0c
parent20e783e39e55c2615fb61d1b3d139ee9edcf6772
ARM: 8297/1: cache-l2x0: optimize aurora range operations

The aurora_inv_range(), aurora_clean_range() and aurora_flush_range()
functions are highly redundant, both in source and in object code, and
they are harder to understand than necessary.

By moving the range loop into the aurora_pa_range() function, they
become trivial wrappers, and the object code start looking like what
one would expect for an optimal implementation.

Further optimization may be possible by using the per-CPU "virtual"
registers to avoid the spinlocks in most cases.

 (on Armada 370 RD and Armada XP GP, boot tested, plus a little bit of
 DMA traffic by reading data from a SD card)

Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/cache-l2x0.c