]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[POWERPC] spufs: Correctly calculate the size of the local-store to dump
authorMichael Ellerman <michael@ellerman.id.au>
Wed, 19 Sep 2007 04:38:12 +0000 (14:38 +1000)
committerPaul Mackerras <paulus@samba.org>
Wed, 19 Sep 2007 05:12:18 +0000 (15:12 +1000)
The routine to dump the local store, __spufs_mem_read(), does not take the
spu_lslr_RW value into account - so we shouldn't check it when we're
calculating the size either.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/cell/spufs/coredump.c

index c65b7178e77b741f65be0ecb5603c5db51050842..52d62193fd8390e108f9f90ccf37826827da75da 100644 (file)
@@ -66,11 +66,6 @@ static int spufs_dump_seek(struct file *file, loff_t off)
        return 1;
 }
 
-static u64 ctx_ls_size(struct spu_context *ctx)
-{
-       return ctx->csa.priv2.spu_lslr_RW + 1;
-}
-
 static int spufs_ctx_note_size(struct spu_context *ctx, int dfd)
 {
        int i, sz, total = 0;
@@ -85,10 +80,7 @@ static int spufs_ctx_note_size(struct spu_context *ctx, int dfd)
 
                total += sizeof(struct elf_note);
                total += roundup(strlen(fullname) + 1, 4);
-               if (!strcmp(name, "mem"))
-                       total += roundup(ctx_ls_size(ctx), 4);
-               else
-                       total += roundup(sz, 4);
+               total += roundup(sz, 4);
        }
 
        return total;
@@ -164,11 +156,7 @@ static void spufs_arch_write_note(struct spu_context *ctx, int i,
                return;
 
        name = spufs_coredump_read[i].name;
-
-       if (!strcmp(name, "mem"))
-               sz = ctx_ls_size(ctx);
-       else
-               sz = spufs_coredump_read[i].size;
+       sz = spufs_coredump_read[i].size;
 
        sprintf(fullname, "SPU/%d/%s", dfd, name);
        en.n_namesz = strlen(fullname) + 1;