summaryrefslogtreecommitdiffstats
path: root/include/misc
diff options
context:
space:
mode:
authorIan Munsie <imunsie@au1.ibm.com>2016-07-13 17:17:08 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2016-07-14 06:26:57 -0400
commit79384e4b71240abf50c375eea56060b0d79c242a (patch)
tree02d0c6eba0afa7755a9d8f24fb78d55137634ea4 /include/misc
parent317f5ef1b363417b6f1e93b90dfd2ffd6be6e867 (diff)
cxl: Add kernel APIs to get & set the max irqs per context
These APIs will be used by the Mellanox CX4 support. While they function standalone to configure existing behaviour, their primary purpose is to allow the Mellanox driver to inform the cxl driver of a hardware limitation, which will be used in a future patch. Signed-off-by: Ian Munsie <imunsie@au1.ibm.com> Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'include/misc')
-rw-r--r--include/misc/cxl.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/misc/cxl.h b/include/misc/cxl.h
index dd9eebba3bb6..fc07ed47c2d8 100644
--- a/include/misc/cxl.h
+++ b/include/misc/cxl.h
@@ -166,6 +166,16 @@ void cxl_psa_unmap(void __iomem *addr);
166/* Get the process element for this context */ 166/* Get the process element for this context */
167int cxl_process_element(struct cxl_context *ctx); 167int cxl_process_element(struct cxl_context *ctx);
168 168
169/*
170 * Limit the number of interrupts that a single context can allocate via
171 * cxl_start_work. If using the api with a real phb, this may be used to
172 * request that additional default contexts be created when allocating
173 * interrupts via pci_enable_msix_range. These will be set to the same running
174 * state as the default context, and if that is running it will reuse the
175 * parameters previously passed to cxl_start_context for the default context.
176 */
177int cxl_set_max_irqs_per_process(struct pci_dev *dev, int irqs);
178int cxl_get_max_irqs_per_process(struct pci_dev *dev);
169 179
170/* 180/*
171 * These calls allow drivers to create their own file descriptors and make them 181 * These calls allow drivers to create their own file descriptors and make them