xpm only support arm64

Signed-off-by: limerence <shituanhui@huawei.com>
This commit is contained in:
limerence
2023-05-10 15:22:34 +08:00
parent de551651c1
commit ebc369de9c
3 changed files with 8 additions and 3 deletions
+3
View File
@@ -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");
+1 -1
View File
@@ -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
+4 -2
View File
@@ -6,9 +6,11 @@
#ifndef _XPM_MISC_H
#define _XPM_MISC_H
#include <linux/types.h>
struct xpm_region_info {
unsigned long addr_base;
unsigned long length;
uint64_t addr_base;
uint64_t length;
};
int xpm_register_misc_device(void);