Skip to content

feat(paging): Also return flags for MapperAllSizes::translate() - #207

Merged
phil-opp merged 1 commit into
rust-osdev:nextfrom
haraldh:page_flags
Dec 28, 2020
Merged

feat(paging): Also return flags for MapperAllSizes::translate()#207
phil-opp merged 1 commit into
rust-osdev:nextfrom
haraldh:page_flags

Conversation

@haraldh

@haraldh haraldh commented Dec 8, 2020

Copy link
Copy Markdown
Contributor

Extend TranslateResult returned by MapperAllSizes::translate() with
the page flags. This way, there is a method to get the flags for the
page of a VirtAddr.

Edit(phil-opp): This is a breaking change.

@phil-opp phil-opp mentioned this pull request Dec 16, 2020
14 tasks
@phil-opp

Copy link
Copy Markdown
Member

Thanks a lot for the PR! Looks good to me overall, I would just prefer to introduce a new local variable entry instead of indexing e.g. p3[addr.p3_index()] twice.

Given that this a breaking change (albeit a small one), I won't merge this directly, but instead try to combine it with other breaking changes (see #193) to limit the number of version bumps we need to do. I hope that this is ok with you.

Extend `TranslateResult` returned by `MapperAllSizes::translate()` with
the page flags. This way, there is a method to get the flags for the
page of a `VirtAddr`.
@haraldh

haraldh commented Dec 16, 2020

Copy link
Copy Markdown
Contributor Author

@phil-opp thanks, here we go with a new local variable entry.

@phil-opp
phil-opp changed the base branch from master to next December 28, 2020 08:54
@phil-opp

Copy link
Copy Markdown
Member

Thank you! I'll merge this into a next branch first to bundle it with more breaking changes and then create a new PR against master for the next version.

@phil-opp
phil-opp merged commit 15ce8dd into rust-osdev:next Dec 28, 2020
phil-opp added a commit that referenced this pull request Dec 28, 2020
@phil-opp

Copy link
Copy Markdown
Member

I just saw that we had an older PR that implements exactly this change: #150. In #150 (comment) I suggested an alternative layout for the TranslateResult type, which I still prefer. I'll implement this is a follow-up PR. I just wanted to give you a heads-up.

@phil-opp

Copy link
Copy Markdown
Member

I opened the PR at #211.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants