Patchwork [2/3] powerpc/spufs: clear purge status before setting up isolated mode

login
register
mail settings
Submitter Jeremy Kerr
Date Feb. 17, 2009, 12:44 a.m.
Message ID <1234831454.359466.897667422107.2.gpush@pingu>
Download mbox | patch
Permalink /patch/23236/
State Accepted
Headers show

Comments

Jeremy Kerr - Feb. 17, 2009, 12:44 a.m.
Currently, we may setup the MFC for isolated mode initilaisation with
the purge still active. This means that DMAs required to perform the
init do not happen.

This change clears the purge status after doing the purge, so that
the isolated init can proceed.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>

---
 arch/powerpc/platforms/cell/spufs/run.c |    3 +++
 1 file changed, 3 insertions(+)
Arnd Bergmann - Feb. 19, 2009, 3:48 p.m.
On Tuesday 17 February 2009, Jeremy Kerr wrote:
> Currently, we may setup the MFC for isolated mode initilaisation with
> the purge still active. This means that DMAs required to perform the
> init do not happen.
> 
> This change clears the purge status after doing the purge, so that
> the isolated init can proceed.
> 
> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
> 

Acked-by: Arnd Bergmann <arnd@arndb.de>

Patch

diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c
index c58bd36..4ddf769 100644
--- a/arch/powerpc/platforms/cell/spufs/run.c
+++ b/arch/powerpc/platforms/cell/spufs/run.c
@@ -117,6 +117,9 @@  static int spu_setup_isolated(struct spu_context *ctx)
 		cond_resched();
 	}
 
+	/* clear purge status */
+	out_be64(mfc_cntl, 0);
+
 	/* put the SPE in kernel mode to allow access to the loader */
 	sr1 = spu_mfc_sr1_get(ctx->spu);
 	sr1 &= ~MFC_STATE1_PROBLEM_STATE_MASK;