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

Set 32-bit DMA mask for M3N and E3 #7

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

Conversation

okhramkov
Copy link

With the current implementation, the MMNGR sets a 40-bit DMA bitmask (when IPMMU is enabled) regardless of the actual SoC. At the same time, M3N and E3 don't have 40-bit address space. IPMMU MMU supports physical address space in the legacy area. It is proposed to make changes that allow using the correct DMA bitmask for all devices.

This MR is based on #6 one.

SergiiPiatakov and others added 2 commits August 22, 2023 18:15
The `dma_set_mask_and_coherent` does not always perform successfully
and it also might fail. Ignoring this error and attempting to use DMA
in case of failure will lead to undefined behavior.
See for details: Documentation/core-api/dma-api-howto.rst

Also, this patch puts the second call of the function inside the
conditional block based on `IPMMU_MMU_SUPPORT` value. This is necessary
to avoid a double function call when the `IPMMU_MMU_SUPPORT` is true.

Signed-off-by: Sergii Piatakov <[email protected]>
With the current implementation, the MMNGR sets a 40-bit DMA bitmask
(when IPMMU is enabled) regardless of the actual SoC. At the same
time, M3N and E3 don't have 40-bit address space. IPMMU MMU supports
physical address space in the legacy area.
It is proposed to make changes that allow using the correct DMA
bitmask for all devices.

Signed-off-by: Oleksii Khramkov <[email protected]>
Signed-off-by: Sergii Piatakov <[email protected]>
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