Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L linux-vs
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • linux-arm
  • linux-vs
  • Repository
Switch branch/tag
  • linux-vs
  • drivers
  • dma
  • bcm2835-dma.c
Find file BlameHistoryPermalink
  • Lukas Wunner's avatar
    dmaengine: bcm2835: Avoid accessing memory when copying zeroes · bf75703d
    Lukas Wunner authored Sep 11, 2019 and Mark Brown's avatar Mark Brown committed Sep 11, 2019
    The BCM2835 DMA controller is capable of synthesizing zeroes instead of
    copying them from a source address. The feature is enabled by setting
    the SRC_IGNORE bit in the Transfer Information field of a Control Block:
    
    "Do not perform source reads.
     In addition, destination writes will zero all the write strobes.
     This is used for fast cache fill operations."
    https://www.raspberrypi.org/app/uploads/2012/02/BCM2835-ARM-Peripherals.pdf
    
    The feature is only available on 8 of the 16 channels. The others are
    so-called "lite" channels with a limited feature set and performance.
    
    Enable the feature if a cyclic transaction copies from the zero page.
    This reduces traffic on the memory bus.
    
    A forthcoming use case is the BCM2835 SPI driver, which will cyclically
    copy from the zero page to the TX FIFO. The idea to use SRC_IGNORE was
    taken from an ancient GitHub conversation between Martin and Noralf:
    https://github.com/msperl/spi-bcm2835/issues/13#issuecomment-98180451
    
    
    
    Tested-by: default avatarNuno Sá <nuno.sa@analog.com>
    Tested-by: default avatarNoralf Trønnes <noralf@tronnes.org>
    Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
    Acked-by: default avatarVinod Koul <vkoul@kernel.org>
    Acked-by: default avatarStefan Wahren <wahrenst@gmx.net>
    Acked-by: default avatarMartin Sperl <kernel@martin.sperl.org>
    Cc: Florian Kauer <florian.kauer@koalo.de>
    Link: https://lore.kernel.org/r/b2286c904408745192e4beb3de3c88f73e4a7210.1568187525.git.lukas@wunner.de
    
    
    Signed-off-by: Mark Brown's avatarMark Brown <broonie@kernel.org>
    bf75703d