diff options
author | Alastair D'Silva <alastair@d-silva.org> | 2018-06-28 06:05:05 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-07-02 09:54:32 -0400 |
commit | c8d43cf08ab8c0b8829e67f7711bc72a3be6503f (patch) | |
tree | 6f26f8e2fe65aedabeb2b5fb540abbe480d4efd5 | |
parent | 29fea8aa21a69418386e3e08fa546a0ba9bee96d (diff) |
Revert "cxl: Add support for using the kernel API with a real PHB"
Remove abandonned capi support for the Mellanox CX4.
This reverts commit 317f5ef1b363417b6f1e93b90dfd2ffd6be6e867.
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>
-rw-r--r-- | drivers/misc/cxl/pci.c | 3 | ||||
-rw-r--r-- | drivers/misc/cxl/vphb.c | 16 |
2 files changed, 2 insertions, 17 deletions
diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c index 9c5a21fee835..193ff22f610b 100644 --- a/drivers/misc/cxl/pci.c +++ b/drivers/misc/cxl/pci.c | |||
@@ -1886,9 +1886,6 @@ static int cxl_probe(struct pci_dev *dev, const struct pci_device_id *id) | |||
1886 | dev_err(&dev->dev, "AFU %i failed to start: %i\n", slice, rc); | 1886 | dev_err(&dev->dev, "AFU %i failed to start: %i\n", slice, rc); |
1887 | } | 1887 | } |
1888 | 1888 | ||
1889 | if (pnv_pci_on_cxl_phb(dev) && adapter->slices >= 1) | ||
1890 | pnv_cxl_phb_set_peer_afu(dev, adapter->afu[0]); | ||
1891 | |||
1892 | return 0; | 1889 | return 0; |
1893 | } | 1890 | } |
1894 | 1891 | ||
diff --git a/drivers/misc/cxl/vphb.c b/drivers/misc/cxl/vphb.c index 7fd0bdc1436a..1a99c9c7a6fb 100644 --- a/drivers/misc/cxl/vphb.c +++ b/drivers/misc/cxl/vphb.c | |||
@@ -9,7 +9,6 @@ | |||
9 | 9 | ||
10 | #include <linux/pci.h> | 10 | #include <linux/pci.h> |
11 | #include <misc/cxl.h> | 11 | #include <misc/cxl.h> |
12 | #include <asm/pnv-pci.h> | ||
13 | #include "cxl.h" | 12 | #include "cxl.h" |
14 | 13 | ||
15 | static int cxl_dma_set_mask(struct pci_dev *pdev, u64 dma_mask) | 14 | static int cxl_dma_set_mask(struct pci_dev *pdev, u64 dma_mask) |
@@ -284,18 +283,13 @@ void cxl_pci_vphb_remove(struct cxl_afu *afu) | |||
284 | */ | 283 | */ |
285 | } | 284 | } |
286 | 285 | ||
287 | static bool _cxl_pci_is_vphb_device(struct pci_controller *phb) | ||
288 | { | ||
289 | return (phb->ops == &cxl_pcie_pci_ops); | ||
290 | } | ||
291 | |||
292 | bool cxl_pci_is_vphb_device(struct pci_dev *dev) | 286 | bool cxl_pci_is_vphb_device(struct pci_dev *dev) |
293 | { | 287 | { |
294 | struct pci_controller *phb; | 288 | struct pci_controller *phb; |
295 | 289 | ||
296 | phb = pci_bus_to_host(dev->bus); | 290 | phb = pci_bus_to_host(dev->bus); |
297 | 291 | ||
298 | return _cxl_pci_is_vphb_device(phb); | 292 | return (phb->ops == &cxl_pcie_pci_ops); |
299 | } | 293 | } |
300 | 294 | ||
301 | struct cxl_afu *cxl_pci_to_afu(struct pci_dev *dev) | 295 | struct cxl_afu *cxl_pci_to_afu(struct pci_dev *dev) |
@@ -304,13 +298,7 @@ struct cxl_afu *cxl_pci_to_afu(struct pci_dev *dev) | |||
304 | 298 | ||
305 | phb = pci_bus_to_host(dev->bus); | 299 | phb = pci_bus_to_host(dev->bus); |
306 | 300 | ||
307 | if (_cxl_pci_is_vphb_device(phb)) | 301 | return (struct cxl_afu *)phb->private_data; |
308 | return (struct cxl_afu *)phb->private_data; | ||
309 | |||
310 | if (pnv_pci_on_cxl_phb(dev)) | ||
311 | return pnv_cxl_phb_to_afu(phb); | ||
312 | |||
313 | return ERR_PTR(-ENODEV); | ||
314 | } | 302 | } |
315 | EXPORT_SYMBOL_GPL(cxl_pci_to_afu); | 303 | EXPORT_SYMBOL_GPL(cxl_pci_to_afu); |
316 | 304 | ||