Skip to content

FROMLIST: misc: fastrpc: Add cache maintenance for non-coherent platf… - #1897

Open
quic-parihar wants to merge 1 commit into
qualcomm-linux:tech/mm/fastrpcfrom
quic-parihar:tech/mm/fastrpc
Open

quic-parihar wants to merge 1 commit into
qualcomm-linux:tech/mm/fastrpcfrom
quic-parihar:tech/mm/fastrpc

Conversation

@quic-parihar

Copy link
Copy Markdown

Some platforms using fastrpc do not support DMA coherency on HLOS. On such systems, explicit cache maintenance is required to ensure data consistency for RPC argument buffers.

Add cache maintenance for argument buffers when operating on non-coherent platforms:

  • Flush input buffers before invoking RPC to ensure CPU writes are visible to the DSP
  • Invalidate output buffers after RPC completion to ensure DSP writes are visible to the CPU

Introduce helper functions fastrpc_flush_args() and fastrpc_inv_args() to perform the required dma-buf cache operations. These are invoked only when the device is not marked as DMA coherent.

The coherency capability is determined using the "dma-coherent" device tree property and stored per session context.

This ensures correct data synchronization on platforms lacking DMA coherency, while avoiding unnecessary overhead on coherent systems.

Link: https://lore.kernel.org/all/20260916185850.3686010-1-abhinav.parihar@oss.qualcomm.com/

CRs-Fixed: 4650183

…orms

Some platforms using fastrpc do not support DMA coherency on
HLOS. On such systems, explicit cache maintenance is
required to ensure data consistency for RPC argument buffers.

Add cache maintenance for argument buffers when operating on
non-coherent platforms:
- Flush input buffers before invoking RPC to ensure CPU writes are
  visible to the DSP
- Invalidate output buffers after RPC completion to ensure DSP
  writes are visible to the CPU

Introduce helper functions fastrpc_flush_args() and
fastrpc_inv_args() to perform the required dma-buf cache
operations. These are invoked only when the device is not marked
as DMA coherent.

The coherency capability is determined using the "dma-coherent"
device tree property and stored per session context.

This ensures correct data synchronization on platforms lacking
DMA coherency, while avoiding unnecessary overhead on coherent
systems.

Link: https://lore.kernel.org/all/20260916185850.3686010-1-abhinav.parihar@oss.qualcomm.com/

Signed-off-by: Abhinav Parihar <abhinav.parihar@oss.qualcomm.com>
@qswat-orbit-external

Copy link
Copy Markdown

Dev Completion validation failed

CR: 4650183
Change Task: kernel.qli.0.0
Error: GenAI Assisted field must be set before moving change tasks to Development Complete. Please provide GenAI information.

The change task for this CR could not be moved to Dev Complete because of the error above. Please resolve the issue in Orbit and re-run the failed Orbit check.

@qcomlnxci
qcomlnxci requested review from a team, Chenna Kesava Raju (Chennak-quic) and Ekansh Gupta (ekanshibu) and removed request for a team September 24, 2026 06:44
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