vm_phys_fictitious_reg_range() was losing the 'memattr' because it would be
reset by pmap_page_init() right after being initialized in vm_page_initfake(). The statement above is with reference to the amd64 implementation of pmap_page_init(). Fix this by calling 'pmap_page_init()' in 'vm_page_initfake()' before changing the 'memattr'. Reviewed by: kib MFC after: 2 weeks
This commit is contained in:
parent
64cf3edab8
commit
6b5fbc1225
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=252653
@ -645,6 +645,7 @@ vm_page_initfake(vm_page_t m, vm_paddr_t paddr, vm_memattr_t memattr)
|
||||
/* Fictitious pages don't use "order" or "pool". */
|
||||
m->oflags = VPO_BUSY | VPO_UNMANAGED;
|
||||
m->wire_count = 1;
|
||||
pmap_page_init(m);
|
||||
memattr:
|
||||
pmap_page_set_memattr(m, memattr);
|
||||
}
|
||||
|
@ -559,7 +559,6 @@ vm_phys_fictitious_reg_range(vm_paddr_t start, vm_paddr_t end,
|
||||
}
|
||||
for (i = 0; i < page_count; i++) {
|
||||
vm_page_initfake(&fp[i], start + PAGE_SIZE * i, memattr);
|
||||
pmap_page_init(&fp[i]);
|
||||
fp[i].oflags &= ~(VPO_BUSY | VPO_UNMANAGED);
|
||||
}
|
||||
mtx_lock(&vm_phys_fictitious_reg_mtx);
|
||||
|
Loading…
Reference in New Issue
Block a user