powerpc/aim: Use nitems() for calculating size of phys_avail in AIM pmaps
Same thing was already done in r347164 for Book-E pmap.
This commit is contained in:
parent
5f37b74d5d
commit
b7918b86b3
@ -749,7 +749,7 @@ moea_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelend)
|
||||
} while (pa < end);
|
||||
}
|
||||
|
||||
if (sizeof(phys_avail)/sizeof(phys_avail[0]) < regions_sz)
|
||||
if (nitems(phys_avail) < regions_sz)
|
||||
panic("moea_bootstrap: phys_avail too small");
|
||||
|
||||
phys_avail_count = 0;
|
||||
|
@ -768,7 +768,7 @@ moea64_early_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelen
|
||||
mem_regions(&pregions, &pregions_sz, ®ions, ®ions_sz);
|
||||
CTR0(KTR_PMAP, "moea64_bootstrap: physical memory");
|
||||
|
||||
if (sizeof(phys_avail)/sizeof(phys_avail[0]) < regions_sz)
|
||||
if (nitems(phys_avail) < regions_sz)
|
||||
panic("moea64_bootstrap: phys_avail too small");
|
||||
|
||||
phys_avail_count = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user