Page MenuHomeFreeBSD

Support interrupts binding in GICv3 and ITS
ClosedPublic

Authored by zbb on Feb 8 2016, 1:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 3, 11:54 PM
Unknown Object (File)
Sun, Nov 3, 11:54 PM
Unknown Object (File)
Sun, Nov 3, 11:54 PM
Unknown Object (File)
Sun, Nov 3, 11:54 PM
Unknown Object (File)
Sun, Nov 3, 11:41 PM
Unknown Object (File)
Sep 25 2024, 12:58 AM
Unknown Object (File)
Sep 25 2024, 12:58 AM
Unknown Object (File)
Sep 25 2024, 12:58 AM
Subscribers

Details

Summary
  • Add MOVI command and routine for the LPI migration
  • Allow to search for the ITS device descriptor using not only devID but also LPI number.
  • Bind SPIs in the Distributor
  • Don't bind its_dev to collection. Keep track of the collection IDs for each LPI.

Reviewed by:
Obtained from: Semihalf
Sponsored by: Cavium
Differential Revision:

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

zbb retitled this revision from to Support interrupts binding in GICv3 and ITS.
zbb updated this object.
zbb edited the test plan for this revision. (Show Details)
zbb added reviewers: andrew, wma.
zbb set the repository for this revision to rS FreeBSD src repository - subversion.
zbb added a subscriber: arm64.
sys/arm64/arm64/gic_v3_its.c
992–994

how is the its_dev protected outside of this region?

sys/arm64/arm64/gic_v3_var.h
135

Out of curiosity, what are the command #s based on?

sys/arm64/arm64/gic_v3_its.c
992–994

We lock the its_device_find_locked() to avoid mismatch in general itd_device list.
I assume that the interrupt resources that are managed through its_dev here are allocated and protected by the resource manager.
So there should be no another driver thread that is going to work on that its_dev.

However, after rethinking, I can see no point of having its_dev->col->col_id. I would probably change that in the next iteration.

sys/arm64/arm64/gic_v3_var.h
135

The numbers are defined by the ITS architecture. This is described in the GIC Architecture Specification PRD03-GENC-010745 24.0

zbb updated this object.
  • Don't bind its_dev to collection. Keep track of the collection IDs for each LPI.
wma edited edge metadata.
wma added inline comments.
sys/arm64/arm64/gic_v3_its.c
921

Now, the execution of lpi_free_chunk is no longer guarded by the lock. I might not see all dependencies here, but please check before commiting if there is a possibility of use-after-free of lpi_col_ids if this function is reentered by mmultiple threads.

If so, it might be fixed as following:

tmp = lpic->lpi_col_ids;
lpic->lpi_col_ids = NULL;
dmb();
free(tmp);

This revision is now accepted and ready to land.Feb 11 2016, 6:23 AM
sys/arm64/arm64/gic_v3_its.c
921

LPI chunk is per driver instance, hence per driver thread. The important thing is LPIs bitmap which is shared (and locked).

zbb marked 2 inline comments as done.Feb 11 2016, 10:41 AM
This revision was automatically updated to reflect the committed changes.