Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
We have an ARM based platform running kernel v2.6.18.For a particular driver, a physical space of around 2MB is required which would be shared by the device, driver and the application. The memory requirement
changes from application to application, so a memory manager manages the physical memory allocation on this shared area.
The device has MMU so, it doesn't require contiguous physical memory. The only condition is that the user space address must be contigous.
In the implementation we have used mmap to get a range of user virtual address, but have delayed the association of user virtual address with kernel virtual address till the our memory manager gives us the physical pages. Which means that remap_pfn_range is not called will memory is allocated by the manager.
We are able to associate a non-contiguous physical memory with contiguous user space address. The problem is that, we want to dissociate the user space address and the physical memory when the memory manager frees the space.
We tried using zap_page_range which doesn't work. Also unmap_range was used which gave kernel panic.
Could anybody let us know what is the way to unmap in such cases, or else an alternate way to achieve the same.