Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[CELL] spufs: remove needless context save/restore code

The following steps are not needed in the SPE context save/restore
paths:

Save Step 12: save_mfc_decr()
save suspend_time to CSA (It will be done by step 14)
save ch 7 (decrementer value will be saved in LSCSA by spe-side step 10)

Restore Step 59: restore_ch_part1()
restore ch 1 (it will be done by spe-side step 15)

This change removes the unnecessary steps.

Signed-off-by: Masato Noguchi <Masato.Noguchi@jp.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>

authored by

Masato Noguchi and committed by
Arnd Bergmann
cfd529b2 daced0f7

+1 -11
+1 -11
arch/powerpc/platforms/cell/spufs/switch.c
··· 253 253 */ 254 254 if (in_be64(&priv2->mfc_control_RW) & MFC_CNTL_DECREMENTER_RUNNING) { 255 255 csa->priv2.mfc_control_RW |= MFC_CNTL_DECREMENTER_RUNNING; 256 - csa->suspend_time = get_cycles(); 257 - out_be64(&priv2->spu_chnlcntptr_RW, 7ULL); 258 - eieio(); 259 - csa->spu_chnldata_RW[7] = in_be64(&priv2->spu_chnldata_RW); 260 - eieio(); 261 256 } else { 262 257 csa->priv2.mfc_control_RW &= ~MFC_CNTL_DECREMENTER_RUNNING; 263 258 } ··· 1562 1567 int i; 1563 1568 1564 1569 /* Restore, Step 59: 1570 + * Restore the following CH: [0,3,4,24,25,27] 1565 1571 */ 1566 - 1567 - /* Restore CH 1 without count */ 1568 - out_be64(&priv2->spu_chnlcntptr_RW, 1); 1569 - out_be64(&priv2->spu_chnldata_RW, csa->spu_chnldata_RW[1]); 1570 - 1571 - /* Restore the following CH: [0,3,4,24,25,27] */ 1572 1572 for (i = 0; i < ARRAY_SIZE(ch_indices); i++) { 1573 1573 idx = ch_indices[i]; 1574 1574 out_be64(&priv2->spu_chnlcntptr_RW, idx);