[PATCH] Fix casting on architectures with 32-bit pointers/longs.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tor, 06 12 2007 kl. 15:20 -0800, skrev Zach Brown:
> The following patches are a substantial refactoring of the syslet code.  I'm
> branding them as the v7 release of the syslet infrastructure, though they
> represent a signifiant change in focus.
> 
> My current focus is to see the most fundamental functionality brought to
> maturity.  To me, this means getting a ABI that is used by applications through
> glibc on x86 and PPC64.   Only once that is ready should we distract ourselves
> with advanced complexity.
> 
> To that end, this patch series differs from v6 in significant ways:
> 
>  * syslets are initiated by providing syslet arguments to sys_indirect().
> 
>  * uatoms, threadlets, and the kaio changes are postponed until they can be
>    justified and rebuilt on more complete infrastructure.  (I'm not saying
>    these shouldn't or won't be persued.  I'm saying that we should get the
>    simplest piece working first.)
> 
>  * the code is clarified and commented, the patches are bisectable and pass
>    checkpatch.
> 
> The use of sys_indirect() and the move from 'atom's simplified the ABI
> considerably.  I've put a trivial example in a syslet-userspace git tree:
> 
>     git://git.kernel.org/pub/scm/linux/kernel/git/zab/syslets-userspace.git
> 

Signed-of-by: Simon Holm Thøgersen <[email protected]>
---

diff --git a/basic.c b/basic.c
index 418a1a3..5938d85 100644
--- a/basic.c
+++ b/basic.c
@@ -42,7 +42,7 @@ int main(int argc, char **argv)
 	params.syslet.frame.sp = (u64)(long)memalign(pagesize, pagesize);
 
 	memset(&params, 0, sizeof(params));
-	params.syslet.frame.ip = (u64)syslet_return_func;
+	params.syslet.frame.ip = (u64)(long)syslet_return_func;
 	params.syslet.frame.sp = (u64)(long)memalign(pagesize, pagesize);
 	params.syslet.ring_ptr = (u64)(long)ring;
 
@@ -55,7 +55,7 @@ int main(int argc, char **argv)
 			pid, my_pid);
 	}
 
-	params.syslet.frame.ip = (u64)syslet_return_func;
+	params.syslet.frame.ip = (u64)(long)syslet_return_func;
 	params.syslet.frame.sp = (u64)(long)memalign(pagesize, pagesize);
 	params.syslet.ring_ptr = (u64)(long)ring;
 	params.syslet.caller_data = CALLER_DATA;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux