Skip to content

Commit 250ad7a

Browse files
iamjpnmpe
authored andcommitted
powerpc/powernv/idle: Restore CIABR after idle for Power9
On Power9, CIABR is lost after idle. This means that instruction breakpoints set by xmon which use CIABR do not work. Fix this by restoring CIABR after idle. Signed-off-by: Jordan Niethe <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 4bb3219 commit 250ad7a

File tree

1 file changed

+3
-0
lines changed
  • arch/powerpc/platforms/powernv

1 file changed

+3
-0
lines changed

arch/powerpc/platforms/powernv/idle.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,7 @@ struct p9_sprs {
589589
u64 spurr;
590590
u64 dscr;
591591
u64 wort;
592+
u64 ciabr;
592593

593594
u64 mmcra;
594595
u32 mmcr0;
@@ -668,6 +669,7 @@ static unsigned long power9_idle_stop(unsigned long psscr, bool mmu_on)
668669
sprs.spurr = mfspr(SPRN_SPURR);
669670
sprs.dscr = mfspr(SPRN_DSCR);
670671
sprs.wort = mfspr(SPRN_WORT);
672+
sprs.ciabr = mfspr(SPRN_CIABR);
671673

672674
sprs.mmcra = mfspr(SPRN_MMCRA);
673675
sprs.mmcr0 = mfspr(SPRN_MMCR0);
@@ -785,6 +787,7 @@ static unsigned long power9_idle_stop(unsigned long psscr, bool mmu_on)
785787
mtspr(SPRN_SPURR, sprs.spurr);
786788
mtspr(SPRN_DSCR, sprs.dscr);
787789
mtspr(SPRN_WORT, sprs.wort);
790+
mtspr(SPRN_CIABR, sprs.ciabr);
788791

789792
mtspr(SPRN_MMCRA, sprs.mmcra);
790793
mtspr(SPRN_MMCR0, sprs.mmcr0);

0 commit comments

Comments
 (0)