[kaffe] [PATCH] JIT on arm
Sascha Hauer
s.hauer at pengutronix.de
Wed Oct 4 01:23:18 PDT 2006
Hi all,
There is a comment in config/arm/linux/md.c which claims that Kernel 2.6
needs a VM_EXEC flag. Fact is that 2.6 never needed this flag, but since
2.6.9 it no longer ignores it.
I have two patches attached, the first one is the change in between 2.6.8
and 2.6.9 and the second one puts the arm jit back into business for kernels
>2.6.9
Have fun,
Sascha
diff -purN linux-2.6.8/arch/arm/kernel/traps.c linux-2.6.9/arch/arm/kernel/traps.c
--- linux-2.6.8/arch/arm/kernel/traps.c 2004-08-14 07:36:56.000000000 +0200
+++ linux-2.6.9/arch/arm/kernel/traps.c 2004-10-18 23:53:51.000000000 +0200
@@ -381,7 +381,7 @@ do_cache_op(unsigned long start, unsigne
{
struct vm_area_struct *vma;
- if (end < start)
+ if (end < start || flags)
return;
vma = find_vma(current->active_mm, start);
Index: kaffe-1.1.7/config/arm/linux/md.c
===================================================================
--- kaffe-1.1.7.orig/config/arm/linux/md.c
+++ kaffe-1.1.7/config/arm/linux/md.c
@@ -35,7 +35,7 @@ init_md(void)
void flush_dcache(void *start, void *end) {
__asm __volatile ("mov r0, %0\n"
"mov r1, %1\n"
- "mov r2, #4\n" /* this is VM_EXEC from linux/mm.h, needed for Kernel 2.6 */
+ "mov r2, #0\n"
"swi " __sys1(__ARM_NR_cacheflush) "\n"
: /* no return value */
: "r" ((long)start), "r" ((long)end)
--
Dipl.-Ing. Sascha Hauer | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
Hannoversche Str. 2, 31134 Hildesheim, Germany
Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9
More information about the kaffe
mailing list