Page MenuHomeFreeBSD

Make pci_host_generic and thunderx_pci common
ClosedPublic

Authored by wma on Feb 12 2016, 8:22 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Sep 13, 6:10 PM
Unknown Object (File)
Sun, Sep 8, 2:49 AM
Unknown Object (File)
Sat, Sep 7, 6:18 AM
Unknown Object (File)
Fri, Aug 23, 7:49 AM
Unknown Object (File)
Aug 17 2024, 5:08 AM
Unknown Object (File)
Aug 15 2024, 7:51 AM
Unknown Object (File)
Aug 12 2024, 6:33 AM
Unknown Object (File)
Aug 5 2024, 8:02 AM
Subscribers

Details

Summary
  • provided OFW interface for pci_host_generic (for handling devices which are present in DTS under the PCI node)
  • removed support for internal pci from qrm64/cavium
  • cleaned up and made most of the code common

Diff Detail

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

Event Timeline

wma retitled this revision from to Add ThunderX quirks to pcie-host-generic.
wma updated this object.
wma edited the test plan for this revision. (Show Details)
wma added reviewers: zbb, br.
wma set the repository for this revision to rS FreeBSD src repository - subversion.

very cool - thanks for that !

sys/dev/pci/pci_host_generic.c
187 ↗(On Diff #13247)

struct generic_pcie_quirks *quirk;
quirk = g_quirks;

zbb edited edge metadata.
This revision is now accepted and ready to land.Feb 16 2016, 1:19 PM
wma edited edge metadata.

Moved qiurk to machine-specific file as suggested by cognet. Also, cleaned up a little and changed bus_probe to be GENERIC.

This revision now requires review to proceed.Feb 19 2016, 7:38 AM
sys/dev/pci/pci_host_generic.c
116 ↗(On Diff #13487)

will be removed

I may be missing something, but there don't seem to be any quirks defined.

Actually, there is one in sys/dev/pci/pci_host_generic.c:232. The generic driver must know the machine-dependent domain (ECAM number) it operates on.

In that case I think it would make sense to create a sub class of the generic driver to handle the ThunderX specific changes.

wma retitled this revision from Add ThunderX quirks to pcie-host-generic to Make pci_host_generic and thunderx_pci common.
wma updated this object.
wma edited edge metadata.
sys/dev/pci/pci_host_generic.c
171 ↗(On Diff #13605)

Will this work with ACPI?

629 ↗(On Diff #13605)

Why didn't you just replace the contents of the old functions?

sys/dev/pci/pci_host_generic.h
2 ↗(On Diff #13605)

You seem to have misspelled Ruslans name. I only see a few lines in this file that didn't come from pci_host_generic.c.

30 ↗(On Diff #13605)

Missing tab

sys/dev/pci/pci_host_generic.c
171 ↗(On Diff #13605)

This whole file is meant to be used when FDT is enabled. Are you suggesting surrounding this part with ifdef FDT? Or did you have something else in mind?

629 ↗(On Diff #13605)

I don't want to mix the code for pci and ofw allocation, it'd make the functions too long, hard to read and to maintain. I'm using the same pattern here as in old thunder_pcie.c.

zbb edited edge metadata.
This revision is now accepted and ready to land.Feb 23 2016, 12:16 PM
This revision was automatically updated to reflect the committed changes.