home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] how to set "nocache" for mmap through /dev/mem ... can that even be done?

On 2017-07-13 12:35 PM, rpjday [ at ] crashcourse [ dot ] ca wrote:
>   it's been a while since i've looked at this, so forgive me for asking what
> i *know* is a simple question. looking at user code that wants to access memory
> associated with a physical device and, since it's a physical device, I/O needs
> to disable caching.

Given your device driver has to disable the VMM for the physical address, shouldn't it be disabling caching for that
address range as well?  It would be a very wrong design for a userspace process to fool around with how the kernel maps
memory onto physical addresses.  Then again, I'd argue it's completely wrong for a device driver to have a userspace
process have any awareness of physical addresses whatsoever, so there you go.


-- 
Stephen M. Webb  <stephen [ dot ] webb [ at ] bregmasoft [ dot ] ca>