When UMA_MD_SMALL_ALLOC is defined, pmap_kextract will be called
for direct-mapped addresses. Assume that any address less than KVA is one of these and return it. Also assert that an address is KVA does have a valid mapping - callers of pmap_kextract don't check the return value, since they assume that they have a valid virtual address.
This commit is contained in:
parent
db55e39aa1
commit
0efd0097cb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=125185
@ -1222,7 +1222,17 @@ pmap_kextract(vm_offset_t va)
|
||||
{
|
||||
struct pvo_entry *pvo;
|
||||
|
||||
#ifdef UMA_MD_SMALL_ALLOC
|
||||
/*
|
||||
* Allow direct mappings
|
||||
*/
|
||||
if (va < VM_MIN_KERNEL_ADDRESS) {
|
||||
return (va);
|
||||
}
|
||||
#endif
|
||||
|
||||
pvo = pmap_pvo_find_va(kernel_pmap, va & ~ADDR_POFF, NULL);
|
||||
KASSERT(pvo != NULL, ("pmap_kextract: no addr found"));
|
||||
if (pvo == NULL) {
|
||||
return (0);
|
||||
}
|
||||
|
@ -1222,7 +1222,17 @@ pmap_kextract(vm_offset_t va)
|
||||
{
|
||||
struct pvo_entry *pvo;
|
||||
|
||||
#ifdef UMA_MD_SMALL_ALLOC
|
||||
/*
|
||||
* Allow direct mappings
|
||||
*/
|
||||
if (va < VM_MIN_KERNEL_ADDRESS) {
|
||||
return (va);
|
||||
}
|
||||
#endif
|
||||
|
||||
pvo = pmap_pvo_find_va(kernel_pmap, va & ~ADDR_POFF, NULL);
|
||||
KASSERT(pvo != NULL, ("pmap_kextract: no addr found"));
|
||||
if (pvo == NULL) {
|
||||
return (0);
|
||||
}
|
||||
|
@ -1222,7 +1222,17 @@ pmap_kextract(vm_offset_t va)
|
||||
{
|
||||
struct pvo_entry *pvo;
|
||||
|
||||
#ifdef UMA_MD_SMALL_ALLOC
|
||||
/*
|
||||
* Allow direct mappings
|
||||
*/
|
||||
if (va < VM_MIN_KERNEL_ADDRESS) {
|
||||
return (va);
|
||||
}
|
||||
#endif
|
||||
|
||||
pvo = pmap_pvo_find_va(kernel_pmap, va & ~ADDR_POFF, NULL);
|
||||
KASSERT(pvo != NULL, ("pmap_kextract: no addr found"));
|
||||
if (pvo == NULL) {
|
||||
return (0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user