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)
Sat, May 11, 12:06 AM
Unknown Object (File)
Fri, May 10, 4:56 AM
Unknown Object (File)
Fri, May 10, 4:56 AM
Unknown Object (File)
Thu, May 9, 10:10 PM
Unknown Object (File)
Jan 13 2024, 11:37 AM
Unknown Object (File)
Dec 23 2023, 1:28 AM
Unknown Object (File)
Jul 13 2023, 6:42 AM
Unknown Object (File)
Jul 3 2023, 9:46 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.