huojianchaoyy opened a new pull request, #22276:
URL: https://github.com/apache/nuttx/pull/22276

   *Note: Please adhere to [Contributing 
Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
   
   ## Summary
   
   mm/map changes from Xiaomi Vela, split out of #22206 as asked in its review.
   
   - **mm: Fix vm_map_region/vm_unmap_region interface**: both take the 
`mm_map_s` to use instead of the current one. **drivers/video: Adapt to the new 
vm_map_region/vm_unmap_region.**, right after it, updates `fb.c`, their only 
in-tree user. The interface change alone does not build `fb.c` in kernel builds 
with `VIDEO_FB` (`rv-virt:kfb64`); the next commit fixes that.
   - **mm: Pass group to unmap when calling mm_destroy_map**: the munmap 
callbacks get the group, as `tcb->group` is already NULL in `group_leave()`.
   - **mm/map: remove error log unmap**: the log in `mm_map_destroy()` could 
deadlock on the UART spinlock.
   - **mm/map: Follow MISRA-C 2012 10.4**.
   - **mm/map: add mm_map_exist() to query overlapping mappings**: whether a 
range overlaps an existing mapping of the task group.
   
   ## Impact
   
   - `vm_map_region()` and `vm_unmap_region()` take the `mm_map_s` as first 
argument; `drivers/video/fb.c` is updated, out-of-tree callers need the same 
change.
   - The munmap callbacks called by `mm_map_destroy()` get the task group 
instead of NULL.
   - New API: `mm_map_exist()`.
   
   ## Testing
   
   Host: Ubuntu 22.04 x86_64, GCC 13.4.0 (riscv-none-elf), Arm GNU Toolchain 
13.2.rel1, CMake 3.23 + Ninja 1.10, QEMU 10.2.1. Base: master 25b649e1c08.
   
   `./tools/checkpatch.sh -c -u -m -g HEAD~6..HEAD` passes.
   
   `rv-virt:kfb64` (kernel build with `VIDEO_FB`) builds at the head of this PR 
and at **drivers/video: Adapt to the new vm_map_region/vm_unmap_region.**; at 
**mm: Fix vm_map_region/vm_unmap_region interface** alone it fails in `fb.c` 
("too few arguments to function 'vm_map_region'"), as said above.
   
   `qemu-armv7a:knsh` builds, boots and runs `hello` and `getprime` from 
`/system` (semihosting).
   
   Not tested: a program that maps the framebuffer, real hardware.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to