Bug 8663 - Fix DMA RW sequence disorder issue
Summary: Fix DMA RW sequence disorder issue
Status: NEW
Alias: None
Product: ANCK 6.6 Dev
Classification: ANCK
Component: X86 (show other bugs) X86
Version: unspecified
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: Guanjun
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-28 16:03 UTC by LeoLiu-oc
Modified: 2024-03-28 16:09 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description LeoLiu-oc zhaoxin_group 2024-03-28 16:03:33 UTC
The Zhaoxin KH-40000 platform can't keep the PCIE transaction order for DMA writes, whose target addresses are located in different NUMA nodes, from the same device. Patch this issue by flushing the target DMA write with a subsequent PCIE configuration space read operation.

For streaming dma ops callback .unmap_page/sg and .sync_sg/single_for_cpu, add PCIE configuration space read operation to flush the target DMA write.

For coherent DMA map, limit the DMA buffer that the device driver applies to to be on the same node as the device.
Comment 1 小龙 admin 2024-03-28 16:09:46 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/2966