powerpc/vdso: Fix __kernel_sync_dicache sequence with coherent icache
authorNicholas Piggin <npiggin@gmail.com>
Fri, 20 May 2022 12:36:49 +0000 (22:36 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 27 Jul 2022 11:36:04 +0000 (21:36 +1000)
Processors with coherent icache require the sequence sync ; icbi ; isync
to entire store->execute coherency. icbi (to any address) must be
executed to ensure isync flushes the pipeline. See "POWER9 Processor
User's Manual, 4.6.2.2 Instruction Cache Block Invalidate (icbi)" for
details.

__kernel_sync_dicache is missing icbi for the coherent icache path.
Add it.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220520123649.258440-1-npiggin@gmail.com
arch/powerpc/kernel/vdso/cacheflush.S

index d4e43ab2d5df55fd1ebb196acbcebf50bca49c97..0085ae464dac9c32381625a6969a4e422ad34eb7 100644 (file)
@@ -91,6 +91,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
 3:
        crclr   cr0*4+so
        sync
+       icbi    0,r1
        isync
        li      r3,0
        blr