[Cbe-oss-dev] [RFC] spufs: use master control bit in spu_run
Arnd Bergmann
arnd at arndb.de
Tue Nov 7 09:44:37 EST 2006
On Monday 06 November 2006 23:19, Kanna Shimizu wrote:
> The EXIT bit in the status register is not sticky. It is only set while
> the SPU is going through the EXIT steps (i.e. the hardware erases
> all of LS and the register file, and then "unlocks" the LS).
Ok, too bad.
> An alternative is the IS bit (the isolated bit) which tells you
> whether the SPU is isolated or not.
That sounds better. We could maybe just check the IS bit in
spu_run and unconditionally load the secure kernel if it's
not set but the context was created with SPU_CREATE_ISOLATE
set.
> It is still not clear to me how your change bubbles up to the user.
> It seems you're making assumption on the state of the SPU
> based on whether the application has completed or asked for a
> second app to be brought in....?
The assumption I'm making is that when an isolated thread has
exited, the user (libspe) will do exactly one of two things:
- call spu_run again, which will result in recycling the context
by reloading the secure kernel, or
- close the file descriptor, which will destroy the context
finally, and free the SPU for other purposes.
AFAICS, the user doesn't have other options anyway, so this
should be safe. The change to the previous behavior is that
it is no longer possible to recycle an SPU while an application
is still running code or blocking on a channel. Is there
a use case where that would make sense?
Arnd <><
More information about the cbe-oss-dev
mailing list