Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

softwarecki
Copy link
Collaborator

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

gbernatxintel
gbernatxintel previously approved these changes Sep 18, 2024
tmleman
tmleman previously approved these changes Sep 18, 2024
dcpleung
dcpleung previously approved these changes Sep 18, 2024
@lyakh
Copy link
Collaborator

lyakh commented Sep 19, 2024

@softwarecki you need to re-add your now reverted 311ddf9 too, right? Without it this PR doesn't really work?

@@ -478,7 +478,11 @@ static int sys_mm_drv_unmap_region_initial(void *virt_in, size_t size)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in title (unmappig->unmapping),plus I think you need to add the reverted commit back to this PR so it fixes the original ace30 problem, right?

@softwarecki softwarecki changed the title ace: mm: tlb: Ignore unmappig error in driver initalization ace: mm: tlb: Ignore unmapping error in driver initalization Sep 20, 2024
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 <adrian.warecki@intel.com>
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 <adrian.warecki@intel.com>
@softwarecki
Copy link
Collaborator Author

Added previously reverted commit from #78227
Created PR in SOF to test this PR: thesofproject/sof#9504

@lyakh
Copy link
Collaborator

lyakh commented Sep 24, 2024

Added previously reverted commit from #78227 Created PR in SOF to test this PR: thesofproject/sof#9504

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

@lyakh lyakh added the DNM This PR should not be merged (Do Not Merge) label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Memory Management DNM This PR should not be merged (Do Not Merge) platform: Intel ADSP Intel Audio platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants