]> git.baikalelectronics.ru Git - kernel.git/commit
microblaze: Fix unaligned value saving to the stack for system with MMU
authorMichal Simek <monstr@monstr.eu>
Fri, 20 May 2011 07:02:13 +0000 (09:02 +0200)
committerMichal Simek <monstr@monstr.eu>
Mon, 25 Jul 2011 07:07:45 +0000 (09:07 +0200)
commitb1dffdd64b307b00508f10e14d4f9da1f90aa04a
tree804664ab82aa0bfd29336354be5a900f6d736fc7
parent806d6f8f7b6ed06c302d8c319b9319f9b153127a
microblaze: Fix unaligned value saving to the stack for system with MMU

Several registers weren't saved correctly to the stack.

Unaligned expection for system with MMU stores
value in ex_tmp_data_loc_X address which is load to registers r3.
The next step is to move this value from r3 to a destination
register which caused unaligned exception. For several registers
this value was directly moved to the register.

For example for r28:
by "or r28, r0, r3"

but register r28 was rewritten when kernel returns from exception
handler by value saved on stack.

This patch changed r3 saving to the correct address on the stack.
For example for r28:
by "swi r3, r1, 4 * 28"

When kernel returns from the exception handler, correct value is restored.

Signed-off-by: Michal Simek <monstr@monstr.eu>
arch/microblaze/kernel/hw_exception_handler.S