[kaffe] CVS kaffe (robilad): config/arm/linux/md.c: put the arm jit back into business for kernels >2.6.9.

Kaffe CVS cvs-commits at kaffe.org
Sun Apr 22 16:43:16 PDT 2007


PatchSet 7476 
Date: 2007/04/22 23:39:19
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
2007-04-22  Sascha Hauer <s.hauer at pengutronix.de>

        * config/arm/linux/md.c: put the arm jit back into business for kernels >2.6.9.

Members: 
	ChangeLog:1.4975->1.4976 
	config/arm/linux/md.c:INITIAL->1.8 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4975 kaffe/ChangeLog:1.4976
--- kaffe/ChangeLog:1.4975	Sat Apr 14 07:54:30 2007
+++ kaffe/ChangeLog	Sun Apr 22 23:39:19 2007
@@ -1,3 +1,7 @@
+2007-04-22  Sascha Hauer <s.hauer at pengutronix.de>
+
+	* config/arm/linux/md.c: put the arm jit back into business for kernels >2.6.9.
+
 2007-04-14 Kiyo Inaba <inaba at src.ricoh.co.jp>
 
 	* kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c: Add macro
===================================================================
Checking out kaffe/config/arm/linux/md.c
RCS:  /home/cvs/kaffe/kaffe/config/arm/linux/md.c,v
VERS: 1.8
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/config/arm/linux/md.c	Sun Apr 22 23:43:16 2007
@@ -0,0 +1,43 @@
+/*
+ * arm/linux/md.c
+ * Linux arm specific functions.
+ *
+ * Copyright (c) 1996, 1997
+ *      Transvirtual Technologies, Inc.  All rights reserved.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file.
+ */     
+                
+#include "config.h"
+#include "md.h"
+#if defined(TRANSLATOR)
+#include "arm/jit.h"
+#endif
+#include <malloc.h>
+#include <sched.h>
+#include <asm/unistd.h>
+
+void            
+init_md(void)
+{       
+#if defined(M_MMAP_MAX) && defined(HAVE_MALLOPT) 
+        mallopt(M_MMAP_MAX, 0);
+#endif
+}
+
+/**
+ * Shamelessly stolen from parrot... ([perl]/parrot/jit/arm/jit_emit.h arm_sync_d_i_cache)
+ *
+ * r2 should be zero for 2.4 (but it's ignored) so passing VM_EXEC (needed
+ * for 2.6) should be okay.
+ */
+void flush_dcache(void *start, void *end) {
+  __asm __volatile ("mov r0, %0\n"
+		    "mov r1, %1\n"
+		    "mov r2, #0\n"
+		    "swi " __sys1(__ARM_NR_cacheflush) "\n"
+		    : /* no return value */
+		    : "r" ((long)start), "r" ((long)end)
+		    : "r0","r1","r2");
+}




More information about the kaffe mailing list