xiaoxiang781216 commented on PR #15072: URL: https://github.com/apache/nuttx/pull/15072#issuecomment-2601435461
> > > > > I don't agree with this change. ISB, DMB and DSB are well documented ARM/ARM64 instructions, so the naming is coherent already. > > > > > If you insist, you can remove the ARM64_ prefix, but even that is unnecessary IMO, as it would require updating all downstream code as well for no benefit. > > > > > Can you explain what is the motivation for this change? Why must we use similar names to RISC-V in arch specific code? > > > > > > > > > > > > If you want to share the same driver around the different arch, it's important to keep this basic operation same around all arch. > > > > > > > > > If a common set of barrier macros are needed in the common kernel drivers, then you can define a common set of macros that the arch specific macros are forwarded to, instead of renaming the existing ones. > > > > > > Why do you insist keep two set of macros (__DSB and ARM64_DSB/RISCV_DSB) which has the same functionality? developers may randomly select one to use, which just make the confusion and inconsistence. > > Because ISB, DMB and DSB are arch specific instructions. The barrier macro names (DMB and ISB) are poorly chosen for risc-v as it does not have these instructions (fence with params is used instead). > > I think in arch specific code it is fine to use ISB DSB and DMB because like I said they are well documented ARM/ARM64 instructions. If generic barrrier macros are needed in the common kernel code, UP_MB and such is better like you said. > > If you insist we remove the arch specific macros then go ahead but I don't see the confusion, as they are macros for well known ARM instructions to support the spinlock operation, OS already require each arch to implement SP_DSB and SP_DMB, this patch series rename them to UP_XXX for the more broad usage. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org