tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Unifying /dev/{mem,kmem,zero,null} implementations



Joerg Sonnenberger wrote:
On Sat, Feb 23, 2008 at 03:36:27PM +0000, Chris Gilbert wrote:
In dev_mem_readwrite() pmap_kenter_pa and pmap_kremove calls require a pmap_update(pmap_kernel()) after them otherwise the updates may not have been sync'd into the hardware.

I'll add it after the kenter. I don't think we need it after the
pmap_kremove -- it can be thrown away lazily, can't it?

The documentation says every pmap_kremove needs a pmap_update, relying on something later on doing a pmap_update is risky.

In theory pmap_kremove could be optimised to not change anything in hardware, and defer the work to be done till the pmap_update, while I don't believe any platform has gone to that level yet, we shouldn't exclude the possibility by not following the documented API.

Note I earlier today I did find a few places that didn't do a pmap_update for pmap_kenter_pa and pmap_kremove calls and I fixed them.

Thanks,
Chris


Home | Main Index | Thread Index | Old Index