From 79384e4b71240abf50c375eea56060b0d79c242a Mon Sep 17 00:00:00 2001 From: Ian Munsie Date: Thu, 14 Jul 2016 07:17:08 +1000 Subject: 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 Reviewed-by: Frederic Barrat Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman --- include/misc/cxl.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/misc') 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); /* Get the process element for this context */ int cxl_process_element(struct cxl_context *ctx); +/* + * Limit the number of interrupts that a single context can allocate via + * cxl_start_work. If using the api with a real phb, this may be used to + * request that additional default contexts be created when allocating + * interrupts via pci_enable_msix_range. These will be set to the same running + * state as the default context, and if that is running it will reuse the + * parameters previously passed to cxl_start_context for the default context. + */ +int cxl_set_max_irqs_per_process(struct pci_dev *dev, int irqs); +int cxl_get_max_irqs_per_process(struct pci_dev *dev); /* * These calls allow drivers to create their own file descriptors and make them -- cgit v1.2.1