aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/ppc64/kernel/head.S10
-rw-r--r--include/asm-ppc64/processor.h9
2 files changed, 19 insertions, 0 deletions
diff --git a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S
index 675c2708588f..93ebcac0d5a2 100644
--- a/arch/ppc64/kernel/head.S
+++ b/arch/ppc64/kernel/head.S
@@ -308,6 +308,7 @@ exception_marker:
308label##_pSeries: \ 308label##_pSeries: \
309 HMT_MEDIUM; \ 309 HMT_MEDIUM; \
310 mtspr SPRG1,r13; /* save r13 */ \ 310 mtspr SPRG1,r13; /* save r13 */ \
311 RUNLATCH_ON(r13); \
311 EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label##_common) 312 EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label##_common)
312 313
313#define STD_EXCEPTION_ISERIES(n, label, area) \ 314#define STD_EXCEPTION_ISERIES(n, label, area) \
@@ -315,6 +316,7 @@ label##_pSeries: \
315label##_iSeries: \ 316label##_iSeries: \
316 HMT_MEDIUM; \ 317 HMT_MEDIUM; \
317 mtspr SPRG1,r13; /* save r13 */ \ 318 mtspr SPRG1,r13; /* save r13 */ \
319 RUNLATCH_ON(r13); \
318 EXCEPTION_PROLOG_ISERIES_1(area); \ 320 EXCEPTION_PROLOG_ISERIES_1(area); \
319 EXCEPTION_PROLOG_ISERIES_2; \ 321 EXCEPTION_PROLOG_ISERIES_2; \
320 b label##_common 322 b label##_common
@@ -324,6 +326,7 @@ label##_iSeries: \
324label##_iSeries: \ 326label##_iSeries: \
325 HMT_MEDIUM; \ 327 HMT_MEDIUM; \
326 mtspr SPRG1,r13; /* save r13 */ \ 328 mtspr SPRG1,r13; /* save r13 */ \
329 RUNLATCH_ON(r13); \
327 EXCEPTION_PROLOG_ISERIES_1(PACA_EXGEN); \ 330 EXCEPTION_PROLOG_ISERIES_1(PACA_EXGEN); \
328 lbz r10,PACAPROCENABLED(r13); \ 331 lbz r10,PACAPROCENABLED(r13); \
329 cmpwi 0,r10,0; \ 332 cmpwi 0,r10,0; \
@@ -393,6 +396,7 @@ __start_interrupts:
393_machine_check_pSeries: 396_machine_check_pSeries:
394 HMT_MEDIUM 397 HMT_MEDIUM
395 mtspr SPRG1,r13 /* save r13 */ 398 mtspr SPRG1,r13 /* save r13 */
399 RUNLATCH_ON(r13)
396 EXCEPTION_PROLOG_PSERIES(PACA_EXMC, machine_check_common) 400 EXCEPTION_PROLOG_PSERIES(PACA_EXMC, machine_check_common)
397 401
398 . = 0x300 402 . = 0x300
@@ -419,6 +423,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
419data_access_slb_pSeries: 423data_access_slb_pSeries:
420 HMT_MEDIUM 424 HMT_MEDIUM
421 mtspr SPRG1,r13 425 mtspr SPRG1,r13
426 RUNLATCH_ON(r13)
422 mfspr r13,SPRG3 /* get paca address into r13 */ 427 mfspr r13,SPRG3 /* get paca address into r13 */
423 std r9,PACA_EXSLB+EX_R9(r13) /* save r9 - r12 */ 428 std r9,PACA_EXSLB+EX_R9(r13) /* save r9 - r12 */
424 std r10,PACA_EXSLB+EX_R10(r13) 429 std r10,PACA_EXSLB+EX_R10(r13)
@@ -439,6 +444,7 @@ data_access_slb_pSeries:
439instruction_access_slb_pSeries: 444instruction_access_slb_pSeries:
440 HMT_MEDIUM 445 HMT_MEDIUM
441 mtspr SPRG1,r13 446 mtspr SPRG1,r13
447 RUNLATCH_ON(r13)
442 mfspr r13,SPRG3 /* get paca address into r13 */ 448 mfspr r13,SPRG3 /* get paca address into r13 */
443 std r9,PACA_EXSLB+EX_R9(r13) /* save r9 - r12 */ 449 std r9,PACA_EXSLB+EX_R9(r13) /* save r9 - r12 */
444 std r10,PACA_EXSLB+EX_R10(r13) 450 std r10,PACA_EXSLB+EX_R10(r13)
@@ -464,6 +470,7 @@ instruction_access_slb_pSeries:
464 .globl system_call_pSeries 470 .globl system_call_pSeries
465system_call_pSeries: 471system_call_pSeries:
466 HMT_MEDIUM 472 HMT_MEDIUM
473 RUNLATCH_ON(r9)
467 mr r9,r13 474 mr r9,r13
468 mfmsr r10 475 mfmsr r10
469 mfspr r13,SPRG3 476 mfspr r13,SPRG3
@@ -707,11 +714,13 @@ fwnmi_data_area:
707system_reset_fwnmi: 714system_reset_fwnmi:
708 HMT_MEDIUM 715 HMT_MEDIUM
709 mtspr SPRG1,r13 /* save r13 */ 716 mtspr SPRG1,r13 /* save r13 */
717 RUNLATCH_ON(r13)
710 EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, system_reset_common) 718 EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, system_reset_common)
711 .globl machine_check_fwnmi 719 .globl machine_check_fwnmi
712machine_check_fwnmi: 720machine_check_fwnmi:
713 HMT_MEDIUM 721 HMT_MEDIUM
714 mtspr SPRG1,r13 /* save r13 */ 722 mtspr SPRG1,r13 /* save r13 */
723 RUNLATCH_ON(r13)
715 EXCEPTION_PROLOG_PSERIES(PACA_EXMC, machine_check_common) 724 EXCEPTION_PROLOG_PSERIES(PACA_EXMC, machine_check_common)
716 725
717 /* 726 /*
@@ -848,6 +857,7 @@ unrecov_fer:
848 .align 7 857 .align 7
849 .globl data_access_common 858 .globl data_access_common
850data_access_common: 859data_access_common:
860 RUNLATCH_ON(r10) /* It wont fit in the 0x300 handler */
851 mfspr r10,DAR 861 mfspr r10,DAR
852 std r10,PACA_EXGEN+EX_DAR(r13) 862 std r10,PACA_EXGEN+EX_DAR(r13)
853 mfspr r10,DSISR 863 mfspr r10,DSISR
diff --git a/include/asm-ppc64/processor.h b/include/asm-ppc64/processor.h
index 06aa07c2c71d..352306cfb579 100644
--- a/include/asm-ppc64/processor.h
+++ b/include/asm-ppc64/processor.h
@@ -524,6 +524,15 @@ static inline void ppc64_runlatch_off(void)
524 524
525#endif /* __ASSEMBLY__ */ 525#endif /* __ASSEMBLY__ */
526 526
527#ifdef __KERNEL__
528#define RUNLATCH_ON(REG) \
529BEGIN_FTR_SECTION \
530 mfspr (REG),SPRN_CTRLF; \
531 ori (REG),(REG),CTRL_RUNLATCH; \
532 mtspr SPRN_CTRLT,(REG); \
533END_FTR_SECTION_IFSET(CPU_FTR_CTRL)
534#endif
535
527/* 536/*
528 * Number of entries in the SLB. If this ever changes we should handle 537 * Number of entries in the SLB. If this ever changes we should handle
529 * it with a use a cpu feature fixup. 538 * it with a use a cpu feature fixup.