Page MenuHomeFreeBSD

Retire unused non-PCI_RES_BUS code
ClosedPublic

Authored by jrtc27 on Nov 12 2021, 1:17 AM.
Tags
None
Referenced Files
F102078559: D32955.diff
Thu, Nov 7, 8:47 AM
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
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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 42745
Build 39633: 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
304

sc->bus can likely go away, no?

342–345

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...

355

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

sys/dev/pci/pci_pci.c
1420

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.

1435

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
1420

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
1420

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.