aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDwayne Grant McConnell <decimal@us.ibm.com>2006-11-20 12:44:57 -0500
committerPaul Mackerras <paulus@samba.org>2006-12-04 04:39:44 -0500
commit9b5047e249f429722d0adc54cb5ef051bd3d685c (patch)
treee3c25427460f4f1e4898f07ed88eec3da80d01c7
parent8dc86ab954d28513f75918d743c40cddbff7388a (diff)
[POWERPC] spufs: Change %llx to 0x%llx.
This patches changes /npc, /decr, /decr_status, /spu_tag_mask, /event_mask, /event_status, and /srr0 files to provide output according to the format string "0x%llx" instead of "%llx". Before this patch some files used "0x%llx" and other used "%llx" which is inconsistent and potentially confusing. A user might assume "%llx" numbers were decimal if they happened to not contain any a-f digits. This change will break any code cannot tolerate a leading 0x in the file contents. The only known users of these files are the libspe but there might also be some scripts which access these files. This risk is deemed acceptable for future consistency. Signed-off-by: Dwayne Grant McConnell <decimal@us.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/powerpc/platforms/cell/spufs/file.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
index 0ea2361865a2..7f1262706671 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -1391,7 +1391,8 @@ static u64 spufs_npc_get(void *data)
1391 spu_release(ctx); 1391 spu_release(ctx);
1392 return ret; 1392 return ret;
1393} 1393}
1394DEFINE_SIMPLE_ATTRIBUTE(spufs_npc_ops, spufs_npc_get, spufs_npc_set, "%llx\n") 1394DEFINE_SIMPLE_ATTRIBUTE(spufs_npc_ops, spufs_npc_get, spufs_npc_set,
1395 "0x%llx\n")
1395 1396
1396static void spufs_decr_set(void *data, u64 val) 1397static void spufs_decr_set(void *data, u64 val)
1397{ 1398{
@@ -1413,7 +1414,7 @@ static u64 spufs_decr_get(void *data)
1413 return ret; 1414 return ret;
1414} 1415}
1415DEFINE_SIMPLE_ATTRIBUTE(spufs_decr_ops, spufs_decr_get, spufs_decr_set, 1416DEFINE_SIMPLE_ATTRIBUTE(spufs_decr_ops, spufs_decr_get, spufs_decr_set,
1416 "%llx\n") 1417 "0x%llx\n")
1417 1418
1418static void spufs_decr_status_set(void *data, u64 val) 1419static void spufs_decr_status_set(void *data, u64 val)
1419{ 1420{
@@ -1435,7 +1436,7 @@ static u64 spufs_decr_status_get(void *data)
1435 return ret; 1436 return ret;
1436} 1437}
1437DEFINE_SIMPLE_ATTRIBUTE(spufs_decr_status_ops, spufs_decr_status_get, 1438DEFINE_SIMPLE_ATTRIBUTE(spufs_decr_status_ops, spufs_decr_status_get,
1438 spufs_decr_status_set, "%llx\n") 1439 spufs_decr_status_set, "0x%llx\n")
1439 1440
1440static void spufs_spu_tag_mask_set(void *data, u64 val) 1441static void spufs_spu_tag_mask_set(void *data, u64 val)
1441{ 1442{
@@ -1457,7 +1458,7 @@ static u64 spufs_spu_tag_mask_get(void *data)
1457 return ret; 1458 return ret;
1458} 1459}
1459DEFINE_SIMPLE_ATTRIBUTE(spufs_spu_tag_mask_ops, spufs_spu_tag_mask_get, 1460DEFINE_SIMPLE_ATTRIBUTE(spufs_spu_tag_mask_ops, spufs_spu_tag_mask_get,
1460 spufs_spu_tag_mask_set, "%llx\n") 1461 spufs_spu_tag_mask_set, "0x%llx\n")
1461 1462
1462static void spufs_event_mask_set(void *data, u64 val) 1463static void spufs_event_mask_set(void *data, u64 val)
1463{ 1464{
@@ -1479,7 +1480,7 @@ static u64 spufs_event_mask_get(void *data)
1479 return ret; 1480 return ret;
1480} 1481}
1481DEFINE_SIMPLE_ATTRIBUTE(spufs_event_mask_ops, spufs_event_mask_get, 1482DEFINE_SIMPLE_ATTRIBUTE(spufs_event_mask_ops, spufs_event_mask_get,
1482 spufs_event_mask_set, "%llx\n") 1483 spufs_event_mask_set, "0x%llx\n")
1483 1484
1484static void spufs_srr0_set(void *data, u64 val) 1485static void spufs_srr0_set(void *data, u64 val)
1485{ 1486{
@@ -1501,7 +1502,7 @@ static u64 spufs_srr0_get(void *data)
1501 return ret; 1502 return ret;
1502} 1503}
1503DEFINE_SIMPLE_ATTRIBUTE(spufs_srr0_ops, spufs_srr0_get, spufs_srr0_set, 1504DEFINE_SIMPLE_ATTRIBUTE(spufs_srr0_ops, spufs_srr0_get, spufs_srr0_set,
1504 "%llx\n") 1505 "0x%llx\n")
1505 1506
1506static u64 spufs_id_get(void *data) 1507static u64 spufs_id_get(void *data)
1507{ 1508{