powerpc/powernv: Capture actag information for the device
In the opencapi protocol, host memory contexts are referenced by a 'actag'. During setup, a driver must tell the device how many actags it can used, and what values are acceptable. On POWER9, the NPU can handle 64 actags per link, so they must be shared between all the PCI functions of the link. To get a global picture of how many actags are used by each AFU of every function, we capture some data at the end of PCI enumeration, so that actags can be shared fairly if needed. This is not powernv specific per say, but rather a consequence of the opencapi configuration specification being quite general. The number of available actags on POWER9 makes it more likely to be hit. This is somewhat mitigated by the fact that existing AFUs are coded by requesting a reasonable count of actags and existing devices carry only one AFU. Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:

committed by
Michael Ellerman

parent
6914c75711
commit
2cb3d64b26
@@ -9,6 +9,10 @@
|
||||
#define PNV_OCXL_TL_BITS_PER_RATE 4
|
||||
#define PNV_OCXL_TL_RATE_BUF_SIZE ((PNV_OCXL_TL_MAX_TEMPLATE+1) * PNV_OCXL_TL_BITS_PER_RATE / 8)
|
||||
|
||||
extern int pnv_ocxl_get_actag(struct pci_dev *dev, u16 *base, u16 *enabled,
|
||||
u16 *supported);
|
||||
extern int pnv_ocxl_get_pasid_count(struct pci_dev *dev, int *count);
|
||||
|
||||
extern int pnv_ocxl_get_tl_cap(struct pci_dev *dev, long *cap,
|
||||
char *rate_buf, int rate_buf_size);
|
||||
extern int pnv_ocxl_set_tl_conf(struct pci_dev *dev, long cap,
|
||||
|
Reference in New Issue
Block a user