aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2007-09-19 00:38:12 -0400
committerPaul Mackerras <paulus@samba.org>2007-09-19 01:12:17 -0400
commit4fca9c425009c01d41db6c6ebf0189843ee90f0b (patch)
treebe198526d9bda3b39ece8a6e8e70cc08120b5569 /arch/powerpc/platforms/cell
parent9a5080f11d67972d7972d824f1b1827fafbce126 (diff)
[POWERPC] spufs: Use computed sizes/#defines rather than literals in SPU coredump code
The spufs_coredump_reader array contains the size of the data that will be returned by the read routine. Currently these are specified as literals, and though some are obvious, sizeof(u32) == 4, others are not, 69 * 8 == ??? Instead, use sizeof() whatever type is returned by each routine, or in the case of spufs_mem_read() the #define LS_SIZE. 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>
Diffstat (limited to 'arch/powerpc/platforms/cell')
-rw-r--r--arch/powerpc/platforms/cell/spufs/file.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
index a4a8770623d4..18ddde8ba197 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -2231,23 +2231,24 @@ struct tree_descr spufs_dir_nosched_contents[] = {
2231}; 2231};
2232 2232
2233struct spufs_coredump_reader spufs_coredump_read[] = { 2233struct spufs_coredump_reader spufs_coredump_read[] = {
2234 { "regs", __spufs_regs_read, NULL, 128 * 16 }, 2234 { "regs", __spufs_regs_read, NULL, sizeof(struct spu_reg128[128])},
2235 { "fpcr", __spufs_fpcr_read, NULL, 16 }, 2235 { "fpcr", __spufs_fpcr_read, NULL, sizeof(struct spu_reg128) },
2236 { "lslr", NULL, __spufs_lslr_get, 11 }, 2236 { "lslr", NULL, __spufs_lslr_get, 11 },
2237 { "decr", NULL, __spufs_decr_get, 11 }, 2237 { "decr", NULL, __spufs_decr_get, 11 },
2238 { "decr_status", NULL, __spufs_decr_status_get, 11 }, 2238 { "decr_status", NULL, __spufs_decr_status_get, 11 },
2239 { "mem", __spufs_mem_read, NULL, 256 * 1024, }, 2239 { "mem", __spufs_mem_read, NULL, LS_SIZE, },
2240 { "signal1", __spufs_signal1_read, NULL, 4 }, 2240 { "signal1", __spufs_signal1_read, NULL, sizeof(u32) },
2241 { "signal1_type", NULL, __spufs_signal1_type_get, 2 }, 2241 { "signal1_type", NULL, __spufs_signal1_type_get, 2 },
2242 { "signal2", __spufs_signal2_read, NULL, 4 }, 2242 { "signal2", __spufs_signal2_read, NULL, sizeof(u32) },
2243 { "signal2_type", NULL, __spufs_signal2_type_get, 2 }, 2243 { "signal2_type", NULL, __spufs_signal2_type_get, 2 },
2244 { "event_mask", NULL, __spufs_event_mask_get, 8 }, 2244 { "event_mask", NULL, __spufs_event_mask_get, 8 },
2245 { "event_status", NULL, __spufs_event_status_get, 8 }, 2245 { "event_status", NULL, __spufs_event_status_get, 8 },
2246 { "mbox_info", __spufs_mbox_info_read, NULL, 4 }, 2246 { "mbox_info", __spufs_mbox_info_read, NULL, sizeof(u32) },
2247 { "ibox_info", __spufs_ibox_info_read, NULL, 4 }, 2247 { "ibox_info", __spufs_ibox_info_read, NULL, sizeof(u32) },
2248 { "wbox_info", __spufs_wbox_info_read, NULL, 16 }, 2248 { "wbox_info", __spufs_wbox_info_read, NULL, 4 * sizeof(u32)},
2249 { "dma_info", __spufs_dma_info_read, NULL, 69 * 8 }, 2249 { "dma_info", __spufs_dma_info_read, NULL, sizeof(struct spu_dma_info)},
2250 { "proxydma_info", __spufs_proxydma_info_read, NULL, 35 * 8 }, 2250 { "proxydma_info", __spufs_proxydma_info_read,
2251 NULL, sizeof(struct spu_proxydma_info)},
2251 { "object-id", NULL, __spufs_object_id_get, 19 }, 2252 { "object-id", NULL, __spufs_object_id_get, 19 },
2252 { }, 2253 { },
2253}; 2254};