pipe_write() do opportunistic buffer resizing, when the buffer is empty.
but there is a possible sleeping point between the check (cnt == 0) and
the resize (pipespace() call), resulting resizing on possibly not empty
fix it by rechecking the buffer usage once the exclusive lock is hold.
it should be revisited later as part of larger work on pipe(2).
ok visa@ anton@
pmap_page_protect() should not unmap pages after making them readonly.
ok kettenis@ patrick@
Adjust the pmap_set_l* functions to a more reasonable API,
the lX_pa parameter was never called with a known physical address,
the called function always needed to look up that data. When this was
originally written, it was expected to be used in another path where the
virtual and physical were both known, but that other path was rewritten
at some point (likely that old path was early kernel table init, before
pmap_extract is available).
Instead of making the function perform a table walk pass the pmapvpX pointer
to the table that the new entry will be inserted. This table is already
known and in a local register, so no point in performing that lookup again.
Panic for missing vp1 entry, do not panic for missing vp2 entry twice.
Fix print on subsequent line.