ARC: unaligned access emulation broken if callee-reg dest of LD/ST
authorVineet Gupta <vgupta@synopsys.com>
Sat, 6 Apr 2013 11:41:58 +0000 (17:11 +0530)
committerVineet Gupta <vgupta@synopsys.com>
Tue, 7 May 2013 08:13:55 +0000 (13:43 +0530)
The fixup code correctly updates the callee-regs on stack, but
fails to unwind it into actual register file. Thus userspace won't see
the update.

Reported-by: Noam Camus <noamc@ezchip.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/kernel/entry.S

index 666a486f1e7b6a2b3fa77f29955a0a46fad3fcca..0c6d664d4a8379512c32c7b52d8fbd0d321cf70e 100644 (file)
@@ -396,7 +396,9 @@ ARC_ENTRY EV_TLBProtV
 
        bl  do_misaligned_access
 
-       DISCARD_CALLEE_SAVED_USER
+       ; TBD: optimize - do this only if a callee reg was involved
+       ; either a dst of emulated LD/ST or src with address-writeback
+       RESTORE_CALLEE_SAVED_USER
 #else
        bl  do_misaligned_error
 #endif