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:
Neel Natu 2013-07-03 23:38:37 +00:00
parent 64cf3edab8
commit 6b5fbc1225
2 changed files with 1 additions and 1 deletions

View File

@ -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);
}

View File

@ -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);