[PATCH] arm64: add DSB after icache flush in __flush_icache_all()

Vinayak Kale vkale at apm.com
Tue Jan 28 00:31:15 EST 2014


On Mon, Jan 27, 2014 at 5:46 PM, Will Deacon <will.deacon at arm.com> wrote:
> Hi Vinayak,
>
> On Mon, Jan 27, 2014 at 11:59:44AM +0000, Vinayak Kale wrote:
>> Add DSB after icache flush operation.
>
> Please elaborate a bit on what this achieves (i.e. completion of the
> maintenance operation).

Okay.

>
>> Signed-off-by: Vinayak Kale <vkale at apm.com>
>> ---
>>  arch/arm64/include/asm/cacheflush.h |    1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/arm64/include/asm/cacheflush.h b/arch/arm64/include/asm/cacheflush.h
>> index fea9ee3..88932498 100644
>> --- a/arch/arm64/include/asm/cacheflush.h
>> +++ b/arch/arm64/include/asm/cacheflush.h
>> @@ -116,6 +116,7 @@ extern void flush_dcache_page(struct page *);
>>  static inline void __flush_icache_all(void)
>>  {
>>       asm("ic ialluis");
>
> This needs a "memory" clobber to prevent re-ordering by GCC. We should
> probably check the rest of the code for other occurrences of this too.

Okay.

>
>> +     dsb();
>
> Can you make a corresponding change for arch/arm/ too, please? I think we're
> missing the barrier there as well.

I could have, but I don't have hardware to test it on.

>
> Will



More information about the linux-arm-kernel mailing list