diff options
author | Alastair D'Silva <alastair@d-silva.org> | 2018-06-28 06:05:02 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-07-02 09:54:31 -0400 |
commit | 17d29039388807305ab02a4d6eae7cbe09f81f90 (patch) | |
tree | 0840162bb6a80262156b1f49d635e052f9111202 /drivers/misc/cxl | |
parent | 0cfd7335d1ebea42cf113fd22452f6a10d3960fe (diff) |
Revert "cxl: Add preliminary workaround for CX4 interrupt limitation"
Remove abandonned capi support for the Mellanox CX4.
This reverts commit cbce0917e2e47d4bf5aa3b5fd6b1247f33e1a126.
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/misc/cxl')
-rw-r--r-- | drivers/misc/cxl/api.c | 15 | ||||
-rw-r--r-- | drivers/misc/cxl/base.c | 17 | ||||
-rw-r--r-- | drivers/misc/cxl/context.c | 1 | ||||
-rw-r--r-- | drivers/misc/cxl/cxl.h | 10 | ||||
-rw-r--r-- | drivers/misc/cxl/main.c | 1 |
5 files changed, 0 insertions, 44 deletions
diff --git a/drivers/misc/cxl/api.c b/drivers/misc/cxl/api.c index 2e5862b7a074..34ba67bc41bd 100644 --- a/drivers/misc/cxl/api.c +++ b/drivers/misc/cxl/api.c | |||
@@ -181,21 +181,6 @@ static irq_hw_number_t cxl_find_afu_irq(struct cxl_context *ctx, int num) | |||
181 | return 0; | 181 | return 0; |
182 | } | 182 | } |
183 | 183 | ||
184 | int _cxl_next_msi_hwirq(struct pci_dev *pdev, struct cxl_context **ctx, int *afu_irq) | ||
185 | { | ||
186 | if (*ctx == NULL || *afu_irq == 0) { | ||
187 | *afu_irq = 1; | ||
188 | *ctx = cxl_get_context(pdev); | ||
189 | } else { | ||
190 | (*afu_irq)++; | ||
191 | if (*afu_irq > cxl_get_max_irqs_per_process(pdev)) { | ||
192 | *ctx = list_next_entry(*ctx, extra_irq_contexts); | ||
193 | *afu_irq = 1; | ||
194 | } | ||
195 | } | ||
196 | return cxl_find_afu_irq(*ctx, *afu_irq); | ||
197 | } | ||
198 | /* Exported via cxl_base */ | ||
199 | 184 | ||
200 | int cxl_set_priv(struct cxl_context *ctx, void *priv) | 185 | int cxl_set_priv(struct cxl_context *ctx, void *priv) |
201 | { | 186 | { |
diff --git a/drivers/misc/cxl/base.c b/drivers/misc/cxl/base.c index fe90f895bb10..e1e80cb99ad9 100644 --- a/drivers/misc/cxl/base.c +++ b/drivers/misc/cxl/base.c | |||
@@ -141,23 +141,6 @@ void cxl_pci_disable_device(struct pci_dev *dev) | |||
141 | } | 141 | } |
142 | EXPORT_SYMBOL_GPL(cxl_pci_disable_device); | 142 | EXPORT_SYMBOL_GPL(cxl_pci_disable_device); |
143 | 143 | ||
144 | int cxl_next_msi_hwirq(struct pci_dev *pdev, struct cxl_context **ctx, int *afu_irq) | ||
145 | { | ||
146 | int ret; | ||
147 | struct cxl_calls *calls; | ||
148 | |||
149 | calls = cxl_calls_get(); | ||
150 | if (!calls) | ||
151 | return -EBUSY; | ||
152 | |||
153 | ret = calls->cxl_next_msi_hwirq(pdev, ctx, afu_irq); | ||
154 | |||
155 | cxl_calls_put(calls); | ||
156 | |||
157 | return ret; | ||
158 | } | ||
159 | EXPORT_SYMBOL_GPL(cxl_next_msi_hwirq); | ||
160 | |||
161 | static int __init cxl_base_init(void) | 144 | static int __init cxl_base_init(void) |
162 | { | 145 | { |
163 | struct device_node *np; | 146 | struct device_node *np; |
diff --git a/drivers/misc/cxl/context.c b/drivers/misc/cxl/context.c index c6ec872800a2..0355d42d367f 100644 --- a/drivers/misc/cxl/context.c +++ b/drivers/misc/cxl/context.c | |||
@@ -74,7 +74,6 @@ int cxl_context_init(struct cxl_context *ctx, struct cxl_afu *afu, bool master) | |||
74 | ctx->pending_afu_err = false; | 74 | ctx->pending_afu_err = false; |
75 | 75 | ||
76 | INIT_LIST_HEAD(&ctx->irq_names); | 76 | INIT_LIST_HEAD(&ctx->irq_names); |
77 | INIT_LIST_HEAD(&ctx->extra_irq_contexts); | ||
78 | 77 | ||
79 | /* | 78 | /* |
80 | * When we have to destroy all contexts in cxl_context_detach_all() we | 79 | * When we have to destroy all contexts in cxl_context_detach_all() we |
diff --git a/drivers/misc/cxl/cxl.h b/drivers/misc/cxl/cxl.h index 9688fe8b4d80..d95c2c98f2ab 100644 --- a/drivers/misc/cxl/cxl.h +++ b/drivers/misc/cxl/cxl.h | |||
@@ -623,14 +623,6 @@ struct cxl_context { | |||
623 | 623 | ||
624 | struct rcu_head rcu; | 624 | struct rcu_head rcu; |
625 | 625 | ||
626 | /* | ||
627 | * Only used when more interrupts are allocated via | ||
628 | * pci_enable_msix_range than are supported in the default context, to | ||
629 | * use additional contexts to overcome the limitation. i.e. Mellanox | ||
630 | * CX4 only: | ||
631 | */ | ||
632 | struct list_head extra_irq_contexts; | ||
633 | |||
634 | struct mm_struct *mm; | 626 | struct mm_struct *mm; |
635 | 627 | ||
636 | u16 tidr; | 628 | u16 tidr; |
@@ -878,13 +870,11 @@ ssize_t cxl_pci_afu_read_err_buffer(struct cxl_afu *afu, char *buf, | |||
878 | /* Internal functions wrapped in cxl_base to allow PHB to call them */ | 870 | /* Internal functions wrapped in cxl_base to allow PHB to call them */ |
879 | bool _cxl_pci_associate_default_context(struct pci_dev *dev, struct cxl_afu *afu); | 871 | bool _cxl_pci_associate_default_context(struct pci_dev *dev, struct cxl_afu *afu); |
880 | void _cxl_pci_disable_device(struct pci_dev *dev); | 872 | void _cxl_pci_disable_device(struct pci_dev *dev); |
881 | int _cxl_next_msi_hwirq(struct pci_dev *pdev, struct cxl_context **ctx, int *afu_irq); | ||
882 | 873 | ||
883 | struct cxl_calls { | 874 | struct cxl_calls { |
884 | void (*cxl_slbia)(struct mm_struct *mm); | 875 | void (*cxl_slbia)(struct mm_struct *mm); |
885 | bool (*cxl_pci_associate_default_context)(struct pci_dev *dev, struct cxl_afu *afu); | 876 | bool (*cxl_pci_associate_default_context)(struct pci_dev *dev, struct cxl_afu *afu); |
886 | void (*cxl_pci_disable_device)(struct pci_dev *dev); | 877 | void (*cxl_pci_disable_device)(struct pci_dev *dev); |
887 | int (*cxl_next_msi_hwirq)(struct pci_dev *pdev, struct cxl_context **ctx, int *afu_irq); | ||
888 | 878 | ||
889 | struct module *owner; | 879 | struct module *owner; |
890 | }; | 880 | }; |
diff --git a/drivers/misc/cxl/main.c b/drivers/misc/cxl/main.c index 59a904efd104..a7e83624034b 100644 --- a/drivers/misc/cxl/main.c +++ b/drivers/misc/cxl/main.c | |||
@@ -106,7 +106,6 @@ static struct cxl_calls cxl_calls = { | |||
106 | .cxl_slbia = cxl_slbia_core, | 106 | .cxl_slbia = cxl_slbia_core, |
107 | .cxl_pci_associate_default_context = _cxl_pci_associate_default_context, | 107 | .cxl_pci_associate_default_context = _cxl_pci_associate_default_context, |
108 | .cxl_pci_disable_device = _cxl_pci_disable_device, | 108 | .cxl_pci_disable_device = _cxl_pci_disable_device, |
109 | .cxl_next_msi_hwirq = _cxl_next_msi_hwirq, | ||
110 | .owner = THIS_MODULE, | 109 | .owner = THIS_MODULE, |
111 | }; | 110 | }; |
112 | 111 | ||