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
F81659313: D40392.diff
Fri, Apr 19, 2:25 PM
Unknown Object (File)
Fri, Apr 12, 12:15 PM
Unknown Object (File)
Wed, Apr 10, 2:55 PM
Unknown Object (File)
Wed, Apr 3, 3:43 PM
Unknown Object (File)
Wed, Mar 27, 4:13 PM
Unknown Object (File)
Dec 23 2023, 9:28 AM
Unknown Object (File)
Dec 12 2023, 4:32 PM
Unknown Object (File)
Nov 13 2023, 1:54 AM

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.