From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] arm64: fpsimd: avoid restoring fpcr if the contents haven't changed
Date: Mon, 30 Jun 2014 10:03:18 +0100 [thread overview]
Message-ID: <20140630090318.GB24879@arm.com> (raw)
In-Reply-To: <CAKv+Gu_-nPg5eGj1MHXui=2QkDPGFgjh=4dZhODj984KCGqGEA@mail.gmail.com>
On Fri, Jun 27, 2014 at 06:33:58PM +0100, Ard Biesheuvel wrote:
> On 27 June 2014 17:53, Will Deacon <will.deacon@arm.com> wrote:
> > Writing to the FPCR is commonly implemented as a self-synchronising
> > operation in the CPU, so avoid writing to the register when the saved
> > value matches that in the hardware already.
[...]
> > .macro fpsimd_restore_partial state, tmpnr1, tmpnr2
> > ldp w\tmpnr1, w\tmpnr2, [\state]
> > msr fpsr, x\tmpnr1
> > - msr fpcr, x\tmpnr2
> > + fpsimd_restore_fpcr x\tmpnr1, x\tmpnr2
>
> Ehm, isn't this the wrong way around?
Yup, well spotted. I'll give the crypto selftests a run to test this path
with the fix (I was just running paranoia in userspace before).
Will
next prev parent reply other threads:[~2014-06-30 9:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-27 15:53 [PATCH v2] arm64: fpsimd: avoid restoring fpcr if the contents haven't changed Will Deacon
2014-06-27 17:33 ` Ard Biesheuvel
2014-06-30 9:03 ` Will Deacon [this message]
2014-06-30 10:26 ` Ard Biesheuvel
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=20140630090318.GB24879@arm.com \
--to=will.deacon@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.