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/imx9: Add DMA memory allocator #12228

Merged
merged 2 commits into from
Apr 30, 2024

Commits on Apr 30, 2024

  1. arm64/imx9: Add DMA memory allocator

    Add a simple allocator for DMA safe memory. It will provide contiguous
    blocks of memory with D-Cache line size alignment.
    
    NOTE: The optimal granule size is the D-Cache line size (64), but due
    to restrictions in the granule allocator this would result in a maximum
    block size of 2K only, thus use 256B granules instead givin 8K max block
    size.
    
    Once the granule allocator is fixed this limitation can be removed.
    pussuw committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    ba547dd View commit details
    Browse the repository at this point in the history
  2. arch/imx9_lpspi: Use DMA safe buffers to do the DMA transfers

    Using user allocated buffers for DMA transfers is not safe for two reasons:
    - User space memory is virtual memory, DMA needs physical memory
    - User memory buffer alignment cannot be guaranteed -> cache line ops
      are not safe
    pussuw committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    182511f View commit details
    Browse the repository at this point in the history