linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* AltiVec in the kernel
@ 2006-07-18 12:48 Matt Sealey
  2006-07-18 13:53 ` Kumar Gala
  2006-07-18 17:43 ` Paul Mackerras
  0 siblings, 2 replies; 31+ messages in thread
From: Matt Sealey @ 2006-07-18 12:48 UTC (permalink / raw)
  To: linuxppc-dev


Once upon a time we were all told this wouldn't work for some reason,
but a lot of documentation now hints that it does actually work and
for instance there is a RAID5/6 driver (for G5) which uses AltiVec
in a kernel context.

But I didn't find any definitive documentation on how one goes about
it. The largest clue I found was in Documentation/cpu_features.txt:

	#ifdef CONFIG_ALTIVEC
	BEGIN_FTR_SECTION
		mfspr	r22,SPRN_VRSAVE		/* if G4, save vrsave register value */
		stw	r22,THREAD_VRSAVE(r23)
	END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
	#endif /* CONFIG_ALTIVEC */

So we can use AltiVec by implementing this kind of wrapper around
kernel functions which may use AltiVec?

In the code above is there ANY significance of r22 and r23 other
than that they are fairly high up and probably marked as "will
be trashed" by all the relevant ABIs and so?

Just curious, as I would like to investigate writing some docs at
least on this (in article fashion) to go with PPCZone, Libfreevec
and so on. I think there is a problem here in that simply developers
who may be interested in doing this kind of optimized code do not
know where to start (and we are thinking from a point of view of
also teaching sessions too, like we did at FTF Frankfurt 2004, so
after we teach them what AltiVec is etc. we demonstrate application
AND kernel functionality and the quirks associated with it).

-- 
Matt Sealey <matt@genesi-usa.com>
Manager, Genesi, Developer Relations

^ permalink raw reply	[flat|nested] 31+ messages in thread
* AltiVec in the kernel
@ 2009-12-11 11:45 Simon Richter
  2009-12-11 15:49 ` Arnd Bergmann
  0 siblings, 1 reply; 31+ messages in thread
From: Simon Richter @ 2009-12-11 11:45 UTC (permalink / raw)
  To: linuxppc-dev

Hi,

since there has been a thread on allowing the use of a coprocessor in
the kernel already: I am wondering if it'd make sense to use AltiVec for
AES in dm-crypt, and how difficult it would be to implement that.

I'm using a PegasosII which has a G4 running at 1 GHz; I get around 3
MB/s throughput when accessing harddisks. I think that could be
improved.

If I understand correctly, the actual encryption work runs in a kernel
thread, which is scheduled normally, so it ought to be possible to
enable AltiVec for that thread; am I missing something here?

   Simon

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2009-12-16 22:28 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-18 12:48 AltiVec in the kernel Matt Sealey
2006-07-18 13:53 ` Kumar Gala
2006-07-18 15:10   ` Matt Sealey
2006-07-18 17:56     ` Paul Mackerras
2006-07-19 18:10       ` Linas Vepstas
2006-07-19 18:19         ` Paul Mackerras
2006-07-19 18:38           ` Johannes Berg
2006-07-19 18:57             ` Linas Vepstas
2006-07-20 12:31         ` Matt Sealey
2006-07-20 13:23           ` Kumar Gala
2006-07-20 13:33             ` Matt Sealey
2006-07-20 17:42           ` Linas Vepstas
2006-07-20 18:47             ` Brian D. Carlstrom
2006-07-20 19:05               ` Olof Johansson
2006-07-20 21:56                 ` Brian D. Carlstrom
2006-07-20 22:39                   ` Daniel Ostrow
2006-07-21  6:35                   ` Olof Johansson
2006-07-21 14:42                   ` Matt Sealey
2006-07-21 16:51                     ` Linas Vepstas
2006-07-21 18:08                       ` Matt Sealey
2006-07-22  3:09                         ` Segher Boessenkool
2006-07-23 13:28                           ` Matt Sealey
2006-07-23 21:37                             ` Benjamin Herrenschmidt
2006-07-21 18:46                       ` Brian D. Carlstrom
2006-07-21 21:30                       ` Hollis Blanchard
2006-07-21 22:21                   ` Peter Bergner
2006-07-18 18:39     ` Benjamin Herrenschmidt
2006-07-18 17:43 ` Paul Mackerras
  -- strict thread matches above, loose matches on Subject: below --
2009-12-11 11:45 Simon Richter
2009-12-11 15:49 ` Arnd Bergmann
2009-12-16 22:11   ` Sebastian Andrzej Siewior

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).