Matt Thomas <m...@3am-software.com> wrote:
> 
> I've been wondering...
> 
> Should pmap_kenter_pa overwrite an existing entry should it be operating
> on an unmapped VA.

You mean already mapped VA?

> I think that if you want to change a mapping, you
> should do a pmap_kremove first.

I tend to agree.  I have not seen a need for such re-mapping (overwriting),
but even if there is, it can be done efficiently by removing, entering and
then calling pmap_update().  With the deferred update, that would result in
a single TLB flush/invalidation.

In x86 pmap, there is a printf() for overwriting case:

http://nxr.netbsd.org/xref/src/sys/arch/x86/x86/pmap.c?r=1.181#1005

Having this converted to an assert might catch something interesting.

-- 
Mindaugas

Reply via email to