]> 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)
commit37c3893c097ebdefb0b23d796c73ba5092a051b1
tree804664ab82aa0bfd29336354be5a900f6d736fc7
parentdd6d81500093d611c180b5133f17ea3182864b26
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