On 2023/12/15 10:11, Shakeel Butt wrote:
On Thu, Dec 14, 2023 at 08:27:55AM -0800, Mina Almasry wrote:
quoted
On Thu, Dec 14, 2023 at 4:05 AM Yunsheng Lin [off-list ref] wrote:
quoted
[...]
quoted
quoted
I perfer the second one personally, as devmem means that it is not
readable from cpu.
From my POV it has to be the first one. We want to abstract the memory
type from the drivers as much as possible, not introduce N new memory
types and ask the driver to implement new code for each of them
separately.
That was my initial thinking too:
https://www.spinics.net/lists/netdev/msg949376.html
But after discussion, it may make more sense to have two sets of API from the
driver's piont of view if we want a complete safe type protection, so that
compiler can check everything statically and devmem driver API have a clear
semantic:
1. devmem is not allowed to be called into mm subsystem.
2. it will not provide a API like page_address().
quoted
Agree with Mina's point. Let's aim to decouple memory types from
drivers.
.