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)
commitc11389406f19e4bddc7b347e5259aebda02b23f1
tree804664ab82aa0bfd29336354be5a900f6d736fc7
parenta2f526994e92ea54be181efccda261c4b1a6ae8d
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