Page MenuHomeFreeBSD

gpiobus: Support non-child interrupt resource consumers
Needs ReviewPublic

Authored by obiwac on Tue, Sep 15, 12:36 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Sep 15, 6:00 AM
Unknown Object (File)
Tue, Sep 15, 5:53 AM
Unknown Object (File)
Tue, Sep 15, 1:10 AM
Unknown Object (File)
Tue, Sep 15, 12:59 AM
Subscribers

Details

Summary

Make gpiobus_alloc_resource() accept a 'child' that is not a child of
'bus'. This will be needed for cousin interrupt consumers, which may not
be a decendant of the interrupt source.

Sponsored by: The FreeBSD Foundation

Diff Detail

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

Event Timeline

When I thought about these things, what concerned me is dependencies between a device and its non-child consumers.
With parent-child relationships many ordering things are obvious.
But with arbitrary relations something may not be set-up enough or already torn down etc.

I think that Linux has a concept of devlink or something like that.
It's a way to register producer-consumer (or some other kind) dependencies between devices and can be thought of as a generalization of parent-child dependencies.
That the dependency graph can be topologically sorted so that devices are initialized and torn down in the correct order.

In the end, I support this change but I think that it can open dangerous holes without additional dependency mechanism.