powerpc/powernv/npu: TCE Kill helpers cleanup
NPU PHB TCE Kill register is exactly the same as in the rest of POWER8 so let's reuse the existing code for NPU. The only bit missing is a helper to reset the entire TCE cache so this moves such a helper from NPU code and renames it. Since pnv_npu_tce_invalidate() does really invalidate the entire cache, this uses pnv_pci_ioda2_tce_invalidate_entire() directly for NPU. This adds an explicit comment for workaround for invalidating NPU TCE cache. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Этот коммит содержится в:

коммит произвёл
Michael Ellerman

родитель
bef9253f55
Коммит
0bbcdb437d
@@ -218,15 +218,10 @@ extern int pnv_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type);
|
||||
extern void pnv_teardown_msi_irqs(struct pci_dev *pdev);
|
||||
|
||||
/* Nvlink functions */
|
||||
extern void pnv_npu_tce_invalidate_entire(struct pnv_ioda_pe *npe);
|
||||
extern void pnv_npu_tce_invalidate(struct pnv_ioda_pe *npe,
|
||||
struct iommu_table *tbl,
|
||||
unsigned long index,
|
||||
unsigned long npages,
|
||||
bool rm);
|
||||
extern void pnv_npu_init_dma_pe(struct pnv_ioda_pe *npe);
|
||||
extern void pnv_npu_setup_dma_pe(struct pnv_ioda_pe *npe);
|
||||
extern int pnv_npu_dma_set_bypass(struct pnv_ioda_pe *npe, bool enabled);
|
||||
extern int pnv_npu_dma_set_mask(struct pci_dev *npdev, u64 dma_mask);
|
||||
extern void pnv_pci_ioda2_tce_invalidate_entire(struct pnv_phb *phb, bool rm);
|
||||
|
||||
#endif /* __POWERNV_PCI_H */
|
||||
|
Ссылка в новой задаче
Block a user