lkml.org 
[lkml]   [2018]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RESEND][PATCH] powerpc/powernv : Save/Restore SPRG3 on entry/exit from stop.
From
Date

> DEFINE(PPC_DBELL_SERVER, PPC_DBELL_SERVER);
> diff --git a/arch/powerpc/kernel/idle_book3s.S
> b/arch/powerpc/kernel/idle_book3s.S
> index d85d551..5069d42 100644
> --- a/arch/powerpc/kernel/idle_book3s.S
> +++ b/arch/powerpc/kernel/idle_book3s.S
> @@ -120,6 +120,9 @@ power9_save_additional_sprs:
> mfspr r4, SPRN_MMCR2
> std r3, STOP_MMCR1(r13)
> std r4, STOP_MMCR2(r13)
> +
> + mfspr r3, SPRN_SPRG3
> + std r3, STOP_SPRG3(r13)

We don't need to save it. Just restore it from paca->sprg_vdso which should
never change.

How can we do better at catching these missing SPRGs?

We missed this one and looking at c1b25a17d249 we missed the AMOR a couple of
months back. I'd rather we had some systematic way of finding the ones we are
missing, rather than playing wake-a-mole.

Mikey

> blr
>
> power9_restore_additional_sprs:
> @@ -144,7 +147,9 @@ power9_restore_additional_sprs:
> mtspr SPRN_MMCR1, r4
>
> ld r3, STOP_MMCR2(r13)
> + ld r4, STOP_SPRG3(r13)
> mtspr SPRN_MMCR2, r3
> + mtspr SPRN_SPRG3, r4
> blr
>
> /*

\
 
 \ /
  Last update: 2018-07-18 01:25    [W:0.559 / U:0.816 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site