Page MenuHomeFreeBSD

Stop using the rid as an index in the arm timer
ClosedPublic

Authored by andrew on Mar 15 2023, 2:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 18 2024, 5:46 AM
Unknown Object (File)
Sep 18 2024, 12:24 AM
Unknown Object (File)
Sep 17 2024, 2:27 AM
Unknown Object (File)
Sep 16 2024, 7:00 PM
Unknown Object (File)
Sep 4 2024, 8:00 AM
Unknown Object (File)
Sep 3 2024, 8:09 AM
Unknown Object (File)
Sep 2 2024, 2:49 AM
Unknown Object (File)
Sep 1 2024, 7:21 PM
Subscribers

Details

Summary

The order of the interrupt array doesn't matter. Store the described
interrupts at the start of the array to simplify iterating over them.

Sponsored by: Arm Ltd

Diff Detail

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

Event Timeline

All looks straight forward. No real functional change here. No need to randomly access the array either, just iterate over it.

This revision is now accepted and ready to land.Mar 15 2023, 2:52 PM
kevans added inline comments.
sys/arm/arm/generic_timer.c
702

I believe we still want the rid here. Is it worth releasing resources for these interrupts that we're now skipping, since we've already decided which we'll be using?

sys/arm/arm/generic_timer.c
702

The rid may change, e.g. when using interrupt-names. The index is used as a internal ID and default rid when interrupt-names isn't used.

We could drop the resource, however that may lead to holes in the array so er would need to memmove later entries to keep the array packed.

kevans added inline comments.
sys/arm/arm/generic_timer.c
702

Ahh, fair point- thanks! I had overlooked that idx was assigned the original idx specified in arm_tmr_irq_defs, which makes sense.