diff --git a/xpm/core/xpm_hck.c b/xpm/core/xpm_hck.c index 4c3e98af915c5ad167bae4c73fbc86712c61d69d..55181ca1d19704c6df31452b2434f83ab50d5fd4 100644 --- a/xpm/core/xpm_hck.c +++ b/xpm/core/xpm_hck.c @@ -211,6 +211,9 @@ void xpm_get_unmapped_area(unsigned long addr, unsigned long len, if (!mm) return; + if ((mm->xpm_region.addr_start == 0) && (mm->xpm_region.addr_end == 0)) + return; + if ((map_flags & MAP_FIXED) && !(addr >= mm->xpm_region.addr_end || addr + len <= mm->xpm_region.addr_start)) { xpm_log_error("xpm region not allow mmap with MAP_FIXED"); diff --git a/xpm/core/xpm_misc.c b/xpm/core/xpm_misc.c index 73bf05eb6e2a07669367e4ccfbe363fbd5b85c75..3879628158d16b4fb1093438e9a87c83538bfbaf 100755 --- a/xpm/core/xpm_misc.c +++ b/xpm/core/xpm_misc.c @@ -75,7 +75,7 @@ static long xpm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) static long xpm_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { - return xpm_ioctl(file, cmd, (uintptr_t)compat_ptr(arg)); + return 0; } #endif diff --git a/xpm/include/xpm_misc.h b/xpm/include/xpm_misc.h index fbdf45e033bbb185414ed661009f9d04e9a5f282..9b459a0a08b1e43d9d91ed30c811f696ea427ece 100755 --- a/xpm/include/xpm_misc.h +++ b/xpm/include/xpm_misc.h @@ -6,9 +6,11 @@ #ifndef _XPM_MISC_H #define _XPM_MISC_H +#include + struct xpm_region_info { - unsigned long addr_base; - unsigned long length; + uint64_t addr_base; + uint64_t length; }; int xpm_register_misc_device(void);