Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sfr/next-fixes

Pull powerpc build fixes from Stephen Rothwell:
"Just a couple of build fixes for powerpc all{mod,yes}config.

Submitted by me since BenH is on vacation."

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sfr/next-fixes:
powerpc: define the conditions where the ePAPR idle hcall can be supported
powerpc: make additional room in exception vector area

+78 -72
+6
arch/powerpc/kernel/epapr_paravirt.c
··· 23 23 #include <asm/code-patching.h> 24 24 #include <asm/machdep.h> 25 25 26 + #if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64) 26 27 extern void epapr_ev_idle(void); 27 28 extern u32 epapr_ev_idle_start[]; 29 + #endif 28 30 29 31 bool epapr_paravirt_enabled; 30 32 ··· 49 47 50 48 for (i = 0; i < (len / 4); i++) { 51 49 patch_instruction(epapr_hypercall_start + i, insts[i]); 50 + #if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64) 52 51 patch_instruction(epapr_ev_idle_start + i, insts[i]); 52 + #endif 53 53 } 54 54 55 + #if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64) 55 56 if (of_get_property(hyper_node, "has-idle", NULL)) 56 57 ppc_md.power_save = epapr_ev_idle; 58 + #endif 57 59 58 60 epapr_paravirt_enabled = true; 59 61
+72 -72
arch/powerpc/kernel/exceptions-64s.S
··· 1066 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 1069 .align 7 1142 1070 .globl alignment_common 1143 1071 alignment_common: ··· 1262 1334 b machine_check_pSeries 1263 1335 #endif /* CONFIG_PPC_POWERNV */ 1264 1336 1337 + 1338 + /* 1339 + * r13 points to the PACA, r9 contains the saved CR, 1340 + * r12 contain the saved SRR1, SRR0 is still ready for return 1341 + * r3 has the faulting address 1342 + * r9 - r13 are saved in paca->exslb. 1343 + * r3 is saved in paca->slb_r3 1344 + * We assume we aren't going to take any exceptions during this procedure. 1345 + */ 1346 + _GLOBAL(slb_miss_realmode) 1347 + mflr r10 1348 + #ifdef CONFIG_RELOCATABLE 1349 + mtctr r11 1350 + #endif 1351 + 1352 + stw r9,PACA_EXSLB+EX_CCR(r13) /* save CR in exc. frame */ 1353 + std r10,PACA_EXSLB+EX_LR(r13) /* save LR */ 1354 + 1355 + bl .slb_allocate_realmode 1356 + 1357 + /* All done -- return from exception. */ 1358 + 1359 + ld r10,PACA_EXSLB+EX_LR(r13) 1360 + ld r3,PACA_EXSLB+EX_R3(r13) 1361 + lwz r9,PACA_EXSLB+EX_CCR(r13) /* get saved CR */ 1362 + 1363 + mtlr r10 1364 + 1365 + andi. r10,r12,MSR_RI /* check for unrecoverable exception */ 1366 + beq- 2f 1367 + 1368 + .machine push 1369 + .machine "power4" 1370 + mtcrf 0x80,r9 1371 + mtcrf 0x01,r9 /* slb_allocate uses cr0 and cr7 */ 1372 + .machine pop 1373 + 1374 + RESTORE_PPR_PACA(PACA_EXSLB, r9) 1375 + ld r9,PACA_EXSLB+EX_R9(r13) 1376 + ld r10,PACA_EXSLB+EX_R10(r13) 1377 + ld r11,PACA_EXSLB+EX_R11(r13) 1378 + ld r12,PACA_EXSLB+EX_R12(r13) 1379 + ld r13,PACA_EXSLB+EX_R13(r13) 1380 + rfid 1381 + b . /* prevent speculative execution */ 1382 + 1383 + 2: mfspr r11,SPRN_SRR0 1384 + ld r10,PACAKBASE(r13) 1385 + LOAD_HANDLER(r10,unrecov_slb) 1386 + mtspr SPRN_SRR0,r10 1387 + ld r10,PACAKMSR(r13) 1388 + mtspr SPRN_SRR1,r10 1389 + rfid 1390 + b . 1391 + 1392 + unrecov_slb: 1393 + EXCEPTION_PROLOG_COMMON(0x4100, PACA_EXSLB) 1394 + DISABLE_INTS 1395 + bl .save_nvgprs 1396 + 1: addi r3,r1,STACK_FRAME_OVERHEAD 1397 + bl .unrecoverable_exception 1398 + b 1b 1399 + 1400 + 1401 + #ifdef CONFIG_PPC_970_NAP 1402 + power4_fixup_nap: 1403 + andc r9,r9,r10 1404 + std r9,TI_LOCAL_FLAGS(r11) 1405 + ld r10,_LINK(r1) /* make idle task do the */ 1406 + std r10,_NIP(r1) /* equivalent of a blr */ 1407 + blr 1408 + #endif 1265 1409 1266 1410 /* 1267 1411 * Hash table stuff