exceptions-64s.S 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101
  1. /*
  2. * This file contains the 64-bit "server" PowerPC variant
  3. * of the low level exception handling including exception
  4. * vectors, exception return, part of the slb and stab
  5. * handling and other fixed offset specific things.
  6. *
  7. * This file is meant to be #included from head_64.S due to
  8. * position dependent assembly.
  9. *
  10. * Most of this originates from head_64.S and thus has the same
  11. * copyright history.
  12. *
  13. */
  14. #include <asm/exception-64s.h>
  15. #include <asm/ptrace.h>
  16. /*
  17. * We layout physical memory as follows:
  18. * 0x0000 - 0x00ff : Secondary processor spin code
  19. * 0x0100 - 0x2fff : pSeries Interrupt prologs
  20. * 0x3000 - 0x5fff : interrupt support common interrupt prologs
  21. * 0x6000 - 0x6fff : Initial (CPU0) segment table
  22. * 0x7000 - 0x7fff : FWNMI data area
  23. * 0x8000 - : Early init and support code
  24. */
  25. /*
  26. * This is the start of the interrupt handlers for pSeries
  27. * This code runs with relocation off.
  28. * Code from here to __end_interrupts gets copied down to real
  29. * address 0x100 when we are running a relocatable kernel.
  30. * Therefore any relative branches in this section must only
  31. * branch to labels in this section.
  32. */
  33. . = 0x100
  34. .globl __start_interrupts
  35. __start_interrupts:
  36. .globl system_reset_pSeries;
  37. system_reset_pSeries:
  38. HMT_MEDIUM;
  39. SET_SCRATCH0(r13)
  40. #ifdef CONFIG_PPC_P7_NAP
  41. BEGIN_FTR_SECTION
  42. /* Running native on arch 2.06 or later, check if we are
  43. * waking up from nap. We only handle no state loss and
  44. * supervisor state loss. We do -not- handle hypervisor
  45. * state loss at this time.
  46. */
  47. mfspr r13,SPRN_SRR1
  48. rlwinm. r13,r13,47-31,30,31
  49. beq 9f
  50. /* waking up from powersave (nap) state */
  51. cmpwi cr1,r13,2
  52. /* Total loss of HV state is fatal, we could try to use the
  53. * PIR to locate a PACA, then use an emergency stack etc...
  54. * but for now, let's just stay stuck here
  55. */
  56. bgt cr1,.
  57. GET_PACA(r13)
  58. #ifdef CONFIG_KVM_BOOK3S_64_HV
  59. lbz r0,PACAPROCSTART(r13)
  60. cmpwi r0,0x80
  61. bne 1f
  62. li r0,1
  63. stb r0,PACAPROCSTART(r13)
  64. b kvm_start_guest
  65. 1:
  66. #endif
  67. beq cr1,2f
  68. b .power7_wakeup_noloss
  69. 2: b .power7_wakeup_loss
  70. 9:
  71. END_FTR_SECTION_IFSET(CPU_FTR_HVMODE | CPU_FTR_ARCH_206)
  72. #endif /* CONFIG_PPC_P7_NAP */
  73. EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, system_reset_common, EXC_STD,
  74. NOTEST, 0x100)
  75. . = 0x200
  76. machine_check_pSeries_1:
  77. /* This is moved out of line as it can be patched by FW, but
  78. * some code path might still want to branch into the original
  79. * vector
  80. */
  81. b machine_check_pSeries
  82. . = 0x300
  83. .globl data_access_pSeries
  84. data_access_pSeries:
  85. HMT_MEDIUM
  86. SET_SCRATCH0(r13)
  87. #ifndef CONFIG_POWER4_ONLY
  88. BEGIN_FTR_SECTION
  89. b data_access_check_stab
  90. data_access_not_stab:
  91. END_MMU_FTR_SECTION_IFCLR(MMU_FTR_SLB)
  92. #endif
  93. EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, data_access_common, EXC_STD,
  94. KVMTEST_PR, 0x300)
  95. . = 0x380
  96. .globl data_access_slb_pSeries
  97. data_access_slb_pSeries:
  98. HMT_MEDIUM
  99. SET_SCRATCH0(r13)
  100. EXCEPTION_PROLOG_1(PACA_EXSLB, KVMTEST_PR, 0x380)
  101. std r3,PACA_EXSLB+EX_R3(r13)
  102. mfspr r3,SPRN_DAR
  103. #ifdef __DISABLED__
  104. /* Keep that around for when we re-implement dynamic VSIDs */
  105. cmpdi r3,0
  106. bge slb_miss_user_pseries
  107. #endif /* __DISABLED__ */
  108. mfspr r12,SPRN_SRR1
  109. #ifndef CONFIG_RELOCATABLE
  110. b .slb_miss_realmode
  111. #else
  112. /*
  113. * We can't just use a direct branch to .slb_miss_realmode
  114. * because the distance from here to there depends on where
  115. * the kernel ends up being put.
  116. */
  117. mfctr r11
  118. ld r10,PACAKBASE(r13)
  119. LOAD_HANDLER(r10, .slb_miss_realmode)
  120. mtctr r10
  121. bctr
  122. #endif
  123. STD_EXCEPTION_PSERIES(0x400, 0x400, instruction_access)
  124. . = 0x480
  125. .globl instruction_access_slb_pSeries
  126. instruction_access_slb_pSeries:
  127. HMT_MEDIUM
  128. SET_SCRATCH0(r13)
  129. EXCEPTION_PROLOG_1(PACA_EXSLB, KVMTEST_PR, 0x480)
  130. std r3,PACA_EXSLB+EX_R3(r13)
  131. mfspr r3,SPRN_SRR0 /* SRR0 is faulting address */
  132. #ifdef __DISABLED__
  133. /* Keep that around for when we re-implement dynamic VSIDs */
  134. cmpdi r3,0
  135. bge slb_miss_user_pseries
  136. #endif /* __DISABLED__ */
  137. mfspr r12,SPRN_SRR1
  138. #ifndef CONFIG_RELOCATABLE
  139. b .slb_miss_realmode
  140. #else
  141. mfctr r11
  142. ld r10,PACAKBASE(r13)
  143. LOAD_HANDLER(r10, .slb_miss_realmode)
  144. mtctr r10
  145. bctr
  146. #endif
  147. /* We open code these as we can't have a ". = x" (even with
  148. * x = "." within a feature section
  149. */
  150. . = 0x500;
  151. .globl hardware_interrupt_pSeries;
  152. .globl hardware_interrupt_hv;
  153. hardware_interrupt_pSeries:
  154. hardware_interrupt_hv:
  155. BEGIN_FTR_SECTION
  156. _MASKABLE_EXCEPTION_PSERIES(0x502, hardware_interrupt,
  157. EXC_HV, SOFTEN_TEST_HV)
  158. KVM_HANDLER(PACA_EXGEN, EXC_HV, 0x502)
  159. FTR_SECTION_ELSE
  160. _MASKABLE_EXCEPTION_PSERIES(0x500, hardware_interrupt,
  161. EXC_STD, SOFTEN_TEST_HV_201)
  162. KVM_HANDLER(PACA_EXGEN, EXC_STD, 0x500)
  163. ALT_FTR_SECTION_END_IFSET(CPU_FTR_HVMODE | CPU_FTR_ARCH_206)
  164. STD_EXCEPTION_PSERIES(0x600, 0x600, alignment)
  165. KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0x600)
  166. STD_EXCEPTION_PSERIES(0x700, 0x700, program_check)
  167. KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0x700)
  168. STD_EXCEPTION_PSERIES(0x800, 0x800, fp_unavailable)
  169. KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0x800)
  170. MASKABLE_EXCEPTION_PSERIES(0x900, 0x900, decrementer)
  171. MASKABLE_EXCEPTION_HV(0x980, 0x982, decrementer)
  172. STD_EXCEPTION_PSERIES(0xa00, 0xa00, trap_0a)
  173. KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0xa00)
  174. STD_EXCEPTION_PSERIES(0xb00, 0xb00, trap_0b)
  175. KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0xb00)
  176. . = 0xc00
  177. .globl system_call_pSeries
  178. system_call_pSeries:
  179. HMT_MEDIUM
  180. #ifdef CONFIG_KVM_BOOK3S_64_HANDLER
  181. SET_SCRATCH0(r13)
  182. GET_PACA(r13)
  183. std r9,PACA_EXGEN+EX_R9(r13)
  184. std r10,PACA_EXGEN+EX_R10(r13)
  185. mfcr r9
  186. KVMTEST(0xc00)
  187. GET_SCRATCH0(r13)
  188. #endif
  189. BEGIN_FTR_SECTION
  190. cmpdi r0,0x1ebe
  191. beq- 1f
  192. END_FTR_SECTION_IFSET(CPU_FTR_REAL_LE)
  193. mr r9,r13
  194. GET_PACA(r13)
  195. mfspr r11,SPRN_SRR0
  196. mfspr r12,SPRN_SRR1
  197. ld r10,PACAKBASE(r13)
  198. LOAD_HANDLER(r10, system_call_entry)
  199. mtspr SPRN_SRR0,r10
  200. ld r10,PACAKMSR(r13)
  201. mtspr SPRN_SRR1,r10
  202. rfid
  203. b . /* prevent speculative execution */
  204. KVM_HANDLER(PACA_EXGEN, EXC_STD, 0xc00)
  205. /* Fast LE/BE switch system call */
  206. 1: mfspr r12,SPRN_SRR1
  207. xori r12,r12,MSR_LE
  208. mtspr SPRN_SRR1,r12
  209. rfid /* return to userspace */
  210. b .
  211. STD_EXCEPTION_PSERIES(0xd00, 0xd00, single_step)
  212. KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0xd00)
  213. /* At 0xe??? we have a bunch of hypervisor exceptions, we branch
  214. * out of line to handle them
  215. */
  216. . = 0xe00
  217. b h_data_storage_hv
  218. . = 0xe20
  219. b h_instr_storage_hv
  220. . = 0xe40
  221. b emulation_assist_hv
  222. . = 0xe50
  223. b hmi_exception_hv
  224. . = 0xe60
  225. b hmi_exception_hv
  226. /* We need to deal with the Altivec unavailable exception
  227. * here which is at 0xf20, thus in the middle of the
  228. * prolog code of the PerformanceMonitor one. A little
  229. * trickery is thus necessary
  230. */
  231. performance_monitor_pSeries_1:
  232. . = 0xf00
  233. b performance_monitor_pSeries
  234. altivec_unavailable_pSeries_1:
  235. . = 0xf20
  236. b altivec_unavailable_pSeries
  237. vsx_unavailable_pSeries_1:
  238. . = 0xf40
  239. b vsx_unavailable_pSeries
  240. #ifdef CONFIG_CBE_RAS
  241. STD_EXCEPTION_HV(0x1200, 0x1202, cbe_system_error)
  242. KVM_HANDLER_SKIP(PACA_EXGEN, EXC_HV, 0x1202)
  243. #endif /* CONFIG_CBE_RAS */
  244. STD_EXCEPTION_PSERIES(0x1300, 0x1300, instruction_breakpoint)
  245. KVM_HANDLER_PR_SKIP(PACA_EXGEN, EXC_STD, 0x1300)
  246. #ifdef CONFIG_CBE_RAS
  247. STD_EXCEPTION_HV(0x1600, 0x1602, cbe_maintenance)
  248. KVM_HANDLER_SKIP(PACA_EXGEN, EXC_HV, 0x1602)
  249. #endif /* CONFIG_CBE_RAS */
  250. STD_EXCEPTION_PSERIES(0x1700, 0x1700, altivec_assist)
  251. KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0x1700)
  252. #ifdef CONFIG_CBE_RAS
  253. STD_EXCEPTION_HV(0x1800, 0x1802, cbe_thermal)
  254. KVM_HANDLER_SKIP(PACA_EXGEN, EXC_HV, 0x1802)
  255. #endif /* CONFIG_CBE_RAS */
  256. . = 0x3000
  257. /*** Out of line interrupts support ***/
  258. /* moved from 0x200 */
  259. machine_check_pSeries:
  260. .globl machine_check_fwnmi
  261. machine_check_fwnmi:
  262. HMT_MEDIUM
  263. SET_SCRATCH0(r13) /* save r13 */
  264. EXCEPTION_PROLOG_PSERIES(PACA_EXMC, machine_check_common,
  265. EXC_STD, KVMTEST, 0x200)
  266. KVM_HANDLER_SKIP(PACA_EXMC, EXC_STD, 0x200)
  267. #ifndef CONFIG_POWER4_ONLY
  268. /* moved from 0x300 */
  269. data_access_check_stab:
  270. GET_PACA(r13)
  271. std r9,PACA_EXSLB+EX_R9(r13)
  272. std r10,PACA_EXSLB+EX_R10(r13)
  273. mfspr r10,SPRN_DAR
  274. mfspr r9,SPRN_DSISR
  275. srdi r10,r10,60
  276. rlwimi r10,r9,16,0x20
  277. #ifdef CONFIG_KVM_BOOK3S_PR
  278. lbz r9,HSTATE_IN_GUEST(r13)
  279. rlwimi r10,r9,8,0x300
  280. #endif
  281. mfcr r9
  282. cmpwi r10,0x2c
  283. beq do_stab_bolted_pSeries
  284. mtcrf 0x80,r9
  285. ld r9,PACA_EXSLB+EX_R9(r13)
  286. ld r10,PACA_EXSLB+EX_R10(r13)
  287. b data_access_not_stab
  288. do_stab_bolted_pSeries:
  289. std r11,PACA_EXSLB+EX_R11(r13)
  290. std r12,PACA_EXSLB+EX_R12(r13)
  291. GET_SCRATCH0(r10)
  292. std r10,PACA_EXSLB+EX_R13(r13)
  293. EXCEPTION_PROLOG_PSERIES_1(.do_stab_bolted, EXC_STD)
  294. #endif /* CONFIG_POWER4_ONLY */
  295. KVM_HANDLER_PR_SKIP(PACA_EXGEN, EXC_STD, 0x300)
  296. KVM_HANDLER_PR_SKIP(PACA_EXSLB, EXC_STD, 0x380)
  297. KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0x400)
  298. KVM_HANDLER_PR(PACA_EXSLB, EXC_STD, 0x480)
  299. KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0x900)
  300. KVM_HANDLER(PACA_EXGEN, EXC_HV, 0x982)
  301. .align 7
  302. /* moved from 0xe00 */
  303. STD_EXCEPTION_HV(., 0xe02, h_data_storage)
  304. KVM_HANDLER_SKIP(PACA_EXGEN, EXC_HV, 0xe02)
  305. STD_EXCEPTION_HV(., 0xe22, h_instr_storage)
  306. KVM_HANDLER(PACA_EXGEN, EXC_HV, 0xe22)
  307. STD_EXCEPTION_HV(., 0xe42, emulation_assist)
  308. KVM_HANDLER(PACA_EXGEN, EXC_HV, 0xe42)
  309. STD_EXCEPTION_HV(., 0xe62, hmi_exception) /* need to flush cache ? */
  310. KVM_HANDLER(PACA_EXGEN, EXC_HV, 0xe62)
  311. /* moved from 0xf00 */
  312. STD_EXCEPTION_PSERIES(., 0xf00, performance_monitor)
  313. KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0xf00)
  314. STD_EXCEPTION_PSERIES(., 0xf20, altivec_unavailable)
  315. KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0xf20)
  316. STD_EXCEPTION_PSERIES(., 0xf40, vsx_unavailable)
  317. KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0xf40)
  318. /*
  319. * An interrupt came in while soft-disabled; clear EE in SRR1,
  320. * clear paca->hard_enabled and return.
  321. */
  322. masked_interrupt:
  323. stb r10,PACAHARDIRQEN(r13)
  324. mtcrf 0x80,r9
  325. ld r9,PACA_EXGEN+EX_R9(r13)
  326. mfspr r10,SPRN_SRR1
  327. rldicl r10,r10,48,1 /* clear MSR_EE */
  328. rotldi r10,r10,16
  329. mtspr SPRN_SRR1,r10
  330. ld r10,PACA_EXGEN+EX_R10(r13)
  331. GET_SCRATCH0(r13)
  332. rfid
  333. b .
  334. masked_Hinterrupt:
  335. stb r10,PACAHARDIRQEN(r13)
  336. mtcrf 0x80,r9
  337. ld r9,PACA_EXGEN+EX_R9(r13)
  338. mfspr r10,SPRN_HSRR1
  339. rldicl r10,r10,48,1 /* clear MSR_EE */
  340. rotldi r10,r10,16
  341. mtspr SPRN_HSRR1,r10
  342. ld r10,PACA_EXGEN+EX_R10(r13)
  343. GET_SCRATCH0(r13)
  344. hrfid
  345. b .
  346. #ifdef CONFIG_PPC_PSERIES
  347. /*
  348. * Vectors for the FWNMI option. Share common code.
  349. */
  350. .globl system_reset_fwnmi
  351. .align 7
  352. system_reset_fwnmi:
  353. HMT_MEDIUM
  354. SET_SCRATCH0(r13) /* save r13 */
  355. EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, system_reset_common, EXC_STD,
  356. NOTEST, 0x100)
  357. #endif /* CONFIG_PPC_PSERIES */
  358. #ifdef __DISABLED__
  359. /*
  360. * This is used for when the SLB miss handler has to go virtual,
  361. * which doesn't happen for now anymore but will once we re-implement
  362. * dynamic VSIDs for shared page tables
  363. */
  364. slb_miss_user_pseries:
  365. std r10,PACA_EXGEN+EX_R10(r13)
  366. std r11,PACA_EXGEN+EX_R11(r13)
  367. std r12,PACA_EXGEN+EX_R12(r13)
  368. GET_SCRATCH0(r10)
  369. ld r11,PACA_EXSLB+EX_R9(r13)
  370. ld r12,PACA_EXSLB+EX_R3(r13)
  371. std r10,PACA_EXGEN+EX_R13(r13)
  372. std r11,PACA_EXGEN+EX_R9(r13)
  373. std r12,PACA_EXGEN+EX_R3(r13)
  374. clrrdi r12,r13,32
  375. mfmsr r10
  376. mfspr r11,SRR0 /* save SRR0 */
  377. ori r12,r12,slb_miss_user_common@l /* virt addr of handler */
  378. ori r10,r10,MSR_IR|MSR_DR|MSR_RI
  379. mtspr SRR0,r12
  380. mfspr r12,SRR1 /* and SRR1 */
  381. mtspr SRR1,r10
  382. rfid
  383. b . /* prevent spec. execution */
  384. #endif /* __DISABLED__ */
  385. .align 7
  386. .globl __end_interrupts
  387. __end_interrupts:
  388. /*
  389. * Code from here down to __end_handlers is invoked from the
  390. * exception prologs above. Because the prologs assemble the
  391. * addresses of these handlers using the LOAD_HANDLER macro,
  392. * which uses an addi instruction, these handlers must be in
  393. * the first 32k of the kernel image.
  394. */
  395. /*** Common interrupt handlers ***/
  396. STD_EXCEPTION_COMMON(0x100, system_reset, .system_reset_exception)
  397. /*
  398. * Machine check is different because we use a different
  399. * save area: PACA_EXMC instead of PACA_EXGEN.
  400. */
  401. .align 7
  402. .globl machine_check_common
  403. machine_check_common:
  404. EXCEPTION_PROLOG_COMMON(0x200, PACA_EXMC)
  405. FINISH_NAP
  406. DISABLE_INTS
  407. bl .save_nvgprs
  408. addi r3,r1,STACK_FRAME_OVERHEAD
  409. bl .machine_check_exception
  410. b .ret_from_except
  411. STD_EXCEPTION_COMMON_ASYNC(0x500, hardware_interrupt, do_IRQ)
  412. STD_EXCEPTION_COMMON_ASYNC(0x900, decrementer, .timer_interrupt)
  413. STD_EXCEPTION_COMMON(0xa00, trap_0a, .unknown_exception)
  414. STD_EXCEPTION_COMMON(0xb00, trap_0b, .unknown_exception)
  415. STD_EXCEPTION_COMMON(0xd00, single_step, .single_step_exception)
  416. STD_EXCEPTION_COMMON(0xe00, trap_0e, .unknown_exception)
  417. STD_EXCEPTION_COMMON(0xe40, emulation_assist, .program_check_exception)
  418. STD_EXCEPTION_COMMON(0xe60, hmi_exception, .unknown_exception)
  419. STD_EXCEPTION_COMMON_ASYNC(0xf00, performance_monitor, .performance_monitor_exception)
  420. STD_EXCEPTION_COMMON(0x1300, instruction_breakpoint, .instruction_breakpoint_exception)
  421. #ifdef CONFIG_ALTIVEC
  422. STD_EXCEPTION_COMMON(0x1700, altivec_assist, .altivec_assist_exception)
  423. #else
  424. STD_EXCEPTION_COMMON(0x1700, altivec_assist, .unknown_exception)
  425. #endif
  426. #ifdef CONFIG_CBE_RAS
  427. STD_EXCEPTION_COMMON(0x1200, cbe_system_error, .cbe_system_error_exception)
  428. STD_EXCEPTION_COMMON(0x1600, cbe_maintenance, .cbe_maintenance_exception)
  429. STD_EXCEPTION_COMMON(0x1800, cbe_thermal, .cbe_thermal_exception)
  430. #endif /* CONFIG_CBE_RAS */
  431. .align 7
  432. system_call_entry:
  433. b system_call_common
  434. ppc64_runlatch_on_trampoline:
  435. b .__ppc64_runlatch_on
  436. /*
  437. * Here we have detected that the kernel stack pointer is bad.
  438. * R9 contains the saved CR, r13 points to the paca,
  439. * r10 contains the (bad) kernel stack pointer,
  440. * r11 and r12 contain the saved SRR0 and SRR1.
  441. * We switch to using an emergency stack, save the registers there,
  442. * and call kernel_bad_stack(), which panics.
  443. */
  444. bad_stack:
  445. ld r1,PACAEMERGSP(r13)
  446. subi r1,r1,64+INT_FRAME_SIZE
  447. std r9,_CCR(r1)
  448. std r10,GPR1(r1)
  449. std r11,_NIP(r1)
  450. std r12,_MSR(r1)
  451. mfspr r11,SPRN_DAR
  452. mfspr r12,SPRN_DSISR
  453. std r11,_DAR(r1)
  454. std r12,_DSISR(r1)
  455. mflr r10
  456. mfctr r11
  457. mfxer r12
  458. std r10,_LINK(r1)
  459. std r11,_CTR(r1)
  460. std r12,_XER(r1)
  461. SAVE_GPR(0,r1)
  462. SAVE_GPR(2,r1)
  463. ld r10,EX_R3(r3)
  464. std r10,GPR3(r1)
  465. SAVE_GPR(4,r1)
  466. SAVE_4GPRS(5,r1)
  467. ld r9,EX_R9(r3)
  468. ld r10,EX_R10(r3)
  469. SAVE_2GPRS(9,r1)
  470. ld r9,EX_R11(r3)
  471. ld r10,EX_R12(r3)
  472. ld r11,EX_R13(r3)
  473. std r9,GPR11(r1)
  474. std r10,GPR12(r1)
  475. std r11,GPR13(r1)
  476. BEGIN_FTR_SECTION
  477. ld r10,EX_CFAR(r3)
  478. std r10,ORIG_GPR3(r1)
  479. END_FTR_SECTION_IFSET(CPU_FTR_CFAR)
  480. SAVE_8GPRS(14,r1)
  481. SAVE_10GPRS(22,r1)
  482. lhz r12,PACA_TRAP_SAVE(r13)
  483. std r12,_TRAP(r1)
  484. addi r11,r1,INT_FRAME_SIZE
  485. std r11,0(r1)
  486. li r12,0
  487. std r12,0(r11)
  488. ld r2,PACATOC(r13)
  489. ld r11,exception_marker@toc(r2)
  490. std r12,RESULT(r1)
  491. std r11,STACK_FRAME_OVERHEAD-16(r1)
  492. 1: addi r3,r1,STACK_FRAME_OVERHEAD
  493. bl .kernel_bad_stack
  494. b 1b
  495. /*
  496. * Here r13 points to the paca, r9 contains the saved CR,
  497. * SRR0 and SRR1 are saved in r11 and r12,
  498. * r9 - r13 are saved in paca->exgen.
  499. */
  500. .align 7
  501. .globl data_access_common
  502. data_access_common:
  503. mfspr r10,SPRN_DAR
  504. std r10,PACA_EXGEN+EX_DAR(r13)
  505. mfspr r10,SPRN_DSISR
  506. stw r10,PACA_EXGEN+EX_DSISR(r13)
  507. EXCEPTION_PROLOG_COMMON(0x300, PACA_EXGEN)
  508. DISABLE_INTS
  509. ld r12,_MSR(r1)
  510. ld r3,PACA_EXGEN+EX_DAR(r13)
  511. lwz r4,PACA_EXGEN+EX_DSISR(r13)
  512. li r5,0x300
  513. b .do_hash_page /* Try to handle as hpte fault */
  514. .align 7
  515. .globl h_data_storage_common
  516. h_data_storage_common:
  517. mfspr r10,SPRN_HDAR
  518. std r10,PACA_EXGEN+EX_DAR(r13)
  519. mfspr r10,SPRN_HDSISR
  520. stw r10,PACA_EXGEN+EX_DSISR(r13)
  521. EXCEPTION_PROLOG_COMMON(0xe00, PACA_EXGEN)
  522. bl .save_nvgprs
  523. DISABLE_INTS
  524. addi r3,r1,STACK_FRAME_OVERHEAD
  525. bl .unknown_exception
  526. b .ret_from_except
  527. .align 7
  528. .globl instruction_access_common
  529. instruction_access_common:
  530. EXCEPTION_PROLOG_COMMON(0x400, PACA_EXGEN)
  531. DISABLE_INTS
  532. ld r12,_MSR(r1)
  533. ld r3,_NIP(r1)
  534. andis. r4,r12,0x5820
  535. li r5,0x400
  536. b .do_hash_page /* Try to handle as hpte fault */
  537. STD_EXCEPTION_COMMON(0xe20, h_instr_storage, .unknown_exception)
  538. /*
  539. * Here is the common SLB miss user that is used when going to virtual
  540. * mode for SLB misses, that is currently not used
  541. */
  542. #ifdef __DISABLED__
  543. .align 7
  544. .globl slb_miss_user_common
  545. slb_miss_user_common:
  546. mflr r10
  547. std r3,PACA_EXGEN+EX_DAR(r13)
  548. stw r9,PACA_EXGEN+EX_CCR(r13)
  549. std r10,PACA_EXGEN+EX_LR(r13)
  550. std r11,PACA_EXGEN+EX_SRR0(r13)
  551. bl .slb_allocate_user
  552. ld r10,PACA_EXGEN+EX_LR(r13)
  553. ld r3,PACA_EXGEN+EX_R3(r13)
  554. lwz r9,PACA_EXGEN+EX_CCR(r13)
  555. ld r11,PACA_EXGEN+EX_SRR0(r13)
  556. mtlr r10
  557. beq- slb_miss_fault
  558. andi. r10,r12,MSR_RI /* check for unrecoverable exception */
  559. beq- unrecov_user_slb
  560. mfmsr r10
  561. .machine push
  562. .machine "power4"
  563. mtcrf 0x80,r9
  564. .machine pop
  565. clrrdi r10,r10,2 /* clear RI before setting SRR0/1 */
  566. mtmsrd r10,1
  567. mtspr SRR0,r11
  568. mtspr SRR1,r12
  569. ld r9,PACA_EXGEN+EX_R9(r13)
  570. ld r10,PACA_EXGEN+EX_R10(r13)
  571. ld r11,PACA_EXGEN+EX_R11(r13)
  572. ld r12,PACA_EXGEN+EX_R12(r13)
  573. ld r13,PACA_EXGEN+EX_R13(r13)
  574. rfid
  575. b .
  576. slb_miss_fault:
  577. EXCEPTION_PROLOG_COMMON(0x380, PACA_EXGEN)
  578. ld r4,PACA_EXGEN+EX_DAR(r13)
  579. li r5,0
  580. std r4,_DAR(r1)
  581. std r5,_DSISR(r1)
  582. b handle_page_fault
  583. unrecov_user_slb:
  584. EXCEPTION_PROLOG_COMMON(0x4200, PACA_EXGEN)
  585. DISABLE_INTS
  586. bl .save_nvgprs
  587. 1: addi r3,r1,STACK_FRAME_OVERHEAD
  588. bl .unrecoverable_exception
  589. b 1b
  590. #endif /* __DISABLED__ */
  591. /*
  592. * r13 points to the PACA, r9 contains the saved CR,
  593. * r12 contain the saved SRR1, SRR0 is still ready for return
  594. * r3 has the faulting address
  595. * r9 - r13 are saved in paca->exslb.
  596. * r3 is saved in paca->slb_r3
  597. * We assume we aren't going to take any exceptions during this procedure.
  598. */
  599. _GLOBAL(slb_miss_realmode)
  600. mflr r10
  601. #ifdef CONFIG_RELOCATABLE
  602. mtctr r11
  603. #endif
  604. stw r9,PACA_EXSLB+EX_CCR(r13) /* save CR in exc. frame */
  605. std r10,PACA_EXSLB+EX_LR(r13) /* save LR */
  606. bl .slb_allocate_realmode
  607. /* All done -- return from exception. */
  608. ld r10,PACA_EXSLB+EX_LR(r13)
  609. ld r3,PACA_EXSLB+EX_R3(r13)
  610. lwz r9,PACA_EXSLB+EX_CCR(r13) /* get saved CR */
  611. mtlr r10
  612. andi. r10,r12,MSR_RI /* check for unrecoverable exception */
  613. beq- 2f
  614. .machine push
  615. .machine "power4"
  616. mtcrf 0x80,r9
  617. mtcrf 0x01,r9 /* slb_allocate uses cr0 and cr7 */
  618. .machine pop
  619. ld r9,PACA_EXSLB+EX_R9(r13)
  620. ld r10,PACA_EXSLB+EX_R10(r13)
  621. ld r11,PACA_EXSLB+EX_R11(r13)
  622. ld r12,PACA_EXSLB+EX_R12(r13)
  623. ld r13,PACA_EXSLB+EX_R13(r13)
  624. rfid
  625. b . /* prevent speculative execution */
  626. 2: mfspr r11,SPRN_SRR0
  627. ld r10,PACAKBASE(r13)
  628. LOAD_HANDLER(r10,unrecov_slb)
  629. mtspr SPRN_SRR0,r10
  630. ld r10,PACAKMSR(r13)
  631. mtspr SPRN_SRR1,r10
  632. rfid
  633. b .
  634. unrecov_slb:
  635. EXCEPTION_PROLOG_COMMON(0x4100, PACA_EXSLB)
  636. DISABLE_INTS
  637. bl .save_nvgprs
  638. 1: addi r3,r1,STACK_FRAME_OVERHEAD
  639. bl .unrecoverable_exception
  640. b 1b
  641. #ifdef CONFIG_PPC_970_NAP
  642. power4_fixup_nap:
  643. andc r9,r9,r10
  644. std r9,TI_LOCAL_FLAGS(r11)
  645. ld r10,_LINK(r1) /* make idle task do the */
  646. std r10,_NIP(r1) /* equivalent of a blr */
  647. blr
  648. #endif
  649. .align 7
  650. .globl alignment_common
  651. alignment_common:
  652. mfspr r10,SPRN_DAR
  653. std r10,PACA_EXGEN+EX_DAR(r13)
  654. mfspr r10,SPRN_DSISR
  655. stw r10,PACA_EXGEN+EX_DSISR(r13)
  656. EXCEPTION_PROLOG_COMMON(0x600, PACA_EXGEN)
  657. ld r3,PACA_EXGEN+EX_DAR(r13)
  658. lwz r4,PACA_EXGEN+EX_DSISR(r13)
  659. std r3,_DAR(r1)
  660. std r4,_DSISR(r1)
  661. bl .save_nvgprs
  662. addi r3,r1,STACK_FRAME_OVERHEAD
  663. ENABLE_INTS
  664. bl .alignment_exception
  665. b .ret_from_except
  666. .align 7
  667. .globl program_check_common
  668. program_check_common:
  669. EXCEPTION_PROLOG_COMMON(0x700, PACA_EXGEN)
  670. bl .save_nvgprs
  671. DISABLE_INTS
  672. addi r3,r1,STACK_FRAME_OVERHEAD
  673. bl .program_check_exception
  674. b .ret_from_except
  675. .align 7
  676. .globl fp_unavailable_common
  677. fp_unavailable_common:
  678. EXCEPTION_PROLOG_COMMON(0x800, PACA_EXGEN)
  679. bne 1f /* if from user, just load it up */
  680. bl .save_nvgprs
  681. DISABLE_INTS
  682. addi r3,r1,STACK_FRAME_OVERHEAD
  683. bl .kernel_fp_unavailable_exception
  684. BUG_OPCODE
  685. 1: bl .load_up_fpu
  686. b fast_exception_return
  687. .align 7
  688. .globl altivec_unavailable_common
  689. altivec_unavailable_common:
  690. EXCEPTION_PROLOG_COMMON(0xf20, PACA_EXGEN)
  691. #ifdef CONFIG_ALTIVEC
  692. BEGIN_FTR_SECTION
  693. beq 1f
  694. bl .load_up_altivec
  695. b fast_exception_return
  696. 1:
  697. END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
  698. #endif
  699. bl .save_nvgprs
  700. DISABLE_INTS
  701. addi r3,r1,STACK_FRAME_OVERHEAD
  702. bl .altivec_unavailable_exception
  703. b .ret_from_except
  704. .align 7
  705. .globl vsx_unavailable_common
  706. vsx_unavailable_common:
  707. EXCEPTION_PROLOG_COMMON(0xf40, PACA_EXGEN)
  708. #ifdef CONFIG_VSX
  709. BEGIN_FTR_SECTION
  710. bne .load_up_vsx
  711. 1:
  712. END_FTR_SECTION_IFSET(CPU_FTR_VSX)
  713. #endif
  714. bl .save_nvgprs
  715. DISABLE_INTS
  716. addi r3,r1,STACK_FRAME_OVERHEAD
  717. bl .vsx_unavailable_exception
  718. b .ret_from_except
  719. .align 7
  720. .globl __end_handlers
  721. __end_handlers:
  722. /*
  723. * Return from an exception with minimal checks.
  724. * The caller is assumed to have done EXCEPTION_PROLOG_COMMON.
  725. * If interrupts have been enabled, or anything has been
  726. * done that might have changed the scheduling status of
  727. * any task or sent any task a signal, you should use
  728. * ret_from_except or ret_from_except_lite instead of this.
  729. */
  730. fast_exc_return_irq: /* restores irq state too */
  731. ld r3,SOFTE(r1)
  732. TRACE_AND_RESTORE_IRQ(r3);
  733. ld r12,_MSR(r1)
  734. rldicl r4,r12,49,63 /* get MSR_EE to LSB */
  735. stb r4,PACAHARDIRQEN(r13) /* restore paca->hard_enabled */
  736. b 1f
  737. .globl fast_exception_return
  738. fast_exception_return:
  739. ld r12,_MSR(r1)
  740. 1: ld r11,_NIP(r1)
  741. andi. r3,r12,MSR_RI /* check if RI is set */
  742. beq- unrecov_fer
  743. #ifdef CONFIG_VIRT_CPU_ACCOUNTING
  744. andi. r3,r12,MSR_PR
  745. beq 2f
  746. ACCOUNT_CPU_USER_EXIT(r3, r4)
  747. 2:
  748. #endif
  749. ld r3,_CCR(r1)
  750. ld r4,_LINK(r1)
  751. ld r5,_CTR(r1)
  752. ld r6,_XER(r1)
  753. mtcr r3
  754. mtlr r4
  755. mtctr r5
  756. mtxer r6
  757. REST_GPR(0, r1)
  758. REST_8GPRS(2, r1)
  759. mfmsr r10
  760. rldicl r10,r10,48,1 /* clear EE */
  761. rldicr r10,r10,16,61 /* clear RI (LE is 0 already) */
  762. mtmsrd r10,1
  763. mtspr SPRN_SRR1,r12
  764. mtspr SPRN_SRR0,r11
  765. REST_4GPRS(10, r1)
  766. ld r1,GPR1(r1)
  767. rfid
  768. b . /* prevent speculative execution */
  769. unrecov_fer:
  770. bl .save_nvgprs
  771. 1: addi r3,r1,STACK_FRAME_OVERHEAD
  772. bl .unrecoverable_exception
  773. b 1b
  774. /*
  775. * Hash table stuff
  776. */
  777. .align 7
  778. _STATIC(do_hash_page)
  779. std r3,_DAR(r1)
  780. std r4,_DSISR(r1)
  781. andis. r0,r4,0xa410 /* weird error? */
  782. bne- handle_page_fault /* if not, try to insert a HPTE */
  783. andis. r0,r4,DSISR_DABRMATCH@h
  784. bne- handle_dabr_fault
  785. BEGIN_FTR_SECTION
  786. andis. r0,r4,0x0020 /* Is it a segment table fault? */
  787. bne- do_ste_alloc /* If so handle it */
  788. END_MMU_FTR_SECTION_IFCLR(MMU_FTR_SLB)
  789. clrrdi r11,r1,THREAD_SHIFT
  790. lwz r0,TI_PREEMPT(r11) /* If we're in an "NMI" */
  791. andis. r0,r0,NMI_MASK@h /* (i.e. an irq when soft-disabled) */
  792. bne 77f /* then don't call hash_page now */
  793. /*
  794. * We need to set the _PAGE_USER bit if MSR_PR is set or if we are
  795. * accessing a userspace segment (even from the kernel). We assume
  796. * kernel addresses always have the high bit set.
  797. */
  798. rlwinm r4,r4,32-25+9,31-9,31-9 /* DSISR_STORE -> _PAGE_RW */
  799. rotldi r0,r3,15 /* Move high bit into MSR_PR posn */
  800. orc r0,r12,r0 /* MSR_PR | ~high_bit */
  801. rlwimi r4,r0,32-13,30,30 /* becomes _PAGE_USER access bit */
  802. ori r4,r4,1 /* add _PAGE_PRESENT */
  803. rlwimi r4,r5,22+2,31-2,31-2 /* Set _PAGE_EXEC if trap is 0x400 */
  804. /*
  805. * r3 contains the faulting address
  806. * r4 contains the required access permissions
  807. * r5 contains the trap number
  808. *
  809. * at return r3 = 0 for success
  810. */
  811. bl .hash_page /* build HPTE if possible */
  812. cmpdi r3,0 /* see if hash_page succeeded */
  813. /*
  814. * Here we have interrupts hard-disabled, so it is sufficient
  815. * to restore paca->{soft,hard}_enable and get out.
  816. */
  817. beq fast_exc_return_irq /* Return from exception on success */
  818. /* For a hash failure, we don't bother re-enabling interrupts */
  819. ble- 13f
  820. /* Here we have a page fault that hash_page can't handle. */
  821. handle_page_fault:
  822. 11: ld r4,_DAR(r1)
  823. ld r5,_DSISR(r1)
  824. addi r3,r1,STACK_FRAME_OVERHEAD
  825. bl .do_page_fault
  826. cmpdi r3,0
  827. beq+ 12f
  828. bl .save_nvgprs
  829. mr r5,r3
  830. addi r3,r1,STACK_FRAME_OVERHEAD
  831. lwz r4,_DAR(r1)
  832. bl .bad_page_fault
  833. b .ret_from_except
  834. /* We have a data breakpoint exception - handle it */
  835. handle_dabr_fault:
  836. bl .save_nvgprs
  837. ld r4,_DAR(r1)
  838. ld r5,_DSISR(r1)
  839. addi r3,r1,STACK_FRAME_OVERHEAD
  840. bl .do_dabr
  841. 12: b .ret_from_except_lite
  842. /* We have a page fault that hash_page could handle but HV refused
  843. * the PTE insertion
  844. */
  845. 13: bl .save_nvgprs
  846. mr r5,r3
  847. addi r3,r1,STACK_FRAME_OVERHEAD
  848. ld r4,_DAR(r1)
  849. bl .low_hash_fault
  850. b .ret_from_except
  851. /*
  852. * We come here as a result of a DSI at a point where we don't want
  853. * to call hash_page, such as when we are accessing memory (possibly
  854. * user memory) inside a PMU interrupt that occurred while interrupts
  855. * were soft-disabled. We want to invoke the exception handler for
  856. * the access, or panic if there isn't a handler.
  857. */
  858. 77: bl .save_nvgprs
  859. mr r4,r3
  860. addi r3,r1,STACK_FRAME_OVERHEAD
  861. li r5,SIGSEGV
  862. bl .bad_page_fault
  863. b .ret_from_except
  864. /* here we have a segment miss */
  865. do_ste_alloc:
  866. bl .ste_allocate /* try to insert stab entry */
  867. cmpdi r3,0
  868. bne- handle_page_fault
  869. b fast_exception_return
  870. /*
  871. * r13 points to the PACA, r9 contains the saved CR,
  872. * r11 and r12 contain the saved SRR0 and SRR1.
  873. * r9 - r13 are saved in paca->exslb.
  874. * We assume we aren't going to take any exceptions during this procedure.
  875. * We assume (DAR >> 60) == 0xc.
  876. */
  877. .align 7
  878. _GLOBAL(do_stab_bolted)
  879. stw r9,PACA_EXSLB+EX_CCR(r13) /* save CR in exc. frame */
  880. std r11,PACA_EXSLB+EX_SRR0(r13) /* save SRR0 in exc. frame */
  881. /* Hash to the primary group */
  882. ld r10,PACASTABVIRT(r13)
  883. mfspr r11,SPRN_DAR
  884. srdi r11,r11,28
  885. rldimi r10,r11,7,52 /* r10 = first ste of the group */
  886. /* Calculate VSID */
  887. /* This is a kernel address, so protovsid = ESID */
  888. ASM_VSID_SCRAMBLE(r11, r9, 256M)
  889. rldic r9,r11,12,16 /* r9 = vsid << 12 */
  890. /* Search the primary group for a free entry */
  891. 1: ld r11,0(r10) /* Test valid bit of the current ste */
  892. andi. r11,r11,0x80
  893. beq 2f
  894. addi r10,r10,16
  895. andi. r11,r10,0x70
  896. bne 1b
  897. /* Stick for only searching the primary group for now. */
  898. /* At least for now, we use a very simple random castout scheme */
  899. /* Use the TB as a random number ; OR in 1 to avoid entry 0 */
  900. mftb r11
  901. rldic r11,r11,4,57 /* r11 = (r11 << 4) & 0x70 */
  902. ori r11,r11,0x10
  903. /* r10 currently points to an ste one past the group of interest */
  904. /* make it point to the randomly selected entry */
  905. subi r10,r10,128
  906. or r10,r10,r11 /* r10 is the entry to invalidate */
  907. isync /* mark the entry invalid */
  908. ld r11,0(r10)
  909. rldicl r11,r11,56,1 /* clear the valid bit */
  910. rotldi r11,r11,8
  911. std r11,0(r10)
  912. sync
  913. clrrdi r11,r11,28 /* Get the esid part of the ste */
  914. slbie r11
  915. 2: std r9,8(r10) /* Store the vsid part of the ste */
  916. eieio
  917. mfspr r11,SPRN_DAR /* Get the new esid */
  918. clrrdi r11,r11,28 /* Permits a full 32b of ESID */
  919. ori r11,r11,0x90 /* Turn on valid and kp */
  920. std r11,0(r10) /* Put new entry back into the stab */
  921. sync
  922. /* All done -- return from exception. */
  923. lwz r9,PACA_EXSLB+EX_CCR(r13) /* get saved CR */
  924. ld r11,PACA_EXSLB+EX_SRR0(r13) /* get saved SRR0 */
  925. andi. r10,r12,MSR_RI
  926. beq- unrecov_slb
  927. mtcrf 0x80,r9 /* restore CR */
  928. mfmsr r10
  929. clrrdi r10,r10,2
  930. mtmsrd r10,1
  931. mtspr SPRN_SRR0,r11
  932. mtspr SPRN_SRR1,r12
  933. ld r9,PACA_EXSLB+EX_R9(r13)
  934. ld r10,PACA_EXSLB+EX_R10(r13)
  935. ld r11,PACA_EXSLB+EX_R11(r13)
  936. ld r12,PACA_EXSLB+EX_R12(r13)
  937. ld r13,PACA_EXSLB+EX_R13(r13)
  938. rfid
  939. b . /* prevent speculative execution */
  940. #if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV)
  941. /*
  942. * Data area reserved for FWNMI option.
  943. * This address (0x7000) is fixed by the RPA.
  944. */
  945. .= 0x7000
  946. .globl fwnmi_data_area
  947. fwnmi_data_area:
  948. /* pseries and powernv need to keep the whole page from
  949. * 0x7000 to 0x8000 free for use by the firmware
  950. */
  951. . = 0x8000
  952. #endif /* defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV) */
  953. /* Space for CPU0's segment table */
  954. .balign 4096
  955. .globl initial_stab
  956. initial_stab:
  957. .space 4096
  958. #ifdef CONFIG_PPC_POWERNV
  959. _GLOBAL(opal_mc_secondary_handler)
  960. HMT_MEDIUM
  961. SET_SCRATCH0(r13)
  962. GET_PACA(r13)
  963. clrldi r3,r3,2
  964. tovirt(r3,r3)
  965. std r3,PACA_OPAL_MC_EVT(r13)
  966. ld r13,OPAL_MC_SRR0(r3)
  967. mtspr SPRN_SRR0,r13
  968. ld r13,OPAL_MC_SRR1(r3)
  969. mtspr SPRN_SRR1,r13
  970. ld r3,OPAL_MC_GPR3(r3)
  971. GET_SCRATCH0(r13)
  972. b machine_check_pSeries
  973. #endif /* CONFIG_PPC_POWERNV */