powerpc/powernv: allocate sparse PE# when using M64 BAR in Single PE mode
When M64 BAR is set to Single PE mode, the PE# assigned to VF could be sparse. This patch restructures the code to allocate sparse PE# for VFs when M64 BAR is set to Single PE mode. Also it rename the offset to pe_num_map to reflect the content is the PE number. Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com> Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Acked-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:

committed by
Michael Ellerman

parent
dfcc8d45c3
commit
be283eeb7f
@@ -215,7 +215,7 @@ struct pci_dn {
|
||||
#ifdef CONFIG_PCI_IOV
|
||||
u16 vfs_expanded; /* number of VFs IOV BAR expanded */
|
||||
u16 num_vfs; /* number of VFs enabled*/
|
||||
int offset; /* PE# for the first VF PE */
|
||||
int *pe_num_map; /* PE# for the first VF PE or array */
|
||||
bool m64_single_mode; /* Use M64 BAR in Single Mode */
|
||||
#define IODA_INVALID_M64 (-1)
|
||||
int (*m64_map)[PCI_SRIOV_NUM_BARS];
|
||||
|
Reference in New Issue
Block a user