[Cbe-oss-dev] [PATCH] spufs: avoid using backing operation for wbox write
Andre Detsch
adetsch at br.ibm.com
Tue Aug 7 00:16:11 EST 2007
On Sunday 05 August 2007 16:18:07 Arnd Bergmann wrote:
> But the SPU_WrEventAck word _is_ written at the context restore time,
> so we must have a way to give it a specific value. AFAICS, all that
> needs to be done is to change the save channel data in
> spu_state->chnldata[2] to restore the new correct value to
> SPU_WrEventAck through the channel access facility.
Channel 2 is not saved/restored. Not in the code, not in the documentation.
Section 12.5 of CBE_Handbook_v1.1_24APR2007_pub.pdf details the context switch
process, and it does not mention channel 2. For example, item 39 refers the
events channels, but does not include channel SPU_WrEventAck (channel 2)
"39. For the following channels:
• SPU_RdEventStat (channel index 0)
• SPU_WrEventMask (channel index 1)
• SPU_RdSigNotify1 (channel index 3)
• SPU_RdSigNotify2 (channel index 4)
• MFC_RdTagStat (channel index 24)
• MFC_RdListStallStat (channel index 25)
• MFC_RdAtomicStat (channel index 27)"
Latter, like on item 45, additional channels are referenced, but nothing about
channel 2.
However, saving/restoring channel 2 was my first try (hoping that the
documentation could be incomplete). Attached is a patch with such a try. The
results are the same for the simulator and blade, but on simulator, we can
observe the channel values more easily. The test case I have hangs after the
following messages from the kernel:
Saving Channel 2 0x4D0 (spu=7)
Saving Channel 2 0x4D0 (spu=6)
Setting Channel 2 to 0x4C0 (spu=7)
Setting Channel 2 to 0x4C0 (spu=6)
Looking at the channels debug window, both SPU 6 and 7 still have Channel 2 ==
0x4D0 (although I'm explicitly trying to write 0x4C0, which correspond to the
same mask, only without the MB event bit unset). I've also tried a different
write order (writting channel 2 at the end of the function, after the other
channels), and also, forcing SPU_WrEventMask (channel 1) to have a non-zero
value, but nothing has helped.
PS: like channel 1, channel 2 does not have an associated count. Simulator
even complains if one tries to write on channel 2 count (e.g., "WARNING:
92790504834: SPE7: Attempt to write channel count for CH 2 with no associated
count is ignored").
--
Andre Detsch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spu_backing_wbox_write-fix-try.diff
Type: text/x-diff
Size: 2369 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/cbe-oss-dev/attachments/20070806/57da1b22/attachment.diff>
More information about the cbe-oss-dev
mailing list