[Cbe-oss-dev] Context switching while page fault handling and warning
Arnd Bergmann
arnd.bergmann at de.ibm.com
Sat Jun 17 05:39:28 EST 2006
On Wednesday 14 June 2006 02:30, HyeonSeung Jang wrote:
>
> static inline void restore_mfc_cntl(struct spu_state *csa, struct spu
> *spu)
> {
> struct spu_priv2 __iomem *priv2 = spu->priv2;
>
> /* Restore, Step 72:
> * Restore the MFC_CNTL register for the CSA.
> */
> out_be64(&priv2->mfc_control_RW, csa-
> >priv2.mfc_control_RW);
> eieio();
> }
>
> After:
>
> static inline void restore_mfc_cntl(struct spu_state *csa, struct spu
> *spu)
> {
> struct spu_priv2 __iomem *priv2 = spu->priv2;
>
> /* Restore, Step 72:
> * Restore the MFC_CNTL register for the CSA.
> */
> out_be64(&priv2->mfc_control_RW, csa-
> >priv2.mfc_control_RW);
> eieio();
> if( (csa->priv2.mfc_control_RW &
> MFC_CNTL_SUSPEND_DMA_QUEUE_MASK)) {
> out_be64(&priv2->mfc_control_RW,
> MFC_CNTL_RESTART_DMA_COMMAND);
> eieio();
> }
> }
>
> It seems to work.
>
>
>
> Now I have two questions :
>
> 1) My fix is correct ? or are there any side effects of it ?
The fix looks technically correct, but I don't think its optimal.
Instead we should better have the context save/restore code
remember whether the context was about to handle a fault
and then process that later.
I'm adding your fix to the next release for now, but mark it
as something we need to work on again later.
> 2) Why there is following warning on mambo simulator? :
> 'WARNING: 61392752237: SPE2: MFC_CMD_QUEUE channel count of 15 is
> inconsistent with number of available DMA queue entries of 16'
>
That's an unrelated but known problem we still need to debug.
Arnd <><
More information about the cbe-oss-dev
mailing list