Adding an ops to struct pci_host_bridge?
Hi,
On powerpc, we have a possibly-programmable device (CXL) which
we're making look a lot like a PCI bus containing devices. Rather than hacking "if (is_really_cxl(dev))" into every powerpc pcibios_* routine, Ben Herrenschmidt suggested moving from pcibios_* to an ops structure inside pci_host_bridge.
In transition, it'd be up to the arch (ie. powerpc) to call
find_pci_host_bridge(dev->bus)->ops->xxx from their pcibios_ functions, but if there's general interest other archs could start doing it too.
If this seems like a nice idea, we can discuss which pcibios_ functions make sense to place into ops.
Thanks,
Rusty.