aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2011-05-20 03:02:13 -0400
committerMichal Simek <monstr@monstr.eu>2011-07-25 03:07:45 -0400
commitc11389406f19e4bddc7b347e5259aebda02b23f1 (patch)
tree804664ab82aa0bfd29336354be5a900f6d736fc7 /arch/microblaze
parenta2f526994e92ea54be181efccda261c4b1a6ae8d (diff)
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>
Diffstat (limited to 'arch/microblaze')
-rw-r--r--arch/microblaze/kernel/hw_exception_handler.S56
1 files changed, 28 insertions, 28 deletions
diff --git a/arch/microblaze/kernel/hw_exception_handler.S b/arch/microblaze/kernel/hw_exception_handler.S
index 56572e923a83..e62be8379604 100644
--- a/arch/microblaze/kernel/hw_exception_handler.S
+++ b/arch/microblaze/kernel/hw_exception_handler.S
@@ -1113,23 +1113,23 @@ lw_r10_vm: R3_TO_LWREG_VM_V (10);
1113lw_r11_vm: R3_TO_LWREG_VM_V (11); 1113lw_r11_vm: R3_TO_LWREG_VM_V (11);
1114lw_r12_vm: R3_TO_LWREG_VM_V (12); 1114lw_r12_vm: R3_TO_LWREG_VM_V (12);
1115lw_r13_vm: R3_TO_LWREG_VM_V (13); 1115lw_r13_vm: R3_TO_LWREG_VM_V (13);
1116lw_r14_vm: R3_TO_LWREG_VM (14); 1116lw_r14_vm: R3_TO_LWREG_VM_V (14);
1117lw_r15_vm: R3_TO_LWREG_VM_V (15); 1117lw_r15_vm: R3_TO_LWREG_VM_V (15);
1118lw_r16_vm: R3_TO_LWREG_VM (16); 1118lw_r16_vm: R3_TO_LWREG_VM_V (16);
1119lw_r17_vm: R3_TO_LWREG_VM_V (17); 1119lw_r17_vm: R3_TO_LWREG_VM_V (17);
1120lw_r18_vm: R3_TO_LWREG_VM_V (18); 1120lw_r18_vm: R3_TO_LWREG_VM_V (18);
1121lw_r19_vm: R3_TO_LWREG_VM (19); 1121lw_r19_vm: R3_TO_LWREG_VM_V (19);
1122lw_r20_vm: R3_TO_LWREG_VM (20); 1122lw_r20_vm: R3_TO_LWREG_VM_V (20);
1123lw_r21_vm: R3_TO_LWREG_VM (21); 1123lw_r21_vm: R3_TO_LWREG_VM_V (21);
1124lw_r22_vm: R3_TO_LWREG_VM (22); 1124lw_r22_vm: R3_TO_LWREG_VM_V (22);
1125lw_r23_vm: R3_TO_LWREG_VM (23); 1125lw_r23_vm: R3_TO_LWREG_VM_V (23);
1126lw_r24_vm: R3_TO_LWREG_VM (24); 1126lw_r24_vm: R3_TO_LWREG_VM_V (24);
1127lw_r25_vm: R3_TO_LWREG_VM (25); 1127lw_r25_vm: R3_TO_LWREG_VM_V (25);
1128lw_r26_vm: R3_TO_LWREG_VM (26); 1128lw_r26_vm: R3_TO_LWREG_VM_V (26);
1129lw_r27_vm: R3_TO_LWREG_VM (27); 1129lw_r27_vm: R3_TO_LWREG_VM_V (27);
1130lw_r28_vm: R3_TO_LWREG_VM (28); 1130lw_r28_vm: R3_TO_LWREG_VM_V (28);
1131lw_r29_vm: R3_TO_LWREG_VM (29); 1131lw_r29_vm: R3_TO_LWREG_VM_V (29);
1132lw_r30_vm: R3_TO_LWREG_VM (30); 1132lw_r30_vm: R3_TO_LWREG_VM_V (30);
1133lw_r31_vm: R3_TO_LWREG_VM_V (31); 1133lw_r31_vm: R3_TO_LWREG_VM_V (31);
1134 1134
1135sw_table_vm: 1135sw_table_vm:
@@ -1147,23 +1147,23 @@ sw_r10_vm: SWREG_TO_R3_VM_V (10);
1147sw_r11_vm: SWREG_TO_R3_VM_V (11); 1147sw_r11_vm: SWREG_TO_R3_VM_V (11);
1148sw_r12_vm: SWREG_TO_R3_VM_V (12); 1148sw_r12_vm: SWREG_TO_R3_VM_V (12);
1149sw_r13_vm: SWREG_TO_R3_VM_V (13); 1149sw_r13_vm: SWREG_TO_R3_VM_V (13);
1150sw_r14_vm: SWREG_TO_R3_VM (14); 1150sw_r14_vm: SWREG_TO_R3_VM_V (14);
1151sw_r15_vm: SWREG_TO_R3_VM_V (15); 1151sw_r15_vm: SWREG_TO_R3_VM_V (15);
1152sw_r16_vm: SWREG_TO_R3_VM (16); 1152sw_r16_vm: SWREG_TO_R3_VM_V (16);
1153sw_r17_vm: SWREG_TO_R3_VM_V (17); 1153sw_r17_vm: SWREG_TO_R3_VM_V (17);
1154sw_r18_vm: SWREG_TO_R3_VM_V (18); 1154sw_r18_vm: SWREG_TO_R3_VM_V (18);
1155sw_r19_vm: SWREG_TO_R3_VM (19); 1155sw_r19_vm: SWREG_TO_R3_VM_V (19);
1156sw_r20_vm: SWREG_TO_R3_VM (20); 1156sw_r20_vm: SWREG_TO_R3_VM_V (20);
1157sw_r21_vm: SWREG_TO_R3_VM (21); 1157sw_r21_vm: SWREG_TO_R3_VM_V (21);
1158sw_r22_vm: SWREG_TO_R3_VM (22); 1158sw_r22_vm: SWREG_TO_R3_VM_V (22);
1159sw_r23_vm: SWREG_TO_R3_VM (23); 1159sw_r23_vm: SWREG_TO_R3_VM_V (23);
1160sw_r24_vm: SWREG_TO_R3_VM (24); 1160sw_r24_vm: SWREG_TO_R3_VM_V (24);
1161sw_r25_vm: SWREG_TO_R3_VM (25); 1161sw_r25_vm: SWREG_TO_R3_VM_V (25);
1162sw_r26_vm: SWREG_TO_R3_VM (26); 1162sw_r26_vm: SWREG_TO_R3_VM_V (26);
1163sw_r27_vm: SWREG_TO_R3_VM (27); 1163sw_r27_vm: SWREG_TO_R3_VM_V (27);
1164sw_r28_vm: SWREG_TO_R3_VM (28); 1164sw_r28_vm: SWREG_TO_R3_VM_V (28);
1165sw_r29_vm: SWREG_TO_R3_VM (29); 1165sw_r29_vm: SWREG_TO_R3_VM_V (29);
1166sw_r30_vm: SWREG_TO_R3_VM (30); 1166sw_r30_vm: SWREG_TO_R3_VM_V (30);
1167sw_r31_vm: SWREG_TO_R3_VM_V (31); 1167sw_r31_vm: SWREG_TO_R3_VM_V (31);
1168#endif /* CONFIG_MMU */ 1168#endif /* CONFIG_MMU */
1169 1169