Page MenuHomeFreeBSD

Retire unused non-PCI_RES_BUS code
ClosedPublic

Authored by jrtc27 on Nov 12 2021, 1:17 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 17, 6:27 AM
Unknown Object (File)
Tue, Oct 15, 10:04 PM
Unknown Object (File)
Tue, Oct 15, 6:08 AM
Unknown Object (File)
Sat, Oct 12, 9:39 PM
Unknown Object (File)
Fri, Oct 11, 12:40 PM
Unknown Object (File)
Wed, Oct 9, 5:43 PM
Unknown Object (File)
Wed, Oct 9, 5:19 PM
Unknown Object (File)
Wed, Oct 9, 8:31 AM
Subscribers

Details

Summary

All architectures define PCI_RES_BUS unconditionally now that only
NEW_PCIB is supported, so we no longer need the legacy code.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 55630
Build 52519: arc lint + arc unit

Event Timeline

The patch series passes make kernels and riscv GENERIC still boots with VirtIO-over-PCI in use, but both were done manually (unifdef apparently does not do anything to defined(A) && defined(B), only defined(A) || defined(B)) so I could easily have broken something.

This revision is now accepted and ready to land.Nov 12 2021, 5:29 PM

love the removal of "AFU" and "gross hack"!

This all looks good to me... I'll see if I still have a CardBus machine around to test on... I kinda doubt it... I'll bet even if I did, it's long ago broken by something else.

sys/dev/pccbb/pccbb_pci.c
301

sc->bus can likely go away, no?

339–342

These likely can go away too.... They were part of the gross hack to allow people to set sec/sub bus numbers. This hack never worked very well...

352

This entire #if 0 likely can go... I never needed to finish stubbing it out...

sys/dev/pci/pci_pci.c
1434

Maybe this is a separate commit? IT's super-duper old hw that I doubt freebsd could still boot on...
But maybe it's ok to include in this omnibus cleanup.

1449

2003/2004 era laptop... likely related to the hacks I had in cbb

Rebased. Build-tested with tinderbox -DWITHOUT_WORLDS -DMAKE_ALL_KERNELS.

This revision now requires review to proceed.Jan 26 2024, 2:01 AM

While there is some cruft @imp noted in the ccb driver that can be purged further, that probably should be done as a separate commit.

sys/dev/pci/pci_pci.c
1434

I think in the PCI_RES_BUS case I had previously replicated this logic up in the pci(4) bus driver since it now tracks bus numbers in ivars. In particular, check pci_reserve_secbus in sys/dev/pci/pci.c.

This revision is now accepted and ready to land.Jan 29 2024, 6:08 PM
sys/dev/pci/pci_pci.c
1434

Also I'm not removing functionality, I'm removing code that's always compiled out

This revision now requires review to proceed.Jul 17 2024, 3:53 PM
This revision is now accepted and ready to land.Jul 17 2024, 5:29 PM
This revision was automatically updated to reflect the committed changes.