diff options
author | Chen Gang <gang.chen@asianux.com> | 2013-03-24 21:31:31 -0400 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2013-03-25 02:14:21 -0400 |
commit | 087aa036eb79f24b856893190359ba812b460f45 (patch) | |
tree | 9cca3788d5fae97004d6fd7ccd75c07c69a452ee /arch | |
parent | 3912a677f68f6084e0a7b6a1a29310ac1b083713 (diff) |
powerpc: make additional room in exception vector area
The FWNMI region is fixed at 0x7000 and the vector are now overflowing
that with allmodconfig. Fix that by moving slb_miss_realmode code out
of that region as it doesn't need to be that close to the call sites
(it is a _GLOBAL function)
Fixes this build error:
arch/powerpc/kernel/exceptions-64s.S: Assembler messages:
arch/powerpc/kernel/exceptions-64s.S:1304: Error: attempt to move .org backwards
Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/exceptions-64s.S | 144 |
1 files changed, 72 insertions, 72 deletions
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index 200afa5bcfb7..56bd92362ce1 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S | |||
@@ -1066,78 +1066,6 @@ unrecov_user_slb: | |||
1066 | #endif /* __DISABLED__ */ | 1066 | #endif /* __DISABLED__ */ |
1067 | 1067 | ||
1068 | 1068 | ||
1069 | /* | ||
1070 | * r13 points to the PACA, r9 contains the saved CR, | ||
1071 | * r12 contain the saved SRR1, SRR0 is still ready for return | ||
1072 | * r3 has the faulting address | ||
1073 | * r9 - r13 are saved in paca->exslb. | ||
1074 | * r3 is saved in paca->slb_r3 | ||
1075 | * We assume we aren't going to take any exceptions during this procedure. | ||
1076 | */ | ||
1077 | _GLOBAL(slb_miss_realmode) | ||
1078 | mflr r10 | ||
1079 | #ifdef CONFIG_RELOCATABLE | ||
1080 | mtctr r11 | ||
1081 | #endif | ||
1082 | |||
1083 | stw r9,PACA_EXSLB+EX_CCR(r13) /* save CR in exc. frame */ | ||
1084 | std r10,PACA_EXSLB+EX_LR(r13) /* save LR */ | ||
1085 | |||
1086 | bl .slb_allocate_realmode | ||
1087 | |||
1088 | /* All done -- return from exception. */ | ||
1089 | |||
1090 | ld r10,PACA_EXSLB+EX_LR(r13) | ||
1091 | ld r3,PACA_EXSLB+EX_R3(r13) | ||
1092 | lwz r9,PACA_EXSLB+EX_CCR(r13) /* get saved CR */ | ||
1093 | |||
1094 | mtlr r10 | ||
1095 | |||
1096 | andi. r10,r12,MSR_RI /* check for unrecoverable exception */ | ||
1097 | beq- 2f | ||
1098 | |||
1099 | .machine push | ||
1100 | .machine "power4" | ||
1101 | mtcrf 0x80,r9 | ||
1102 | mtcrf 0x01,r9 /* slb_allocate uses cr0 and cr7 */ | ||
1103 | .machine pop | ||
1104 | |||
1105 | RESTORE_PPR_PACA(PACA_EXSLB, r9) | ||
1106 | ld r9,PACA_EXSLB+EX_R9(r13) | ||
1107 | ld r10,PACA_EXSLB+EX_R10(r13) | ||
1108 | ld r11,PACA_EXSLB+EX_R11(r13) | ||
1109 | ld r12,PACA_EXSLB+EX_R12(r13) | ||
1110 | ld r13,PACA_EXSLB+EX_R13(r13) | ||
1111 | rfid | ||
1112 | b . /* prevent speculative execution */ | ||
1113 | |||
1114 | 2: mfspr r11,SPRN_SRR0 | ||
1115 | ld r10,PACAKBASE(r13) | ||
1116 | LOAD_HANDLER(r10,unrecov_slb) | ||
1117 | mtspr SPRN_SRR0,r10 | ||
1118 | ld r10,PACAKMSR(r13) | ||
1119 | mtspr SPRN_SRR1,r10 | ||
1120 | rfid | ||
1121 | b . | ||
1122 | |||
1123 | unrecov_slb: | ||
1124 | EXCEPTION_PROLOG_COMMON(0x4100, PACA_EXSLB) | ||
1125 | DISABLE_INTS | ||
1126 | bl .save_nvgprs | ||
1127 | 1: addi r3,r1,STACK_FRAME_OVERHEAD | ||
1128 | bl .unrecoverable_exception | ||
1129 | b 1b | ||
1130 | |||
1131 | |||
1132 | #ifdef CONFIG_PPC_970_NAP | ||
1133 | power4_fixup_nap: | ||
1134 | andc r9,r9,r10 | ||
1135 | std r9,TI_LOCAL_FLAGS(r11) | ||
1136 | ld r10,_LINK(r1) /* make idle task do the */ | ||
1137 | std r10,_NIP(r1) /* equivalent of a blr */ | ||
1138 | blr | ||
1139 | #endif | ||
1140 | |||
1141 | .align 7 | 1069 | .align 7 |
1142 | .globl alignment_common | 1070 | .globl alignment_common |
1143 | alignment_common: | 1071 | alignment_common: |
@@ -1336,6 +1264,78 @@ _GLOBAL(opal_mc_secondary_handler) | |||
1336 | 1264 | ||
1337 | 1265 | ||
1338 | /* | 1266 | /* |
1267 | * r13 points to the PACA, r9 contains the saved CR, | ||
1268 | * r12 contain the saved SRR1, SRR0 is still ready for return | ||
1269 | * r3 has the faulting address | ||
1270 | * r9 - r13 are saved in paca->exslb. | ||
1271 | * r3 is saved in paca->slb_r3 | ||
1272 | * We assume we aren't going to take any exceptions during this procedure. | ||
1273 | */ | ||
1274 | _GLOBAL(slb_miss_realmode) | ||
1275 | mflr r10 | ||
1276 | #ifdef CONFIG_RELOCATABLE | ||
1277 | mtctr r11 | ||
1278 | #endif | ||
1279 | |||
1280 | stw r9,PACA_EXSLB+EX_CCR(r13) /* save CR in exc. frame */ | ||
1281 | std r10,PACA_EXSLB+EX_LR(r13) /* save LR */ | ||
1282 | |||
1283 | bl .slb_allocate_realmode | ||
1284 | |||
1285 | /* All done -- return from exception. */ | ||
1286 | |||
1287 | ld r10,PACA_EXSLB+EX_LR(r13) | ||
1288 | ld r3,PACA_EXSLB+EX_R3(r13) | ||
1289 | lwz r9,PACA_EXSLB+EX_CCR(r13) /* get saved CR */ | ||
1290 | |||
1291 | mtlr r10 | ||
1292 | |||
1293 | andi. r10,r12,MSR_RI /* check for unrecoverable exception */ | ||
1294 | beq- 2f | ||
1295 | |||
1296 | .machine push | ||
1297 | .machine "power4" | ||
1298 | mtcrf 0x80,r9 | ||
1299 | mtcrf 0x01,r9 /* slb_allocate uses cr0 and cr7 */ | ||
1300 | .machine pop | ||
1301 | |||
1302 | RESTORE_PPR_PACA(PACA_EXSLB, r9) | ||
1303 | ld r9,PACA_EXSLB+EX_R9(r13) | ||
1304 | ld r10,PACA_EXSLB+EX_R10(r13) | ||
1305 | ld r11,PACA_EXSLB+EX_R11(r13) | ||
1306 | ld r12,PACA_EXSLB+EX_R12(r13) | ||
1307 | ld r13,PACA_EXSLB+EX_R13(r13) | ||
1308 | rfid | ||
1309 | b . /* prevent speculative execution */ | ||
1310 | |||
1311 | 2: mfspr r11,SPRN_SRR0 | ||
1312 | ld r10,PACAKBASE(r13) | ||
1313 | LOAD_HANDLER(r10,unrecov_slb) | ||
1314 | mtspr SPRN_SRR0,r10 | ||
1315 | ld r10,PACAKMSR(r13) | ||
1316 | mtspr SPRN_SRR1,r10 | ||
1317 | rfid | ||
1318 | b . | ||
1319 | |||
1320 | unrecov_slb: | ||
1321 | EXCEPTION_PROLOG_COMMON(0x4100, PACA_EXSLB) | ||
1322 | DISABLE_INTS | ||
1323 | bl .save_nvgprs | ||
1324 | 1: addi r3,r1,STACK_FRAME_OVERHEAD | ||
1325 | bl .unrecoverable_exception | ||
1326 | b 1b | ||
1327 | |||
1328 | |||
1329 | #ifdef CONFIG_PPC_970_NAP | ||
1330 | power4_fixup_nap: | ||
1331 | andc r9,r9,r10 | ||
1332 | std r9,TI_LOCAL_FLAGS(r11) | ||
1333 | ld r10,_LINK(r1) /* make idle task do the */ | ||
1334 | std r10,_NIP(r1) /* equivalent of a blr */ | ||
1335 | blr | ||
1336 | #endif | ||
1337 | |||
1338 | /* | ||
1339 | * Hash table stuff | 1339 | * Hash table stuff |
1340 | */ | 1340 | */ |
1341 | .align 7 | 1341 | .align 7 |