Re: [Very RFC 06/46] powerpc/iov: Move VF pdev fixup into pcibios_fixup_iov()
From: Christoph Hellwig <hch@infradead.org>
Date: 2019-11-21 08:29:07
From: Christoph Hellwig <hch@infradead.org>
Date: 2019-11-21 08:29:07
On Wed, Nov 20, 2019 at 12:28:19PM +1100, Oliver O'Halloran wrote:
Move this out of the PHB's dma_dev_setup() callback and into the ppc_md.pcibios_fixup_iov callback. This ensures that the VF PE's pdev pointer is always valid for the whole time the device is added the bus. This isn't strictly required, but it's slightly a slightly more logical place to do the fixup and it makes dma_dev_setup a bit simpler.
Ok, this removes the code I commented on earlier, so I take my comment there back.
+ if (pdev->is_virtfn) {
+ /* Fix the VF PE's pdev pointer */
+ struct pnv_ioda_pe *pe = pnv_ioda_get_pe(pdev);
+ pe->pdev = pdev;Maybe add an empty line after the variable declaration?
@@ -3641,20 +3654,6 @@ void pnv_pci_dma_dev_setup(struct pci_dev *pdev) { struct pci_controller *hose = pci_bus_to_host(pdev->bus); struct pnv_phb *phb = hose->private_data; pnv_pci_ioda_dma_dev_setup(phb, pdev); }
Can you just merge pnv_pci_dma_dev_setup and pnv_pci_ioda_dma_dev_setup now?