* Adding helper function for ARM "dsb st"
@ 2024-02-05 14:11 Boyer, Andrew
2024-02-07 3:50 ` Honnappa Nagarahalli
0 siblings, 1 reply; 2+ messages in thread
From: Boyer, Andrew @ 2024-02-05 14:11 UTC (permalink / raw)
To: ruifeng.wang, Honnappa Nagarahalli
Cc: dev, Yigit, Ferruh, Srikanth Yalavarthi
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"); })
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Adding helper function for ARM "dsb st"
2024-02-05 14:11 Adding helper function for ARM "dsb st" Boyer, Andrew
@ 2024-02-07 3:50 ` Honnappa Nagarahalli
0 siblings, 0 replies; 2+ messages in thread
From: Honnappa Nagarahalli @ 2024-02-07 3:50 UTC (permalink / raw)
To: Boyer, Andrew
Cc: Ruifeng Wang, dev, Yigit, Ferruh, Srikanth Yalavarthi, nd,
Wathsala Wathawana Vithanage, Dhruv Tripathi
Hi Andrew,
On Feb 5, 2024, at 8:11 AM, Boyer, Andrew <Andrew.Boyer@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-07 3:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-05 14:11 Adding helper function for ARM "dsb st" Boyer, Andrew
2024-02-07 3:50 ` Honnappa Nagarahalli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).