Is there a need for DMB if we are using DSB

2020-04-16 05:04发布

Is DSB the superset of DMB ?

If performnace is not a consideration can DMB be replaced by a DSB

标签: arm
1条回答
【Aperson】
2楼-- · 2020-04-16 05:30

DSB is superset of DMB so it can be replaced by a DSB if performance is not a concern.

From Cortex-A Series Programmer's Guide:

Data Synchronization Barrier (DSB)

This instruction forces the core to wait for all pending explicit data accesses to complete before any additional instructions stages can be executed. There is no effect on pre-fetching of instructions.

Data Memory Barrier (DMB)

This instruction ensures that all memory accesses in program order before the barrier are observed in the system before any explicit memory accesses that appear in program order after the barrier. It does not affect the ordering of any other instructions executing on the core, or of instruction fetches.

查看更多
登录 后发表回答