From: Jeremy Kerr Date: Thu, 27 Mar 2008 03:59:58 +0000 (+1100) Subject: [POWERPC] spufs: save MFC command channel before purging MFC queue X-Git-Tag: firefly_0821_release~21602^2~17^2~1 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=36d29edb6dded938bf07f741a0bb0f2a7116e617;p=firefly-linux-kernel-4.4.55.git [POWERPC] spufs: save MFC command channel before purging MFC queue During the context save process, we currently save the MFC command channel after purging the MFC queues. This causes a systemsim warning, as the command channel may be in an unknown state after the purge. This change does the save before purging the MFC queues. Signed-off-by: Jeremy Kerr --- diff --git a/arch/powerpc/platforms/cell/spufs/switch.c b/arch/powerpc/platforms/cell/spufs/switch.c index e9dc7a55d1b9..d2a1249d36dd 100644 --- a/arch/powerpc/platforms/cell/spufs/switch.c +++ b/arch/powerpc/platforms/cell/spufs/switch.c @@ -1815,6 +1815,7 @@ static void save_csa(struct spu_state *prev, struct spu *spu) save_mfc_csr_ato(prev, spu); /* Step 24. */ save_mfc_tclass_id(prev, spu); /* Step 25. */ set_mfc_tclass_id(prev, spu); /* Step 26. */ + save_mfc_cmd(prev, spu); /* Step 26a - moved from 44. */ purge_mfc_queue(prev, spu); /* Step 27. */ wait_purge_complete(prev, spu); /* Step 28. */ setup_mfc_sr1(prev, spu); /* Step 30. */ @@ -1831,7 +1832,6 @@ static void save_csa(struct spu_state *prev, struct spu *spu) save_ppuint_mb(prev, spu); /* Step 41. */ save_ch_part1(prev, spu); /* Step 42. */ save_spu_mb(prev, spu); /* Step 43. */ - save_mfc_cmd(prev, spu); /* Step 44. */ reset_ch(prev, spu); /* Step 45. */ }