如果我们使用 DSB 是否需要 DMB [英] Is there a need for DMB if we are using DSB

查看:36
本文介绍了如果我们使用 DSB 是否需要 DMB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

DSB 是 DMB 的超集吗?

Is DSB the superset of DMB ?

如果不考虑性能,可以将 DMB 替换为 DSB

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

推荐答案

DSBDMB 的超集,所以可以用 DSB 代替> 如果性能不是问题.

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

来自 Cortex-A 系列程序员指南:

数据同步屏障 (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.

数据内存屏障 (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.

这篇关于如果我们使用 DSB 是否需要 DMB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆