What's the difference b/w __raw_readl/__raw_wr

2019-02-06 12:56发布

What's the difference b/w __raw_readl/__raw_writel and readl/writel in linux kernel? It is said readl/writel is safer than __raw_readl/__raw_writel, then why do we still use __raw_readl/__raw_writel ?

Under what circumstances should we use this: __raw_readl/__raw_writel or readl/writel ?

1条回答
再贱就再见
2楼-- · 2019-02-06 13:21

It seems to be the case that

  • raw denotes native byte ordering, non-raw means little-endian
  • the __ prefix alternatives don't include memory barriers

See this LKML discussion and also the comments in linux/arch/arm/include/asm/io.h

查看更多
登录 后发表回答