Parcourir la source

[POWERPC] spufs: Call spu_acquire_saved() before calculating the SPU note sizes

It makes sense to stop the SPU processes as soon as possible.  Also if we
dont acquire_saved() I think there's a possibility that the value in
csa.priv2.spu_lslr_RW won't be accurate.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Michael Ellerman il y a 17 ans
Parent
commit
9a5080f11d
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      arch/powerpc/platforms/cell/spufs/coredump.c

+ 2 - 0
arch/powerpc/platforms/cell/spufs/coredump.c

@@ -135,7 +135,9 @@ static int spufs_arch_notes_size(void)
 
 	fd = 0;
 	while ((ctx = coredump_next_context(&fd)) != NULL) {
+		spu_acquire_saved(ctx);
 		rc = spufs_ctx_note_size(ctx, fd);
+		spu_release_saved(ctx);
 		if (rc < 0)
 			break;