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

Check result when setting DMA mask and coherent #6

Open
wants to merge 1 commit into
base: rcar_gen3
Choose a base branch
from

Conversation

SergiiPiatakov
Copy link

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.

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]>
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.

1 participant