public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman•id.au>
To: Oliver O'Halloran <oohall@gmail•com>, linuxppc-dev@lists•ozlabs.org
Cc: Oliver O'Halloran <oohall@gmail•com>, Anton Blanchard <anton@samba•org>
Subject: Re: powerpc/process: fix altivec SPR not being saved
Date: Thu, 31 Mar 2016 10:29:45 +1100 (AEDT)	[thread overview]
Message-ID: <3qb3lF16RQz9sf6@ozlabs.org> (raw)
In-Reply-To: <1457388527-14575-1-git-send-email-oohall@gmail.com>

On Mon, 2016-07-03 at 22:08:47 UTC, Oliver O'Halloran wrote:
> In save_sprs() in process.c contains the following test:
> 
> 	if (cpu_has_feature(cpu_has_feature(CPU_FTR_ALTIVEC)))
> 		t->vrsave = mfspr(SPRN_VRSAVE);
> 
> CPU feature with the mask 0x1 is CPU_FTR_COHERENT_ICACHE so the test
> is equivilent to:
> 
> 	if (cpu_has_feature(CPU_FTR_ALTIVEC) &&
> 		cpu_has_feature(CPU_FTR_COHERENT_ICACHE))
> 
> On CPUs without support for both (i.e G5) this results in vrsave not being
> saved between context switches. The vector register save/restore code
> doesn't use VRSAVE to determine which registers to save/restore,
> but the value of VRSAVE is used to determine if altivec is being used
> in several code paths.
> 
> Signed-off-by: Oliver O'Halloran <oohall@gmail•com>
> Signed-off-by: Anton Blanchard <anton@samba•org>
> Fixes: 152d523e6307 ("powerpc: Create context switch helpers save_sprs() and restore_sprs()")
> Cc: stable@vger•kernel.org

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/01d7c2a2de47890934faba91a7

cheers

      reply	other threads:[~2016-03-30 23:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-06 22:33 [PATCH] powerpc/process: fix altivec SPR not being saved Oliver O'Halloran
2016-03-07  3:51 ` Benjamin Herrenschmidt
2016-03-07  4:19 ` Anton Blanchard
2016-03-07 22:08 ` Oliver O'Halloran
2016-03-30 23:29   ` Michael Ellerman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3qb3lF16RQz9sf6@ozlabs.org \
    --to=mpe@ellerman$(echo .)id.au \
    --cc=anton@samba$(echo .)org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=oohall@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox