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

Revert "ace: mm: tlb: Check tlb translation enabled before flushing cache" #78479

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

lyakh
Copy link
Collaborator

@lyakh lyakh commented Sep 16, 2024

This reverts commit 311ddf9. That commit breaks firmware boot on both MTL and LNL.

…ache"

This reverts commit 311ddf9. That
commit breaks firmware boot on both MTL and LNL.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
@lyakh lyakh requested a review from nashif September 16, 2024 12:08
@lyakh lyakh added Regression Something, which was working, does not anymore and removed area: Memory Management labels Sep 16, 2024
@lyakh lyakh added the platform: Intel ADSP Intel Audio platforms label Sep 16, 2024
Copy link

@jsarha jsarha left a comment

Choose a reason for hiding this comment

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

The Zephyr main now indeed crashes at boot at least on MTL, and reverting 311ddf9 fixes it.

@softwarecki
Copy link
Collaborator

I have checked on our mtl fpga test platforms and the firmware boots successfully using sof/main + zephyr/main. Is there any overlay being used? In particular the debugging options like:
CONFIG_ZTEST, CONFIG_SOF_BOOT_TEST, CONFIG_DEBUG or CONFIG_ASSERT? I will check on rvp tomorrow.

@softwarecki
Copy link
Collaborator

ACK. Activating the CONFIG_ASSERT option actually break firmware loading. It seems that somewhere we trying to unmap an memory address that is not mapped. After my fix the function returns an appropriate error code. In my opinion we should look for the cause and not treat the effect by reverting my commit.

@lyakh
Copy link
Collaborator Author

lyakh commented Sep 18, 2024

testing with thesofproject/sof#9455

ACK. Activating the CONFIG_ASSERT option actually break firmware loading. It seems that somewhere we trying to unmap an memory address that is not mapped. After my fix the function returns an appropriate error code. In my opinion we should look for the cause and not treat the effect by reverting my commit.

@softwarecki sorry, which your fix? I don't see any open PRs from you for Zephyr ATM?

@softwarecki
Copy link
Collaborator

@lyakh The one you're trying to revert in this PR. It causes the sys_mm_drv_unmap_page_wflush function to return an error code when trying to unmap a memory page that is not mapped. This error is probably detected by unmap_locked or sys_mm_drv_unmap_region_initial and the firmware stops at assert. I think we should stop trying to unmap an unmapped memory instead of throwing the error checking code away.

@kv2019i
Copy link
Collaborator

kv2019i commented Sep 18, 2024

@softwarecki Ack a fix is preferred, but time is of essence here as well. Let's go with standard procedure. If you can fix the MTL/LNL boot assert issue quickly, please submit ASAP, or if not, let's merge this revert PR and @softwarecki you submit the original patch again later with the updates to avoid panics with asserts. This is currently blocking all Zephyr updates to SOF mainline, so we need to address this quickly to not block other developers while this issue is addressed for Intel.

@softwarecki
Copy link
Collaborator

@kv2019i I will create a PR with the fix right away.

softwarecki

This comment was marked as outdated.

@lyakh
Copy link
Collaborator Author

lyakh commented Sep 18, 2024

I will block it as fix is proposed in #78612

@softwarecki have you also submitted a SOF PR to test your fix?

Copy link
Collaborator

@softwarecki softwarecki left a comment

Choose a reason for hiding this comment

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

Approve to not block others

@henrikbrixandersen henrikbrixandersen merged commit 531bbbd into zephyrproject-rtos:main Sep 18, 2024
31 checks passed
@lyakh lyakh deleted the mm branch September 18, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Intel ADSP Intel Audio platforms Regression Something, which was working, does not anymore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants