[Cbe-oss-dev] [RFC] Reading Local Store base address from SPU using stop-and-signal with kernel support

Patrick Mansfield patmans at us.ibm.com
Thu May 31 08:52:41 EST 2007


On Wed, May 30, 2007 at 11:32:48PM +0200, Arnd Bergmann wrote:
> On Wednesday 30 May 2007, Patrick Mansfield wrote:
> 
> > Is the EA of the LS (as seen by the kernel) for a given SPU context
> > dynamic? If a context is not running it looks like the EA (result of the
> > ->get_ls() call) can change.
> > 
> > So the SPU can't have a static LS EA that can be used inside the kernel?
> > 
> > And so we can't use raw SPU syscalls (in the kernel, like via
> > spu_callbacks.c) that point to anywhere in LS? Like for open(path, flag)
> > on the SPU path would normally just be an LS address, but we need to add
> > some constant (over the life of the SPU context) LS EA base address so
> > the kernel can reference it.
> 
> You are mixing up several points here, let me try to explain:

Ok, I get it now :)

Per irc discussion:

For the SPU syscalls, you just have to add an LS base offset as seen from
*user space*, just like we do in libspe. That is also needed in Cédric's
SPU syscall code, and I assume the rational for his patch. 

Then the kernel just does its normal copy from user space, the same as it
might for syscalls done via libspe with the 0x2101 stop-and-signal.

-- Patrick Mansfield



More information about the cbe-oss-dev mailing list