-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ace: mm: tlb: Ignore unmapping error in driver initalization #78612
Conversation
f414f7b
cb2c3eb
to
f414f7b
Compare
f414f7b
to
7b88686
Compare
@softwarecki you need to re-add your now reverted 311ddf9 too, right? Without it this PR doesn't really work? |
7b88686
to
dcf1f12
Compare
Added previously reverted commit from #78227 |
Thanks for adding a SOF PR. Since it has failed some tests, let me mark this PR "DNM" for now, feel free to remove the label once those failures are fixed |
The sys_mm_drv_unmap_region_initial function is responsible for unmapping all unused virtual memory during tlb driver initialization. Most addresses will not have a mapped page. Ignore the error code indicating unmapped memory that will occur when trying to unmap. Signed-off-by: Adrian Warecki <[email protected]>
Before unmapping a memory page, the cache is flushed. If the given memory page is not mapped, this operation ends with a cpu exception on the ptl platform. Add check if tlb translation is active before flushing. Signed-off-by: Adrian Warecki <[email protected]>
dcf1f12
to
eba0eb7
Compare
@lyakh Can we merge it? |
@softwarecki sure, sorry, I was on holiday, which was why I suggested to remove the label without me. I was a bit concerned about using a specific error code to identify a "soft failure" in |
@lyakh This error code is well described in the /**
* @brief Remove mapping for one page of the provided virtual address
*
* This unmaps one page from the virtual address space.
*
* When this completes, the relevant translation table entries will be
* updated as if no mapping was ever made for that memory page. No previous
* context needs to be preserved. This function must update mapping in
* all active translation tables.
*
* Behavior when providing unaligned address is undefined, this
* is assumed to be page aligned.
*
* Implementations must invalidate translation caching as necessary.
*
* @param virt Page-aligned virtual address to un-map
*
* @retval 0 if successful
* @retval -EINVAL if invalid arguments are provided
* @retval -EFAULT if virtual address is not mapped
*/
int sys_mm_drv_unmap_page(void *virt); In this driver the |
The sys_mm_drv_unmap_region_initial function is responsible for unmapping all unused virtual memory during tlb driver initialization. Most addresses will not have a mapped page. Ignore the error code indicating unmapped memory that will occur when trying to unmap.
Fix for issue detected in: #78479