Page MenuHomeFreeBSD

Sprinkle EARLY_DRIVER_MODULE throughout the tree
ClosedPublic

Authored by jhibbits on Oct 8 2014, 5:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 4 2024, 11:28 PM
Unknown Object (File)
Oct 3 2024, 10:03 AM
Unknown Object (File)
Oct 3 2024, 8:05 AM
Unknown Object (File)
Oct 3 2024, 5:15 AM
Unknown Object (File)
Oct 3 2024, 12:08 AM
Unknown Object (File)
Oct 2 2024, 6:48 PM
Unknown Object (File)
Oct 2 2024, 5:34 PM
Unknown Object (File)
Oct 2 2024, 12:10 PM
Subscribers

Details

Summary

As preparation for multipass suspend/resume, mark busses as BUS_PASS_BUS, and
give all unowned devices the same pass number as their parent (they will be
re-assigned a pass number when a driver attaches). This will allow most devices
to be suspended early and resumed late, while devices such as PCI Baseboard
devices will be resumed early with the parent bus. Some devices are marked as
BUS_PASS_RESOURCE, as they're not buses, but may be more critical than normal
devices.

This currently only sprinkles around x86 and PowerPC. Others can be updated as
needed (perhaps a better pass number can be chosen?).

Test Plan

Has been tested on PowerPC as part of my projects/pmac_pmu branch (this is a
conceptual merge of part of that branch). Needs testing on x86.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhibbits retitled this revision from to Sprinkle EARLY_DRIVER_MODULE throughout the tree.
jhibbits updated this object.
jhibbits edited the test plan for this revision. (Show Details)
jhibbits added reviewers: jhb, nwhitehorn.
nwhitehorn edited edge metadata.

Looks good to me.

This revision is now accepted and ready to land.Aug 20 2016, 1:49 AM

In its current form it breaks x86. If there are some drivers you need for powerpc (like the PCI buses), that can be fine since it won't actually enable things on x86 if ACPI and nexus remain at the default pass. I have a git branch where I have something that somewhat works on x86. I basically have to handle ACPI an acpi_sysresource before I probe anything else (I think I ended up adding a BUS_PASS_PREBUS or some such, though I'm not super happy about that approach).

What's the next step with this patch?

In D918#384691, @emaste wrote:

What's the next step with this patch?

I think I'll take @jhb's comment, and apply all but the x86 changes. As he mentioned, if the nexus and its immediate children don't attach until default pass, nothing will change for that platform.

This revision was automatically updated to reflect the committed changes.