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

ARM64 MMU fixes #72706

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

ARM64 MMU fixes #72706

wants to merge 2 commits into from

Conversation

npitre
Copy link
Collaborator

@npitre npitre commented May 13, 2024

Looking at my own code I couldn't convince myself it was OK.
So I wrote a test and guess what? The code was broken... of course.

Here's the fix which required a slight rethinking of the page table
usage tracking. And more tests.

@zephyrbot zephyrbot added the area: ARM64 ARM (64-bit) Architecture label May 13, 2024
Existing code confused table usage and table reference counts together.
This obviously doesn't work. A table with one reference to it and one
populated PTE is not the same as a table with 2 references to it and
no PTe in use.

So split the two concepts and adjust the code accordingly. A page needs
to have its PTE usage count drop to zero before the last reference is
released. When both counts are 0 then the page is free.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
@npitre npitre force-pushed the arm64mmtest branch 2 times, most recently from 91d2f9c to 452be2a Compare May 14, 2024 15:56
This code was never formally tested before... and without the preceding
commit it obviously didn't work either.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ARM64 ARM (64-bit) Architecture
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants