problem in mmap b/w user and kernel space

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

problem in mmap b/w user and kernel space

1,504 次查看
vijeshreddy
Contributor I

I am trying to mmap some memory b/w user space and kernel space so that I can use it as a shared memory area.

I tried a sample code from internet in which the following functions were used.

1. mem_map_reserve(page);

2. remap_page_range(start, page, PAGE_SIZE, PAGE_SHARED))

and  an include file #include <linux/wrapper.h> was used.

If I compile the same code for imx6 i am getting <linux/wrapper.h> - no such file  error , if I am not including the file - i am getting an error - implicit declaration of  remap_page_range()

Please let me know which include i have to use to eliminate the error or is there any better way to mmap some memory between user and kernel space.

Thanks in advance.

Vijesh.

0 项奖励
回复
3 回复数

1,213 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Vijesh

what android release used in the case. In general one can try to rebuild from scratch,

to avoid possibilty for using old headers. Also similar issues one can find by googling, like
mmap causes compile errors on r15c (unknown identifier) · Issue #477 · android-ndk/ndk · GitHub 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

1,213 次查看
vijeshreddy
Contributor I

I am using linux 4.1.18-i.MX6-PD15.3.0

0 项奖励
回复

1,213 次查看
igorpadykov
NXP Employee
NXP Employee

this is not supported by nxp, please try nxp official releases described on

http://www.nxp.com/products/software-and-tools/software-development-tools/i.mx-software-and-tools/i....

Best regards
igor

0 项奖励
回复