mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-22 10:48:02 +00:00
physmem: zero entire array
As a convenience to callers, who might allocate the array on the stack. An empty/zero-valued range indicates the end of the physmap entries. Remove the now-redundant calls to bzero() at the call site. Reviewed by: andrew Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45318
This commit is contained in:
parent
480ad40553
commit
191e6a6049
|
@ -1437,7 +1437,6 @@ pmap_bootstrap_san1(vm_offset_t va, int scale)
|
|||
* Rebuild physmap one more time, we may have excluded more regions from
|
||||
* allocation since pmap_bootstrap().
|
||||
*/
|
||||
bzero(physmap, sizeof(physmap));
|
||||
physmap_idx = physmem_avail(physmap, nitems(physmap));
|
||||
physmap_idx /= 2;
|
||||
|
||||
|
|
|
@ -189,6 +189,8 @@ regions_to_avail(vm_paddr_t *avail, uint32_t exflags, size_t maxavail,
|
|||
const struct region *exp, *hwp;
|
||||
uint64_t availsz;
|
||||
|
||||
bzero(avail, maxavail * sizeof(vm_paddr_t));
|
||||
|
||||
totalmem = 0;
|
||||
availmem = 0;
|
||||
availsz = 0;
|
||||
|
@ -587,7 +589,6 @@ ram_attach(device_t dev)
|
|||
rid = 0;
|
||||
|
||||
/* Get the avail list. */
|
||||
bzero(avail_list, sizeof(avail_list));
|
||||
regions_to_avail(avail_list, EXFLAG_NOALLOC | EXFLAG_NODUMP,
|
||||
PHYS_AVAIL_COUNT, 0, NULL, NULL);
|
||||
|
||||
|
|
Loading…
Reference in a new issue