Page MenuHomeFreeBSD

bus: Document special ranges of IVARs
Needs ReviewPublic

Authored by jhb on Tue, Dec 9, 8:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 10, 10:43 AM
Unknown Object (File)
Wed, Dec 10, 7:05 AM

Details

Reviewers
imp
andrew
manu
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Summary

Some IVAR indices are special in that they have global meaning across
multiple buses where as other IVARs are always private to the local bus.
Try to document this a bit and add constants for the various ranges to
avoid future conflicts.

This is mostly a no-op except for some buses that started their IVAR
indices at 1 instead of 0. Those buses now start at 0 after this
change. Also, IVAR indices are now generally defined as enum's as
that makes it easier to define them.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 69156
Build 66039: arc lint + arc unit

Event Timeline

Owners added a reviewer: Restricted Owners Package.Tue, Dec 9, 8:35 PM
jhb requested review of this revision.Tue, Dec 9, 8:35 PM
sys/arm64/arm64/gic_v3_var.h
114

Are you planning on MFCing this change? If not then we could just drop them.

sys/sys/bus.h
312

I don't think this is needed, the GICv3 ivars can be in the private space.

sys/arm64/arm64/gic_v3_var.h
114

I might MFC this change but have a followup change that can't be merged that drops unused ivars.

sys/sys/bus.h
312

I was going to ask about these as followups. For now I just want to document what is there.

Can the regular GIC IVARs also be in the private space?

sys/arm64/arm64/gic_v3_var.h
114

It's unused from 13 so you could name it GICV3_IVAR_UNUSED to make it self documenting.

Wouldn't it be an issue for a MFC renumbering the 1-indexed ivars to be 0-indexed?

sys/sys/bus.h
312

The regular GIC IVARs are shared between the two GIC drivers so can't be in the private space.

If you keep it then the name should be BUS_IVARS_GICV3. I'll have a GICv5 driver in the next few weeks, but that can use the private space.

sys/arm64/arm64/gic_v3_var.h
114

Oh, yes, so perhaps I won't MFC after all. Still, I think removing the unused entries as a separate commit is easier to review, etc.

sys/sys/bus.h
312

Have you considered just having a single set of GIC IVARs shared by all the drivers btw?