arm: Fix cache flushing so it doesn't crash the kernel
authorDavid Schleef <ds@schleef.org>
Fri, 12 Jun 2009 19:35:41 +0000 (12:35 -0700)
committerDavid Schleef <ds@schleef.org>
Fri, 12 Jun 2009 19:35:41 +0000 (12:35 -0700)
orc/orcarm.c

index 422c410..e6f90db 100644 (file)
@@ -443,14 +443,7 @@ void
 orc_arm_flush_cache (OrcCompiler *compiler)
 {
 #ifdef HAVE_ARM
-  unsigned char *ptr;
-  int size = compiler->codeptr - compiler->program->code;
-
-  ptr = compiler->program->code;
-  __clear_cache (ptr, ptr + size);
-
-  ptr = compiler->program->code_exec;
-  __clear_cache (ptr, ptr + size);
+  __clear_cache (compiler->program->code, compiler->codeptr);
 #endif
 }