[PATCH] powerpc/lib: Split xor_vmx file to guarantee instruction ordering

Paul Clarke pc at us.ibm.com
Wed May 24 23:36:36 AEST 2017


On 05/23/2017 06:45 PM, Matt Brown wrote:
> The xor_vmx.c file is used for the RAID5 xor operations. In these functions
> altivec is enabled to run the operation and then disabled. However due to
> compiler instruction reordering, altivec instructions are being run before
> enable_altivec() and after disable_altivec().

If altivec instructions can be reordered after disable_altivec(), then disable_altivec() is broken, I'd think.

Could it be because the isync in mtmsr_isync() is after the mtmsr?

disable_kernel_altivec
- msr_check_and_clear
  - __msr_check_and_clear
    - mtmsr_isync

PC



More information about the Linuxppc-dev mailing list