ARM: KVM: __kvm_vcpu_run function return result fix in BE case
[firefly-linux-kernel-4.4.55.git] / arch / arm / kvm / interrupts.S
index 24d4e65806a73dea4a29d34487a472f5fccaa732..01dcb0e752d9f04cbb1492378cc6382397c9c8e8 100644 (file)
@@ -199,8 +199,13 @@ after_vfp_restore:
 
        restore_host_regs
        clrex                           @ Clear exclusive monitor
+#ifndef CONFIG_CPU_ENDIAN_BE8
        mov     r0, r1                  @ Return the return code
        mov     r1, #0                  @ Clear upper bits in return value
+#else
+       @ r1 already has return code
+       mov     r0, #0                  @ Clear upper bits in return value
+#endif /* CONFIG_CPU_ENDIAN_BE8 */
        bx      lr                      @ return to IOCTL
 
 /********************************************************************