public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: James Morris <jmorris@intercode.com.au>
Cc: Thomas Spatzier <TSPAT@de.ibm.com>,
	linux-kernel@vger.kernel.org,
	"David S. Miller" <davem@redhat.com>
Subject: Re: crypto API and IBM z990 hardware support
Date: Mon, 7 Jul 2003 08:09:29 +0100	[thread overview]
Message-ID: <20030707080929.A1848@infradead.org> (raw)
In-Reply-To: <Mutt.LNX.4.44.0307021913540.31308-100000@excalibur.intercode.com.au>; from jmorris@intercode.com.au on Wed, Jul 02, 2003 at 07:35:16PM +1000

On Wed, Jul 02, 2003 at 07:35:16PM +1000, James Morris wrote:
> The plan is to provide crypto/arch/ subdirectories where arch optimized 
> versions of the crypto algorithms are implemented, and built automatically 
> (via configuration defaults) instead of the generic C versions.
> 
> So, there might be:
> 
> crypto/aes.c
> crypto/arch/i386/aes.s

crypto/arch/ sounds like a bad idea.  We really should avoid arch code
outside arch/ and include/asm*.  So arch/<foo>/crypto/ as suggested by
Thomas is much better.

> where on i386, aes.s would be built into aes.o and aes.c would not be 
> built.

That's a really bad idea.  Think of a i586/i686 optimized assembler
implementaion e.g. using MMX or SSE or whatever.  You'll always need
the generic version as fallback.

> The simple solution for you might be something like:
> 
> crypto/aes.c -> aes.o
> crypto/arch/s390/aes_z990.c -> aes_z990.o
> 
> and the administrator of the system could configure modprobe.conf to alias 
> aes to aes_z990 if the latter is supported in hardware.

Right.  And IMHO this should happen with all optimized version - putting
policy in the kernel to select them sounds like a bad idea, especially
as it could get rather complicated when it involves multiple optimized
and / or hardware implementations.


  reply	other threads:[~2003-07-07  6:55 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-02  7:07 crypto API and IBM z990 hardware support Thomas Spatzier
2003-07-02  9:35 ` James Morris
2003-07-07  7:09   ` Christoph Hellwig [this message]
2003-07-08  2:53     ` David S. Miller
2003-07-08  3:37       ` Roland Dreier
2003-07-08  3:35         ` David S. Miller
2003-07-10  1:08       ` Werner Almesberger
2003-07-10  1:08         ` David S. Miller
2003-07-10  2:06           ` Werner Almesberger
2003-07-10  2:06             ` David S. Miller
2003-07-10  2:37               ` Werner Almesberger
2003-07-11  0:02                 ` David S. Miller
     [not found]       ` <mailman.1057799700.15422.linux-kernel2news@redhat.com>
2003-07-10  5:55         ` Pete Zaitcev
  -- strict thread matches above, loose matches on Subject: below --
2003-07-02 12:35 Thomas Spatzier
2003-07-02 16:57 ` James Morris
2003-07-07  7:11   ` Christoph Hellwig
2003-07-07 10:27     ` James Morris
2003-07-02 20:23 Ulrich Weigand
     [not found] <4P45.5YN.11@gated-at.bofh.it>
     [not found] ` <4T81.24d.41@gated-at.bofh.it>
2003-07-02 22:06   ` Arnd Bergmann
2003-07-06 14:08     ` James Morris
2003-07-06 17:46       ` Arnd Bergmann
2003-07-07  7:14       ` Christoph Hellwig

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=20030707080929.A1848@infradead.org \
    --to=hch@infradead.org \
    --cc=TSPAT@de.ibm.com \
    --cc=davem@redhat.com \
    --cc=jmorris@intercode.com.au \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox