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

Kernel: Add and use TypedMapping<T*[]*> #25411

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Hendiadyoin1
Copy link
Contributor

@Hendiadyoin1 Hendiadyoin1 commented Nov 16, 2024

This mainly adds users of this in the Network code, as those were the easiest to find
Other places in the kernel may profit off of this in the future, like the ring buffers across other drivers

@Hendiadyoin1 Hendiadyoin1 marked this pull request as ready for review November 16, 2024 19:43
@Hendiadyoin1 Hendiadyoin1 changed the title Kernel: Add and use TypedMapping<T[]> Kernel: Add and use TypedMapping<T**[]**> Nov 16, 2024
@Hendiadyoin1 Hendiadyoin1 changed the title Kernel: Add and use TypedMapping<T**[]**> Kernel: Add and use TypedMapping<T*[]*> Nov 16, 2024
@github-actions github-actions bot added the 👀 pr-needs-review PR needs review from a maintainer or community member label Nov 16, 2024
@Hendiadyoin1
Copy link
Contributor Author

ahh oops an unrelated change sneaked in
Will fix

Copy link
Member

@spholz spholz left a comment

Choose a reason for hiding this comment

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

Using TypedMappings for this seems nice. I guess it shifts their purpose beyond just MMIO mappings, but that seems ok.

Just some commit message typos:
"Remove Unused" -> "Remove unused"
"Add support for Arrays" -> "Add support for arrays"
"TypedMapping<T volatie[]>" -> "TypedMapping<T volatile[]>"

@Hendiadyoin1
Copy link
Contributor Author

Using TypedMappings for this seems nice. I guess it shifts their purpose beyond just MMIO mappings, but that seems ok.

Just some commit message typos: "Remove Unused" -> "Remove unused" "Add support for Arrays" -> "Add support for arrays" "TypedMapping<T volatie[]>" -> "TypedMapping<T volatile[]>"

Huh I had changed that locally, just forgot to push....

Copy link
Member

@spholz spholz left a comment

Choose a reason for hiding this comment

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

One more thing I missed during my first review

(Also, CI is failing due to my MM PR replacing Region::Cacheable with MemoryType)

}

template<typename T>
static ErrorOr<TypedMapping<T[]>> map_typed_array(PhysicalAddress paddr, size_t items)
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this overload be unnecessary? The access parameter of the other map_typed_array implementation has a default value

@nico nico added ⏳ pr-waiting-for-author PR is blocked by feedback / code changes from the author and removed 👀 pr-needs-review PR needs review from a maintainer or community member labels Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⏳ pr-waiting-for-author PR is blocked by feedback / code changes from the author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants