Subject: [PATCH 06/10] ARM: V7M: Implement cache macros for V7M

From: [email-masked] (Vladimir Murzin)
Date: Mon, 13 Jun 2016 17:27:32 +0100

On 13/06/16 16:18, Russell King - ARM Linux wrote:
> On Mon, Jun 13, 2016 at 04:03:05PM +0100, Vladimir Murzin wrote:
>> From: Jonathan Austin <[email-masked]>
>>
>> This commit implements the cache operation macros for V7M, paving the way
>> for caches to be used on V7 with a future commit.
>>
>> Because the cache operations in V7M are memory mapped, in most operations an
>> extra register is required compared to the V7 version, where the type of
>> operation is encoded in the instruction, not the address that is written to.
>>
>> Thus, an extra register argument has been added to the cache operation macros,
>> that is required in V7M but ignored/unused in V7. In almost all cases there
>> was a spare temporary register, but in places where the register allocation
>> was tighter the M_CLASS macro has been used to avoid clobbering new
>> registers.
> 
> It's probably way more efficient to just implement this as an entirely
> separate implementation, rather than trying to bodge this into the v7
> stuff.
> 

It might be an option, but having all these as a macro make it possible
to have cache support in decompresser (not presented in this series)
too. If you don't buy it I'll think of moving to an entirely separate
implementation as you've just suggested.

Thanks
Vladimir