| 1 |
/* CPU flush support */ |
| 2 |
#include <stdio.h> |
| 3 |
#include <sys/ioctl.h> |
| 4 |
#include <errno.h> |
| 5 |
#include <unistd.h> |
| 6 |
#include <fcntl.h> |
| 7 |
#include "libdha.h" |
| 8 |
#include "kernelhelper/dhahelper.h" |
| 9 |
|
| 10 |
void cpu_flush(void *va,unsigned long length) |
| 11 |
{ |
| 12 |
int retval; |
| 13 |
int libdha_fd=-1; |
| 14 |
if( libdha_fd == -1) libdha_fd = open("/dev/dhahelper",O_RDWR); |
| 15 |
if (libdha_fd > 0) |
| 16 |
{ |
| 17 |
dhahelper_cpu_flush_t _l2; |
| 18 |
_l2.va = va; |
| 19 |
_l2.length = length; |
| 20 |
retval = ioctl(libdha_fd, DHAHELPER_CPU_FLUSH, &_l2); |
| 21 |
close(libdha_fd); |
| 22 |
} |
| 23 |
} |