Page MenuHomeFreeBSD

Retire unused non-PCI_RES_BUS code
AcceptedPublic

Authored by jrtc27 on Nov 12 2021, 1:17 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 12, 8:52 AM
Unknown Object (File)
Fri, Apr 12, 8:13 AM
Unknown Object (File)
Mon, Apr 8, 9:41 AM
Unknown Object (File)
Mar 16 2024, 2:05 AM
Unknown Object (File)
Jan 29 2024, 2:16 AM
Unknown Object (File)
Jan 26 2024, 1:30 AM
Unknown Object (File)
Jan 26 2024, 1:30 AM
Unknown Object (File)
Jan 26 2024, 1:30 AM
Subscribers

Details

Summary

All architectures define PCI_RES_BUS, 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