Page MenuHomeFreeBSD

arm64: Reduce the direct use of cpu_desc
ClosedPublic

Authored by andrew on Jun 2 2023, 3:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 13, 5:43 AM
Unknown Object (File)
Oct 7 2024, 6:09 AM
Unknown Object (File)
Oct 2 2024, 7:03 AM
Unknown Object (File)
Sep 17 2024, 5:33 PM
Unknown Object (File)
Sep 8 2024, 11:57 PM
Unknown Object (File)
Sep 8 2024, 2:11 AM
Unknown Object (File)
Sep 7 2024, 11:08 PM
Unknown Object (File)
Aug 18 2024, 12:36 PM

Details

Summary

To help moving to a dynamically allocated cpu_desc array reduce the
places we use it directly and create a pointer that is passed in to
functions that read it.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

andrew requested review of this revision.Jun 2 2023, 3:58 PM
zachary.leaf_arm.com added inline comments.
sys/arm64/arm64/identcpu.c
2453

Functionally, we used to compare everything with cpu_desc[0], now we compare with prev_desc - does that matter?

sys/arm64/arm64/identcpu.c
2453

In the base case where prev_desc is CPU0 the check is identical.

When prev_desc is not CPU0 we know that at this affinity level and all higher levels the value is identical so it doesn't matter which cpu we compare with. This is true because cpu_aff_levels is set to the affinity level where above it all CPUs have an identical affinity and below it some CPUs are different.

This revision was not accepted when it landed; it landed in state Needs Review.Jun 8 2023, 4:11 PM
This revision was automatically updated to reflect the committed changes.