Page MenuHomeFreeBSD

arm64: Malloc the cpu_desc array
ClosedPublic

Authored by andrew on Jun 6 2023, 8:49 AM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 7 2024, 6:29 AM
Unknown Object (File)
Oct 7 2024, 6:29 AM
Unknown Object (File)
Oct 7 2024, 6:28 AM
Unknown Object (File)
Oct 7 2024, 6:06 AM
Unknown Object (File)
Sep 27 2024, 11:16 AM
Unknown Object (File)
Sep 27 2024, 9:49 AM
Unknown Object (File)
Sep 24 2024, 3:44 AM
Unknown Object (File)
Sep 24 2024, 3:20 AM

Details

Summary

We only need this during boot. Allocate the array before starting CPUs
to reduce the memory usage.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 51920
Build 48811: arc lint + arc unit

Event Timeline

andrew requested review of this revision.Jun 6 2023, 8:49 AM
zachary.leaf_arm.com added inline comments.
sys/arm64/arm64/identcpu.c
1862

It's the same thing, but mp_ncpus-1 seems clearer for what we're passing here as the first parameter i.e. malloc_array(size_t nmemb...)

sys/arm64/arm64/identcpu.c
1862

I decided on mp_maxid as it is allocating an array indexed by cpu id. If for some reason we had a sparse cpu id space then mp_ncpus - 1 may be too small.

This revision is now accepted and ready to land.Jun 8 2023, 7:55 AM
This revision was automatically updated to reflect the committed changes.