Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L linux-coresight-backports
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Admin message

The Gitlab will upgrade to latest version for security in the Oct 7th (9:00 ~ 12:00 UTC+8), during the time, the Gitlab site will be offline.

  • linux-arm
  • linux-coresight-backports
  • Repository
  • linux-coresight-backports
  • arch
  • arm
  • Kconfig
Find file BlameHistoryPermalink
  • Vladimir Murzin's avatar
    ARM: NOMMU: Introduce dma operations for noMMU · 1c51c429
    Vladimir Murzin authored May 24, 2017
    
    
    R/M classes of cpus can have memory covered by MPU which in turn might
    configure RAM as Normal i.e. bufferable and cacheable. It breaks
    dma_alloc_coherent() and friends, since data can stuck in caches now
    or be buffered.
    
    This patch factors out DMA support for NOMMU configuration into
    separate entity which provides dedicated dma_ops. We have to handle
    there several cases:
    - configurations with MMU/MPU setup
    - configurations without MMU/MPU setup
    - special case for M-class, since caches and MPU there are optional
    
    In general we rely on default DMA area for coherent allocations or/and
    per-device memory reserves suitable for coherent DMA, so if such
    regions are set coherent allocations go from there.
    
    In case MMU/MPU was not setup we fallback to normal page allocator for
    DMA memory allocation.
    
    In case we run M-class cpus, for configuration without cache support
    (like Cortex-M3/M4) dma operations are forced to be coherent and wired
    with dma-noop (such decision is made based on cacheid global
    variable); however, if caches are detected there and no DMA coherent
    region is given (either default or per-device), dma is disallowed even
    MPU is not set - it is because M-class implement system memory map
    which defines part of address space as Normal memory.
    
    Reported-by: default avatarAlexandre Torgue <alexandre.torgue@st.com>
    Reported-by: default avatarAndras Szemzo <sza@esh.hu>
    Tested-by: default avatarBenjamin Gaignard <benjamin.gaignard@linaro.org>
    Tested-by: default avatarAndras Szemzo <sza@esh.hu>
    Tested-by: default avatarAlexandre TORGUE <alexandre.torgue@st.com>
    Reviewed-by: default avatarRobin Murphy <robin.murphy@arm.com>
    Signed-off-by: default avatarVladimir Murzin <vladimir.murzin@arm.com>
    Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
    Acked-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
    [hch: removed the dma_supported() implementation that isn't required anymore]
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    1c51c429