From 1b0c67047dbfca420f8e32fb897212956183cf31 Mon Sep 17 00:00:00 2001 From: limerence Date: Wed, 10 May 2023 15:22:34 +0800 Subject: [PATCH] xpm only support arm64 Signed-off-by: limerence --- xpm/core/xpm_hck.c | 3 +++ xpm/core/xpm_misc.c | 2 +- xpm/include/xpm_misc.h | 6 ++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/xpm/core/xpm_hck.c b/xpm/core/xpm_hck.c index 4c3e98a..55181ca 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 73bf05e..3879628 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 fbdf45e..9b459a0 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); -- Gitee