[PATCH v3 4/7] powerpc/dt_cpu_ftrs: Set current thread fscr bits
Christophe Leroy
christophe.leroy at csgroup.eu
Wed Mar 9 19:25:32 AEDT 2022
Hi,
Le 21/05/2020 à 03:43, Alistair Popple a écrit :
> Setting the FSCR bit directly in the SPR only sets it during the initial
> boot and early init of the kernel but not for the init process or any
> subsequent kthreads. This is because the thread_struct for those is
> copied from the current thread_struct setup at boot which doesn't
> reflect any changes made to the FSCR during cpu feature detection. This
> patch ensures the current thread state is updated to match once feature
> detection is complete.
>
> Signed-off-by: Alistair Popple <alistair at popple.id.au>
I see that the series has been merged but this patch was left over.
Has it been forgotten or is it rejected ?
Thanks
Christophe
> ---
> arch/powerpc/kernel/dt_cpu_ftrs.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/powerpc/kernel/dt_cpu_ftrs.c b/arch/powerpc/kernel/dt_cpu_ftrs.c
> index b5e21264d168..677190f70cac 100644
> --- a/arch/powerpc/kernel/dt_cpu_ftrs.c
> +++ b/arch/powerpc/kernel/dt_cpu_ftrs.c
> @@ -170,6 +170,7 @@ static int __init feat_try_enable_unknown(struct dt_cpu_feature *f)
> u64 fscr = mfspr(SPRN_FSCR);
> fscr |= 1UL << f->fscr_bit_nr;
> mtspr(SPRN_FSCR, fscr);
> + current->thread.fscr |= 1UL << f->fscr_bit_nr;
> } else {
> /* Does not have a known recipe */
> return 0;
> @@ -205,6 +206,7 @@ static int __init feat_enable(struct dt_cpu_feature *f)
> u64 fscr = mfspr(SPRN_FSCR);
> fscr |= 1UL << f->fscr_bit_nr;
> mtspr(SPRN_FSCR, fscr);
> + current->thread.fscr |= 1UL << f->fscr_bit_nr;
> }
> }
>
More information about the Linuxppc-dev
mailing list