[commit: ghc] master: Storage.c: Pass a size to sys_icache_invalidate (0135188)

git at git.haskell.org git at git.haskell.org
Wed Nov 16 04:08:53 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/0135188fecfc679a498093f8fc5f665d706fa4cb/ghc

>---------------------------------------------------------------

commit 0135188fecfc679a498093f8fc5f665d706fa4cb
Author: Shea Levy <shea at shealevy.com>
Date:   Tue Nov 15 22:01:56 2016 -0500

    Storage.c: Pass a size to sys_icache_invalidate
    
    The previous code passed an end pointer, but the interface takes a size
    instead.
    
    Fixes #12838.
    
    Reviewers: austin, erikd, simonmar, bgamari
    
    Reviewed By: simonmar, bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2711
    
    GHC Trac Issues: #12838


>---------------------------------------------------------------

0135188fecfc679a498093f8fc5f665d706fa4cb
 rts/sm/Storage.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c
index 357e018..da1acbc 100644
--- a/rts/sm/Storage.c
+++ b/rts/sm/Storage.c
@@ -1314,7 +1314,7 @@ calcNeeded (rtsBool force_major, memcount *blocks_needed)
    ------------------------------------------------------------------------- */
 
 #if (defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH)) && defined(ios_HOST_OS)
-void sys_icache_invalidate(void *start, size_t len);
+#include <libkern/OSCacheControl.h>
 #endif
 
 /* On ARM and other platforms, we need to flush the cache after
@@ -1327,7 +1327,7 @@ void flushExec (W_ len, AdjustorExecutable exec_addr)
   (void)exec_addr;
 #elif (defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH)) && defined(ios_HOST_OS)
   /* On iOS we need to use the special 'sys_icache_invalidate' call. */
-  sys_icache_invalidate(exec_addr, ((unsigned char*)exec_addr)+len);
+  sys_icache_invalidate(exec_addr, len);
 #elif defined(__GNUC__)
   /* For all other platforms, fall back to a libgcc builtin. */
   unsigned char* begin = (unsigned char*)exec_addr;



More information about the ghc-commits mailing list