[Cbe-oss-dev] [PATCH] OProfile: fix parameter types in function defs
Bob Nelson
rrnelson at linux.vnet.ibm.com
Thu Apr 19 23:47:02 EST 2007
A 64-bit unsigned long parameter is being demoted to 32-bit unsigned int
as it is being passed along by several functions and eventually being
promoted back to unsigned long in the CBE module spu_task_sync.c.
Signed-off-by: Bob Nelson <rrnelson at us.ibm.com>
Index: linux-2.6.20/arch/powerpc/oprofile/cell/spu_task_sync.c
===================================================================
--- linux-2.6.20.orig/arch/powerpc/oprofile/cell/spu_task_sync.c
+++ linux-2.6.20/arch/powerpc/oprofile/cell/spu_task_sync.c
@@ -4,6 +4,8 @@
* (C) Copyright IBM Corporation 2006
*
* Author: Maynard Johnson <maynardj at us.ibm.com>
+ * Modifications:
+ * Bob Nelson <rrnelson at us.ibm.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -88,7 +90,7 @@ static struct cached_info * get_cached_i
* Returns 0 for success; otherwise, -1 for error.
*/
static int
-prepare_cached_spu_info(struct spu * spu, unsigned int objectId)
+prepare_cached_spu_info(struct spu * spu, unsigned long objectId)
{
unsigned long flags;
struct vma_to_fileoffset_map * new_map;
@@ -218,7 +220,7 @@ static inline unsigned long fast_get_dco
static unsigned long
get_exec_dcookie_and_offset(struct spu * spu, unsigned int * offsetp,
unsigned long * spu_bin_dcookie,
- unsigned int spu_ref)
+ unsigned long spu_ref)
{
unsigned long app_cookie = 0;
unsigned int my_offset = 0;
@@ -249,7 +251,7 @@ get_exec_dcookie_and_offset(struct spu *
if (!vma->vm_file)
goto fail_no_image_cookie;
- pr_debug("Found spu ELF at %X(object-id:%X) for file %s\n",
+ pr_debug("Found spu ELF at %X(object-id:%lX) for file %s\n",
my_offset, spu_ref,
vma->vm_file->f_dentry->d_name.name);
*offsetp = my_offset;
@@ -276,7 +278,7 @@ fail_no_image_cookie:
* passed SPU and records SPU context information into the OProfile
* event buffer.
*/
-static int process_context_switch(struct spu * spu, unsigned int objectId)
+static int process_context_switch(struct spu * spu, unsigned long objectId)
{
unsigned long flags;
int retval;
More information about the cbe-oss-dev
mailing list