Fix __clear_cache implementation

Forgot to give the parameters to syscall function, doh!
This commit is contained in:
Thomas Preud'homme 2014-03-11 22:57:22 +08:00
parent b2192fc50b
commit 40e3859739

View File

@ -728,13 +728,14 @@ void __clear_cache(char *beginning, char *end)
#define _GNU_SOURCE
#include <unistd.h>
#include <sys/syscall.h>
#include <stdio.h>
void __clear_cache(char *beginning, char *end)
{
/* __ARM_NR_cacheflush is kernel private and should not be used in user space.
* However, there is no ARM asm parser in tcc so we use it for now */
#if 1
syscall(__ARM_NR_cacheflush);
syscall(__ARM_NR_cacheflush, beginning, end, 0);
#else
__asm__ ("push {r7}\n\t"
"mov r7, #0xf0002\n\t"