diff options
author | Wei Yang <weiyang@linux.vnet.ibm.com> | 2015-03-25 04:23:58 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2015-03-30 22:02:38 -0400 |
commit | 5b88ec228498b7d41de6599eca12cc0032056e3f (patch) | |
tree | 9ef87bc8413673daf8a074c8baf0f052eb03950c /arch/powerpc/include | |
parent | 781a868f3136c6eb8e8c5c19d148416d7da86610 (diff) |
powerpc/powernv: Reserve additional space for IOV BAR, with m64_per_iov supported
M64 aperture size is limited on PHB3. When the IOV BAR is too big, this
will exceed the limitation and failed to be assigned.
Introduce a different mechanism based on the IOV BAR size:
- if IOV BAR size is smaller than 64MB, expand to total_pe
- if IOV BAR size is bigger than 64MB, roundup power2
[bhelgaas: make dev_printk() output more consistent, use PCI_SRIOV_NUM_BARS]
Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/pci-bridge.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h index 8716db48e946..415df8509f52 100644 --- a/arch/powerpc/include/asm/pci-bridge.h +++ b/arch/powerpc/include/asm/pci-bridge.h | |||
@@ -182,6 +182,8 @@ struct pci_dn { | |||
182 | u16 vfs_expanded; /* number of VFs IOV BAR expanded */ | 182 | u16 vfs_expanded; /* number of VFs IOV BAR expanded */ |
183 | u16 num_vfs; /* number of VFs enabled*/ | 183 | u16 num_vfs; /* number of VFs enabled*/ |
184 | int offset; /* PE# for the first VF PE */ | 184 | int offset; /* PE# for the first VF PE */ |
185 | #define M64_PER_IOV 4 | ||
186 | int m64_per_iov; | ||
185 | #define IODA_INVALID_M64 (-1) | 187 | #define IODA_INVALID_M64 (-1) |
186 | int m64_wins[PCI_SRIOV_NUM_BARS]; | 188 | int m64_wins[PCI_SRIOV_NUM_BARS]; |
187 | #endif /* CONFIG_PCI_IOV */ | 189 | #endif /* CONFIG_PCI_IOV */ |