Is there a need for DMB if we are using DSB

后端 未结 1 1611
甜味超标
甜味超标 2021-01-22 02:50

Is DSB the superset of DMB ?

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

1条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-22 03:04

    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.

    0 讨论(0)
提交回复
热议问题