Adding helper function for ARM "dsb st"
Honnappa Nagarahalli
Honnappa.Nagarahalli at arm.com
Wed Feb 7 04:50:12 CET 2024
Hi Andrew,
On Feb 5, 2024, at 8:11 AM, Boyer, Andrew <Andrew.Boyer at amd.com> wrote:
>
> I see that cnxk has added inline assembly for the ARM "dsb st" barrier. We, too, would like to add a use of this instruction. Can a helper function be added to the atomics headers?
>
>> drivers/ml/cnxk/cn10k_ml_dev.h:#define dsb_st ({ asm volatile("dsb st" : : : "memory"); })
This is not being used. I have submitted a patch to remove the unused code [1]
We have removed the use of ‘dsb *’ as architecture definition does not need it for DPDK use cases. rte_wmb() should be enough to guarantee the memory ordering while interacting with the devices in DPDK context. I can comment more if you can explain your use case.
[1] https://patchwork.dpdk.org/project/dpdk/list/?series=31032
>
> What would the helper be named, rte_wsb()? I suppose it would be a NOP on all other platforms.
>
> Maybe we could add something for "dmb st" at the same time and get rid of that assembly, too.
>
> Thanks,
> Andrew
More information about the dev
mailing list