diff options
Diffstat (limited to 'arch/powerpc/kernel/idle_book3s.S')
-rw-r--r-- | arch/powerpc/kernel/idle_book3s.S | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/arch/powerpc/kernel/idle_book3s.S b/arch/powerpc/kernel/idle_book3s.S index e734f6e45abc..d85d5515a091 100644 --- a/arch/powerpc/kernel/idle_book3s.S +++ b/arch/powerpc/kernel/idle_book3s.S | |||
@@ -467,43 +467,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_P9_TM_XER_SO_BUG) | |||
467 | #endif | 467 | #endif |
468 | 468 | ||
469 | /* | 469 | /* |
470 | * On waking up from stop 0,1,2 with ESL=1 on POWER9 DD1, | ||
471 | * HSPRG0 will be set to the HSPRG0 value of one of the | ||
472 | * threads in this core. Thus the value we have in r13 | ||
473 | * may not be this thread's paca pointer. | ||
474 | * | ||
475 | * Fortunately, the TIR remains invariant. Since this thread's | ||
476 | * paca pointer is recorded in all its sibling's paca, we can | ||
477 | * correctly recover this thread's paca pointer if we | ||
478 | * know the index of this thread in the core. | ||
479 | * | ||
480 | * This index can be obtained from the TIR. | ||
481 | * | ||
482 | * i.e, thread's position in the core = TIR. | ||
483 | * If this value is i, then this thread's paca is | ||
484 | * paca->thread_sibling_pacas[i]. | ||
485 | */ | ||
486 | power9_dd1_recover_paca: | ||
487 | mfspr r4, SPRN_TIR | ||
488 | /* | ||
489 | * Since each entry in thread_sibling_pacas is 8 bytes | ||
490 | * we need to left-shift by 3 bits. Thus r4 = i * 8 | ||
491 | */ | ||
492 | sldi r4, r4, 3 | ||
493 | /* Get &paca->thread_sibling_pacas[0] in r5 */ | ||
494 | ld r5, PACA_SIBLING_PACA_PTRS(r13) | ||
495 | /* Load paca->thread_sibling_pacas[i] into r13 */ | ||
496 | ldx r13, r4, r5 | ||
497 | SET_PACA(r13) | ||
498 | /* | ||
499 | * Indicate that we have lost NVGPR state | ||
500 | * which needs to be restored from the stack. | ||
501 | */ | ||
502 | li r3, 1 | ||
503 | stb r3,PACA_NAPSTATELOST(r13) | ||
504 | blr | ||
505 | |||
506 | /* | ||
507 | * Called from machine check handler for powersave wakeups. | 470 | * Called from machine check handler for powersave wakeups. |
508 | * Low level machine check processing has already been done. Now just | 471 | * Low level machine check processing has already been done. Now just |
509 | * go through the wake up path to get everything in order. | 472 | * go through the wake up path to get everything in order. |
@@ -537,9 +500,6 @@ pnv_powersave_wakeup: | |||
537 | ld r2, PACATOC(r13) | 500 | ld r2, PACATOC(r13) |
538 | 501 | ||
539 | BEGIN_FTR_SECTION | 502 | BEGIN_FTR_SECTION |
540 | BEGIN_FTR_SECTION_NESTED(70) | ||
541 | bl power9_dd1_recover_paca | ||
542 | END_FTR_SECTION_NESTED_IFSET(CPU_FTR_POWER9_DD1, 70) | ||
543 | bl pnv_restore_hyp_resource_arch300 | 503 | bl pnv_restore_hyp_resource_arch300 |
544 | FTR_SECTION_ELSE | 504 | FTR_SECTION_ELSE |
545 | bl pnv_restore_hyp_resource_arch207 | 505 | bl pnv_restore_hyp_resource_arch207 |
@@ -602,22 +562,12 @@ END_FTR_SECTION_IFCLR(CPU_FTR_POWER9_DD2_1) | |||
602 | LOAD_REG_ADDRBASE(r5,pnv_first_deep_stop_state) | 562 | LOAD_REG_ADDRBASE(r5,pnv_first_deep_stop_state) |
603 | ld r4,ADDROFF(pnv_first_deep_stop_state)(r5) | 563 | ld r4,ADDROFF(pnv_first_deep_stop_state)(r5) |
604 | 564 | ||
605 | BEGIN_FTR_SECTION_NESTED(71) | ||
606 | /* | ||
607 | * Assume that we are waking up from the state | ||
608 | * same as the Requested Level (RL) in the PSSCR | ||
609 | * which are Bits 60-63 | ||
610 | */ | ||
611 | ld r5,PACA_REQ_PSSCR(r13) | ||
612 | rldicl r5,r5,0,60 | ||
613 | FTR_SECTION_ELSE_NESTED(71) | ||
614 | /* | 565 | /* |
615 | * 0-3 bits correspond to Power-Saving Level Status | 566 | * 0-3 bits correspond to Power-Saving Level Status |
616 | * which indicates the idle state we are waking up from | 567 | * which indicates the idle state we are waking up from |
617 | */ | 568 | */ |
618 | mfspr r5, SPRN_PSSCR | 569 | mfspr r5, SPRN_PSSCR |
619 | rldicl r5,r5,4,60 | 570 | rldicl r5,r5,4,60 |
620 | ALT_FTR_SECTION_END_NESTED_IFSET(CPU_FTR_POWER9_DD1, 71) | ||
621 | li r0, 0 /* clear requested_psscr to say we're awake */ | 571 | li r0, 0 /* clear requested_psscr to say we're awake */ |
622 | std r0, PACA_REQ_PSSCR(r13) | 572 | std r0, PACA_REQ_PSSCR(r13) |
623 | cmpd cr4,r5,r4 | 573 | cmpd cr4,r5,r4 |