From: Scott Wood <scottwood@freescale.com>
To: Markus Stockhausen <stockhausen@collogia.de>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: How to make use of SPE instructions?
Date: Thu, 15 Jan 2015 16:56:10 -0600 [thread overview]
Message-ID: <1421362570.4961.163.camel@freescale.com> (raw)
In-Reply-To: <12EF8D94C6F8734FB2FF37B9FBEDD1735F90DD25@EXCHANGE.collogia.de>
On Thu, 2015-01-08 at 09:58 +0000, Markus Stockhausen wrote:
> Hello,
>
> I developed a SHA224/256 kernel crypto module with SPE instructions.
> The result looks quite promising (~ +50% speedup). Nevertheless the
> flooding of kernel messages "SPE used in kernel" makes me feel
> uncomfortable.
>
> My findings so far:
>
> - I can configure the kernel with "SPE support".
> - arch/powerpc/kernel/head_fsl_booke.S suggests that the message is
> triggerd unconditionally whenwever we make use of SPE in kernel.
> - There exists a function enable_kernel_spe() but I don't know how
> this could help me in my work.
>
> I guess I need some kind of "brackets" around my coding to make sure
> the upper 32 bit of the registers are stored correctly during task switch.
> Or is the use of SPE instructions inside the kernel totally forbidden? Any
> expert with some helpful advise?
You need to disable preemption, call enable_kernel_spe(), and finish
using SPE before you enable preemption. This assumes that SPE is never
used from interrupt context. Be careful to not disable preemption for
too long.
-Scott
next prev parent reply other threads:[~2015-01-15 22:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-08 9:58 How to make use of SPE instructions? Markus Stockhausen
2015-01-15 22:38 ` Michael Ellerman
2015-01-15 22:56 ` Scott Wood [this message]
2015-01-16 5:27 ` AW: " Markus Stockhausen
2015-01-20 7:38 ` Scott Wood
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=1421362570.4961.163.camel@freescale.com \
--to=scottwood@freescale.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=stockhausen@collogia.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).